WebKit-https.git
8 years agoAdd unit test for default builder for the dashboards.
jparent@chromium.org [Thu, 3 Jan 2013 21:30:32 +0000 (21:30 +0000)]
Add unit test for default builder for the dashboards.
https://bugs.webkit.org/show_bug.cgi?id=105972

Reviewed by Dirk Pranke.

* TestResultServer/static-dashboards/loader_unittests.js:

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

8 years agoUnreviewed gardening of Apple Windows port.
roger_fong@apple.com [Thu, 3 Jan 2013 21:26:44 +0000 (21:26 +0000)]
Unreviewed gardening of Apple Windows port.

* platform/win/TestExpectations:
* platform/win/fast/inline/justify-emphasis-inline-box-expected.txt: Added.

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

8 years agoUnreviewed build fix.
adamk@chromium.org [Thu, 3 Jan 2013 21:22:10 +0000 (21:22 +0000)]
Unreviewed build fix.

* dom/ContainerNode.cpp:
(WebCore::isInTemplateContent): s/UNUSED/UNUSED_PARAM/

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

8 years ago[HTMLTemplateElement] Disallow cycles within template content
adamk@chromium.org [Thu, 3 Jan 2013 21:16:59 +0000 (21:16 +0000)]
[HTMLTemplateElement] Disallow cycles within template content
https://bugs.webkit.org/show_bug.cgi?id=105066

Reviewed by Ojan Vafai.

Source/WebCore:

Cycles in <template> content aren't quite as bad as cycles in normal
DOM trees, but they can easily cause crashes, e.g. in cloneNode and
innerHTML.

Shadow DOM has an analagous issue, and this patch tackles that problem
at the same time by creating a new method, Node::containsIncludingHostElements.

In order to disallow cycles, the HTMLTemplateElement.content
DocumentFragment needs a pointer to its host. The approach here
creates a new subclass with a host pointer and a new virtual method
to DocumentFragment to identify the subclass.

To avoid unnecessary virtual function calls, also changed how
Document::templateContentsOwnerDocument works to allow fast inlined
access and avoid lazy creation when not needed.

Tests: fast/dom/HTMLTemplateElement/cycles-in-shadow.html
       fast/dom/HTMLTemplateElement/cycles.html
       fast/dom/shadow/shadow-hierarchy-exception.html

* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/ContainerNode.cpp:
(WebCore::isInTemplateContent):
(WebCore::containsConsideringHostElements):
(WebCore::checkAcceptChild):
* dom/Document.cpp:
(WebCore::Document::ensureTemplateContentsOwnerDocument): Renamed to make clear that it lazily creates the Document. Updated all existing callers to call this method.
* dom/Document.h:
(Document):
(WebCore::Document::templateContentsOwnerDocument): Fast, inlined accessor for use in checkAcceptChild().
* dom/DocumentFragment.h:
(WebCore::DocumentFragment::isTemplateContent):
* dom/Node.cpp:
(WebCore::Node::containsIncludingShadowDOM): made const, simplified
(WebCore::Node::containsIncludingHostElements): Specialized version of Node::contains that knows how to jump over template content boundaries.
* dom/Node.h:
(Node):
* dom/TemplateContentDocumentFragment.h: Added.
(TemplateContentDocumentFragment): Subclass of DocumentFragment which stores its host template element.
(WebCore::TemplateContentDocumentFragment::create):
(WebCore::TemplateContentDocumentFragment::host):
(WebCore::TemplateContentDocumentFragment::TemplateContentDocumentFragment):
* editing/markup.cpp:
(WebCore::createFragmentForInnerOuterHTML):
* html/HTMLTemplateElement.cpp:
(WebCore::HTMLTemplateElement::content): Construct the new subclass.

LayoutTests:

* fast/dom/HTMLTemplateElement/cycles-expected.txt: Added.
* fast/dom/HTMLTemplateElement/cycles-in-shadow-expected.txt: Added.
* fast/dom/HTMLTemplateElement/cycles-in-shadow.html: Added.
* fast/dom/HTMLTemplateElement/cycles.html: Added.
* fast/dom/shadow/shadow-hierarchy-exception-expected.txt: Added.
* fast/dom/shadow/shadow-hierarchy-exception.html: Added.

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

8 years agoRevert auto-start plugins to snapshotted plugins after a period of inactivity
jonlee@apple.com [Thu, 3 Jan 2013 21:00:37 +0000 (21:00 +0000)]
Revert auto-start plugins to snapshotted plugins after a period of inactivity
https://bugs.webkit.org/show_bug.cgi?id=105973
<rdar://problem/12947865>

Reviewed by Brady Eidson.

Source/WebCore:

* html/HTMLPlugInElement.h:
(WebCore::HTMLPlugInElement::plugInOriginHash): Expose publicly for WebKit2.
Reorganize the protected members of the class.
* html/HTMLPlugInImageElement.h: Move the member to HTMLPlugInElement.

Source/WebKit2:

Change the set of origin hashes maintained by the web process to a hash map that associates
a timestamp for each hash. If the plug-in's origin is marked for auto-start, we also check
it against the timestamp. If the time is later, then we consider the entry stale, and snapshot
the plug-in instead.

But, if the user interacts with the plug-in, we delay that expiration timestamp out, so that
it expires a month from first interaction. To avoid too much chatter between the web processes
and UI process, we only update the timestamp if a day a passed since the last change to the
timestamp.

* WebProcess/Plugins/PluginView.h:
(PluginView): Add a member variable to flag whether the user had interacted with the plug-in.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView): Initialize the flag to false.
(WebKit::PluginView::handleEvent): We consider mouse down, up, wheel, context menu, and keyboard
events as user interaction. Do not consider mouse enter, leave, and move events as user
interaction. Also, remove unneeded comments.
(WebKit::PluginView::pluginDidReceiveUserInteraction): If this is the first time the function is
called, tell the web process, so that the expiration timestamp can be updated.

* WebProcess/WebProcess.messages.in: Update the messages to include the expiration time.
* WebProcess/WebProcess.h:
(WebProcess): Update the cached copy of the auto-start origins to include their expiration
timestamps. Update the message signatures. Add a function to update the expiration timestamp
for a specific origin. Rename plugInAutoStartOriginsChanged to resetPlugInAutoStartOrigins.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Instead of individually adding the origins in the
provided vector, just call resetPlugInAutoStartOrigins().
(WebKit::WebProcess::isPlugInAutoStartOrigin): Check to see if the origin is in the table, and if
so, check the current time against the expiration time.
(WebKit::WebProcess::didAddPlugInAutoStartOrigin): Update the cached table.
(WebKit::WebProcess::resetPlugInAutoStartOrigins): Swap the tables between the provided parameter
and the member variable. We can safely do this because the function is called in two cases where
the parameter is afterwards thrown away: when a new web process is created, and when it is called
through an IPC message.
(WebKit::WebProcess::plugInDidReceiveUserInteraction): When invoked, we tell the UI process to
update the expiration time for the given origin if the time difference between the expiration
time and the current time is less than the threshold plugInAutoStartExpirationTimeUpdateThreshold.

* UIProcess/WebContext.messages.in: Add message that is called when the web process wants to
update the expiration timestamp for the plug-in origin.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::plugInDidReceiveUserInteraction): Forward to the provider.
* UIProcess/WebContext.h:

* UIProcess/Plugins/PlugInAutoStartProvider.cpp:
(WebKit::expirationTimeFromNow): Returns a new time based on the current time + 1 month.
(WebKit::PlugInAutoStartProvider::addAutoStartOrigin): Refactor. Set the expiration time for the
added origin.
(WebKit::PlugInAutoStartProvider::autoStartOriginsCopy): Refactor.
(WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy): Refactor to include the expiration
times. Also, check the current time against the expiration time. If we are past the time, remove
the entry from the copy.
(WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable): Refactor to extract and duplicate
the provided map of origins and expiration timestamps.
(WebKit::PlugInAutoStartProvider::didReceiveUserInteraction): Look for the origin hash. If found,
update the expiration time. Update all existing web processes with the new expiration time, and
tell the context client that the hashes have changed.
* UIProcess/Plugins/PlugInAutoStartProvider.h:
(PlugInAutoStartProvider): Change the m_autoStartHashes variable to a map of a hash to its domain
entry in the auto-start table. It is used to cross-reference the auto-start table and update
the origin's expiration time.

* Shared/WebProcessCreationParameters.h:
(WebProcessCreationParameters): Switch the creation parameter to seed the origin table to a map.

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

8 years agoQuerying transition-timing-function value on the computed style does not return keywo...
alexis@webkit.org [Thu, 3 Jan 2013 20:22:47 +0000 (20:22 +0000)]
Querying transition-timing-function value on the computed style does not return keywords when it should.
https://bugs.webkit.org/show_bug.cgi?id=105442

Reviewed by Simon Fraser.

Source/WebCore:

http://www.w3.org/TR/css3-transitions/#transition-timing-function-property
contains a set of predefined timing functions which under the hood are
implemented using cubic-bezier but it's an implementation detail that
should not be exposed. It seems to be more clear to return a CSS
keyword rather than the cubic-bezier form when querying the value of
the property on the computed style. In fact the spec even say that for
example the initial value is "ease" and not cubic-bezier(0.25, 0.1,
0.25, 1.0). We could also imagine that in the future these predefined
values could contain other values not represented by a cubic-bezier
form. This behavior also align with the "linear" keyword which return
"linear" rather than cubic-bezier(0.0, 0.0, 1.0, 1.0).

Test: transitions/transitions-parsing.html has been updated to cover
the new behavior as well as making sure that an explicitly set value of
cubic-bezier(0.25, 0.1, 0.25, 1.0) does not return "ease" but the
cubic-bezier() form.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::createAnimationValue):
(WebCore):
(WebCore::getTimingFunctionValue):
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
* platform/animation/TimingFunction.h:
(WebCore::CubicBezierTimingFunction::create):
(CubicBezierTimingFunction):
(WebCore::CubicBezierTimingFunction::operator==):
(WebCore::CubicBezierTimingFunction::timingFunctionPreset): Store the
preset value of the timing function if it is one when creating it
so we can use it later from the computed style.
(WebCore::CubicBezierTimingFunction::CubicBezierTimingFunction):

Source/WebKit2:

Update the code to pass the animations from one process to another as
the constructor of TimingFunction changed to take an extra parameter
holding the type of the cubic-bezier form.

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::encodeTimingFunction):
(CoreIPC::decodeTimingFunction):

LayoutTests:

Update the tests to match the correct behavior of returning a keyword
rather than a cubic-bezier() form when using predefined values for the
transition-timing-function property.

* animations/animation-shorthand-name-order-expected.txt:
* animations/animation-shorthand-name-order.html:
* animations/animation-shorthand-removed.html:
* animations/animation-shorthand.html:
* animations/computed-style-expected.txt:
* animations/computed-style.html:
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:
* transitions/inherit-other-props-expected.txt:
* transitions/inherit-other-props.html:
* transitions/transitions-parsing-expected.txt:
* transitions/transitions-parsing.html:

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

8 years agoGenerate internal.settings from Settings.in
tony@chromium.org [Thu, 3 Jan 2013 20:07:09 +0000 (20:07 +0000)]
Generate internal.settings from Settings.in
https://bugs.webkit.org/show_bug.cgi?id=104740

Reviewed by Adam Barth.

.:

* Source/cmake/WebKitMacros.cmake: Specify additional output files from make_settings.pl.

Source/WebCore:

If the setting is declared in Settings.in and is a basic type, generate a
setter function at internals.settings.

InternalSettingsGenerated.idl is created by make_settings.pl. InternalSettings.idl
inherits from InternalSettingsGenerated.idl so we can override generated functions if
needed or add additional custom setters.

This patch removes 2 password echo methods from InternalSettings.idl since they are
auto generated. There are other methods we could remove, but I'll do that in a followup.

No new tests, existing tests should pass. Specifically, editing/input/password* tests should pass.

* CMakeLists.txt: Add generated cpp file to the testing lib.
* DerivedSources.make: Add generated idl file and specify all the outputs of make_settings.pl
* DerivedSources.pri: Generate idl file before generating bindings and include generated idl
for bindings generation.
* GNUmakefile.am: Specify all the generated files of make_settings.pl. Add generated idl to
list of files to be processed and resulting output to be compiled.
* UseJSC.cmake: Add generated idl file to list of idl files to process.
* UseV8.cmake: Same as UseJSC.cmake.
* WebCore.gyp/WebCore.gyp: Run make_settings.pl earlier so we can run the output through the
bindings generator.
* WebCore.gypi: Add new files.
* WebCore.vcproj/WebCoreTestSupport.vcproj: Add new files.
* WebCore.xcodeproj/project.pbxproj: Add new files.
* bindings/scripts/CodeGenerator.pm:
(IDLFileForInterface): Add current directory to the include path so DerivedSources.make can
find the generated idl file.
* page/make_settings.pl:
(generateCode): Generate InternalSettingsGenerated.{idl,h,cpp}.
(generateSettingsMacrosHeader): Rename since we're generating 2 headers now.
(setterFunctionName): Helper function for naming a setter.
(printGetterAndSetter): Use setterFunctionName.
(enumerateParsedItems): Helper function that visits each parsed item.
(generateInternalSettingsIdlFile): Generate idl file.
(generateInternalSettingsHeaderFile): Generate header file.
(generateInternalSettingsCppFile): Generate C++ file.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup): Remove password echo members.
(WebCore::InternalSettings::Backup::restoreTo): Remove password echo members.
(InternalSettingsWrapper): We can't use RefCountedSupplemental because we're we're already
RefCounted. Create a wrapper class to wrap the RefCounted InternalSettings for Supplement<>::provideTo,
which uses an OwnPtr.
(WebCore::InternalSettingsWrapper::InternalSettingsWrapper): Wraps an InternalSettings that the Page can own.
(WebCore::InternalSettingsWrapper::~InternalSettingsWrapper): Clear's m_page when the Page goes away.
(WebCore::InternalSettingsWrapper::internalSettings): Unwrap InternalSettings.
(WebCore::InternalSettings::from): Update to use InternalSettingsWrapper.
(WebCore::InternalSettings::InternalSettings): Call base class constructor.
(WebCore::InternalSettings::resetToConsistentState): Renamed from reset() and pass through to base class.
Also remove unnecessary pageScaleFactor reset (done in Internals::resetToConsistentState).
* testing/InternalSettings.h:
(Backup): Remove password echo members.
(WebCore::InternalSettings::create): Create an instance instead of using new.
(WebCore::InternalSettings::hostDestroyed): Clear the page. This is similar to the code that
RefCountedSupplemental has.
* testing/InternalSettings.idl: Extends InternalSettingsGenerated.
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::resetInternalsObject): Rename to resetToConsistentState to be like other code.
* testing/v8/WebCoreTestSupport.cpp:
(WebCoreTestSupport::resetInternalsObject): Rename to resetToConsistentState to be like other code.
Remove an unused header.

Tools:

* GNUmakefile.am: Compile new generated files on GTK+.
* qmake/mkspecs/features/default_post.prf: Qt: Make it so an action
with both extra_sources and add_output_to_sources=false will still
compile the files in extra_sources. This makes it possible to compile
InternalSettingsGenerated.cpp and not be confused by
InternalSettingsGenerated.idl.

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

8 years agoCanvas blending tests fail on Mac WK2
commit-queue@webkit.org [Thu, 3 Jan 2013 20:04:47 +0000 (20:04 +0000)]
Canvas blending tests fail on Mac WK2
https://bugs.webkit.org/show_bug.cgi?id=105943

Patch by Rik Cabanier <cabanier@adobe.com> on 2013-01-03
Reviewed by Simon Fraser.

Source/WebCore:

Tests that now pass:
    LayoutTests/fast/canvas/canvas-blend-solid.html
    LayoutTests/fast/canvas/canvas-blend-image.html

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
* testing/InternalSettings.h:
(Backup):

Source/WebKit2:

CanvasUsesAcceleratedDrawing preference was not passed to the WebProcess.

* WebProcess/InjectedBundle/InjectedBundle.cpp: Adds support for CanvasUsesAcceleratedDrawing to WK2
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

LayoutTests:

* platform/mac-wk2/TestExpectations: updated expectations as the test now passes

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

8 years agoMicrodata: Fix build failure after r137003
arko@motorola.com [Thu, 3 Jan 2013 19:59:02 +0000 (19:59 +0000)]
Microdata: Fix build failure after r137003
https://bugs.webkit.org/show_bug.cgi?id=106023

Reviewed by Ryosuke Niwa.

Set HTMLCollection::namedPropertyGetter as named property getter for
HTMLPropertiesCollection in GenerateImplementationNamedPropertyGetter.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateImplementationNamedPropertyGetter):
* bindings/v8/custom/V8HTMLCollectionCustom.cpp:
(WebCore::V8HTMLCollection::namedPropertyGetter):

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

8 years agoClear failed image loads when an <img> is adopted into a different document
adamk@chromium.org [Thu, 3 Jan 2013 19:52:26 +0000 (19:52 +0000)]
Clear failed image loads when an <img> is adopted into a different document
https://bugs.webkit.org/show_bug.cgi?id=104409

Reviewed by Nate Chapin.

Source/WebCore:

This avoids an assertion failure setImageWithoutConsideringPendingLoadEvent().

Test: loader/image-loader-adoptNode-assert.html

* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement): Use new helper.
(WebCore::ImageLoader::updateFromElementIgnoringPreviousError): ditto
(WebCore::ImageLoader::elementDidMoveToNewDocument): ditto
(WebCore::ImageLoader::clearFailedLoadURL): Added a helper method to self-document the code.
(WebCore):
* loader/ImageLoader.h:
(ImageLoader):

LayoutTests:

* loader/image-loader-adoptNode-assert-expected.txt: Added.
* loader/image-loader-adoptNode-assert.html: Added.

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

8 years ago[Qt] Use WebPageProxy::postMessageToInjectedBundle when passing messages to a specifi...
caio.oliveira@openbossa.org [Thu, 3 Jan 2013 19:24:27 +0000 (19:24 +0000)]
[Qt] Use WebPageProxy::postMessageToInjectedBundle when passing messages to a specific page in the builtin bundle
https://bugs.webkit.org/show_bug.cgi?id=105928

Reviewed by Simon Hausmann.

Simplify the code since we now can send the contents as is, instead of packaging it inside
an array that also contained the reference for the page. This was made possible after
r126311.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::setNavigatorQtObjectEnabled):
(QQuickWebViewExperimental::postMessage):
Built the messages and used WebPageProxy::postMessageToInjectedBundle() directly.

* UIProcess/qt/QtWebContext.cpp: Removed functions that now are simpler and were inlined in
qquickwebview.cpp.
* UIProcess/qt/QtWebContext.h: Ditto.
* WebProcess/qt/QtBuiltinBundle.cpp:
(WebKit::QtBuiltinBundle::initialize): Used the callback that gets messages for specific
pages. Also changed the way we create the bundle client: now we fill the struct with zeros,
and then set the fields we care about. This way if another field is added to that client,
this code doesn't need to be changed.
(WebKit::QtBuiltinBundle::didReceiveMessageToPage):
(WebKit::QtBuiltinBundle::handleMessageToNavigatorQtObject): Changed to not read the page
reference from the message, since we get it in the callback already.
(WebKit::QtBuiltinBundle::handleSetNavigatorQtObjectEnabled): Ditto.
* WebProcess/qt/QtBuiltinBundle.h:
(QtBuiltinBundle):

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

8 years agoSandbox-blocked pointer lock should log to the console.
scheib@chromium.org [Thu, 3 Jan 2013 19:07:17 +0000 (19:07 +0000)]
Sandbox-blocked pointer lock should log to the console.
https://bugs.webkit.org/show_bug.cgi?id=105794

Reviewed by Adrienne Walker.

Source/WebCore:

When pointer lock is requested and is denied due to sandbox restrictions
a helpful message to web developers is sent to the developer console.

Existing test expectations updated.

* page/PointerLockController.cpp:
(WebCore::PointerLockController::requestPointerLock):

LayoutTests:

* http/tests/pointer-lock/iframe-sandboxed-expected.txt:
* http/tests/pointer-lock/iframe-sandboxed-nested-disallow-then-allow-pointer-lock-expected.txt:

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

8 years agoAdd tests to cover what transition-timing-function accepts for cubic-bezier values.
alexis@webkit.org [Thu, 3 Jan 2013 19:05:44 +0000 (19:05 +0000)]
Add tests to cover what transition-timing-function accepts for cubic-bezier values.
https://bugs.webkit.org/show_bug.cgi?id=105426

Reviewed by Simon Fraser.

http://www.w3.org/TR/css3-transitions/#transition-timing-function-property
has not yet been updated following the discussions
http://lists.w3.org/Archives/Public/www-style/2010Apr/0489.html and
http://lists.w3.org/Archives/Public/www-style/2010Jun/0254.html where
the range restriction of Y values for cubic-bezier type has been
removed. This patch add tests to cover that behavior to avoid breakage
in the future and test also various other different cubic-bezier use
cases.

* transitions/transitions-parsing-expected.txt:
* transitions/transitions-parsing.html:

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

8 years agoPingLoader.h missing virtual and OVERRIDE keywords on its inherited methods.
tsepez@chromium.org [Thu, 3 Jan 2013 18:48:41 +0000 (18:48 +0000)]
PingLoader.h missing virtual and OVERRIDE keywords on its inherited methods.
https://bugs.webkit.org/show_bug.cgi?id=105975

Reviewed by Nate Chapin.

Change adds compile-time checks only, so no new tests.

* loader/PingLoader.h:
(PingLoader):
(WebCore::PingLoader::timeout):

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

8 years ago[style] WebIDL-reflecting uppercase enums reported as style violation
zandobersek@gmail.com [Thu, 3 Jan 2013 18:42:20 +0000 (18:42 +0000)]
[style] WebIDL-reflecting uppercase enums reported as style violation
https://bugs.webkit.org/show_bug.cgi?id=105832

Reviewed by Tony Chang.

Recognize the enum as WebIDL-reflecting one if there's a comment present that
indicates this. In enums spanning over multiple lines, the comment is expected
on the first line. In enums placed in one line, the comment is expected at the
end of that line.

WebIDL-reflecting enum values are required to be written in uppercase and as such
violate the common rule of these values being written in InterCaps. Annotating
enums this way makes it possible to avoid false style violation reports.

The comment is of form '// Web(?:Kit)?IDL enum'.

* Scripts/webkitpy/style/checkers/cpp.py:
(_EnumState.__init__):
(_EnumState.process_clean_line):
(check_enum_casing):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(NoNonVirtualDestructorsTest.test_enum_casing):

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

8 years agoUpdate Mac test expectations after merging the bug 105987 into the bug 105986.
rniwa@webkit.org [Thu, 3 Jan 2013 18:38:44 +0000 (18:38 +0000)]
Update Mac test expectations after merging the bug 105987 into the bug 105986.

Also add one more test expectation for the bug.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

8 years agoFix incorrect assumption about in-flow descendants of inlines in touch event rect...
leviw@chromium.org [Thu, 3 Jan 2013 18:32:01 +0000 (18:32 +0000)]
Fix incorrect assumption about in-flow descendants of inlines in touch event rect tracking
https://bugs.webkit.org/show_bug.cgi?id=105970

Reviewed by Simon Fraser.

Source/WebCore:

Correcting the touch event target rect accumulation code to no longer incorrectly assume that
non-block renderers held only normal-flow children. The updated code will always walk the
complete renderer sub-tree, but only do the work of calculating the absolute rect when the
child won't necessarily fall inside its parent (floating, positioned, or transformed).

Tests: platform/chromium/fast/events/touch/compositor-touch-hit-rects.html updated to catch bug.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::accumulateRendererTouchEventTargetRects): Walk all renderer sub-trees. Also keeping
track of the last added parent container rect to avoid adding redundant rectangles.
(WebCore::accumulateDocumentEventTargetRects): Avoiding adding empty rects.

LayoutTests:

* platform/chromium-linux/platform/chromium/fast/events/touch/compositor-touch-hit-rects-expected.txt: Updating expectations
* platform/chromium/fast/events/touch/compositor-touch-hit-rects.html: Updating test to check previously failing case where
an inline with a touch handler contains a non-normal-flow child. Also, fixing the test since it was incorrectly duplicated.
* platform/chromium/TestExpectations:

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

8 years agoIndexedDB: Simplify IDBTransactionBackendImpl::scheduleTask usage
jsbell@chromium.org [Thu, 3 Jan 2013 18:23:56 +0000 (18:23 +0000)]
IndexedDB: Simplify IDBTransactionBackendImpl::scheduleTask usage
https://bugs.webkit.org/show_bug.cgi?id=103536

Reviewed by Tony Chang.

Source/WebCore:

Move responsibility for firing abort errors from requests that arrive on the
back-end after an asynchronous transaction abort out of WebCore, since the
front-end takes care of this as far as script is concerned.

No new tests -  no behavior changes.

* Modules/indexeddb/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::continueFunction):
(WebCore::IDBCursorBackendImpl::advance):
(WebCore::IDBCursorBackendImpl::prefetchContinue):
* Modules/indexeddb/IDBIndexBackendImpl.cpp:
(WebCore::IDBIndexBackendImpl::openCursor):
(WebCore::IDBIndexBackendImpl::openKeyCursor):
(WebCore::IDBIndexBackendImpl::count):
(WebCore::IDBIndexBackendImpl::get):
(WebCore::IDBIndexBackendImpl::getKey):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::get):
(WebCore::IDBObjectStoreBackendImpl::put):
(WebCore::IDBObjectStoreBackendImpl::deleteFunction):
(WebCore::IDBObjectStoreBackendImpl::clear):
(WebCore::IDBObjectStoreBackendImpl::openCursor):
(WebCore::IDBObjectStoreBackendImpl::count):

Source/WebKit/chromium:

Track whether IDBCallbacks has fired before being destructed. If not it probably
came in after a transaction had asynchronously aborted; fire an abort error which
will be ignored on the front-end but will clean up lingering IPC tracking.

* public/WebIDBDatabaseException.h:
* src/AssertMatchingEnums.cpp:
* src/IDBCallbacksProxy.cpp:
(WebKit::IDBCallbacksProxy::IDBCallbacksProxy):
(WebKit::IDBCallbacksProxy::~IDBCallbacksProxy):
(WebKit::IDBCallbacksProxy::onError):
(WebKit::IDBCallbacksProxy::onSuccess):
* src/IDBCallbacksProxy.h:
(IDBCallbacksProxy):

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

8 years ago[Qt] Fix a crash when the QQuickWebPage is destroyed between the scene graph sync...
jocelyn.turcotte@digia.com [Thu, 3 Jan 2013 18:17:21 +0000 (18:17 +0000)]
[Qt] Fix a crash when the QQuickWebPage is destroyed between the scene graph sync and render.
https://bugs.webkit.org/show_bug.cgi?id=106018

Reviewed by Simon Hausmann.

The main and rendering threads are only guaranteed to be synchronised in
the updatePaintNode call. In every other cases, QQuickItems cannot be
safely accessed from the rendering thread.

Do as the first patch version in
https://bugs.webkit.org/show_bug.cgi?id=104574 was doing and copy the
ratio value directly to fix the issue.

Also add a note about the threading issue in QQuickWebPage::updatePaintNode.

* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::updatePaintNode):
* UIProcess/qt/QtWebPageSGNode.cpp:
(WebKit::QtWebPageSGNode::QtWebPageSGNode):
* UIProcess/qt/QtWebPageSGNode.h:
(QtWebPageSGNode):
(WebKit::QtWebPageSGNode::devicePixelRatio):
(WebKit::QtWebPageSGNode::setDevicePixelRatio):

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

8 years agoUnreviewed gardening. Marking webaudio/automatic-pull-node.html as
tdanderson@chromium.org [Thu, 3 Jan 2013 18:17:17 +0000 (18:17 +0000)]
Unreviewed gardening. Marking webaudio/automatic-pull-node.html as
[ Pass Slow ] instead of [ Pass Timeout ] for XP.

* platform/chromium/TestExpectations:

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

8 years agoAdding favicon.ico to the garden-o-matic.
commit-queue@webkit.org [Thu, 3 Jan 2013 18:05:39 +0000 (18:05 +0000)]
Adding favicon.ico to the garden-o-matic.
https://bugs.webkit.org/show_bug.cgi?id=105982

Patch by Tim 'mithro' Ansell <mithro@mithis.com> on 2013-01-03
Reviewed by Adam Barth.

* Scripts/webkitpy/tool/servers/gardeningserver.py:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/favicon.ico:

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

8 years agoUpdate BB10 media render theme.
commit-queue@webkit.org [Thu, 3 Jan 2013 17:32:28 +0000 (17:32 +0000)]
Update BB10 media render theme.
https://bugs.webkit.org/show_bug.cgi?id=105728

Patch by Tiancheng Jiang <tijiang@rim.com> on 2013-01-03
Reviewed by Yong Li.

Internally Reviewed by John Griggs.

Update GL friendly render method for audio volume.
Change the background color for embedded media player to semi-transparent.
Change remaining time font color to grey to match full screen video.
Change media slider thumb color to blue when pressed.

* css/mediaControlsBlackBerry.css:
(audio):
(audio::-webkit-media-controls-embedded-panel, video::-webkit-media-controls-embedded-panel):
(video::-webkit-media-controls-time-display-container, audio::-webkit-media-controls-time-display-container):
(video::-webkit-media-controls-timeline-container, audio::-webkit-media-controls-timeline-container):
(audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
(video::-webkit-media-controls-time-remaining-display, audio::-webkit-media-controls-time-remaining-display):
(audio::-webkit-media-controls-volume-slider-container):
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintMediaSliderThumb):
(WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderTrack):

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

8 years agoUnreviewed, rolling out r138640.
commit-queue@webkit.org [Thu, 3 Jan 2013 17:05:08 +0000 (17:05 +0000)]
Unreviewed, rolling out r138640.
http://trac.webkit.org/changeset/138640
https://bugs.webkit.org/show_bug.cgi?id=106019

Causing crashes in multiply() (Requested by danakj on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-03

* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore):
(WebCore::TransformationMatrix::multiply):
* platform/graphics/transforms/TransformationMatrix.h:
(TransformationMatrix):

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

8 years ago[Qt] Unreviewed gardening, skip a new failing test.
ossy@webkit.org [Thu, 3 Jan 2013 14:37:25 +0000 (14:37 +0000)]
[Qt] Unreviewed gardening, skip a new failing test.

* platform/qt/TestExpectations:

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

8 years agoThe 'body' of seamless IFrames should default to 'margin: 0'
mkwst@chromium.org [Thu, 3 Jan 2013 14:30:22 +0000 (14:30 +0000)]
The 'body' of seamless IFrames should default to 'margin: 0'
https://bugs.webkit.org/show_bug.cgi?id=90834

Reviewed by Antti Koivisto.

Source/WebCore:

Documents displayed in seamless iframes should override the 'body'
element's normal 8px default margins with 0px, in order to ensure that
contents are displayed flush with the boundries of the seamless box.[1]

This patch does so by adding a new pseudoclass to allow the user agent
stylesheet to specify a different margin for seamless documents.

[1]: http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Jul/0039.html

Test: fast/frames/seamless/seamless-body-margin.html

* css/CSSSelector.cpp:
(WebCore::CSSSelector::pseudoId):
(WebCore::nameToPseudoTypeMap):
(WebCore::CSSSelector::extractPseudoType):
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOneSelector):
* css/html.css:
(body:-webkit-seamless-document):
* rendering/style/RenderStyleConstants.h:
    Define a new pseudoclass: '-webkit-seamless-document', which
    matches for any element in a document that's rendered in a
    seamless IFrame.

LayoutTests:

* fast/frames/seamless/seamless-body-margin-expected.txt: Added.
* fast/frames/seamless/seamless-body-margin.html: Added.
    New test to explicitly check 'body' margins.
* fast/frames/seamless/resources/nested-seamless.html:
* fast/frames/seamless/resources/quirks-square.html:
* fast/frames/seamless/resources/two-inline-blocks.html:
* fast/frames/seamless/seamless-inherited-origin-expected.txt:
* fast/frames/seamless/seamless-inherited-origin.html:
    Updated these tests to remove the assumption that the body had an
    8px margin.

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

8 years ago[Qt] Unreviewed gardening.
ossy@webkit.org [Thu, 3 Jan 2013 14:28:01 +0000 (14:28 +0000)]
[Qt] Unreviewed gardening.

* platform/qt/TestExpectations: Skip new failing tests.
* platform/qt/editing/deleting/delete-to-select-table-expected.txt: Updated after r138654.
* platform/qt/editing/execCommand/print-expected.txt: Updated after r138654.
* platform/qt/editing/execCommand/selectAll-expected.txt: Updated after r138654.
* platform/qt/editing/inserting/editable-html-element-expected.txt: Updated after r138654.

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

8 years ago[Qt] Fix library linking order
commit-queue@webkit.org [Thu, 3 Jan 2013 14:13:44 +0000 (14:13 +0000)]
[Qt] Fix library linking order
https://bugs.webkit.org/show_bug.cgi?id=105818

Some Qt libraries are linked before the private static libraries
that depend on them which results in QtWebKit failing to link.

Copy Qt module dependencies from QT to QT_PRIVATE when creating
module to ensure the Qt libraries are linked after the private
static libraries that depend on them.

Patch by Jonathan Liu <net147@gmail.com> on 2013-01-03
Reviewed by Tor Arne Vestbø.

* qmake/mkspecs/features/default_post.prf:

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

8 years agoUnreviewed fix after r138656 to make GIT-SVN repositories happy.
ossy@webkit.org [Thu, 3 Jan 2013 13:43:22 +0000 (13:43 +0000)]
Unreviewed fix after r138656 to make GIT-SVN repositories happy.

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

8 years ago[MinGW-w64] Centralize workaround for pow() implementation
hausmann@webkit.org [Thu, 3 Jan 2013 09:54:36 +0000 (09:54 +0000)]
[MinGW-w64] Centralize workaround for pow() implementation
https://bugs.webkit.org/show_bug.cgi?id=105925

Reviewed by Sam Weinig.

As suggested by Sam, move the MinGW-w64 workaround into MathExtras.h
away from the JSC usage.

Source/JavaScriptCore:

* runtime/MathObject.cpp:
(JSC::mathPow):

Source/WTF:

* wtf/MathExtras.h:
(wtf_pow):

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

8 years agoseamless iframes don't inherit styles when srcdoc is used
mkwst@chromium.org [Thu, 3 Jan 2013 09:13:50 +0000 (09:13 +0000)]
seamless iframes don't inherit styles when srcdoc is used
https://bugs.webkit.org/show_bug.cgi?id=103539

Reviewed by Antti Koivisto.

Source/WebCore:

Seamless iframes populated via a 'srcdoc' attribute should always
inherit styles from their parent documents. At the moment, this is
only the case when they contain a stylesheet or some other markup
that forces a style recalculation on the document. Simple 'srcdoc'
attributes (e.g. "srcdoc='<p>This is a comment.</p>'") bail out of
recalculating style early, resulting in unstyled appearance.

This patch instructs WebCore to treat seamless documents as having an
updated StyleResolver regardless of what actions the parser takes,
which in turn ensures that the document's style is recalculated
correctly.

Test: fast/frames/seamless/seamless-srcdoc.html

* dom/Document.cpp:
(WebCore::Document::implicitOpen):
    If it's a seamless document, notify it that its StyleResolver isn't
    what it might have expected.

LayoutTests:

* fast/frames/seamless/resources/span.html: Added.
* fast/frames/seamless/seamless-contenteditable-not-inherited-expected.txt:
    Updating the previously failing expectation.
* fast/frames/seamless/seamless-srcdoc-expected.txt: Added.
* fast/frames/seamless/seamless-srcdoc.html: Added.
    Exciting new test to ensure that this doesn't regress, neither
    for totally simple srcdoc attriubtes, nor for slightly more
    complex variations.

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

8 years ago[Qt] Implement SimpleFontData::platformBoundsForGlyph
allan.jensen@digia.com [Thu, 3 Jan 2013 08:42:24 +0000 (08:42 +0000)]
[Qt] Implement SimpleFontData::platformBoundsForGlyph
https://bugs.webkit.org/show_bug.cgi?id=104127

Reviewed by Jocelyn Turcotte.

Implements platformBoundsForGlyph which is necessary for working MathML and Ruby.

* platform/graphics/qt/SimpleFontDataQt.cpp:
(WebCore::SimpleFontData::platformBoundsForGlyph):

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

8 years agoAdd failing test expectations for two canvas tests on Mac Lion
rniwa@webkit.org [Thu, 3 Jan 2013 07:11:20 +0000 (07:11 +0000)]
Add failing test expectations for two canvas tests on Mac Lion
since they have been failing as far as we could tell on the flakiness dashboard.

The failure is tracked by the bug 105999.

* platform/mac/TestExpectations:

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

8 years agoRemove superfluous 'IntPoint toPoint(const IntSize&)'
commit-queue@webkit.org [Thu, 3 Jan 2013 07:09:19 +0000 (07:09 +0000)]
Remove superfluous 'IntPoint toPoint(const IntSize&)'
https://bugs.webkit.org/show_bug.cgi?id=105993

Patch by Steve Block <steveblock@chromium.org> on 2013-01-02
Reviewed by Eric Seidel.

Refactoring only, no change in behavior.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::elementAccessibilityHitTest):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::remoteSVGElementHitTest):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleDrag):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
* platform/graphics/IntPoint.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollToOffset):
(WebCore::RenderLayer::offsetFromResizeCorner):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):

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

8 years agoAdd a Mac test expectation for the bug 105998.
rniwa@webkit.org [Thu, 3 Jan 2013 07:05:44 +0000 (07:05 +0000)]
Add a Mac test expectation for the bug 105998.

* platform/mac-wk2/TestExpectations:

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

8 years ago[BlackBerry] file:/// pages don't get correct scales after several rotations and...
zhajiang@rim.com [Thu, 3 Jan 2013 06:11:38 +0000 (06:11 +0000)]
[BlackBerry] file:/// pages don't get correct scales after several rotations and history navigations
https://bugs.webkit.org/show_bug.cgi?id=105996

Patch by Jacky Jiang <zhajiang@rim.com>.
Reviewed by George Staikos.

PR: 273541
When navigating back to the previous page on portrait mode, we were
trying to set virtual viewport after recalculation. However, we didn't
change the fixed layout size so that we still layouted the contents at
the old virtual viewport size. In this case, the old virtual viewport
was 570 * 293 which was set in landscape mode unfortunately. There
would be no chance for such kind of contents size to fit the portrait
mode screen size nicely.
This was a regression of webkit/cc31d9bad where setViewMode() was
removed as a noop. So just get setViewMode() back to apply the fixed
layout size with a little bit change as SVG document path was proved
invalid in that patch. Thanks to George for the float comparison change.
Put a FIXME as we don't have a way to save the scale precisely before
the rotation and history navigation currently.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setLoadState):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem):

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

8 years agoMore Mac test expectation updates per bugs 105988 and 105987.
rniwa@webkit.org [Thu, 3 Jan 2013 05:36:32 +0000 (05:36 +0000)]
More Mac test expectation updates per bugs 105988 and 105987.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

8 years ago[EFL][WK2] Fix tooltip bugs in MiniBrowser.
commit-queue@webkit.org [Thu, 3 Jan 2013 04:47:46 +0000 (04:47 +0000)]
[EFL][WK2] Fix tooltip bugs in MiniBrowser.
https://bugs.webkit.org/show_bug.cgi?id=102209

Patch by Byungwoo Lee <bw80.lee@samsung.com> on 2013-01-02
Reviewed by Gyuyoung Kim.

Set tooltip on the elm_window instead of ewk_view, and add delay to
show the tooltip window.

Setting tooltip on the ewk_view makes elementary error message because
ewk_view is not an elementary widget. To remove the error message,
tooltip should be set on the elm_window.

Most browsers show the tooltip after a mouse pointer stays on an
element object that has tooltip text.
But elm_tooltip widget itself doesn't have delay or handle mouse
events to show/hide.

So additional codes are added to show/hide tooltip widget along with
mouse events.
  1) When a mouse pointer stays for a second on an element which has
     tooltip text, then tooltip widget is displayed.
  2) When a mouse pointer is moved or out of ewk_view, hide the tooltip
     widget.

* MiniBrowser/efl/main.c:
(_Tooltip_Information):
(_Browser_Window):
(on_tooltip_show):
(window_tooltip_hide):
(window_tooltip_update):
(on_mouse_in):
(on_mouse_move):
(on_mouse_out):
(window_free):
(on_tooltip_text_set):
(on_tooltip_text_unset):
(window_create):

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

8 years ago[BlackBerry] Do not determine db quota limit using db file size
commit-queue@webkit.org [Thu, 3 Jan 2013 04:44:09 +0000 (04:44 +0000)]
[BlackBerry] Do not determine db quota limit using db file size
https://bugs.webkit.org/show_bug.cgi?id=105991

PR 267191

Patch by Otto Derek Cheung <otcheung@rim.com> on 2013-01-02
Reviewed by George Staikos.

Passing the current quota to WebPageClientImpl::databaseQuota so we can determine a better
quota limit without using the db file size.

* Api/WebPageClient.h:
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):

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

8 years ago[TexMap] Remove m_size in TextureMapperLayer.
commit-queue@webkit.org [Thu, 3 Jan 2013 04:39:01 +0000 (04:39 +0000)]
[TexMap] Remove m_size in TextureMapperLayer.
https://bugs.webkit.org/show_bug.cgi?id=105781

Patch by Huang Dongsung <luxtella@company100.net> on 2013-01-02
Reviewed by Noam Rosenthal.

m_size is duplicated by State::size, so this patch removes it.

No new tests. Refactoring only.

* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::computeTransformsRecursive):
(WebCore::TextureMapperLayer::paintSelf):
(WebCore::TextureMapperLayer::isVisible):
(WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
* platform/graphics/texmap/TextureMapperLayer.h:
(WebCore::TextureMapperLayer::layerRect):
(TextureMapperLayer):

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

8 years agoAdd flaky crash expectations for multiple tests on Mac WebKit2.
rniwa@webkit.org [Thu, 3 Jan 2013 03:24:20 +0000 (03:24 +0000)]
Add flaky crash expectations for multiple tests on Mac WebKit2.

* platform/mac-wk2/TestExpectations:

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

8 years ago[chromium] Creation of dedicated workers (isolates) leaks reference to HTMLDocument
kbr@google.com [Thu, 3 Jan 2013 03:22:30 +0000 (03:22 +0000)]
[chromium] Creation of dedicated workers (isolates) leaks reference to HTMLDocument
https://bugs.webkit.org/show_bug.cgi?id=105367

Reviewed by Dmitry Titov.

Source/WebCore:

Eliminated a Chromium-specific object wrapping WorkerMessagingProxy in order to fix a
lifetime management bug, which leaked every Document which started a dedicated worker.

Test: fast/workers/worker-document-leak.html

* workers/WorkerLoaderProxy.h:
(WorkerLoaderProxy):
    Added Chromium-specific casting method to bridge two now-distinct class hierarchies.
* workers/WorkerMessagingProxy.h:
(WorkerMessagingProxy):
    Made destructor protected instead of private to allow subclassing.

Source/WebKit/chromium:

Made WebWorkerClientImpl a subclass of WorkerMessagingProxy rather than an object wrapping
WorkerMessagingProxy. WorkerMessagingProxy manages its own lifetime and it is impossible to
properly synchronize the lifetime of WebWorkerClientImpl separately.

This allowed most of WebWorkerClientImpl to be deleted, but forced a divergence in the class
hierarchies of WebWorkerClientImpl and WebSharedWorkerImpl. Conversion methods were added to
WorkerLoaderProxy and WebWorkerBase to bridge the hierarchies of in-process and
out-of-process workers.

* src/DatabaseObserver.cpp:
(WebCore::DatabaseObserver::canEstablishDatabase):
    Adjusted how WebWorkerBase is obtained from WorkerLoaderProxy.
* src/IDBFactoryBackendProxy.cpp:
(WebKit::AllowIndexedDBMainThreadBridge::signalCompleted):
    Adjusted how WorkerLoaderProxy's methods are called.
(WebKit::IDBFactoryBackendProxy::allowIndexedDB):
    Adjusted how WebWorkerBase is obtained from WorkerLoaderProxy.
* src/LocalFileSystemChromium.cpp:
(WebCore::openFileSystemHelper):
    Adjusted how WebWorkerBase is obtained from WorkerLoaderProxy.
* src/WebSharedWorkerImpl.cpp:
(WebKit::WebSharedWorkerImpl::toWebWorkerBase):
    Implemented new conversion method.
* src/WebSharedWorkerImpl.h:
(WebSharedWorkerImpl):
    Explicitly derive from WorkerLoaderProxy now that WebWorkerBase no longer does.
(WebKit::WebSharedWorkerImpl::workerLoaderProxy):
    Added new conversion method.
* src/WebWorkerBase.h:
(WebWorkerBase):
    Removed derivation from WorkerLoaderProxy. Added method to convert to WorkerLoaderProxy.
* src/WebWorkerClientImpl.cpp:
(WebKit):
    Adjusted comment.
(WebKit::WebWorkerClientImpl::createWorkerContextProxy):
    Adjusted whitespace.
(WebKit::WebWorkerClientImpl::terminateWorkerContext):
    Eliminated delegation to separate object.
(WebKit::WebWorkerClientImpl::toWebWorkerBase):
    Implemented new conversion method.
(WebKit::WebWorkerClientImpl::view):
(WebKit::WebWorkerClientImpl::allowDatabase):
(WebKit::WebWorkerClientImpl::allowFileSystem):
(WebKit::WebWorkerClientImpl::openFileSystem):
(WebKit::WebWorkerClientImpl::allowIndexedDB):
    Eliminated delegation to separate object.
(WebKit::WebWorkerClientImpl::WebWorkerClientImpl):
* src/WebWorkerClientImpl.h:
(WebKit):
    Changed to inherit from WorkerMessagingProxy directly.
(WebWorkerClientImpl):
    Deleted most methods previously overridden from WorkerContextProxy, etc.
* src/WorkerAsyncFileSystemChromium.cpp:
(WebCore::WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium):
(WebCore::WorkerAsyncFileSystemChromium::createWorkerFileSystemCallbacksBridge):
    Hold on to, and use, WorkerLoaderProxy rather than WebWorkerBase.
* src/WorkerAsyncFileSystemChromium.h:
(WebKit):
(WebCore):
(WorkerAsyncFileSystemChromium):
    Hold on to WorkerLoaderProxy rather than WebWorkerBase.

LayoutTests:

* fast/workers/resources/empty-worker.js: Added.
* fast/workers/resources/worker-document-leak-iframe.html: Added.
* fast/workers/worker-document-leak-expected.txt: Added.
* fast/workers/worker-document-leak.html: Added.

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

8 years agoOne more Mac rebaseline attempt for r138654. Also remove an entry for the bug 105514
rniwa@webkit.org [Thu, 3 Jan 2013 03:09:22 +0000 (03:09 +0000)]
One more Mac rebaseline attempt for r138654. Also remove an entry for the bug 105514
which has been dup'ed with the bug 103663 for which we have more specific expectations.

* platform/mac-lion/editing/deleting: Removed.
* platform/mac-lion/editing/deleting/delete-to-select-table-expected.txt: Removed.
* platform/mac-wk2/editing/deleting: Removed.
* platform/mac-wk2/editing/deleting/delete-to-select-table-expected.txt: Removed.
* platform/mac/TestExpectations:
* platform/mac/editing/deleting/delete-to-select-table-expected.txt:

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

8 years agoMake ClassList::reset's purpose obvious and don't keep quirks string when not needed
esprehn@chromium.org [Thu, 3 Jan 2013 02:59:32 +0000 (02:59 +0000)]
Make ClassList::reset's purpose obvious and don't keep quirks string when not needed
https://bugs.webkit.org/show_bug.cgi?id=105963

Reviewed by Ojan Vafai.

ClassList::reset only exists to handle updating the special SpaceSplitString
for quirks mode documents. This adds a new method that makes this obvious and
instead of updating the string immediately clear the value and lazily
update it. We also clear the value whenever we're inserted into the
document so that when moving from a quirks mode document to a non-quirks
mode document we don't keep the SpaceSplitString around if it's not needed.

No new tests, I'm not sure how to write a test that we don't keep the
SpaceSplitString when moving between quirks and non-quirks mode documents.

* dom/Element.cpp:
(WebCore::Element::classAttributeChanged):
(WebCore::Element::insertedInto):
* dom/Element.h:
(Element):
* dom/ElementRareData.h:
(WebCore::ElementRareData::clearClassListValueForQuirksMode):
* html/ClassList.cpp:
* html/ClassList.h:
(WebCore::ClassList::clearValueForQuirksMode):

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

8 years ago[chromium] Remove unused transitional #defines from WebKit Client API
commit-queue@webkit.org [Thu, 3 Jan 2013 02:05:15 +0000 (02:05 +0000)]
[chromium] Remove unused transitional #defines from WebKit Client API
https://bugs.webkit.org/show_bug.cgi?id=105974

Patch by James Robinson <jamesr@chromium.org> on 2013-01-02
Reviewed by Adam Barth.

The transitions these #defines helped with have completed.

* public/WebFileSystemCallbacks.h:
(WebKit):
* public/WebKit.h:
* public/WebRuntimeFeatures.h:
* public/WebSettings.h:
* public/WebWidget.h:

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

8 years agoObjective-C API for JavaScriptCore
barraclough@apple.com [Thu, 3 Jan 2013 02:03:12 +0000 (02:03 +0000)]
Objective-C API for JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=105889

Reviewed by Geoff Garen.

Fixes for more issues raised by Darin.

* API/JSBlockAdaptor.mm:
(BlockArgument):
(BlockArgumentStruct::BlockArgumentStruct):
(BlockArgumentTypeDelegate::typeStruct):
(BlockResult):
(BlockResultStruct::BlockResultStruct):
(buildBlockSignature):
(-[JSBlockAdaptor initWithBlockSignatureFromProtocol:]):
(-[JSBlockAdaptor blockFromValue:inContext:withException:]):
    - fix * position for Objective-C types
* API/JSContext.h:
    - fix * position for Objective-C types
* API/JSContext.mm:
(-[JSContext initWithVirtualMachine:]):
(-[JSContext virtualMachine]):
(contextInternalContext):
    - fix * position for Objective-C types
(-[JSContext dealloc]):
(-[JSContext protect:]):
(-[JSContext unprotect:]):
    - HashMap<JSValueRef, size_t> -> HashCountedSet<JSValueRef>
* API/JSContextInternal.h:
(WeakContextRef):
    - fix * position for Objective-C types
* API/JSValue.mm:
(valueToString):
    - fix * position for Objective-C types
(isNSBoolean):
    - Added helper to check for booleans.
(objectToValueWithoutCopy):
    - Added contextRef
    - fix * position for Objective-C types
    - Remove @YES, @NO literal usage, use isNSBoolean instead
(objectToValue):
    - Added contextRef
(+[JSValue valueWithValue:inContext:]):
(-[JSValue initWithValue:inContext:]):
    - fix * position for Objective-C types
(createStructHandlerMap):
(handerForStructTag):
    - getStructTagHandler -> handerForStructTag
    - Split out createStructHandlerMap
    - strncmp -> memcmp
    - String(type).impl() -> StringImpl::create(type)
(+[JSValue selectorForStructToValue:]):
(+[JSValue selectorForValueToStruct:]):
    - getStructTagHandler -> handerForStructTag
(typeToValueInvocationFor):
(valueToTypeInvocationFor):
    - fix * position for Objective-C types
* API/JSValueInternal.h:
    - fix * position for Objective-C types
* API/JSVirtualMachineInternal.h:
    - fix * position for Objective-C types
* API/JSWrapperMap.h:
    - fix * position for Objective-C types
* API/JSWrapperMap.mm:
(selectorToPropertyName):
(createObjectWithCustomBrand):
(createRenameMap):
(putNonEnumerable):
(copyMethodsToObject):
(copyPrototypeProperties):
(-[JSObjCClassInfo initWithContext:forClass:superClassInfo:]):
(-[JSWrapperMap initWithContext:]):
(-[JSWrapperMap wrapperForObject:]):
(getJSExportProtocol):
    - fix * position for Objective-C types
* API/ObjCCallbackFunction.h:
    - fix * position for Objective-C types
* API/ObjCCallbackFunction.mm:
(CallbackArgument):
(CallbackArgumentStruct::CallbackArgumentStruct):
    - fix * position for Objective-C types
(CallbackArgumentBlockCallback::createAdoptingJSBlockAdaptor):
    - Added to make adopt explicit
(CallbackArgumentBlockCallback):
(CallbackArgumentBlockCallback::CallbackArgumentBlockCallback):
(ArgumentTypeDelegate::typeBlock):
    - Call createAdoptingJSBlockAdaptor
(ArgumentTypeDelegate::typeStruct):
(CallbackResult):
(CallbackResultStruct::CallbackResultStruct):
(ResultTypeDelegate::typeStruct):
(ObjCCallbackFunction::ObjCCallbackFunction):
(ObjCCallbackFunction::context):
(objCCallbackFunctionForInvocation):
(objCCallbackFunctionForMethod):
(objCCallbackFunctionForBlock):
    - fix * position for Objective-C types
* API/ObjcRuntimeExtras.h:
(protocolImplementsProtocol):
(forEachProtocolImplementingProtocol):
(forEachMethodInProtocol):
(forEachPropertyInProtocol):
    - fix * position for Objective-C types
* API/tests/testapi.m:
(-[TestObject testArgumentTypesWithInt:double:boolean:string:number:array:dictionary:]):
(testObjectiveCAPI):
    - fix * position for Objective-C types

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

8 years ago[chromium] Remove unused transitional #defines from Platform API
commit-queue@webkit.org [Thu, 3 Jan 2013 01:21:08 +0000 (01:21 +0000)]
[chromium] Remove unused transitional #defines from Platform API
https://bugs.webkit.org/show_bug.cgi?id=105971

Patch by James Robinson <jamesr@chromium.org> on 2013-01-02
Reviewed by Adrienne Walker.

These are leftovers from multi-sided patches that landed months ago.

* chromium/public/WebContentLayerClient.h:
(WebContentLayerClient):
* chromium/public/WebLayer.h:
* chromium/public/WebLayerTreeView.h:
* chromium/public/WebThread.h:

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

8 years agoMac and Chromium rebaselines after r138654.
rniwa@webkit.org [Thu, 3 Jan 2013 01:20:56 +0000 (01:20 +0000)]
Mac and Chromium rebaselines after r138654.

* editing/deleting/delete-to-select-table-expected.txt: Added.
* platform/chromium-mac/editing/deleting/delete-to-select-table-expected.txt: Added.
* platform/chromium/editing/deleting/delete-to-select-table-expected.txt: Removed.
* platform/efl/editing/deleting/delete-to-select-table-expected.txt: Removed.
* platform/gtk/editing/deleting/delete-to-select-table-expected.txt: Removed.
* platform/mac-lion/editing/deleting/delete-to-select-table-expected.txt: Added.
* platform/mac-wk2/editing/deleting: Added.
* platform/mac-wk2/editing/deleting/delete-to-select-table-expected.txt: Added.

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

8 years agoUnreviewed Chromium gardening.
macpherson@chromium.org [Thu, 3 Jan 2013 01:11:01 +0000 (01:11 +0000)]
Unreviewed Chromium gardening.

Rebaseline win-xp image for svg/dynamic-updates/SVGFEComponentTransferElement-dom-tableValues-attr-expected.html.

* platform/chromium-win-xp/svg/dynamic-updates/SVGFEComponentTransferElement-dom-tableValues-attr-expected.png: Added.

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

8 years agoInitialize WebInputEvent to prevent sending uninitialized bytes with IPC messages.
cdn@chromium.org [Thu, 3 Jan 2013 01:10:24 +0000 (01:10 +0000)]
Initialize WebInputEvent to prevent sending uninitialized bytes with IPC messages.
https://bugs.webkit.org/show_bug.cgi?id=105934

Reviewed by James Robinson.

* public/WebInputEvent.h:
(WebKit::WebInputEvent::WebInputEvent):

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

8 years agoStop pretending its possible to run the WebProcess in threaded mode
weinig@apple.com [Thu, 3 Jan 2013 01:06:53 +0000 (01:06 +0000)]
Stop pretending its possible to run the WebProcess in threaded mode
https://bugs.webkit.org/show_bug.cgi?id=105969

Reviewed by Alexey Proskuryakov.

- Removes WebProcess::isSeparateProcess()
- Stop storing a RunLoop on the WebProcess and just use RunLoop::main().

* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::NetworkProcessConnection):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::PluginProcessConnection):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::PageOverlay):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::close):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection):
(WebKit::WebProcess::shouldTerminate):
(WebKit::WebProcess::terminate):
(WebKit::WebProcess::didClose):
* WebProcess/WebProcess.h:
(WebProcess):
* WebProcess/efl/WebProcessMainEfl.cpp:
(WebKit::WebProcessMainEfl):
* WebProcess/gtk/WebProcessMainGtk.cpp:
(WebKit::WebProcessMainGtk):
* WebProcess/mac/WebProcessInitialization.mm:
(WebKit::initializeWebProcess):
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::WebProcessMainQt):
* WebProcess/win/WebProcessMainWin.cpp:
(WebKit::WebProcessMain):

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

8 years ago[V8] V8DOMWrapper.cpp has many more includes than necessary
abarth@webkit.org [Thu, 3 Jan 2013 01:04:29 +0000 (01:04 +0000)]
[V8] V8DOMWrapper.cpp has many more includes than necessary
https://bugs.webkit.org/show_bug.cgi?id=105968

Reviewed by Kentaro Hara.

Now that this file isn't in charge of doing everything under the sun,
it can have a more focused set of include directives.

* bindings/v8/V8DOMWrapper.cpp:

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

8 years ago[EFL][CMAKE] Remove duplicated conditionals
gyuyoung.kim@samsung.com [Thu, 3 Jan 2013 01:00:35 +0000 (01:00 +0000)]
[EFL][CMAKE] Remove duplicated conditionals
https://bugs.webkit.org/show_bug.cgi?id=105905

Reviewed by Laszlo Gombos.

.:

* Source/cmake/OptionsEfl.cmake: Remove set(WTF_USE_GLX 1).

Source/WebCore:

Remove conditionals from CMake build system, where the files being built are already wrapped with
the conditionals. It just messes cmake file up.

* PlatformEfl.cmake:

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

8 years agoAX: Chromium needs platform localized strings for media controls.
commit-queue@webkit.org [Thu, 3 Jan 2013 00:55:59 +0000 (00:55 +0000)]
AX: Chromium needs platform localized strings for media controls.
https://bugs.webkit.org/show_bug.cgi?id=105940

Patch by David Tseng <dtseng@google.com> on 2013-01-02
Reviewed by Tony Chang.

Source/Platform:

* chromium/public/WebLocalizedString.h:

Source/WebKit/chromium:

* src/LocalizedStrings.cpp:
(WebCore::localizedMediaControlElementString):
(WebCore):
(WebCore::localizedMediaControlElementHelpText):

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

8 years ago Release build fix.
ap@apple.com [Thu, 3 Jan 2013 00:53:34 +0000 (00:53 +0000)]
    Release build fix.

        * platform/network/cf/FormDataStreamCFNet.cpp: (WebCore::formFinalize):
        Use ASSERT_UNUSED for an otherwise unused variable.

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

8 years agoUnreviewed, rolling out r138661.
tony@chromium.org [Thu, 3 Jan 2013 00:43:42 +0000 (00:43 +0000)]
Unreviewed, rolling out r138661.
http://trac.webkit.org/changeset/138661
https://bugs.webkit.org/show_bug.cgi?id=104740

Compile problems on EFL

.:

* Source/cmake/WebKitMacros.cmake:

Source/WebCore:

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* UseJSC.cmake:
* UseV8.cmake:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.vcproj/WebCoreTestSupport.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGenerator.pm:
(IDLFileForInterface):
* page/make_settings.pl:
(generateCode):
(generateHeader):
(printGetterAndSetter):
(printInitializer):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::from):
(WebCore::InternalSettings::InternalSettings):
(WebCore::InternalSettings::reset):
(WebCore::InternalSettings::setPasswordEchoEnabled):
(WebCore):
(WebCore::InternalSettings::setPasswordEchoDurationInSeconds):
* testing/InternalSettings.h:
(Backup):
(InternalSettings):
* testing/InternalSettings.idl:
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::resetInternalsObject):
* testing/v8/WebCoreTestSupport.cpp:
(WebCoreTestSupport::resetInternalsObject):

Tools:

* GNUmakefile.am:
* qmake/mkspecs/features/default_post.prf:

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

8 years ago[V8] There are some extra blank lines after removing INC_STATS
abarth@webkit.org [Thu, 3 Jan 2013 00:30:50 +0000 (00:30 +0000)]
[V8] There are some extra blank lines after removing INC_STATS
https://bugs.webkit.org/show_bug.cgi?id=105964

Reviewed by Ojan Vafai.

This patch is a followup to http://trac.webkit.org/changeset/138665
that removes some extra blank lines that sed wasn't smart enough to
delete for us.

* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
(WebCore::V8CSSStyleDeclaration::namedPropertyQuery):
* bindings/v8/custom/V8DOMFormDataCustom.cpp:
(WebCore::V8DOMFormData::appendCallback):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8DOMWindow::addEventListenerCallback):
(WebCore::V8DOMWindow::removeEventListenerCallback):
(WebCore::V8DOMWindow::postMessageCallback):
* bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
(WebCore::V8DedicatedWorkerContext::postMessageCallback):
* bindings/v8/custom/V8DocumentCustom.cpp:
(WebCore::V8Document::evaluateCallback):
* bindings/v8/custom/V8GeolocationCustom.cpp:
(WebCore::V8Geolocation::getCurrentPositionCallback):
(WebCore::V8Geolocation::watchPositionCallback):
* bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
(WebCore::V8HTMLAllCollection::namedPropertyGetter):
* bindings/v8/custom/V8HTMLCollectionCustom.cpp:
(WebCore::V8HTMLCollection::namedPropertyGetter):
* bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
(WebCore::V8HTMLFormControlsCollection::namedPropertyGetter):
* bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
(WebCore::v8HTMLImageElementConstructorCallback):
* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
(WebCore::V8HTMLOptionsCollection::namedPropertyGetter):
* bindings/v8/custom/V8MessagePortCustom.cpp:
(WebCore::V8MessagePort::postMessageCallback):
* bindings/v8/custom/V8NamedNodeMapCustom.cpp:
(WebCore::V8NamedNodeMap::namedPropertyGetter):
* bindings/v8/custom/V8NotificationCustom.cpp:
(WebCore::V8Notification::requestPermissionCallback):
* bindings/v8/custom/V8PopStateEventCustom.cpp:
(WebCore::V8PopStateEvent::stateAccessorGetter):
* bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
(WebCore::V8SQLResultSetRowList::itemCallback):
* bindings/v8/custom/V8SQLTransactionCustom.cpp:
(WebCore::V8SQLTransaction::executeSqlCallback):
* bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
(WebCore::V8SQLTransactionSync::executeSqlCallback):
* bindings/v8/custom/V8StorageCustom.cpp:
(WebCore::V8Storage::namedPropertyQuery):
* bindings/v8/custom/V8StyleSheetListCustom.cpp:
(WebCore::V8StyleSheetList::namedPropertyGetter):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
(WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback):
(WebCore::V8WebGLRenderingContext::getParameterCallback):
(WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
(WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
(WebCore::V8WebGLRenderingContext::getUniformCallback):
* bindings/v8/custom/V8WorkerCustom.cpp:
(WebCore::V8Worker::postMessageCallback):

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

8 years ago [WK2 NetworkProcess] Uploading fails if a client modified the request
ap@apple.com [Thu, 3 Jan 2013 00:26:37 +0000 (00:26 +0000)]
    [WK2 NetworkProcess] Uploading fails if a client modified the request
        https://bugs.webkit.org/show_bug.cgi?id=105965

        Reviewed by Brady Eidson.

        Associating streams with additional information via a side HashMap does not work,
        because the stream we can see is an internal one, with address and other information
        not matching a stream that we created.

        It's surprising that this design issue was not causing major trouble without NetworkProcess.

        * platform/network/cf/FormDataStreamCFNet.cpp:
        (WebCore): Renamed FormContext to FormCreationContext, because this type only used
        for creation. Later, we use FormStreamFields as context.
        (WebCore::closeCurrentStream): Moved a star.
        (WebCore::formCreate): We no longer have a side map to keep updated.
        (WebCore::formFinalize): Ditto.
        (WebCore::formCopyProperty): Added an accessor to get FormData pointer from a stream.
        (WebCore::setHTTPBody): Ditto.
        (WebCore::httpBodyFromStream): Use the new property to get FormData pointer.

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

8 years agoSome renaming in the CodeCache
ggaren@apple.com [Thu, 3 Jan 2013 00:25:26 +0000 (00:25 +0000)]
Some renaming in the CodeCache
https://bugs.webkit.org/show_bug.cgi?id=105966

Reviewed by Gavin Barraclough.

CodeBlockKey => SourceCodeKey because the key is not a CodeBlock.

m_recentlyUsedFunctionCode => m_recentlyUsedFunctions to match other names.

GlobalFunctionKey => FunctionKey because the key is not unique to globalness.

m_cachedGlobalFunctions => m_globalFunctions because "cached" is redundant
for data members in an object called "CodeCache".

kMaxRootCodeBlockEntries => kMaxRootEntries because there are no non-CodeBlock
entries in a CodeBlock cache.

kMaxFunctionCodeBlocks => kMaxChildFunctionEntries to clarify that this
number models a parent-child relationship.

Also removed the initial "k" from enum constants. That's an interesting
style for calling out constants, but it's not the WebKit style.

Finally, a behavior change: Use MaxRootEntries for the limit on global
functions, and not MaxChildFunctionEntries. Previously, there was an
unused constant that seemed to have been intended for this purpose.

* runtime/CodeCache.cpp:
(JSC::CodeCache::makeSourceCodeKey):
(JSC::CodeCache::getCodeBlock):
(JSC::CodeCache::generateFunctionCodeBlock):
(JSC::CodeCache::makeFunctionKey):
(JSC::CodeCache::getFunctionExecutableFromGlobalCode):
(JSC::CodeCache::usedFunctionCode):
* runtime/CodeCache.h:
(JSC::CodeCache::clear):

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

8 years agoClean up dispatchEvent overrides and overloads
esprehn@chromium.org [Thu, 3 Jan 2013 00:21:33 +0000 (00:21 +0000)]
Clean up dispatchEvent overrides and overloads
https://bugs.webkit.org/show_bug.cgi?id=105959

Reviewed by Adam Barth.

Add OVERRIDE to all dispatchEvent overrides and use "using" instead of
reimplementing EventTarget::dispatchEvent in subclasses where having the
virtual override of dispatchEvent hides the overloads in
the superclass.

No new tests, just refactoring.

* Modules/indexeddb/IDBDatabase.h:
(IDBDatabase):
* Modules/indexeddb/IDBOpenDBRequest.h:
(IDBOpenDBRequest):
* Modules/indexeddb/IDBRequest.h:
(IDBRequest):
* Modules/indexeddb/IDBTransaction.h:
(IDBTransaction):
* dom/EventDispatchMediator.h:
(FocusEventDispatchMediator):
(BlurEventDispatchMediator):
* dom/GestureEvent.h:
(GestureEventDispatchMediator):
* dom/KeyboardEvent.h:
(KeyboardEventDispatchMediator):
* dom/MouseEvent.h:
* dom/Node.h:
(Node):
* dom/UIEvent.h:
(FocusInEventDispatchMediator):
(FocusOutEventDispatchMediator):
* dom/WheelEvent.h:
(WheelEventDispatchMediator):
* html/HTMLMediaElement.h:
* html/track/TextTrackCue.cpp:
* html/track/TextTrackCue.h:
(TextTrackCue):
* page/DOMWindow.h:
(DOMWindow):
* svg/SVGElementInstance.h:
(SVGElementInstance):

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

8 years ago[Chromium] Add Platform/chromium to include_dirs
pilgrim@chromium.org [Thu, 3 Jan 2013 00:08:50 +0000 (00:08 +0000)]
[Chromium] Add Platform/chromium to include_dirs
https://bugs.webkit.org/show_bug.cgi?id=105955

Reviewed by James Robinson.

Currently the headers in WebKit/chromium/public/Web*.h can not
include headers from the new Platform/chromium/ directory with the
"#include <public/WebFoo.h>" syntax, because the include_dirs for
dependent builds (like Chromium-within-WebKit) do not include the
new Platform/chromium/ directory. This patch adds that capability
without managing to break anything else.

* WebKit.gyp:

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

8 years agoIndexedDB: Surface a few more leveldb errors.
dgrogan@chromium.org [Wed, 2 Jan 2013 23:55:40 +0000 (23:55 +0000)]
IndexedDB: Surface a few more leveldb errors.
https://bugs.webkit.org/show_bug.cgi?id=105670

Reviewed by Tony Chang.

Two calls to old LevelDBTransaction::get slipped through the cracks.

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IndexKeyCursorImpl::loadCurrentRow):
(WebCore::IndexCursorImpl::loadCurrentRow):
  Make these two functions use safeGet instead of get.

* platform/leveldb/LevelDBTransaction.cpp:
* platform/leveldb/LevelDBTransaction.h:
  Remove get now that it is unused.

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

8 years agoDFG inlining machinery should be robust against the inline callee varying while the...
fpizlo@apple.com [Wed, 2 Jan 2013 23:54:42 +0000 (23:54 +0000)]
DFG inlining machinery should be robust against the inline callee varying while the executable stays the same
https://bugs.webkit.org/show_bug.cgi?id=105953

Reviewed by Mark Hahnenberg.

This institutes the policy that if InlineCallFrame::callee is null, then the callee and scope have already
been stored into the true call frame (i.e. the place where the call frame of the inlined call would have
been) and so any attempt to access the callee or scope should do a load instead of assuming that the value
is constant. This wires the changes through the bytecode parser, the stack scanning logic, and the compiler
optimization phases and backends.

* bytecode/CodeOrigin.cpp:
(JSC::InlineCallFrame::dump):
* bytecode/CodeOrigin.h:
(CodeOrigin):
(InlineCallFrame):
(JSC::InlineCallFrame::isClosureCall):
(JSC::CodeOrigin::stackOffset):
(JSC):
* dfg/DFGAssemblyHelpers.h:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::get):
(InlineStackEntry):
(JSC::DFG::ByteCodeParser::getScope):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
* dfg/DFGCSEPhase.cpp:
(CSEPhase):
(JSC::DFG::CSEPhase::genericPureCSE):
(JSC::DFG::CSEPhase::pureCSE):
(JSC::DFG::CSEPhase::pureCSERequiringSameInlineCallFrame):
(JSC::DFG::CSEPhase::getMyScopeLoadElimination):
(JSC::DFG::CSEPhase::performNodeCSE):
* dfg/DFGOSRExitCompiler32_64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* interpreter/CallFrame.cpp:
(JSC::CallFrame::trueCallFrame):

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

8 years agoWhen a block's height is determined by min-height/max-height, children with percentag...
commit-queue@webkit.org [Wed, 2 Jan 2013 23:54:21 +0000 (23:54 +0000)]
When a block's height is determined by min-height/max-height, children with percentage heights are sized incorrectly
https://bugs.webkit.org/show_bug.cgi?id=26559

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-01-02
Reviewed by Tony Chang.

Source/WebCore:

Percentage logical height computation now takes into account the min and max height of the container.

Test: fast/block/min-max-height-percent-height-child.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax): Added. Like constrainLogicalHeightByMinMax,
    but constrains the content box instead of the border box.
(WebCore):
(WebCore::RenderBox::computeContentLogicalHeight): Make const so it can be called from the const method
    constrainContentBoxLogicalHeightByMinMax.
(WebCore::RenderBox::computePercentageLogicalHeight): Use constrainContentBoxLogicalHeightByMinMax to properly
    respect min and max height on the containing box when computing the percentage height.
* rendering/RenderBox.h:
(RenderBox):

LayoutTests:

Add tests to ensure percent heights are correctly determined.

* fast/block/min-max-height-percent-height-child-expected.txt: Added.
* fast/block/min-max-height-percent-height-child.html: Added.

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

8 years agoUnreviewed, force InternalSettings.cpp to rebuild to try and fix the Apple Win build.
tony@chromium.org [Wed, 2 Jan 2013 23:51:20 +0000 (23:51 +0000)]
Unreviewed, force InternalSettings.cpp to rebuild to try and fix the Apple Win build.

* testing/InternalSettings.cpp:

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

8 years agoIndexedDB: Use non-const buffers in put() to avoid copies
alecflett@chromium.org [Wed, 2 Jan 2013 23:48:58 +0000 (23:48 +0000)]
IndexedDB: Use non-const buffers in put() to avoid copies
https://bugs.webkit.org/show_bug.cgi?id=105572

Reviewed by Adam Barth.

Source/WebCore:

Change the new put() method to allow the implementation to consume
or adopt the vector, to avoid copying.

No new tests as this is an interface change that will be implemented later.

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::put):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
(IDBDatabaseBackendImpl):
* Modules/indexeddb/IDBDatabaseBackendInterface.h:

Source/WebKit/chromium:

Pass on non-const Vectors to allow buffer adoption rather than copies.

* public/WebIDBDatabase.h:
(WebIDBDatabase):
(WebKit::WebIDBDatabase::put):
* src/IDBDatabaseBackendProxy.cpp:
(WebKit::IDBDatabaseBackendProxy::put):
* src/IDBDatabaseBackendProxy.h:
(IDBDatabaseBackendProxy):
* src/WebIDBDatabaseImpl.cpp:
(WebKit::WebIDBDatabaseImpl::put):
* src/WebIDBDatabaseImpl.h:
(WebIDBDatabaseImpl):
* tests/IDBDatabaseBackendTest.cpp:

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

8 years ago[V8] Remove INC_STATS because it is unused
abarth@webkit.org [Wed, 2 Jan 2013 23:41:17 +0000 (23:41 +0000)]
[V8] Remove INC_STATS because it is unused
https://bugs.webkit.org/show_bug.cgi?id=105957

Reviewed by Ojan Vafai.

We haven't been able to compile with INC_STATS turned on in a long
time. This patch just removes this ancient cruft. I generated this
patch using

find . -type f | xargs sed -i '/INC_STATS/d'

and then fixing up V8BindingMacros.h.

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

8 years agoObjective-C API for JavaScriptCore
barraclough@apple.com [Wed, 2 Jan 2013 23:34:48 +0000 (23:34 +0000)]
Objective-C API for JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=105889

Reviewed by Geoff Garen.

Fixes for a number of issues raised by Darin.

* API/APIJSValue.h:
    - Fix typos in comment
    - Add newline before NS_CLASS_AVAILABLE(10_9, NA)
    - cls -> expectedClass
    - key type for -setObject:forKeyedSubscript: is now NSObject <NSCopying> *
* API/JSBase.h:
    - JS_OBJC_API_ENABLED no longer implies __OBJC__
* API/JSBlockAdaptor.mm:
(BlockArgumentStruct::BlockArgumentStruct):
(BlockArgumentStruct):
    - mark virtual functions as virtual, override, and private
    - refactor out buffer allocation for struct types
(BlockArgumentTypeDelegate::typeVoid):
(BlockArgumentTypeDelegate::typeBlock):
(BlockArgumentTypeDelegate::typeStruct):
    - return nil -> return 0
(BlockResultStruct::BlockResultStruct):
(BlockResultStruct):
    - mark virtual functions as virtual, override, and private
    - refactor out buffer allocation for struct types
(buildBlockSignature):
    - %lu is not an appropriate format specifier for NSInteger
(-[JSBlockAdaptor initWithBlockSignatureFromProtocol:]):
    - nil check [super init]
(-[JSBlockAdaptor blockMatchesSignature:]):
(-[JSBlockAdaptor blockFromValue:inContext:withException:]):
    - ctx -> contextRef
* API/JSContext.h:
    - Fix typos in comment
    - Add newline before NS_CLASS_AVAILABLE(10_9, NA)
    - key type for -setObject:forKeyedSubscript: is now NSObject <NSCopying> *
* API/JSContext.mm:
(-[JSContext initWithVirtualMachine:]):
    - nil check [super init]
(+[JSContext currentArguments]):
    - args -> argumentArray
(-[JSContext setObject:forKeyedSubscript:]):
    - key type for -setObject:forKeyedSubscript: is now NSObject <NSCopying> *
(-[JSContext dealloc]):
(-[JSContext protect:]):
(-[JSContext unprotect:]):
    - m_protected -> m_protectCounts
* API/JSValue.mm:
(-[JSValue toObjectOfClass:]):
    - cls -> expectedClass
(-[JSValue toBool]):
(-[JSValue deleteProperty:]):
(-[JSValue hasProperty:]):
(-[JSValue isUndefined]):
(-[JSValue isNull]):
(-[JSValue isBoolean]):
(-[JSValue isNumber]):
(-[JSValue isString]):
(-[JSValue isObject]):
(-[JSValue isEqualToObject:]):
(-[JSValue isEqualWithTypeCoercionToObject:]):
(-[JSValue isInstanceOf:]):
    - removed ? YES : NO
(-[JSValue callWithArguments:]):
(-[JSValue constructWithArguments:]):
(-[JSValue invokeMethod:withArguments:]):
    - args -> argumentArray
(+[JSValue valueWithPoint:inContext:]):
(+[JSValue valueWithRange:inContext:]):
(+[JSValue valueWithRect:inContext:]):
(+[JSValue valueWithSize:inContext:]):
    - [NSNumber numberWithFloat:] -> @()
(-[JSValue objectForKeyedSubscript:]):
(-[JSValue setObject:forKeyedSubscript:]):
    - key type for -setObject:forKeyedSubscript: is now NSObject <NSCopying> *
(JSContainerConvertor):
(JSContainerConvertor::isWorkListEmpty):
(JSContainerConvertor::convert):
(ObjcContainerConvertor):
(ObjcContainerConvertor::isWorkListEmpty):
    - remove WTF::
    - isWorkListEmpty is const
(objectToValue):
    -  use fast enumeration
(-[JSValue initWithValue:inContext:]):
    - nil check [super init]
(getStructTagHandler):
    - m_structHandlers -> structHandlers
* API/JSVirtualMachine.h:
    - Add newline before NS_CLASS_AVAILABLE(10_9, NA)
* API/JSVirtualMachine.mm:
(-[JSVirtualMachine init]):
    - nil check [super init]
* API/JSWrapperMap.mm:
(selectorToPropertyName):
(copyPrototypeProperties):
    - remove WTF::
    - use static_cast
(-[JSObjCClassInfo initWithContext:forClass:superClassInfo:]):
(-[JSWrapperMap initWithContext:]):
    - nil check [super init]
(-[JSWrapperMap wrapperForObject:]):
(tryUnwrapObjcObject):
    - enable ASSERT
(getJSExportProtocol):
(getNSBlockClass):
    - remove if check on initializing static
* API/JavaScriptCore.h:
    - JS_OBJC_API_ENABLED no longer implies __OBJC__
* API/ObjCCallbackFunction.mm:
(CallbackArgumentOfClass):
(CallbackArgumentOfClass::~CallbackArgumentOfClass):
(CallbackArgumentStruct::CallbackArgumentStruct):
(CallbackArgumentStruct):
(CallbackArgumentBlockCallback):
    - mark virtual functions as virtual, override, and private
    - refactor out buffer allocation for struct types
(ArgumentTypeDelegate::typeVoid):
(ArgumentTypeDelegate::typeOfClass):
(ArgumentTypeDelegate::typeStruct):
    - return nil -> return 0
(CallbackResultStruct::CallbackResultStruct):
(CallbackResultStruct):
    - mark virtual functions as virtual, override, and private
    - refactor out buffer allocation for struct types
(ResultTypeDelegate::typeStruct):
    - return nil -> return 0
(ObjCCallbackFunction):
    - remove WTF::
(objCCallbackFunctionFinalize):
    - use static_cast
(objCCallbackFunctionCallAsFunction):
    - Fix typos in comment
(createObjCCallbackFunctionClass):
(objCCallbackFunctionClass):
    - Split out createObjCCallbackFunctionClass from objCCallbackFunctionClass
(ObjCCallbackFunction::call):
    - ctx -> contextRef
(blockSignatureContainsClass):
    - Remove tri-state enum.
(skipNumber):
    - isdigit -> isASCIIDigit
(objCCallbackFunctionForInvocation):
    - clean up & comment blockSignatureContainsClass() usage
(tryUnwrapBlock):
    - use static_cast
* API/ObjcRuntimeExtras.h:
(forEachProtocolImplementingProtocol):
(forEachMethodInClass):
(forEachMethodInProtocol):
(forEachPropertyInProtocol):
    - Remove WTF::
    - Remove if (count) checks
(skipPair):
    - NSUInteger -> size_t
(StringRange):
(StringRange::operator const char*):
(StringRange::get):
(StructBuffer):
(StructBuffer::StructBuffer):
(StructBuffer::~StructBuffer):
(StructBuffer::operator void*):
    - Added helper for creating an aligned buffer, used by struct conversion invocations.
(parseObjCType):
    - *(position++) -> *position++
* API/tests/testapi.c:
    - PLATFORM(MAC) -> JS_OBJC_API_ENABLED
* API/tests/testapi.m:
(blockSignatureContainsClass):
    - Remove tri-state enum.
(testObjectiveCAPI):
    - Added more result type checks.

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

8 years agoAdd a failing test expectation to a test added by r136697.
rniwa@webkit.org [Wed, 2 Jan 2013 23:32:14 +0000 (23:32 +0000)]
Add a failing test expectation to a test added by r136697.
The failure is tracked by the bug 105960.

* platform/mac-wk2/TestExpectations:

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

8 years agoAdd a failing test expectations to a test added by r132411.
rniwa@webkit.org [Wed, 2 Jan 2013 23:23:28 +0000 (23:23 +0000)]
Add a failing test expectations to a test added by r132411.
The patch updated DumpRenderTree but didn't update WebKitTestRunner.
The failure is tracked by the bug 105958.

* platform/mac-wk2/TestExpectations:

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

8 years agoGenerate internal.settings from Settings.in
tony@chromium.org [Wed, 2 Jan 2013 23:15:23 +0000 (23:15 +0000)]
Generate internal.settings from Settings.in
https://bugs.webkit.org/show_bug.cgi?id=104740

Reviewed by Adam Barth.

.:

* Source/cmake/WebKitMacros.cmake: Specify additional output files from make_settings.pl.

Source/WebCore:

If the setting is declared in Settings.in and is a basic type, generate a
setter function at internals.settings.

InternalSettingsGenerated.idl is created by make_settings.pl. InternalSettings.idl
inherits from InternalSettingsGenerated.idl so we can override generated functions if
needed or add additional custom setters.

This patch removes 2 password echo methods from InternalSettings.idl since they are
auto generated. There are other methods we could remove, but I'll do that in a followup.

No new tests, existing tests should pass. Specifically, editing/input/password* tests should pass.

* CMakeLists.txt: Add generated cpp file to the testing lib.
* DerivedSources.make: Add generated idl file and specify all the outputs of make_settings.pl
* DerivedSources.pri: Generate idl file before generating bindings and include generated idl
for bindings generation.
* GNUmakefile.am: Specify all the generated files of make_settings.pl. Add generated idl to
list of files to be processed and resulting output to be compiled.
* UseJSC.cmake: Add generated idl file to list of idl files to process.
* UseV8.cmake: Same as UseJSC.cmake.
* WebCore.gyp/WebCore.gyp: Run make_settings.pl earlier so we can run the output through the
bindings generator.
* WebCore.gypi: Add new files.
* WebCore.vcproj/WebCoreTestSupport.vcproj: Add new files.
* WebCore.xcodeproj/project.pbxproj: Add new files.
* bindings/scripts/CodeGenerator.pm:
(IDLFileForInterface): Add current directory to the include path so DerivedSources.make can
find the generated idl file.
* page/make_settings.pl:
(generateCode): Generate InternalSettingsGenerated.{idl,h,cpp}.
(generateSettingsMacrosHeader): Rename since we're generating 2 headers now.
(setterFunctionName): Helper function for naming a setter.
(printGetterAndSetter): Use setterFunctionName.
(enumerateParsedItems): Helper function that visits each parsed item.
(generateInternalSettingsIdlFile): Generate idl file.
(generateInternalSettingsHeaderFile): Generate header file.
(generateInternalSettingsCppFile): Generate C++ file.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup): Remove password echo members.
(WebCore::InternalSettings::Backup::restoreTo): Remove password echo members.
(InternalSettingsWrapper): We can't use RefCountedSupplemental because we're we're already
RefCounted. Create a wrapper class to wrap the RefCounted InternalSettings for Supplement<>::provideTo,
which uses an OwnPtr.
(WebCore::InternalSettingsWrapper::InternalSettingsWrapper): Wraps an InternalSettings that the Page can own.
(WebCore::InternalSettingsWrapper::~InternalSettingsWrapper): Clear's m_page when the Page goes away.
(WebCore::InternalSettingsWrapper::internalSettings): Unwrap InternalSettings.
(WebCore::InternalSettings::from): Update to use InternalSettingsWrapper.
(WebCore::InternalSettings::InternalSettings): Call base class constructor.
(WebCore::InternalSettings::resetToConsistentState): Renamed from reset() and pass through to base class.
Also remove unnecessary pageScaleFactor reset (done in Internals::resetToConsistentState).
* testing/InternalSettings.h:
(Backup): Remove password echo members.
(WebCore::InternalSettings::create): Create an instance instead of using new.
(WebCore::InternalSettings::hostDestroyed): Clear the page. This is similar to the code that
RefCountedSupplemental has.
* testing/InternalSettings.idl: Extends InternalSettingsGenerated.
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::resetInternalsObject): Rename to resetToConsistentState to be like other code.
* testing/v8/WebCoreTestSupport.cpp:
(WebCoreTestSupport::resetInternalsObject): Rename to resetToConsistentState to be like other code.
Remove an unused header.

Tools:

* GNUmakefile.am: Compile new generated files on GTK+.
* qmake/mkspecs/features/default_post.prf: Qt: Make it so an action
with both extra_sources and add_output_to_sources=false will still
compile the files in extra_sources. This makes it possible to compile
InternalSettingsGenerated.cpp and not be confused by
InternalSettingsGenerated.idl.

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

8 years agoAdd a Mac WebKit2 test expectation for the bug 105954.
rniwa@webkit.org [Wed, 2 Jan 2013 23:15:13 +0000 (23:15 +0000)]
Add a Mac WebKit2 test expectation for the bug 105954.

* platform/mac-wk2/TestExpectations:

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

8 years agoAdd a failing test expectation for the bug 105954.
rniwa@webkit.org [Wed, 2 Jan 2013 23:06:25 +0000 (23:06 +0000)]
Add a failing test expectation for the bug 105954.

* platform/mac-wk2/TestExpectations:

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

8 years agoHTML preload scanner doesn't need to remember whether we're scanning the body
abarth@webkit.org [Wed, 2 Jan 2013 23:06:14 +0000 (23:06 +0000)]
HTML preload scanner doesn't need to remember whether we're scanning the body
https://bugs.webkit.org/show_bug.cgi?id=105945

Reviewed by Eric Seidel.

As far as I can tell, no one uses this state.

* html/parser/CSSPreloadScanner.cpp:
(WebCore::CSSPreloadScanner::CSSPreloadScanner):
(WebCore::CSSPreloadScanner::scan):
(WebCore::CSSPreloadScanner::emitRule):
* html/parser/CSSPreloadScanner.h:
(CSSPreloadScanner):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::PreloadTask::preload):
(WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
(WebCore::HTMLPreloadScanner::processToken):
* html/parser/HTMLPreloadScanner.h:
(HTMLPreloadScanner):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::preload):
* loader/cache/CachedResourceLoader.h:
(CachedResourceLoader):

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

8 years agoCrash in WebCore::Element::cloneElementWithoutChildren.
inferno@chromium.org [Wed, 2 Jan 2013 23:03:24 +0000 (23:03 +0000)]
Crash in WebCore::Element::cloneElementWithoutChildren.
https://bugs.webkit.org/show_bug.cgi?id=105949

Reviewed by Ryosuke Niwa.

RefPtr |ancestors| vector since its elements can be destroyed from mutation events
fired in CompositeEditCommand::appendNode.

No new tests. The testcase relies on recursive DOM mutations and does not minimize.

* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock):
(WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock):
(WebCore::InsertParagraphSeparatorCommand::doApply):
* editing/InsertParagraphSeparatorCommand.h:
(InsertParagraphSeparatorCommand):

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

8 years agoUnreviewed. Build fix after reintroducing r138331.
roger_fong@apple.com [Wed, 2 Jan 2013 23:00:10 +0000 (23:00 +0000)]
Unreviewed. Build fix after reintroducing r138331.

Attempted to remove WebKit2 from Apple Windows port in r138331 but two vsprops files were missing.

* WebKit.vcproj/WebKitApple.vsprops: Added.
* WebKit.vcproj/WebKitDirectX.vsprops: Added.

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

8 years agoFactor out NetworkProcess initialization into its own function in preparation of...
weinig@apple.com [Wed, 2 Jan 2013 23:00:00 +0000 (23:00 +0000)]
Factor out NetworkProcess initialization into its own function in preparation of adding a NetworkProcess service
https://bugs.webkit.org/show_bug.cgi?id=105946

Reviewed by Brady Eidson.

* NetworkProcess/NetworkProcess.h:
* NetworkProcess/mac/NetworkProcessInitialization.h: Added.
(NetworkProcessInitializationParameters):
* NetworkProcess/mac/NetworkProcessInitialization.mm: Added.
(WebKit::initializeNetworkProcess):
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::initializeSandbox):
(WebKit::NetworkProcess::platformInitialize):
* NetworkProcess/mac/NetworkProcessMainMac.mm:
(WebKit::NetworkProcessMain):
* WebKit2.xcodeproj/project.pbxproj:

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

8 years agoCrash in WebCore::InlineBox::deleteLine
commit-queue@webkit.org [Wed, 2 Jan 2013 22:52:58 +0000 (22:52 +0000)]
Crash in WebCore::InlineBox::deleteLine
https://bugs.webkit.org/show_bug.cgi?id=93448

Patch by Douglas Stockwell <dstockwell@chromium.org> on 2013-01-02
Reviewed by Eric Seidel.

Source/WebCore:

When we ran off the end of the line while looking for line breaks in an
inline with white-space:nowrap nested in a block with white-space:pre
it was possible for the line break to be set at or before the current
position -- this could result in duplications in the render tree or
infinite looping.

This patch changes the "fixup" logic that runs after we have finished
iterating through elements and text and have potentially found a break
point. In the case of a block setting white-space:pre we would back up
a character in some cases. Not doing so could leave whitespace that
should have been collapsed at the end of an inline.

For example in '<span style="white-space:nowrap">x_</span>_y' if a
break was inserted before 'y' the space after 'x' would still be
rendered (rather than be collapsed with the break).

To avoid this problem we will not take the opportunity to break until
we have finished collapsing whitespace.

Tests: fast/text/whitespace/inline-whitespace-wrapping-1.html
       fast/text/whitespace/inline-whitespace-wrapping-2.html
       fast/text/whitespace/inline-whitespace-wrapping-3.html
       fast/text/whitespace/inline-whitespace-wrapping-4.html
       fast/text/whitespace/nowrap-white-space-collapse.html
       fast/text/whitespace/pre-block-normal-inline-crash-1.html
       fast/text/whitespace/pre-block-normal-inline-crash-2.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextLineBreak): Collapse
whitespace before breaking. Avoid setting the break before the current
position.

LayoutTests:

* editing/deleting/delete-block-table-expected.txt:
* editing/execCommand/selectAll-expected.txt: Renamed from LayoutTests/platform/chromium/editing/execCommand/selectAll-expected.txt.
* fast/text/whitespace/inline-whitespace-wrapping-1-expected.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-1.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-2-expected.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-2.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-3-expected.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-3.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-4-expected.html: Added.
* fast/text/whitespace/inline-whitespace-wrapping-4.html: Added.
* fast/text/whitespace/nowrap-white-space-collapse-expected.html: Added.
* fast/text/whitespace/nowrap-white-space-collapse.html: Added.
* fast/text/whitespace/pre-block-normal-inline-crash-1-expected.txt: Added.
* fast/text/whitespace/pre-block-normal-inline-crash-1.html: Added.
* fast/text/whitespace/pre-block-normal-inline-crash-2-expected.txt: Added.
* fast/text/whitespace/pre-block-normal-inline-crash-2.html: Added.
* platform/chromium-win/editing/deleting/delete-to-select-table-expected.txt:
* platform/chromium-win/editing/execCommand/print-expected.txt:
* platform/chromium-win/editing/execCommand/selectAll-expected.txt:
* platform/chromium-win/editing/inserting/editable-html-element-expected.txt:
* platform/efl/editing/execCommand/selectAll-expected.txt: Removed.
* platform/gtk/editing/execCommand/selectAll-expected.txt: Removed.
* platform/mac/editing/execCommand/selectAll-expected.txt: Removed.

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

8 years agoREGRESSION: Review tool sometimes doesn't include some comments in preview & posts
ojan@chromium.org [Wed, 2 Jan 2013 22:45:54 +0000 (22:45 +0000)]
REGRESSION: Review tool sometimes doesn't include some comments in preview & posts
https://bugs.webkit.org/show_bug.cgi?id=105252

Reviewed by Tony Chang.

When adding context, the LineContainer for the context line can get removed.
In that case, forEachLine needs to know to keep looping past that line number.

Also, make it so that you can't leave comments on context lines.

* code-review-test.html:
* code-review.js:

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

8 years ago[BlackBerry] Cached frame shouldn't access the page when being destroyed
yoli@rim.com [Wed, 2 Jan 2013 22:41:16 +0000 (22:41 +0000)]
[BlackBerry] Cached frame shouldn't access the page when being destroyed
https://bugs.webkit.org/show_bug.cgi?id=105942

Reviewed by George Staikos.

In order to prevent our FrameLoaderClient from dangling WebPagePrivate object in any case,
this patches clear the m_webPagePrivate pointer when the frame is detached or cached.

RIM PR# 272137.

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::isMainFrame):
(WebCore::FrameLoaderClientBlackBerry::detachedFromParent2):
(WebCore::FrameLoaderClientBlackBerry::didSaveToPageCache):
(WebCore::FrameLoaderClientBlackBerry::didRestoreFromPageCache):

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

8 years agoDFG should not use the InlineCallFrame's callee when it could have used the executabl...
fpizlo@apple.com [Wed, 2 Jan 2013 22:41:07 +0000 (22:41 +0000)]
DFG should not use the InlineCallFrame's callee when it could have used the executable istead
https://bugs.webkit.org/show_bug.cgi?id=105947

Reviewed by Mark Hahnenberg.

We shouldn't use the callee to get the executable when we have the executable already. Not only
does this make the logic more clear, but it also allows for a world where the executable is known
but the callee isn't.

* dfg/DFGAssemblyHelpers.h:
(JSC::DFG::AssemblyHelpers::strictModeFor):

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

8 years agoAdd a test expectation for the bug 105952.
rniwa@webkit.org [Wed, 2 Jan 2013 22:34:04 +0000 (22:34 +0000)]
Add a test expectation for the bug 105952.

* platform/wk2/TestExpectations:

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

8 years agoUnreviewed, rolling out r138403.
commit-queue@webkit.org [Wed, 2 Jan 2013 22:27:55 +0000 (22:27 +0000)]
Unreviewed, rolling out r138403.
http://trac.webkit.org/changeset/138403
https://bugs.webkit.org/show_bug.cgi?id=105950

Fixing e138331 which was rolled out in r138403 (Requested by
rfong on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-02

Source/WebKit/win:

* WebKit.vcproj/WebKit.sln:
* WebKit.vcproj/WebKit.vcproj:
* WebKit.vcproj/WebKitLibCommon.vsprops:
* WebKit.vcproj/WebKitLibDebug.vsprops:
* WebKit.vcproj/WebKitLibDebugAll.vsprops:
* WebKit.vcproj/WebKitLibProduction.vsprops:
* WebKit.vcproj/WebKitLibRelease.vsprops:

Source/WebKit2:

* win/WebKit2.def.in:

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

8 years agoAdd a failing test expectation to a test added by r138380 on Mac WK2.
rniwa@webkit.org [Wed, 2 Jan 2013 22:23:15 +0000 (22:23 +0000)]
Add a failing test expectation to a test added by r138380 on Mac WK2.
The failure is tracked by the bug 105948.

* platform/mac-wk2/TestExpectations:

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

8 years agoRemove webkitPostMessage
abarth@webkit.org [Wed, 2 Jan 2013 22:14:28 +0000 (22:14 +0000)]
Remove webkitPostMessage
https://bugs.webkit.org/show_bug.cgi?id=105910

Reviewed by Kentaro Hara.

The vendor-prefixed version of postMessage was never widely used.
We've been compiling it out of the Chromium port for a while now and
haven't received any reports of compatibility problems. I've done a
number of web searches for uses of the API and personally contacted a
handful of authors I found using the API, all of whom have now moved to
the identical unprefixed API. We've publicied the prefix removal in a
blog post:

http://blog.chromium.org/2012/11/a-web-developers-guide-to-latest-chrome.html

and discussed it on webkit-dev:

http://lists.macosforge.org/pipermail/webkit-dev/2012-September/022189.html

We've done our diligence, and now we should remove the API from the
remainder of the ports.

* bindings/js/JSDOMWindowCustom.cpp:
* bindings/js/JSDedicatedWorkerContextCustom.cpp:
* bindings/js/JSMessagePortCustom.cpp:
* bindings/js/JSWorkerCustom.cpp:
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8DOMWindow::postMessageCallback):
* bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
(WebCore::V8DedicatedWorkerContext::postMessageCallback):
* bindings/v8/custom/V8MessagePortCustom.cpp:
(WebCore::V8MessagePort::postMessageCallback):
* bindings/v8/custom/V8WorkerCustom.cpp:
(WebCore::V8Worker::postMessageCallback):
* dom/MessagePort.idl:
* page/DOMWindow.idl:
* workers/DedicatedWorkerContext.idl:
* workers/Worker.idl:

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

8 years agoX-XSS-Protection report-uri doesn't work with mode=block
tsepez@chromium.org [Wed, 2 Jan 2013 22:11:24 +0000 (22:11 +0000)]
X-XSS-Protection report-uri doesn't work with mode=block
https://bugs.webkit.org/show_bug.cgi?id=105907

Reviewed by Adam Barth.

Appears to work as-is, but the test was missing for this case. Checking
for completion is complicated by the frame navigating to about:blank, rather
than the echo-report page, so check it from the parent frame.

* http/tests/security/xssAuditor/report-script-tag-full-block-expected.txt: Added.
* http/tests/security/xssAuditor/report-script-tag-full-block.html: Added.
* http/tests/security/xssAuditor/resources/echo-intertag.pl:

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

8 years ago[chromium] Mark webaudio/automatic-pull-node.html as Timeout for XP
tdanderson@chromium.org [Wed, 2 Jan 2013 22:06:39 +0000 (22:06 +0000)]
[chromium] Mark webaudio/automatic-pull-node.html as Timeout for XP
https://bugs.webkit.org/show_bug.cgi?id=105941

Unreviewed gardening.

* platform/chromium/TestExpectations:

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

8 years agoRebaseline tests after r137798 and update test expectations per bug 105943.
rniwa@webkit.org [Wed, 2 Jan 2013 22:03:13 +0000 (22:03 +0000)]
Rebaseline tests after r137798 and update test expectations per bug 105943.

* platform/mac-wk2/TestExpectations:
* platform/mac-wk2/compositing/rtl/rtl-fixed-expected.txt:
* platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:

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

8 years agoDFG inliner should not use the callee's bytecode variable for resolving references...
fpizlo@apple.com [Wed, 2 Jan 2013 21:28:28 +0000 (21:28 +0000)]
DFG inliner should not use the callee's bytecode variable for resolving references to the callee in inlined code
https://bugs.webkit.org/show_bug.cgi?id=105938

Reviewed by Mark Hahnenberg.

This simplifies a bunch of code for referring to the callee. It also ought to simplify how we do
closure call inlining: for inlined closure call frames we will simply require that the callee is
already stashed on the stack in the Callee slot in the inline call frame header.

* dfg/DFGByteCodeParser.cpp:
(ByteCodeParser):
(JSC::DFG::ByteCodeParser::getDirect):
(JSC::DFG::ByteCodeParser::get):
(InlineStackEntry):
(JSC::DFG::ByteCodeParser::InlineStackEntry::remapOperand):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
(JSC::DFG::ByteCodeParser::parse):

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

8 years agoOptimize TransformationMatrix::multiply() for x86_64
benjamin@webkit.org [Wed, 2 Jan 2013 21:19:57 +0000 (21:19 +0000)]
Optimize TransformationMatrix::multiply() for x86_64
https://bugs.webkit.org/show_bug.cgi?id=105719

Reviewed by Sam Weinig.

On x86_64, we have access to 16 XMM registers. This can hold 32 double values.
We can use that in two ways to optimize matrix multiplications:
-Keep the source matrix completely in registers. Write the result directly in
 the source matrix's memory. This avoids the memcpy at the end of the multiplication
 and various memory operations.
-Use SIMD with SSE to perform 2 operations at a time.

The parameter from the second matrix are loaded one by one in XMM registers.
Loading them with SSE then shuffling the values perform worse than loading
one by one.

This is only enabled on 64bits as x86 only has access to 8 XMM registers and
the function should be written differently.

On a i5, TransformationMatrix::multiply() perform about 3 times faster with the change.

* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::TransformationMatrix::multiply):
* platform/graphics/transforms/TransformationMatrix.h:
(TransformationMatrix): Fix an incorrect comment. Unify the comment with the cpp file.

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

8 years agoClean up the loadXXXStyle() idiom in StyleResolver.
mkwst@chromium.org [Wed, 2 Jan 2013 21:13:56 +0000 (21:13 +0000)]
Clean up the loadXXXStyle() idiom in StyleResolver.
https://bugs.webkit.org/show_bug.cgi?id=105903

Reviewed by Darin Adler.

This patch refactors 'loadViewSourceStyle' in order to avoid the
necessity of each call site checking whether the relevant data has
been loaded. The new 'viewSourceStyle' will load the data if required,
and return a pointer which can be used directly.

No new tests, as this refactoring should exhibit no visible change in
behavior.

* css/StyleResolver.cpp:
(WebCore::viewSourceStyle):
    Lazily populate the static 'defaultViewSourceStyle' with data. I
    haven't removed the outer variable, as it's used directly in
    StyleResolver::reportMemoryUsage.
(WebCore::StyleResolver::matchUARules):
(WebCore::StyleResolver::collectFeatures):
    Use the new hotness rather than the old, lame method.

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

8 years agoYet another Windows build fix attempt. Try exporting more symbols.
rniwa@webkit.org [Wed, 2 Jan 2013 20:49:53 +0000 (20:49 +0000)]
Yet another Windows build fix attempt. Try exporting more symbols.

* win/WebKit2.def.in:

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

8 years agoView source mode is missing the processing instruction line.
esprehn@chromium.org [Wed, 2 Jan 2013 20:48:33 +0000 (20:48 +0000)]
View source mode is missing the processing instruction line.
https://bugs.webkit.org/show_bug.cgi?id=15961

Reviewed by Adam Barth.

Add a test for XML documents shown in viewsource mode. The bug
with the missing processing instruction line was fixed long
ago with the HTML5 parser rewrite so this just adds a test.

* fast/frames/viewsource-xml-expected.txt: Added.
* fast/frames/viewsource-xml.html: Added.

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

8 years agoAnother Windows port build fix attempt. Try not exporting this symbol from JSC
rniwa@webkit.org [Wed, 2 Jan 2013 20:40:42 +0000 (20:40 +0000)]
Another Windows port build fix attempt. Try not exporting this symbol from JSC
since it's also compiled in WebCore.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

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

8 years agoREGRESSION (r138464): Safari hangs when opening Privacy preferences
ap@apple.com [Wed, 2 Jan 2013 20:39:24 +0000 (20:39 +0000)]
REGRESSION (r138464): Safari hangs when opening Privacy preferences
https://bugs.webkit.org/show_bug.cgi?id=105933

Reviewed by Sam Weinig.

Quick and dirty fix - added a special case for main thread. But I'm not sure if
dispatch_sync on main queue is really the best idiom here.

* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::getPluginInfoFromCarbonResources):

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

8 years agoRemove old-run-webkit-tests support from webkitpy
abarth@webkit.org [Wed, 2 Jan 2013 20:37:53 +0000 (20:37 +0000)]
Remove old-run-webkit-tests support from webkitpy
https://bugs.webkit.org/show_bug.cgi?id=105619

Reviewed by Eric Seidel.

This patch removes support for webkitpy parsing the
old-run-webkit-tests results format. There doesn't seem to be any
reason to keep this code around anymore now that most bots have
switched to new-run-webkit-tests.

* Scripts/webkitpy/common/net/buildbot/buildbot.py:
(Builder.fetch_layout_test_results):
* Scripts/webkitpy/common/net/layouttestresults.py:
(path_for_layout_test):
(LayoutTestResults.results_from_string):
(LayoutTestResults):
* Scripts/webkitpy/common/net/layouttestresults_unittest.py:
(LayoutTestResultsTest.test_results_from_string):
* Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
(test_flaky_test_failure):
* Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
(LayoutTestResultsReaderTest.test_missing_layout_test_results):
* Scripts/webkitpy/tool/bot/patchanalysistask.py:
(PatchAnalysisTask._test_patch):
* Scripts/webkitpy/tool/commands/queuestest.py:
(QueuesTest.assert_queue_outputs):

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

8 years agoUnreviewed, rolling out r138627.
rniwa@webkit.org [Wed, 2 Jan 2013 20:33:18 +0000 (20:33 +0000)]
Unreviewed, rolling out r138627.
http://trac.webkit.org/changeset/138627
https://bugs.webkit.org/show_bug.cgi?id=105935

This patch doesn't fix Windows port build failure (Requested
by rniwa on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-01-02

* WebCore.vcproj/WebCore.vcproj:

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

8 years agoTransitions and animations do not apply to CSS ::before and ::after pseudo-elements
esprehn@chromium.org [Wed, 2 Jan 2013 20:31:44 +0000 (20:31 +0000)]
Transitions and animations do not apply to CSS ::before and ::after pseudo-elements
https://bugs.webkit.org/show_bug.cgi?id=92591

Reviewed by Eric Seidel.

.:

Expose Element::pseudoElement for Internals.

* Source/autotools/symbols.filter:

Source/WebCore:

The new DOM based :before and :after pseudo elements support animations
and transitions already, but I had disabled support so we could turn them
on in a separate step. This patch just removes the checks and adds tests.

This also adds two methods to internals to allow pausing animations and
transitions on pseudo elements at predictable locations so the tests
are not flaky.

Tests: fast/css-generated-content/pseudo-animation.html
       fast/css-generated-content/pseudo-transition.html

* WebCore.exp.in:
* page/animation/AnimationController.cpp:
(WebCore::AnimationController::updateAnimations):
* testing/Internals.cpp:
(WebCore::Internals::pauseAnimationAtTimeOnPseudoElement):
(WebCore::Internals::pauseTransitionAtTimeOnPseudoElement):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

LayoutTests:

Add tests that check if animations and transitions play for pseudo
:before and :after pseudo elements.

* fast/css-generated-content/pseudo-animation-expected.txt: Added.
* fast/css-generated-content/pseudo-animation.html: Added.
* fast/css-generated-content/pseudo-transition-expected.txt: Added.
* fast/css-generated-content/pseudo-transition.html: Added.

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

8 years agoImplement WebIDL-style string constants in WebAudio
crogers@google.com [Wed, 2 Jan 2013 20:27:40 +0000 (20:27 +0000)]
Implement WebIDL-style string constants in WebAudio
https://bugs.webkit.org/show_bug.cgi?id=105058

Reviewed by Kentaro Hara.

Source/WebCore:

See Deprecation Notes for more detail:
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#DeprecationNotes

PannerNode, BiquadFilterNode, OscillatorNode constants must support WebIDL-style string constants.
Legacy support in the setters for the old integer values should be supported.

This patch handles the changes for OscillatorNode.

* GNUmakefile.list.am:
* Modules/webaudio/OscillatorNode.cpp:
(WebCore::OscillatorNode::OscillatorNode):
(WebCore::OscillatorNode::type):
(WebCore):
(WebCore::OscillatorNode::setType):
* Modules/webaudio/OscillatorNode.h:
* Modules/webaudio/OscillatorNode.idl:
* Target.pri:
* UseJSC.cmake:
* UseV8.cmake:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSOscillatorNodeCustom.cpp: Copied from Source/WebCore/Modules/webaudio/OscillatorNode.idl.
(WebCore):
(WebCore::JSOscillatorNode::setType):
* bindings/v8/custom/V8OscillatorNodeCustom.cpp: Copied from Source/WebCore/Modules/webaudio/OscillatorNode.idl.
(WebCore):
(WebCore::V8OscillatorNode::typeAccessorSetter):

LayoutTests:

* webaudio/oscillator-basic-expected.txt:
* webaudio/oscillator-basic.html:
* webaudio/resources/audio-testing.js:

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

8 years agoRegression (r132935): WebKit breaks between <nobr> tags
robert@webkit.org [Wed, 2 Jan 2013 20:18:15 +0000 (20:18 +0000)]
Regression (r132935): WebKit breaks between <nobr> tags
https://bugs.webkit.org/show_bug.cgi?id=11857

Reviewed by David Hyatt.

Source/WebCore:

The fix for bug 29648 in http://trac.webkit.org/changeset/132935 was too broad - it caused us
to find linebreaks in autowrap containers between non-wrapping elements where there was no
whitespace to allow the break. This reverts the code change in r132935 and ensures we attempt
to move below floats when inside an autowrap container but leaves the treatment of non-wrapping
elements in an autowrap container unaffected.

Test: fast/inline/break-between-nobr.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):

LayoutTests:

* fast/inline/break-between-nobr-expected.html: Added.
* fast/inline/break-between-nobr.html: Added.

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

8 years ago[chromium] Use top level field for gesture event source
rjkroege@chromium.org [Wed, 2 Jan 2013 20:16:57 +0000 (20:16 +0000)]
[chromium] Use top level field for gesture event source
https://bugs.webkit.org/show_bug.cgi?id=105664

Reviewed by Adam Barth.

Previously, only GestureFlingStart subtypes of WebGestureEvent
had a deviceSource flag. A previous CL added a top-level
deviceSource field for all WebGestureEvent. Now that this field
is populated in Chromium, use it as necessary in the Chromium
WebKit layer.

No new tests: covered by existing tests.

* src/WebCompositorInputHandlerImpl.cpp:
(WebKit::WebCompositorInputHandlerImpl::handleGestureFling):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleGestureEvent):
* tests/WebCompositorInputHandlerImplTest.cpp:
(WebKit::TEST_F):

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