1. 24 Jan, 2012 40 commits
    • ggaren@apple.com's avatar
      JSValue::toString() should return a JSString* instead of a UString · 64be5e90
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=76861
      
      ../JavaScriptCore: 
      
      Reviewed by Gavin Barraclough.
              
      This makes the common case -- toString() on a string -- faster and
      inline-able. (Not a measureable speedup, but we can now remove a bunch
      of duplicate hand-rolled code for this optimization.)
              
      This also clarifies the boundary between "C++ strings" and "JS strings".
              
      In all cases other than true, false, null, undefined, and multi-digit
      numbers, the JS runtime was just retrieving a UString from a JSString,
      so returning a JSString* is strictly better. In the other cases, we can
      optimize to avoid creating a new JSString if we care to, but it doesn't
      seem to be a big deal.
      
      * JavaScriptCore.exp: Export!
              
      * jsc.cpp:
      (functionPrint):
      (functionDebug):
      (functionRun):
      (functionLoad):
      (functionCheckSyntax):
      (runWithScripts):
      (runInteractive):
      * API/JSValueRef.cpp:
      (JSValueToStringCopy):
      * bytecode/CodeBlock.cpp:
      (JSC::valueToSourceString): Call value() after calling toString(), to
      convert from "JS string" (JSString*) to "C++ string" (UString), since
      toString() no longer returns a "C++ string".
      
      * dfg/DFGOperations.cpp:
      (JSC::DFG::operationValueAddNotNumber):
      * jit/JITStubs.cpp:
      (op_add): Updated for removal of toPrimitiveString():
      all '+' operands can use toString(), except for object operands, which
      need to take a slow path to call toPrimitive().
      
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncToString):
      (JSC::arrayProtoFuncToLocaleString):
      (JSC::arrayProtoFuncJoin):
      (JSC::arrayProtoFuncPush):
      * runtime/CommonSlowPaths.h:
      (JSC::CommonSlowPaths::opIn):
      * runtime/DateConstructor.cpp:
      (JSC::dateParse):
      * runtime/DatePrototype.cpp:
      (JSC::formatLocaleDate): Call value() after calling toString(), as above.
      
      * runtime/ErrorInstance.h:
      (JSC::ErrorInstance::create): Simplified down to one canonical create()
      function, to make string handling easier.
      
      * runtime/ErrorPrototype.cpp:
      (JSC::errorProtoFuncToString):
      * runtime/ExceptionHelpers.cpp:
      (JSC::createInvalidParamError):
      (JSC::createNotAConstructorError):
      (JSC::createNotAFunctionError):
      (JSC::createNotAnObjectError):
      * runtime/FunctionConstructor.cpp:
      (JSC::constructFunctionSkippingEvalEnabledCheck):
      * runtime/FunctionPrototype.cpp:
      (JSC::functionProtoFuncBind):
      * runtime/JSArray.cpp:
      (JSC::JSArray::sort): Call value() after calling toString(), as above.
      
      * runtime/JSCell.cpp:
      * runtime/JSCell.h: Removed JSCell::toString() because JSValue does this
      job now. Doing it in JSCell is slower (requires extra type checking), and
      creates the misimpression that language-defined toString() behavior is
      an implementation detail of JSCell.
              
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::encode):
      (JSC::decode):
      (JSC::globalFuncEval):
      (JSC::globalFuncParseInt):
      (JSC::globalFuncParseFloat):
      (JSC::globalFuncEscape):
      (JSC::globalFuncUnescape): Call value() after calling toString(), as above.
      
      * runtime/JSONObject.cpp:
      (JSC::unwrapBoxedPrimitive):
      (JSC::Stringifier::Stringifier):
      (JSC::JSONProtoFuncParse): Removed some manual optimization that toString()
      takes care of.
      
      * runtime/JSObject.cpp:
      (JSC::JSObject::toString):
      * runtime/JSObject.h: Updated to return JSString*.
      
      * runtime/JSString.cpp:
      * runtime/JSString.h:
      (JSC::JSValue::toString): Removed, since I removed JSCell::toString().
      
      * runtime/JSValue.cpp:
      (JSC::JSValue::toStringSlowCase): Removed toPrimitiveString(), and re-
      spawned toStringSlowCase() from its zombie corpse, since toPrimitiveString()
      basically did what we want all the time. (Note that the toPrimitive()
      preference changes from NoPreference to PreferString, because that's
      how ToString is defined in the language. op_add does not want this behavior.)
      
      * runtime/NumberPrototype.cpp:
      (JSC::numberProtoFuncToString):
      (JSC::numberProtoFuncToLocaleString): A little simpler, now that toString()
      returns a JSString*.
      
      * runtime/ObjectConstructor.cpp:
      (JSC::objectConstructorGetOwnPropertyDescriptor):
      (JSC::objectConstructorDefineProperty):
      * runtime/ObjectPrototype.cpp:
      (JSC::objectProtoFuncHasOwnProperty):
      (JSC::objectProtoFuncDefineGetter):
      (JSC::objectProtoFuncDefineSetter):
      (JSC::objectProtoFuncLookupGetter):
      (JSC::objectProtoFuncLookupSetter):
      (JSC::objectProtoFuncPropertyIsEnumerable): More calls to value(), as above.
      
      * runtime/Operations.cpp:
      (JSC::jsAddSlowCase): Need to check for object before taking the toString()
      fast path becuase adding an object to a string requires calling toPrimitive()
      on the object, not toString(). (They differ in their preferred conversion
      type.)
      
      * runtime/Operations.h:
      (JSC::jsString):
      (JSC::jsStringFromArguments): This code gets simpler, now that toString()
      does the right thing.
      
      (JSC::jsAdd): Now checks for object, just like jsAddSlowCase().
      
      * runtime/RegExpConstructor.cpp:
      (JSC::setRegExpConstructorInput):
      (JSC::constructRegExp):
      * runtime/RegExpObject.cpp:
      (JSC::RegExpObject::match):
      * runtime/RegExpPrototype.cpp:
      (JSC::regExpProtoFuncCompile):
      (JSC::regExpProtoFuncToString): More calls to value(), as above.
      
      * runtime/StringConstructor.cpp:
      (JSC::constructWithStringConstructor):
      (JSC::callStringConstructor): This code gets simpler, now that toString()
      does the right thing.
      
      * runtime/StringPrototype.cpp:
      (JSC::replaceUsingRegExpSearch):
      (JSC::replaceUsingStringSearch):
      (JSC::stringProtoFuncReplace):
      (JSC::stringProtoFuncCharAt):
      (JSC::stringProtoFuncCharCodeAt):
      (JSC::stringProtoFuncConcat):
      (JSC::stringProtoFuncIndexOf):
      (JSC::stringProtoFuncLastIndexOf):
      (JSC::stringProtoFuncMatch):
      (JSC::stringProtoFuncSearch):
      (JSC::stringProtoFuncSlice):
      (JSC::stringProtoFuncSplit):
      (JSC::stringProtoFuncSubstr):
      (JSC::stringProtoFuncSubstring):
      (JSC::stringProtoFuncToLowerCase):
      (JSC::stringProtoFuncToUpperCase):
      (JSC::stringProtoFuncLocaleCompare):
      (JSC::stringProtoFuncBig):
      (JSC::stringProtoFuncSmall):
      (JSC::stringProtoFuncBlink):
      (JSC::stringProtoFuncBold):
      (JSC::stringProtoFuncFixed):
      (JSC::stringProtoFuncItalics):
      (JSC::stringProtoFuncStrike):
      (JSC::stringProtoFuncSub):
      (JSC::stringProtoFuncSup):
      (JSC::stringProtoFuncFontcolor):
      (JSC::stringProtoFuncFontsize):
      (JSC::stringProtoFuncAnchor):
      (JSC::stringProtoFuncLink):
      (JSC::trimString): Some of this code gets simpler, now that toString()
      does the right thing. More calls to value(), as above.
      
      ../JavaScriptGlue: 
      
      Reviewed by Gavin Barraclough.
      
      * JSUtils.cpp:
      (KJSValueToCFTypeInternal):
      
      ../WebCore: 
      
      Reviewed by Gavin Barraclough.
      
      Mechanical changes to call value() after calling toString(), to
      convert from "JS string" (JSString*) to "C++ string" (UString), since
      toString() no longer returns a "C++ string".
      
      * bindings/js/IDBBindingUtilities.cpp:
      (WebCore::createIDBKeyFromValue):
      * bindings/js/JSCSSStyleDeclarationCustom.cpp:
      (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
      * bindings/js/JSClipboardCustom.cpp:
      (WebCore::JSClipboard::clearData):
      (WebCore::JSClipboard::getData):
      * bindings/js/JSCustomXPathNSResolver.cpp:
      (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::valueToStringWithNullCheck):
      (WebCore::valueToStringWithUndefinedOrNullCheck):
      (WebCore::reportException):
      * bindings/js/JSDOMFormDataCustom.cpp:
      (WebCore::JSDOMFormData::append):
      * bindings/js/JSDOMStringMapCustom.cpp:
      (WebCore::JSDOMStringMap::putDelegate):
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::setLocation):
      (WebCore::JSDOMWindow::open):
      (WebCore::JSDOMWindow::addEventListener):
      (WebCore::JSDOMWindow::removeEventListener):
      * bindings/js/JSDeviceMotionEventCustom.cpp:
      (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
      * bindings/js/JSDeviceOrientationEventCustom.cpp:
      (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
      * bindings/js/JSDictionary.cpp:
      (WebCore::JSDictionary::convertValue):
      * bindings/js/JSDocumentCustom.cpp:
      (WebCore::JSDocument::setLocation):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/JSHTMLAllCollectionCustom.cpp:
      (WebCore::callHTMLAllCollection):
      (WebCore::JSHTMLAllCollection::item):
      (WebCore::JSHTMLAllCollection::namedItem):
      * bindings/js/JSHTMLCanvasElementCustom.cpp:
      (WebCore::JSHTMLCanvasElement::getContext):
      * bindings/js/JSHTMLCollectionCustom.cpp:
      (WebCore::JSHTMLCollection::item):
      (WebCore::JSHTMLCollection::namedItem):
      * bindings/js/JSHTMLDocumentCustom.cpp:
      (WebCore::documentWrite):
      * bindings/js/JSHTMLInputElementCustom.cpp:
      (WebCore::JSHTMLInputElement::setSelectionDirection):
      (WebCore::JSHTMLInputElement::setSelectionRange):
      * bindings/js/JSInspectorFrontendHostCustom.cpp:
      (WebCore::JSInspectorFrontendHost::showContextMenu):
      * bindings/js/JSJavaScriptCallFrameCustom.cpp:
      (WebCore::JSJavaScriptCallFrame::evaluate):
      * bindings/js/JSLocationCustom.cpp:
      (WebCore::JSLocation::setHref):
      (WebCore::JSLocation::setProtocol):
      (WebCore::JSLocation::setHost):
      (WebCore::JSLocation::setHostname):
      (WebCore::JSLocation::setPort):
      (WebCore::JSLocation::setPathname):
      (WebCore::JSLocation::setSearch):
      (WebCore::JSLocation::setHash):
      (WebCore::JSLocation::replace):
      (WebCore::JSLocation::assign):
      * bindings/js/JSMessageEventCustom.cpp:
      (WebCore::handleInitMessageEvent):
      * bindings/js/JSSQLTransactionCustom.cpp:
      (WebCore::JSSQLTransaction::executeSql):
      * bindings/js/JSSQLTransactionSyncCustom.cpp:
      (WebCore::JSSQLTransactionSync::executeSql):
      * bindings/js/JSSharedWorkerCustom.cpp:
      (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
      * bindings/js/JSStorageCustom.cpp:
      (WebCore::JSStorage::putDelegate):
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      (WebCore::JSWebGLRenderingContext::getExtension):
      * bindings/js/JSWebSocketCustom.cpp:
      (WebCore::JSWebSocketConstructor::constructJSWebSocket):
      (WebCore::JSWebSocket::send):
      (WebCore::JSWebSocket::close):
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::importScripts):
      * bindings/js/JSWorkerCustom.cpp:
      (WebCore::JSWorkerConstructor::constructJSWorker):
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::open):
      (WebCore::JSXMLHttpRequest::send):
      * bindings/js/JSXSLTProcessorCustom.cpp:
      (WebCore::JSXSLTProcessor::setParameter):
      (WebCore::JSXSLTProcessor::getParameter):
      (WebCore::JSXSLTProcessor::removeParameter):
      * bindings/js/ScheduledAction.cpp:
      (WebCore::ScheduledAction::create):
      * bindings/js/ScriptEventListener.cpp:
      (WebCore::eventListenerHandlerBody):
      * bindings/js/ScriptValue.cpp:
      (WebCore::ScriptValue::toString):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateEventListenerCall):
      (JSValueToNative):
      (GenerateConstructorDefinition):
      * bridge/c/c_utility.cpp:
      (JSC::Bindings::convertValueToNPVariant):
      * bridge/jni/jni_jsobject.mm:
      (JavaJSObject::convertValueToJObject):
      * bridge/jni/jsc/JNIUtilityPrivate.cpp:
      (JSC::Bindings::convertArrayInstanceToJavaArray):
      (JSC::Bindings::convertValueToJValue):
      * bridge/jni/jsc/JavaFieldJSC.cpp:
      (JavaField::dispatchValueFromInstance):
      (JavaField::valueFromInstance):
      (JavaField::dispatchSetValueToInstance):
      (JavaField::setValueToInstance):
      * bridge/jni/jsc/JavaInstanceJSC.cpp:
      (JavaInstance::invokeMethod):
      * testing/js/JSInternalsCustom.cpp:
      (WebCore::JSInternals::setUserPreferredLanguages):
      
      ../WebKit/mac: 
      
      Reviewed by Gavin Barraclough.
      
      Mechanical changes to call value() after calling toString(), to
      convert from "JS string" (JSString*) to "C++ string" (UString), since
      toString() no longer returns a "C++ string".
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::addValueToArray):
      * WebView/WebFrame.mm:
      (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
      (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
      
      ../WebKit2: 
      
      Reviewed by Gavin Barraclough.
      
      Mechanical changes to call value() after calling toString(), to
      convert from "JS string" (JSString*) to "C++ string" (UString), since
      toString() no longer returns a "C++ string".
      
      * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
      (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64be5e90
    • haraken@chromium.org's avatar
      In CodeGeneratorObjC.pm, overwrite the output .h/.mm · 8675fa83
      haraken@chromium.org authored
      only if the bytes differ
      https://bugs.webkit.org/show_bug.cgi?id=76874
      
      Reviewed by Adam Barth.
      
      This is one of steps to stop rebuilding .h/.cpp/.mm files
      generated by unchanged IDLs (bug 76836).
      This patch makes a change on CodeGeneratorObjC.pm so that
      it overwrites the output .h/.mm only if the bytes differ.
      
      No tests. No change in behavior.
      I manually confirmed that when I add a new attribute to Element.idl,
      the time-stamps of unrelated DOM*.h and DOM*.mm do not change.
      
      * bindings/scripts/CodeGenerator.pm:
      (UpdateFileIfChanged): Added. This method writes data to a file
      only if the data is different from the data in the current file.
      * bindings/scripts/CodeGeneratorObjC.pm:
      (WriteData): Used UpdateFileIfChanged().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8675fa83
    • commit-queue@webkit.org's avatar
      Unreviewed. Rolled DEPS. · a5e058b5
      commit-queue@webkit.org authored
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-01-23
      
      * DEPS:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5e058b5
    • ap@apple.com's avatar
      REGRESSION: Downloaded file name fallback encodings are not set correctly · 58267196
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=76862
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Tests: http/tests/download/default-encoding.html
             http/tests/download/form-submission-result.html
             http/tests/download/inherited-encoding.html
             http/tests/download/literal-utf-8.html
      
      * loader/DocumentWriter.cpp:
      * loader/DocumentWriter.h:
      Removed deprecatedFrameEncoding. Due to changes in Document::encoding behavior, it can now
      be used in its place.
      
      * loader/FrameLoader.cpp: (WebCore::FrameLoader::addExtraFieldsToRequest): Instead of hunting
      down a correct loader (and active one is not always correct any more), just use opening document's
      encoding.
      
      LayoutTests:
      
      * http/tests/download/default-encoding-expected.txt: Added.
      * http/tests/download/default-encoding.html: Added.
      * http/tests/download/inherited-encoding-expected.txt: Added.
      * http/tests/download/inherited-encoding.html: Added.
      * http/tests/download/literal-utf-8-expected.txt: Added.
      * http/tests/download/literal-utf-8.html: Added.
      * http/tests/download/resources/literal-koi8-r.php: Added.
      * http/tests/download/resources/literal-utf-8.php: Added.
      * http/tests/download/inherited-encoding-form-submission-result-expected.txt: Added.
      * http/tests/download/inherited-encoding-form-submission-result.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58267196
    • ojan@chromium.org's avatar
      Implement flex-pack:distribute · a625ad3a
      ojan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76864
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      See http://dev.w3.org/csswg/css3-flexbox/#flex-pack.
      
      * css/CSSParser.cpp:
      (WebCore::CSSParser::parseValue):
      * css/CSSPrimitiveValueMappings.h:
      (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
      (WebCore::CSSPrimitiveValue::operator EFlexPack):
      * css/CSSValueKeywords.in:
      * rendering/RenderFlexibleBox.cpp:
      (WebCore::initialPackingOffset):
      (WebCore::packingSpaceBetweenChildren):
      (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
      (WebCore::RenderFlexibleBox::layoutColumnReverse):
      * rendering/style/RenderStyleConstants.h:
      * rendering/style/StyleFlexibleBoxData.h:
      
      LayoutTests:
      
      * css3/flexbox/004-expected.txt:
      * css3/flexbox/004.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a625ad3a
    • macpherson@chromium.org's avatar
      Implement CSS clip property in CSSStyleApplyProperty. · 02ec7bc8
      macpherson@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=74913
      
      Reviewed by Andreas Kling.
      
      No new tests / refactoring only.
      
      * css/CSSPrimitiveValue.h:
      * css/CSSPrimitiveValueMappings.h:
      (WebCore::CSSPrimitiveValue::convertToLength):
      This new function aims to provide a single call for converting many CSSPrimitiveValue
      values to Lengths. It is templated to allow the caller to specify which conversions
      are appropriate depending on the context in which the value is used.
      * css/CSSStyleApplyProperty.cpp:
      (WebCore::ApplyPropertyClip::convertToLength):
      (WebCore::ApplyPropertyClip::applyInheritValue):
      (WebCore::ApplyPropertyClip::applyInitialValue):
      (WebCore::ApplyPropertyClip::applyValue):
      (WebCore::ApplyPropertyClip::createHandler):
      (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::applyProperty):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      02ec7bc8
    • tsepez@chromium.org's avatar
      decodeEscapeSequences() not correct for some encodings (GBK, Big5, ...). · 0fff87c0
      tsepez@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=71316
      
      Reviewed by Daniel Bates.
      
      Source/WebCore:
      
      Pass trailing unescaped bytes into the character set decoder to get correct
      results in the presence of encodings which re-use ASCII values in sequences.
      
      Tests: http/tests/navigation/anchor-frames-gbk.html
             http/tests/security/xssAuditor/iframe-onload-GBK-char.html
             http/tests/security/xssAuditor/img-onerror-GBK-char.html
             http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode-16bit-unicode.html
             http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode.html
             http/tests/security/xssAuditor/script-tag-Big5-char.html
             http/tests/security/xssAuditor/script-tag-Big5-char2.html
      
      * platform/text/DecodeEscapeSequences.h:
      (WebCore::Unicode16BitEscapeSequence::findInString):
      (WebCore::Unicode16BitEscapeSequence::findEndOfRun):
      (WebCore::Unicode16BitEscapeSequence::decodeRun):
      (WebCore::URLEscapeSequence::findInString):
      (WebCore::URLEscapeSequence::findEndOfRun):
      (WebCore::URLEscapeSequence::decodeRun):
      (WebCore::decodeEscapeSequences):
      
      LayoutTests:
      
      * http/tests/navigation/anchor-frames-gbk-expected.txt: Added.
      * http/tests/navigation/anchor-frames-gbk.html: Added.
      * http/tests/navigation/resources/frame-with-anchor-gbk.html: Added.
      * http/tests/security/xssAuditor/iframe-onload-GBK-char-expected.txt: Added.
      * http/tests/security/xssAuditor/iframe-onload-GBK-char.html: Added.
      * http/tests/security/xssAuditor/img-onerror-GBK-char-expected.txt: Added.
      * http/tests/security/xssAuditor/img-onerror-GBK-char.html: Added.
      * http/tests/security/xssAuditor/resources/echo-intertag-decode-16bit-unicode.pl:
      * http/tests/security/xssAuditor/script-tag-Big5-char-expected.txt: Added.
      * http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode-16bit-unicode-expected.txt: Added.
      * http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode-16bit-unicode.html: Added.
      * http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode-expected.txt: Added.
      * http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode.html: Added.
      * http/tests/security/xssAuditor/script-tag-Big5-char.html: Added.
      * http/tests/security/xssAuditor/script-tag-Big5-char2-expected.txt: Added.
      * http/tests/security/xssAuditor/script-tag-Big5-char2.html: Added.
      * platform/chromium/test_expectations.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0fff87c0
    • abarth@webkit.org's avatar
      Fix a build break in a clean compile of the Chromium port (at least · 129ec5f5
      abarth@webkit.org authored
      reported by tbreisacher).
      
      * css/CSSStyleDeclaration.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      129ec5f5
    • commit-queue@webkit.org's avatar
      [Qt][WK2] QQuickWebView is initializing touch mode twice while being constructed · 0db629da
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76859
      
      Patch by Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> on 2012-01-23
      Reviewed by Kenneth Rohde Christiansen.
      
      Removing d->initializeTouch() from QQuickWebView::QQuickWebView()
      since in QQuickWebViewPrivate::initialize() there is a call for
      setUseTraditionalDesktopBehaviour(false), which will call initializeTouch.
      
      * UIProcess/API/qt/qquickwebview.cpp:
      (QQuickWebView::QQuickWebView):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0db629da
    • mrobinson@webkit.org's avatar
      [GTK][WK2] Make the LoadTracking and WebView test fixtures more flexible · 61fac4c6
      mrobinson@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76755
      
      Reviewed by Alejandro G. Castro.
      
      Always clear the loading events when loading new content in the load tracking
      test. In the WebView test correctly handle loading HTML with a URL that isn't
      "about:blank."
      
      * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
      (LoadTrackingTest::loadURI): Reset the class state when starting a new load.
      (LoadTrackingTest::loadHtml): Ditto.
      (LoadTrackingTest::loadPlainText): Ditto.
      (LoadTrackingTest::loadRequest): Ditto.
      * UIProcess/API/gtk/tests/LoadTrackingTest.h: Added new method definitions.
      * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
      (assertNormalLoadHappened): No longer clear loading events. The fixture handles that now.
      (testLoadHtml): Update to reflect new method name.
      (testLoadPlainText): Ditto.
      (testLoadRequest): Ditto.
      (testWebViewReload): Ditto.
      * UIProcess/API/gtk/tests/WebViewTest.cpp:
      (WebViewTest::loadHtml): Properly interpret the baseURL parameter.
      * UIProcess/API/gtk/tests/WebViewTest.h: Make loading methods virtual.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      61fac4c6
    • tsepez@chromium.org's avatar
      [chromium] Clean up old WebSharedWorker::startWorkerContext() method. · 78f5eb75
      tsepez@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76853
      
      Reviewed by Darin Fisher.
      
      * public/WebSharedWorker.h:
      * src/WebSharedWorkerImpl.cpp:
      * src/WebSharedWorkerImpl.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      78f5eb75
    • commit-queue@webkit.org's avatar
      [GTK] editing/deleting/5408255.html results are incorrect · ad16b0f9
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=53644
      
      Patch by Zan Dobersek <zandobersek@gmail.com> on 2012-01-23
      Reviewed by Martin Robinson.
      
      Source/WebCore:
      
      When the WEBKIT_TOP_LEVEL environment variable is set, resources
      should be loaded from the source tree to which the variable is
      pointing. This approach is used when performing testing on the
      Gtk port.
      
      No new tests, changes cause one test to pass.
      
      * platform/graphics/gtk/ImageGtk.cpp:
      (getPathToImageResource): Also make changes to the resource path
      construction code on Windows.
      (WebCore::Image::loadPlatformResource):
      
      Tools:
      
      WEBKIT_TOP_LEVEL environment variable is now set directly in either
      WebKitTestRunner or DumpRenderTree through usage of a compilation-time
      macro. This way both tools can be run outside the test harness without
      the need to manually set the environment variable.
      
      * DumpRenderTree/gtk/DumpRenderTree.cpp:
      (getTopLevelPath):
      * GNUmakefile.am:
      * Scripts/webkitpy/layout_tests/port/gtk.py:
      (GtkPort.setup_environ_for_server):
      * WebKitTestRunner/GNUmakefile.am:
      * WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp:
      (WTR::InjectedBundle::platformInitialize):
      
      LayoutTests:
      
      Unskip newly-passing editing test.
      
      * platform/gtk/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad16b0f9
    • jchaffraix@webkit.org's avatar
      Crash in WebCore::RenderTableSection::rowLogicalHeightChanged · dd34df48
      jchaffraix@webkit.org authored
      https://webkit.org/b/76842
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      Test: fast/table/crash-section-logical-height-changed-needsCellRecalc.html
      
      The issue was that we would access our section's structure when it was dirty.
      
      * rendering/RenderTableSection.cpp:
      (WebCore::RenderTableSection::rowLogicalHeightChanged):
      Bail out if we need cells recalculation as our internal structure is not up-to-date
      and we will recompute all the rows' heights as part of the recomputation anyway.
      
      LayoutTests:
      
      * fast/table/crash-section-logical-height-changed-needsCellRecalc-expected.txt: Added.
      * fast/table/crash-section-logical-height-changed-needsCellRecalc.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dd34df48
    • dslomov@google.com's avatar
      Source/WebKit/chromium: [Chromium] Implement layoutTestController.workerThreadCount in DRT · 23359ecd
      dslomov@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=74653.
      Expose WebCore::WorkerThread::workerThreadCount() in API layer
      for DumpRenderTree.
      
      Reviewed by Darin Fisher.
      
      * WebKit.gyp:
      * public/WebWorkerInfo.h: Copied from Source/WebKit/chromium/public/WebCommonWorkerClient.h.
      * src/WebWorkerInfo.cpp: Copied from Source/WebKit/chromium/public/WebCommonWorkerClient.h.
      (WebKit::WebWorkerInfo::dedicatedWorkerCount):
      
      Tools: [Chromium] Implement layoutTestController.workerThreadCount in DRT
      https://bugs.webkit.org/show_bug.cgi?id=74653.
      
      Reviewed by Darin Fisher.
      
      * DumpRenderTree/chromium/LayoutTestController.cpp:
      (LayoutTestController::LayoutTestController):
      (LayoutTestController::workerThreadCount):
      * DumpRenderTree/chromium/LayoutTestController.h:
      
      LayoutTests: [Chromium] Implement layoutTestController.workerThreadCount in DRT
      https://bugs.webkit.org/show_bug.cgi?id=74653.
      
      Reviewed by Darin Fisher.
      
      * platform/chromium/test_expectations.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      23359ecd
    • haraken@chromium.org's avatar
      [Refactoring] Make finish() of CodeGeneratorJS.pm empty · 60c08ab4
      haraken@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76846
      
      Reviewed by Adam Barth.
      
      This is one of steps to stop rebuilding .h/.cpp files generated
      by unchanged IDLs (bug 76836).
      
      As a refactoring, we are planning to remove finish() from all
      CodeGenerators. In this bug, we make finish() of CodeGeneratorJS.pm
      empty.
      
      No new tests. No change in behavior.
      
      * bindings/scripts/CodeGeneratorJS.pm:
      (finish): Made it empty. We will remove finish() after
      making finish() of all CodeGenerators empty.
      (GenerateInterface): Modified to call WriteData().
      (WriteData): Simple code refactoring.
      Removed if(defined $IMPL).
      Removed if(defined $HEADER).
      Removed if(defined $DEPS).
      $IMPL -> IMPL.
      $HEADER -> HEADER.
      $DEPS -> DEPS.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      60c08ab4
    • macpherson@chromium.org's avatar
      Unreviewed, rolling out r105676. · e3d31e06
      macpherson@chromium.org authored
      http://trac.webkit.org/changeset/105676
      https://bugs.webkit.org/show_bug.cgi?id=76665
      
      Breaks build on max due to compile warnings.
      
      * runtime/JSObject.cpp:
      (JSC::JSObject::finalize):
      (JSC::JSObject::visitChildren):
      (JSC::JSObject::allocatePropertyStorage):
      * runtime/JSObject.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3d31e06
    • commit-queue@webkit.org's avatar
      Fine tune Web Intents Chromium API · cc75f55e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76754
      
      Patch by Greg Billock <gbillock@google.com> on 2012-01-23
      Reviewed by Darin Fisher.
      
      * public/WebIntent.h:
      * public/WebIntentServiceInfo.h:
      * src/WebIntent.cpp:
      * src/WebIntentServiceInfo.cpp:
      (WebKit::WebIntentServiceInfo::WebIntentServiceInfo):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc75f55e
    • shawnsingh@chromium.org's avatar
      [chromium] updateRect is incorrect when contentBounds != bounds · 24b7c203
      shawnsingh@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=72919
      
      Reviewed by James Robinson.
      
      Source/WebCore:
      
      Unit test added to TiledLayerChromiumTest.cpp
      
      The m_updateRect member in LayerChromium types is used to track
      what was painted for that layer. For tiled layers (especially
      image layers), the updateRect was being given with respect to the
      size of the content, rather than the size of the layer. This patch
      adds a conversion so that updateRect is always with respect to the
      layer size, so that damage tracking will work correctly in those
      cases.
      
      * platform/graphics/chromium/LayerChromium.h:
      * platform/graphics/chromium/TiledLayerChromium.cpp:
      (WebCore::TiledLayerChromium::updateCompositorResources):
      
      Source/WebKit/chromium:
      
      * tests/TiledLayerChromiumTest.cpp:
      (WTF::FakeTiledLayerWithScaledBounds::FakeTiledLayerWithScaledBounds):
      (WTF::FakeTiledLayerWithScaledBounds::setContentBounds):
      (WTF::FakeTiledLayerWithScaledBounds::contentBounds):
      (WTF::FakeTiledLayerWithScaledBounds::updateRect):
      (WTF::TEST):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24b7c203
    • commit-queue@webkit.org's avatar
      Web Inspector: Make "Copy as HTML" use the same copy functions as other copy methods. · 2acc73bd
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76706
      
      Patch by Konrad Piascik <kpiascik@rim.com> on 2012-01-23
      Reviewed by Pavel Feldman.
      
      Changed DOMAgent.copyNode to call getOuterHTML and use the callback function to
      return the text to InspectorFrontendHost.copyText.  This will make all copy
      functions use the same code path.
      
      Not testable.
      
      * inspector/Inspector.json:
      * inspector/InspectorDOMAgent.cpp:
      * inspector/InspectorDOMAgent.h:
      * inspector/front-end/DOMAgent.js:
      (WebInspector.DOMNode.prototype.copyNode.copy):
      (WebInspector.DOMNode.prototype.copyNode):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2acc73bd
    • macpherson@chromium.org's avatar
      Make zoom multiplier float instead of double to match... · 6f00b60a
      macpherson@chromium.org authored
      Make zoom multiplier float instead of double to match RenderStyle::effectiveZoom etc. and thus avoid unnecessary precision conversions.
      https://bugs.webkit.org/show_bug.cgi?id=69490
      
      Reviewed by Andreas Kling.
      
      Covered by existing tests.
      
      * css/CSSPrimitiveValue.cpp:
      (WebCore::CSSPrimitiveValue::computeLength):
      Use float multiplier instead of double.
      (WebCore::CSSPrimitiveValue::computeLengthDouble):
      Use float multiplier instead of double.
      * css/CSSPrimitiveValue.h:
      Change type signatures of computeLength template prototype.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6f00b60a
    • mhahnenberg@apple.com's avatar
      Use copying collector for out-of-line JSObject property storage · 4108deff
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=76665
      
      Reviewed by Geoffrey Garen.
      
      * runtime/JSObject.cpp:
      (JSC::JSObject::visitChildren): Changed to use copyAndAppend whenever the property storage is out-of-line.
      (JSC::JSObject::allocatePropertyStorage): Changed to use tryAllocateStorage/tryReallocateStorage as opposed to 
      operator new.
      * runtime/JSObject.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4108deff
    • toyoshim@chromium.org's avatar
      [Chromium][WebSocket] Remove binary communication using WebData in WebKit API · 2f3c7a92
      toyoshim@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76608
      
      Reviewed by Darin Fisher.
      
      * public/WebSocket.h: Remove BinaryTypeData definition and sendBinary(const WebData&).
      * public/WebSocketClient.h: Remove didReceiveBinaryData(const WebData&).
      * src/WebSocketImpl.cpp: Remove WebData related code and set default binary type as BinaryTypeBlob.
      (WebKit::WebSocketImpl::WebSocketImpl): Remove sendBinary(const WebData&).
      (WebKit::WebSocketImpl::didReceiveBinaryData): Remove WebData supporting code.
      * src/WebSocketImpl.h: Remove sendBinary(const WebData&).
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2f3c7a92
    • dpranke@chromium.org's avatar
      nrwt: make --chromium work like --qt · d9061f86
      dpranke@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76875
      
      Reviewed by Adam Barth.
      
      --chromium used to have to be handled differently from --qt
      due to the way the PortFactory was implemented; there's not
      really a good reason for that any more so this patch makes
      things slightly more consistent and eliminates the
      options.chromium flag (--chromium is now truly a synonym for
      --platform chromium).
      
      * Scripts/webkitpy/layout_tests/port/factory.py:
      (PortFactory._default_port):
      (PortFactory.get):
      * Scripts/webkitpy/layout_tests/port/factory_unittest.py:
      (FactoryTest.setUp):
      (FactoryTest.test_chromium_mac):
      (FactoryTest.test_chromium_linux):
      (FactoryTest.test_chromium_win):
      * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
      (parse_args):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9061f86
    • dpranke@chromium.org's avatar
      run-webkit-tests needs to propagate --chromium · 13bb4476
      dpranke@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76870
      
      Reviewed by Eric Seidel.
      
      run-webkit-tests removes '--chromium' argument from @ARGV when
      determining which port to run, which means that that doesn't
      propagate to new-run-webkit-tests. That's bad (and is handled
      for the other ports by re-adding the flag, but apparently we're
      just now noticing for Chromium).
      
      * Scripts/run-webkit-tests:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13bb4476
    • eae@chromium.org's avatar
      Unreviewed test expectations fixes for a couple of window/frame tests. · f37684e3
      eae@chromium.org authored
      * http/tests/security/cross-frame-access-put-expected.txt:
      Updated expectations to reflect that window.frameElement now has the type
      HTMLIFrameElement. The test itself has already been updated.
      
      * platform/mac/fast/dom/Window/window-properties-expected.txt:
      Added window.applicationCache.abort method.
      
      * platform/mac/fast/dom/prototype-inheritance-2-expected.txt:
      Added DOMURL class.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f37684e3
    • commit-queue@webkit.org's avatar
      [GTK][PATCH] More build silencing with (AM_V_...) · 4d65fba2
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76791
      
      Patch by Priit Laes <plaes@plaes.org> on 2012-01-23
      Reviewed by Gustavo Noronha Silva.
      
      * GNUmakefile.am: Silence is golden...
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4d65fba2
    • commit-queue@webkit.org's avatar
      [Qt] Implement SSL error handling QML API. · 628dca58
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76793
      
      Patch by Alexander Færøy <alexander.faeroy@nokia.com> on 2012-01-23
      Reviewed by Simon Hausmann.
      
      This patch implements support for accepting or rejecting invalid SSL
      certificates from the QML API.
      
      * UIProcess/API/qt/qquickwebview.cpp:
      (QQuickWebViewPrivate::QQuickWebViewPrivate):
      (QQuickWebViewPrivate::handleCertificateVerificationRequest):
      (QQuickWebViewExperimental::certificateVerificationDialog):
      (QQuickWebViewExperimental::setCertificateVerificationDialog):
      * UIProcess/API/qt/qquickwebview_p.h:
      * UIProcess/API/qt/qquickwebview_p_p.h:
      * UIProcess/PageClient.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::certificateVerificationRequest):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * UIProcess/qt/QtDialogRunner.cpp:
      (CertificateVerificationDialogContextObject::CertificateVerificationDialogContextObject):
      (CertificateVerificationDialogContextObject::hostname):
      (CertificateVerificationDialogContextObject::accept):
      (CertificateVerificationDialogContextObject::reject):
      (QtDialogRunner::initForCertificateVerification):
      * UIProcess/qt/QtDialogRunner.h:
      * UIProcess/qt/QtPageClient.cpp:
      (QtPageClient::handleCertificateVerificationRequest):
      * UIProcess/qt/QtPageClient.h:
      * WebProcess/qt/QtNetworkAccessManager.cpp:
      (WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
      (WebKit::QtNetworkAccessManager::onSslErrors):
      * WebProcess/qt/QtNetworkAccessManager.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      628dca58
    • bweinstein@apple.com's avatar
      More build fixing after r105646. · e88fc125
      bweinstein@apple.com authored
      Source/JavaScriptCore: 
      
      * JavaScriptCore.exp:
      
      Tools: 
      
      * TestWebKitAPI/Tests/WTF/RedBlackTree.cpp:
      (TestWebKitAPI::TestNode::key):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e88fc125
    • commit-queue@webkit.org's avatar
      MicroData: Remove ExceptionCode& from setAttribute() call. · 7feb9533
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76695
      
      Patch by Arko Saha <nghq36@motorola.com> on 2012-01-23
      Reviewed by Hajime Morita.
      
      Changeset http://trac.webkit.org/changeset/103296 removed unused
      ExceptionCode& argument from Element::setAttribute(QualifiedName).
      Hence updating all calls to setAttribute() method in MicroData code.
      
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::setItemValueText):
      * html/HTMLAreaElement.cpp:
      (WebCore::HTMLAreaElement::setItemValueText):
      * html/HTMLEmbedElement.cpp:
      (WebCore::HTMLEmbedElement::setItemValueText):
      * html/HTMLIFrameElement.cpp:
      (WebCore::HTMLIFrameElement::setItemValueText):
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::setItemValueText):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::setItemValueText):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::setItemValueText):
      * html/HTMLMetaElement.cpp:
      (WebCore::HTMLMetaElement::setItemValueText):
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::setItemValueText):
      * html/HTMLSourceElement.cpp:
      (WebCore::HTMLSourceElement::setItemValueText):
      * html/HTMLTrackElement.cpp:
      (WebCore::HTMLTrackElement::setItemValueText):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7feb9533
    • levin@chromium.org's avatar
      [windows] Convert usages of GetDC to HWndDC Part 2. · 691549bb
      levin@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76750
      
      Reviewed by Adam Roben.
      
      Source/WebKit/win:
      
      * FullscreenVideoController.cpp:
      (createCompatibleDCForWindow): Moved out the code which creates a DC for a window
      to keep the same scope for the DC lifetime.
      (FullscreenVideoController::draw):  Switch to using OwnPtr<HDC>
      since createCompatibleDCForWindow returns a PassOwnPtr.
      * WebNodeHighlight.cpp:
      (WebNodeHighlight::update):
        Cleaned up leaks from calling GetDC without release.
        Note that there is a potential leak of hdc that previously existed
        and still does in an early exit scenario. (This could be easily fixed
        by using OwnPtr<HDC> but I was trying to keep this patch focused.)
      * WebView.cpp:
      (WebView::scrollBackingStore): Typical conversion.
      (WebView::updateBackingStore): Reduced the scope of windowDC to be
      right where it is being used.
      (WebView::performLayeredWindowUpdate): Typical conversion.
      (WebView::paintIntoBackingStore): Ditto.
      
      Source/WebKit2:
      
      * Shared/win/ShareableBitmapWin.cpp:
      (WebKit::ShareableBitmap::windowsContext): Fix incorrect usage of OwnPtr<HDC> which
      would do a DeleteDC instead of a ReleaseDC.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      691549bb
    • barraclough@apple.com's avatar
      Unreviewed build fix - r105646 broke this. · d24c6be6
      barraclough@apple.com authored
      * TestWebKitAPI/Tests/WTF/RedBlackTree.cpp:
      (TestWebKitAPI::TestNode::TestNode):
      (TestWebKitAPI::TestNode::key):
      (TestWebKitAPI::RedBlackTreeTest::assertEqual):
      (TestWebKitAPI::RedBlackTreeTest::assertSameValuesForKey):
      (TestWebKitAPI::RedBlackTreeTest::testDriver):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d24c6be6
    • hayato@chromium.org's avatar
      Fix crash when a focused node is removed while in processing focusin event. · 0159d533
      hayato@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76656
      
      Reviewed by Dimitri Glazkov.
      
      Source/WebCore:
      
      Test: fast/events/focus-remove-focuesed-node.html
      
      * dom/Document.cpp:
      (WebCore::Document::setFocusedNode):
      
      LayoutTests:
      
      * fast/events/focus-remove-focuesed-node-expected.txt: Added.
      * fast/events/focus-remove-focuesed-node.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0159d533
    • scherkus@chromium.org's avatar
      Switch media/audio-data-url.html layout test to base64-encoded WAV data. · 52410747
      scherkus@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76759
      
      Reviewed by Eric Carlson.
      
      * media/audio-data-url-expected.txt:
      * media/audio-data-url.html:
      * platform/chromium/test_expectations.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      52410747
    • abarth@webkit.org's avatar
      Unreviewed, rolling out r105658. · a219d97d
      abarth@webkit.org authored
      http://trac.webkit.org/changeset/105658
      https://bugs.webkit.org/show_bug.cgi?id=76883
      
      We want this eventually, but not right at this moment
      (Requested by abarth on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-01-23
      
      * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a219d97d
    • jamesr@google.com's avatar
      [chromium] Add <(SHARED_INTERMEDIATE_DIR)/webkit to include path of targets... · 8c6bc93d
      jamesr@google.com authored
      [chromium] Add <(SHARED_INTERMEDIATE_DIR)/webkit to include path of targets that depend on WebKit API so they pick up the copied headers in an onion build
      https://bugs.webkit.org/show_bug.cgi?id=76879
      
      Reviewed by Dirk Pranke.
      
      * WebKit.gyp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8c6bc93d
    • levin@chromium.org's avatar
      [windows] Convert usages of GetDC to HWndDC Part 1. · 7ca31dfd
      levin@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76744
      
      Reviewed by Adam Roben.
      
      Source/WebCore:
      
      No new functionality so no new tests.
      
      * platform/graphics/win/FontCacheWin.cpp:
      (WebCore::FontCache::getFontDataForCharacters): Changed GetDC to HWndDC
      and removed ReleaseDC.
      (WebCore::createGDIFont): Ditto.
      (WebCore::FontCache::getTraitsInFamily): Ditto.
      * platform/graphics/win/FontPlatformDataWin.cpp:
      (WebCore::FontPlatformData::FontPlatformData): Ditto.
      * platform/graphics/win/SimpleFontDataCGWin.cpp:
      (WebCore::SimpleFontData::platformInit): Ditto.
      * platform/graphics/win/SimpleFontDataWin.cpp:
      (WebCore::SimpleFontData::initGDIFont): Ditto.
      (WebCore::SimpleFontData::containsCharacters): Ditto.
      (WebCore::SimpleFontData::determinePitch): Ditto.
      (WebCore::SimpleFontData::boundsForGDIGlyph): Ditto.
      (WebCore::SimpleFontData::widthForGDIGlyph): Ditto.
      (WebCore::SimpleFontData::scriptFontProperties): Ditto.
      * platform/win/CursorWin.cpp:
      (WebCore::createSharedCursor): Ditto.
      * platform/win/DragImageCGWin.cpp:
      (WebCore::scaleDragImage): Ditto.
      (WebCore::createDragImageFromImage): Ditto.
      * platform/win/DragImageWin.cpp:
      (WebCore::createDragImageForLink): Ditto.
      * platform/win/PasteboardWin.cpp:
      (WebCore::Pasteboard::writeImage): Ditto.
      
      Source/WebKit/win:
      
      * WebIconDatabase.cpp:
      (createDIB): Changed GetDC to HWndDC and removed ReleaseDC.
      
      Source/WebKit2:
      
      * UIProcess/win/WebView.cpp:
      (WebKit::WebView::flashBackingStoreUpdates): Typical conversion.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ca31dfd
    • commit-queue@webkit.org's avatar
      [GTK] Scrollbars do not respect the has-backward-stepper and has-forward-stepper properties · 0823eec7
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76747
      
      Patch by Martin Robinson <mrobinson@igalia.com> on 2012-01-23
      Reviewed by Gustavo Noronha Silva.
      
      No new tests. Regressions are covered by existing tests, but testing
      different GTK+ theme configurations is not possible yet.
      
      * platform/gtk/ScrollbarThemeGtk.cpp:
      (WebCore::ScrollbarThemeGtk::backButtonRect): If there is no back stepper, return an empty rect.
      (WebCore::ScrollbarThemeGtk::forwardButtonRect): If there is no forward stepper, return an empty rect.
      (WebCore::ScrollbarThemeGtk::trackRect): Adjust track rect calculation to account for when there is
      no steppers.
      * platform/gtk/ScrollbarThemeGtk.h: New members describing whether there are primary steppers.
      * platform/gtk/ScrollbarThemeGtk2.cpp:
      (WebCore::ScrollbarThemeGtk::updateThemeProperties): Look at the theme to determine if there
      are primary foward and back steppers.
      * platform/gtk/ScrollbarThemeGtk3.cpp:
      (WebCore::ScrollbarThemeGtk::updateThemeProperties): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0823eec7
    • rniwa@webkit.org's avatar
      REGRESSION(r105396): drag state is not cleared after each drag · d22c03e2
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76878
      
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore: 
      
      Revert a part of r105396 that made performDragAndDrop not call clearDragState
      when the default action was not prevented since it caused a regression.
      
      I'm pretty certain always calling clearDragState in performDragAndDrop is wrong
      but I can't think of a test case where this becomes a problem at the moment.
      Since this area is not well tested, revert the change instead of making further
      changes to the code base.
      
      Tests: fast/events/clear-drag-state.html
             fast/events/clear-edit-drag-state.html
      
      * page/EventHandler.cpp:
      (WebCore::EventHandler::performDragAndDrop):
      
      LayoutTests: 
      
      Add a regression test to ensure we don't fire extra dragenter event
      on the second drag at an element that contains the dragged content.
      
      * fast/events/clear-drag-state-expected.txt: Added.
      * fast/events/clear-drag-state.html: Added.
      * fast/events/clear-edit-drag-state-expected.txt: Added.
      * fast/events/clear-edit-drag-state.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d22c03e2
    • abarth@webkit.org's avatar
      garden-o-matic should support Chromium Mac Lion · e7a56a6f
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76880
      
      Reviewed by Eric Seidel.
      
      * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e7a56a6f
    • commit-queue@webkit.org's avatar
      Fixed typo in exception messages · 994f1bc2
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76710
      
      Patch by Thiago Marcos P. Santos <tmpsantos@gmail.com> on 2012-01-23
      Reviewed by Alexey Proskuryakov.
      
      * dom/DOMCoreException.cpp:
      * fileapi/FileException.cpp:
      * storage/SQLTransaction.cpp:
      (WebCore::SQLTransaction::openTransactionAndPreflight):
      (WebCore::SQLTransaction::postflightAndCommit):
      * xml/XMLHttpRequestException.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      994f1bc2