WebKit-https.git
7 years agoRemove Widget from screenColorProfile
commit-queue@webkit.org [Sat, 14 Jul 2012 02:03:21 +0000 (02:03 +0000)]
Remove Widget from screenColorProfile
https://bugs.webkit.org/show_bug.cgi?id=91300

Patch by Tony Payne <tpayne@chromium.org> on 2012-07-13
Reviewed by Adam Barth.

Source/Platform:

* chromium/public/Platform.h:
(Platform): Updated comment to reflect that we no longer have a type param.

Source/WebCore:

Chromium, the only platform implementing screenColorProfile, does not
need the Widget, so removing for simplicity.

Covered by existing tests.

* platform/PlatformScreen.h:
(WebCore): Updated comment to remove reference to type param that no
longer exists and removed Widget param.
* platform/blackberry/PlatformScreenBlackBerry.cpp:
(WebCore::screenColorProfile): Removed widget param.
* platform/chromium/PlatformScreenChromium.cpp:
(WebCore::screenColorProfile): Removed widget param.
* platform/efl/PlatformScreenEfl.cpp:
(WebCore::screenColorProfile): Removed widget param.
* platform/gtk/PlatformScreenGtk.cpp:
(WebCore::screenColorProfile): Removed widget param.
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::qcmsOutputDeviceProfile): removed param to
match screenColorProfile()'s new spec.
* platform/mac/PlatformScreenMac.mm:
(WebCore::screenColorProfile): Removed widget param.
* platform/qt/PlatformScreenQt.cpp:
(WebCore::screenColorProfile): Removed widget param.
* platform/win/PlatformScreenWin.cpp:
(WebCore::screenColorProfile): Removed widget param.

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

7 years agoSource/WebCore: [chromium] Add flushes to CCTextureUpdater::update
commit-queue@webkit.org [Sat, 14 Jul 2012 01:49:13 +0000 (01:49 +0000)]
Source/WebCore: [chromium] Add flushes to CCTextureUpdater::update
https://bugs.webkit.org/show_bug.cgi?id=89035

Patch by Brian Anderson <brianderson@chromium.org> on 2012-07-13
Reviewed by Adrienne Walker.

Automatic flushes are being removed from the command buffer, so
this moves the flushes into the CCTextureUpdater itself.

CCTextureUpdaterTest added to verify texture upload/flushing patterns.

* platform/graphics/chromium/cc/CCGraphicsContext.h:
(WebCore::CCGraphicsContext::flush):
(CCGraphicsContext):
* platform/graphics/chromium/cc/CCTextureUpdater.cpp:
(WebCore):
(WebCore::CCTextureUpdater::update): Manual flushes added here.

Source/WebKit/chromium: Add flushes to CCTextureUpdater::update
https://bugs.webkit.org/show_bug.cgi?id=89035

Patch by Brian Anderson <brianderson@chromium.org> on 2012-07-13
Reviewed by Adrienne Walker.

CCTextureUpdaterTest added to verify texture upload/flushing patterns.

* WebKit.gypi:
* tests/CCTextureUpdaterTest.cpp: Added.

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

7 years agoREGRESSION: RenderInline boundingBox ignores relative position offset
commit-queue@webkit.org [Sat, 14 Jul 2012 01:08:07 +0000 (01:08 +0000)]
REGRESSION: RenderInline boundingBox ignores relative position offset
https://bugs.webkit.org/show_bug.cgi?id=91168

Patch by Kiran Muppala <cmuppala@apple.com> on 2012-07-13
Reviewed by Simon Fraser.

Source/WebCore:

RenderGeometryMap, used for caching the transform to the view,
expects the first mapping pushed, to be that of the view itself.
RenderInline was instead pushing it's own offset first.  Besides
the offset of the view itself was not being pushed.

Relaxed the RenderGeometryMap restriction that the first pushed
step should be of the view.  It is sufficient that the view's mapping
is pushed in the first call to pushMappingsToAncestor.  Modified
RenderInline to push the offset of the view also to the geometry map.

Test: fast/inline/inline-relative-offset-boundingbox.html

* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::pushMappingsToAncestor): Add assertion to
check if mapping to view was pushed in first invocation.
(WebCore::RenderGeometryMap::pushView): Correct assertion that checks
if the view's mapping is the first one to be applied.
(WebCore::RenderGeometryMap::stepInserted): Use isRenderView to check if
a mapping step belongs to a view instead of using mapping size.
(WebCore::RenderGeometryMap::stepRemoved): Ditto.
* rendering/RenderInline.cpp:
(WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::AbsoluteQuadsGeneratorContext):
Push mappings all the way up to and including the view.

LayoutTests:

Add a regression test for boundingBox of an inline element with relative position offsets.

* fast/inline/inline-relative-offset-boundingbox-expected.txt: Added.
* fast/inline/inline-relative-offset-boundingbox.html: Added.

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

7 years agoMove WebCore/platform/text/Base64 to WTF/wtf/text
wangxianzhu@chromium.org [Sat, 14 Jul 2012 01:03:14 +0000 (01:03 +0000)]
Move WebCore/platform/text/Base64 to WTF/wtf/text
https://bugs.webkit.org/show_bug.cgi?id=91162

Reviewed by Adam Barth.

Source/WebCore:

No new tests. Files moving only.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::generateSecWebSocketKey):
(WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
* Target.pri:
* WebCore.gypi:
* WebCore.order:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::convertToDataURL):
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::createDigest):
* inspector/InspectorFileSystemAgent.cpp:
(WebCore):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceContent):
(WebCore::InspectorPageAgent::sharedBufferContent):
* loader/archive/mhtml/MHTMLArchive.cpp:
(WebCore::MHTMLArchive::generateMHTMLData):
* loader/archive/mhtml/MHTMLParser.cpp:
(WebCore::MHTMLParser::parseNextPart):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::btoa):
(WebCore::DOMWindow::atob):
* page/Page.cpp:
(WebCore::Page::userStyleSheetLocationChanged):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::CGImageToDataURL):
* platform/graphics/gtk/ImageBufferGtk.cpp:
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/skia/FontCustomPlatformData.cpp:
(WebCore::createUniqueFontName):
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBuffer::toDataURL):
(WebCore::ImageDataToDataURL):
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::createUniqueFontName):
* platform/graphics/wince/FontCustomPlatformData.cpp:
(WebCore::createUniqueFontName):
* platform/graphics/wince/ImageBufferWinCE.cpp:
* platform/graphics/wx/ImageBufferWx.cpp:
* platform/network/DataURL.cpp:
(WebCore::handleDataURL):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::applyBasicAuthorizationHeader):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::applyBasicAuthorizationHeader):
* platform/network/soup/ResourceHandleSoup.cpp:
* platform/win/SSLKeyGeneratorWin.cpp:
(WebCore::WebCore::signedPublicKeyAndChallengeString):

Source/WebKit/blackberry:

* Api/WebKitTextCodec.cpp:
(BlackBerry::WebKit::base64DecodePolicyForWTF):
(BlackBerry::WebKit::base64Decode):
(BlackBerry::WebKit::base64EncodePolicyForWTF):
(BlackBerry::WebKit::base64Encode):
* Api/WebSettings.cpp:
(BlackBerry::WebKit::WebSettings::setUserStyleSheetString):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:

Source/WTF:

* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/text/Base64.cpp: Renamed from Source/WebCore/platform/text/Base64.cpp.
(WTF):
(WTF::base64Encode):
(WTF::base64Decode):
(WTF::base64DecodeInternal):
* wtf/text/Base64.h: Renamed from Source/WebCore/platform/text/Base64.h.
(WTF):
(WTF::base64Encode):

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

7 years ago[Chromium] Sometimes bottom of text is truncated when page has a fractional scale
wangxianzhu@chromium.org [Sat, 14 Jul 2012 00:52:56 +0000 (00:52 +0000)]
[Chromium] Sometimes bottom of text is truncated when page has a fractional scale
https://bugs.webkit.org/show_bug.cgi?id=88684

Reviewed by Tony Chang.

Source/WebCore:

When the page has a fractional scale, the ascent and descent part of the fonts might be fractional.
If the descent part is rounded down, the bottom of the text might be truncated when displayed
when subpixel text positioning is enabled.
To avoid that, borrow one unit from the ascent when possible.

Test: fast/text/descent-clip-in-scaled-page.html

* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
(WebCore::FontPlatformData::setupPaint): Moved NoPreference handling into querySystemForRenderStyle so that fontRenderStyle() can have actual styles without NoPreference.
(WebCore::FontPlatformData::querySystemForRenderStyle): Added NoPreference handling (moved from setupPaint)
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
(FontPlatformData):
(WebCore::FontPlatformData::fontRenderStyle): Added to let SimpleFontDataSkia access the font render styles.
* platform/graphics/skia/SimpleFontDataSkia.cpp:
(WebCore::SimpleFontData::platformInit):

LayoutTests:

New test case.

* fast/text/descent-clip-in-scaled-page-expected.html: Added.
* fast/text/descent-clip-in-scaled-page.html: Added.

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

7 years agoOfflineASM Pretty printing and commenting enhancements.
commit-queue@webkit.org [Sat, 14 Jul 2012 00:44:47 +0000 (00:44 +0000)]
OfflineASM Pretty printing and commenting enhancements.
https://bugs.webkit.org/show_bug.cgi?id=91281

Patch by Mark Lam <mark.lam@apple.com> on 2012-07-13
Reviewed by Filip Pizlo.

Added some minor pretty printing in the OfflineASM.
Also added infrastruture for adding multiple types of comments and
annotations with the ability to enable/disable them in the generated
output as desired.

* GNUmakefile.list.am: add new file config.rb.
* llint/LLIntOfflineAsmConfig.h:
  Added OFFLINE_ASM_BEGIN, OFFLINE_ASM_END, and OFFLINE_ASM_LOCAL_LABEL macros.
  This will allow us to redefine these for other backends later.
* llint/LowLevelInterpreter32_64.asm:
  Add a small example of instruction annotations for now.
* llint/LowLevelInterpreter64.asm:
  Add a small example of instruction annotations for now.
* offlineasm/armv7.rb: Added handling of annotations.
* offlineasm/asm.rb:
  Added machinery to dump the new comments and annotations.
  Also added some indentations to make the output a little prettier.
* offlineasm/ast.rb: Added annotation field in class Instruction.
* offlineasm/backends.rb:
* offlineasm/config.rb: Added.
  Currently only contains commenting options.  This file is meant to be
  a centralized place for build config values much like config.h for
  JavaScriptCore.
* offlineasm/generate_offset_extractor.rb:
* offlineasm/instructions.rb:
* offlineasm/offsets.rb:
* offlineasm/opt.rb:
* offlineasm/parser.rb: Parse and record annotations.
* offlineasm/registers.rb:
* offlineasm/self_hash.rb:
* offlineasm/settings.rb:
* offlineasm/transform.rb:
* offlineasm/x86.rb: Added handling of annotations.

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

7 years agoRemove an assertion after r122637.
rniwa@webkit.org [Sat, 14 Jul 2012 00:44:02 +0000 (00:44 +0000)]
Remove an assertion after r122637.

* dom/DynamicNodeList.h:
(WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange):

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

7 years agoFix for WebContext::getWebCoreStatistics() causes crash if no m_process
commit-queue@webkit.org [Sat, 14 Jul 2012 00:33:28 +0000 (00:33 +0000)]
Fix for WebContext::getWebCoreStatistics() causes crash if no m_process
https://bugs.webkit.org/show_bug.cgi?id=91116

.:

Patch by Josh Hawn <jhawn@apple.com> on 2012-07-12
Reviewed by Simon Fraser.

* Source/WebKit2/UIProcess/WebContext.cpp:
  WebContext::getWebCoreStatistics():
        Now invalidates callback if no m_process.

Tools:

Patch by Josh Hawn <jhawn@apple.com> on 2012-07-13
Reviewed by Simon Fraser.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
    Added new test file.
* TestWebKitAPI/Tests/WebKit2/WebCoreStatisticsWithNoWebProcess.cpp: Added.
(TestWebKitAPI::wkContextGetStatisticsCallback):
    Tests that callback function receives an error.
(TestWebKitAPI::TEST):
    Creates a dummy web context object (no web process).
    Calls WKContextGetStatistics with the web context and test callback.
    The test callback should get an expected error.

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

7 years ago[Qt] Improve the mobile theme slightly
pierre.rossi@gmail.com [Sat, 14 Jul 2012 00:15:43 +0000 (00:15 +0000)]
[Qt] Improve the mobile theme slightly
https://bugs.webkit.org/show_bug.cgi?id=90806

Reviewed by Kenneth Rohde Christiansen.

Improve drawing of the mobile theme's controls' background.

Ensure the focus ring never appears with the mobile theme, since it
looks bad in combination with the highlights.

No new tests. The painting code from the mobile theme is still
not covered specifically (it will when we revive pixel tests).

* platform/qt/RenderThemeQtMobile.cpp:
(WebCore):
(WebCore::addPointToOctants): Added. This is simply a helper to avoid
    doing too much duplicate work in drawControlBackground.
(WebCore::drawControlBackground): Rely on the octant logic added above
    and take the opportunity to increase the granularity.
(WebCore::borderPen):
(WebCore::StylePainterMobile::findLineEdit):
(WebCore::RenderThemeQtMobile::adjustTextFieldStyle):
* platform/qt/RenderThemeQtMobile.h:
(RenderThemeQtMobile):
(WebCore::RenderThemeQtMobile::supportsFocusRing):

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

7 years agoASSERTION FAILED: use.useKind() != DoubleUse
fpizlo@apple.com [Fri, 13 Jul 2012 23:55:18 +0000 (23:55 +0000)]
ASSERTION FAILED: use.useKind() != DoubleUse
https://bugs.webkit.org/show_bug.cgi?id=91082

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

The implementation of Branch() was unwisely relying on register allocation state
to decide what speculations to perform. That's never correct.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

LayoutTests:

* fast/js/dfg-mispredict-variable-but-prove-int-expected.txt: Added.
* fast/js/dfg-mispredict-variable-but-prove-int.html: Added.
* fast/js/script-tests/dfg-mispredict-variable-but-prove-int.js: Added.
(foo):

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

7 years agotest-webkitpy: move printing-related code out of the runner
dpranke@chromium.org [Fri, 13 Jul 2012 23:39:13 +0000 (23:39 +0000)]
test-webkitpy: move printing-related code out of the runner
https://bugs.webkit.org/show_bug.cgi?id=91289

Reviewed by Ryosuke Niwa.

More refactoring ... this moves all printing-related stuff out
of runner.py and into printer.py.

No functional changes; covered by existing tests.

* Scripts/webkitpy/test/main.py:
(Tester._run_tests):
* Scripts/webkitpy/test/printer.py:
(Printer.__init__):
(Printer):
(Printer.test_name):
(Printer.print_started_test):
(Printer.print_finished_test):
(Printer.print_result):
* Scripts/webkitpy/test/runner.py:
(Runner.__init__):
(Runner.all_test_names):
(Runner.run):
* Scripts/webkitpy/test/runner_unittest.py:
(RunnerTest.test_regular):
(RunnerTest.test_verbose):
(RunnerTest.test_timing):

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

7 years agoUnreviewed, rolling out r122640.
commit-queue@webkit.org [Fri, 13 Jul 2012 23:36:34 +0000 (23:36 +0000)]
Unreviewed, rolling out r122640.
http://trac.webkit.org/changeset/122640
https://bugs.webkit.org/show_bug.cgi?id=91298

LLInt apparently does not expect to mark these (Requested by
olliej on #webkit).

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

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::visitStructures):
(JSC::CodeBlock::stronglyVisitStrongReferences):

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

7 years agowebkitpy: split printing/logging code for test-webkitpy out into a new class
dpranke@chromium.org [Fri, 13 Jul 2012 23:36:29 +0000 (23:36 +0000)]
webkitpy: split printing/logging code for test-webkitpy out into a new class
https://bugs.webkit.org/show_bug.cgi?id=91282

Reviewed by Ojan Vafai.

This patch is the first step at splitting all of the
printing/logging code out separately from the actual
test-running code.

This is just moving stuff around; no new functionality and no
new tests needed.

* Scripts/webkitpy/test/finder_unittest.py:
(FinderTest.setUp):
* Scripts/webkitpy/test/main.py:
(Tester.__init__):
(Tester._parse_args):
(Tester.run):
(Tester._run_tests):
(Tester._log_exception):
* Scripts/webkitpy/test/main_unittest.py:
(TesterTest.test_no_tests_found):
* Scripts/webkitpy/test/printer.py: Added.
(Printer):
(Printer.__init__):
(Printer.configure):
(Printer.configure.filter):
(_CaptureAndPassThroughStream):
(_CaptureAndPassThroughStream.__init__):
(_CaptureAndPassThroughStream.write):
(_CaptureAndPassThroughStream._message_is_from_pdb):
(_CaptureAndPassThroughStream.flush):
(_CaptureAndPassThroughStream.getvalue):

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

7 years agoRemove an always-failing table-wrapping check in RenderObject::addChild
jchaffraix@webkit.org [Fri, 13 Jul 2012 23:34:00 +0000 (23:34 +0000)]
Remove an always-failing table-wrapping check in RenderObject::addChild
https://bugs.webkit.org/show_bug.cgi?id=91286

Reviewed by Eric Seidel.

Due to the structure of the code, this test is always failing (newChild->isTableCell()
is true to get in the branch).

The changeset adding the code didn't add testing so I poundered adding the mentioned test,
which is passing. However the test would need to be blindly changed to be included in our
test harness. I would also expect this code to be exercised by other table tests anyway.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::addChild):
Removed never-reached branch. While at it, removed a 'what' comment in the same file.

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

7 years agoUse LayoutBoxExtent for image outsets
eae@chromium.org [Fri, 13 Jul 2012 23:23:40 +0000 (23:23 +0000)]
Use LayoutBoxExtent for image outsets
https://bugs.webkit.org/show_bug.cgi?id=91166

Reviewed by Tony Chang.

Change RenderStyle and calling code to use LayoutBoxExtent for image
outsets and remove text direction and writing mode versions of the
outline getters from RenderStyle as LayoutBoxExtent provides the same
functionality.

No new tests, no change in functionality.

* platform/graphics/FractionalLayoutBoxExtent.h:
* platform/graphics/FractionalLayoutBoxExtent.cpp:
(WebCore::FractionalLayoutBoxExtent::logicalTop):
(WebCore::FractionalLayoutBoxExtent::logicalBottom):
Add logicalTop and logicalBottom methods to go with the existing
logicalLeft and logicalRight ones.

* platform/graphics/FractionalLayoutRect.h:
(WebCore::FractionalLayoutRect::expand):
Add FractionalLayoutBoxExtent version of expand method.

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
Change implementation to use the new FractionalLayoutBoxExtent version of
borderImageOutsets and the logicalTop/Bottom/Left/Right methods.

(WebCore::clipRectForNinePieceImageStrip):
Change implementation to use the new FractionalLayoutBoxExtent version of
borderImageOutsets.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::maskClipRect):
Change implementation to use the new FractionalLayoutBoxExtent version of
borderImageOutsets and the new FractionalLayoutRect::expand method.

(WebCore::RenderBox::addVisualEffectOverflow):
Change implementation to use the new FractionalLayoutBoxExtent version of
borderImageOutsets.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintNinePieceImage):
Change implementation to use the new FractionalLayoutBoxExtent version of
borderImageOutsets and the new FractionalLayoutRect::expand method.

* rendering/style/RenderStyle.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::imageOutsets):
Change getImageOutsets to return a FractionalLayoutBoxExtent object and
rename to imageOutsets to match the webkit naming convention for getters.

Remove getBorderImageHorizontalOutsets, getBorderImageVerticalOutsets,
getBorderImageInlineDirectionOutsets, getImageHorizontalOutsets,
getImageVerticalOutsets and getBorderImageBlockDirectionOutsets methods
as the same functionality is provided by FractionalLayoutBoxExtent.

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

7 years agoLLInt fails to mark structures stored in the bytecode
oliver@apple.com [Fri, 13 Jul 2012 23:12:14 +0000 (23:12 +0000)]
LLInt fails to mark structures stored in the bytecode
https://bugs.webkit.org/show_bug.cgi?id=91296

Reviewed by Geoffrey Garen.

LLInt stores structures in the bytecode, so we need to visit the appropriate
instructions as we would if we were running in the classic interpreter.
This requires adding additional checks for the LLInt specific opcodes, and
the lint specific variants of operand ordering.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::visitStructures):
(JSC::CodeBlock::stronglyVisitStrongReferences):

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

7 years agohttps://bugs.webkit.org/show_bug.cgi?id=91278
hyatt@apple.com [Fri, 13 Jul 2012 22:57:16 +0000 (22:57 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=91278
Improve block margin estimation function to account for not having a layout and for quirks mode

Reviewed by Simon Fraser.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::marginBeforeEstimateForChild):
Revise marginBeforeEstimateForChild so that it computes block margins for the grandchild before
recurring. This includes the quirks margin information as well. This ensures that the margins are
up-to-date when checked, even before the object has had its first layout.

* rendering/RenderBlock.h:
(WebCore::RenderBlock::setMarginStartForChild):
(WebCore::RenderBlock::setMarginEndForChild):
(WebCore::RenderBlock::setMarginBeforeForChild):
(WebCore::RenderBlock::setMarginAfterForChild):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeBlockDirectionMargins):
* rendering/RenderBox.h:
(RenderBox):
Add consts in order to compile.

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

7 years ago[BlackBerry] Fix crash due to unguarded use of renderer in select
staikos@webkit.org [Fri, 13 Jul 2012 22:46:41 +0000 (22:46 +0000)]
[BlackBerry] Fix crash due to unguarded use of renderer in select
popup.
https://bugs.webkit.org/show_bug.cgi?id=91287

Reviewed by Rob Buis.

No known testcase for this.  Found in the wild.

* WebCoreSupport/SelectPopupClient.cpp:
(WebCore::SelectPopupClient::setValueAndClosePopup):

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

7 years agoNodeLists should not invalidate on irreleavnt attribute changes
rniwa@webkit.org [Fri, 13 Jul 2012 22:44:46 +0000 (22:44 +0000)]
NodeLists should not invalidate on irreleavnt attribute changes
https://bugs.webkit.org/show_bug.cgi?id=91277

Reviewed by Ojan Vafai.

Explicitely check the invalidation type and the changed attribute in NodeListNodeData::invalidateCaches
and ElementRareData::clearHTMLCollectionCaches to only invalidate node lists affected by the change.

Also merged invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged
as invalidateNodeListCachesInAncestors since they're almost identical after r122498.

In addition, moved shouldInvalidateNodeListForType from Document.cpp to DynamicNodeList.h and renamed it to
shouldInvalidateTypeOnAttributeChange since it needs to called in Node.cpp and ElementRareData.h.

* dom/Attr.cpp:
(WebCore::Attr::setValue):
(WebCore::Attr::childrenChanged):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::childrenChanged):
* dom/Document.cpp:
(WebCore::Document::registerNodeListCache): Calls isRootedAtDocument() instead of directly comparing
the value of NodeListRootType in order to prepare for the bug 80269.
(WebCore::Document::unregisterNodeListCache): Ditto.
(WebCore): shouldInvalidateNodeListForType is moved to DynamicNodeList.h
(WebCore::Document::shouldInvalidateNodeListCaches):
* dom/DynamicNodeList.h:
(DynamicNodeListCacheBase):
(WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Moved from Document.cpp.
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
* dom/ElementRareData.h:
(WebCore::ElementRareData::clearHTMLCollectionCaches): Takes const QualifiedName* to compare against
the invalidation type of HTML collections via shouldInvalidateTypeOnAttributeChange.
* dom/Node.cpp:
(WebCore::Node::invalidateNodeListCachesInAncestors): Merged invalidateNodeListCachesInAncestors and
invalidateNodeListsCacheAfterChildrenChanged. Also pass attrName to clearHTMLCollectionCaches.
(WebCore::NodeListsNodeData::invalidateCaches): Compares attrName against the invalidation type of
node lists via shouldInvalidateTypeOnAttributeChange.
(WebCore):
* dom/Node.h:
(Node):
* dom/NodeRareData.h:
(WebCore::NodeRareData::ensureNodeLists): Merged NodeRareData::createNodeLists.
(WebCore::NodeRareData::clearChildNodeListCache): Moved from Node.cpp.
(NodeRareData):
* html/HTMLCollection.h:
(HTMLCollectionCacheBase):

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

7 years agoRefactor RenderTable to use the section's iteration functions.
commit-queue@webkit.org [Fri, 13 Jul 2012 22:37:58 +0000 (22:37 +0000)]
Refactor RenderTable to use the section's iteration functions.
https://bugs.webkit.org/show_bug.cgi?id=89751

Patch by Arpita Bahuguna <arpitabahuguna@gmail.com> on 2012-07-13
Reviewed by Julien Chaffraix.

Removing anti-pattern wherever possible from RenderTable code. Also, modifying
RenderTable sections' iterations to use helper functions.

No new tests required for this change since no change in behavior is expected.

* rendering/RenderTable.cpp:
(WebCore::RenderTable::addOverflowFromChildren):
(WebCore::RenderTable::setCellLogicalWidths):
(WebCore::RenderTable::outerBorderStart):
(WebCore::RenderTable::outerBorderEnd):
Removed anti-patterns involving iterations over RenderObjects.

(WebCore::RenderTable::outerBorderAfter):
Modified RenderTable sections' iteration to use helper functions.

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

7 years agoThreadsafety issues in WebScriptObject
enrica@apple.com [Fri, 13 Jul 2012 22:35:11 +0000 (22:35 +0000)]
Threadsafety issues in WebScriptObject
https://bugs.webkit.org/show_bug.cgi?id=90849

Reviewed by Geoff Garen.

Updated fix for this bug. The JSC API lock needs to be acquired also in JSObject.

* bindings/objc/WebScriptObject.mm:
(-[WebScriptObject JSObject]):

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

7 years ago[EFL] Unskip fast/css/font-face-download-error.html
commit-queue@webkit.org [Fri, 13 Jul 2012 22:25:14 +0000 (22:25 +0000)]
[EFL] Unskip fast/css/font-face-download-error.html
https://bugs.webkit.org/show_bug.cgi?id=91279

Unreviewed EFL gardening. Unskip passing test
fast/css/font-face-download-error.html

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-07-13

* platform/efl/TestExpectations:

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

7 years agoRemove supressions for flashplayer crash
abarth@webkit.org [Fri, 13 Jul 2012 22:19:38 +0000 (22:19 +0000)]
Remove supressions for flashplayer crash
https://bugs.webkit.org/show_bug.cgi?id=91283

Reviewed by Tony Chang.

These tests don't crash any more now that I've corrected the
configuration on the bots.

* platform/chromium/TestExpectations:

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

7 years ago[Navigation Timing] Imported W3C tests contain duplicates and are DOS formatted
simonjam@chromium.org [Fri, 13 Jul 2012 21:29:40 +0000 (21:29 +0000)]
[Navigation Timing] Imported W3C tests contain duplicates and are DOS formatted
https://bugs.webkit.org/show_bug.cgi?id=91184

Reviewed by Adam Barth.

The upstream 'html5' tests are just duplicates of the 'html' tests.

Tools:

* Scripts/import-w3c-performance-wg-tests:

LayoutTests:

* http/tests/w3c/webperf/approved/navigation-timing/html/test_document_readiness_exist.html: Converted to *NIX newline format.
* http/tests/w3c/webperf/approved/navigation-timing/html/test_navigation_attributes_exist.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_navigation_redirectCount_none.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_navigation_type_backforward.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_navigation_type_enums.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_navigation_type_reload.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_no_previous_document.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_performance_attributes_exist.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_performance_attributes_exist_in_object.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_readwrite.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_timing_attributes_exist.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_timing_attributes_order.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_timing_client_redirect.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_timing_reload.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_timing_server_redirect.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_timing_xserver_redirect.html:
* http/tests/w3c/webperf/approved/navigation-timing/html/test_unique_performance_objects.html:
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_document_open-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_document_open.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_document_readiness_exist-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_document_readiness_exist.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_navigate_within_document-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_navigate_within_document.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_navigation_attributes_exist-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_navigation_attributes_exist.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_navigation_redirectCount_none-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_navigation_redirectCount_none.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_navigation_type_backforward-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_navigation_type_backforward.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_navigation_type_enums-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_navigation_type_enums.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_navigation_type_reload-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_navigation_type_reload.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_no_previous_document-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_no_previous_document.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_performance_attributes_exist-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_performance_attributes_exist.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_performance_attributes_exist_in_object-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_performance_attributes_exist_in_object.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_readwrite-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_readwrite.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_timing_attributes_exist-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_timing_attributes_exist.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_timing_attributes_order-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_timing_attributes_order.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_timing_client_redirect-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_timing_client_redirect.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_timing_reload-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_timing_reload.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_timing_server_redirect-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_timing_server_redirect.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_timing_xserver_redirect-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_timing_xserver_redirect.html: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_unique_performance_objects-expected.txt: Removed.
* http/tests/w3c/webperf/approved/navigation-timing/html5/test_unique_performance_objects.html: Removed.
* http/tests/w3c/webperf/resources/blank_page_green.htm:
* http/tests/w3c/webperf/resources/blank_page_green_with_onunload.htm:
* http/tests/w3c/webperf/resources/blank_page_meta_redirect.htm:
* http/tests/w3c/webperf/resources/blank_page_unload.htm:
* http/tests/w3c/webperf/resources/blank_page_yellow.htm:
* http/tests/w3c/webperf/resources/blank_page_yellow_with_onunload.htm:
* http/tests/w3c/webperf/resources/pagevistestharness.js:
(pv_test):
(test_feature_exists):
(test_equals):
(add_async_result_assert):
(TabSwitch):
* http/tests/w3c/webperf/resources/webperftestharness.js:
(test_true):
* platform/chromium/TestExpectations:

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

7 years agowebkitpy: hide yield_to_caller from callers in MessagePool :)
dpranke@chromium.org [Fri, 13 Jul 2012 21:16:39 +0000 (21:16 +0000)]
webkitpy: hide yield_to_caller from callers in MessagePool :)
https://bugs.webkit.org/show_bug.cgi?id=91269

Reviewed by Adam Barth.

yield_to_caller() was an optimization/hack to allow us to run
both manager and worker in a single process/loop without
starving the manager while the worker is running tests. The
worker was required to call yield_to_caller() periodically. It
turns out that I can get equivalent responsiveness by yielding
inside the MessagePool every time the worker posts a message, and this
allows me to no longer need the worker to call the routine. Thus
I rename yield_to_caller() to _yield_to_manager() to be a little
clearer about its purpose.

Tested by existing tests.

* Scripts/webkitpy/common/message_pool.py:
(_Worker.run):
(_Worker.post):
(_Worker._yield_to_manager):
* Scripts/webkitpy/layout_tests/controllers/worker.py:
(Worker.handle):

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

7 years agoDelayNode doesn't work if delayTime.value == delayTime.maxValue
commit-queue@webkit.org [Fri, 13 Jul 2012 21:10:37 +0000 (21:10 +0000)]
DelayNode doesn't work if delayTime.value == delayTime.maxValue
https://bugs.webkit.org/show_bug.cgi?id=90357

Patch by Raymond Toy <rtoy@google.com> on 2012-07-13
Reviewed by Kenneth Russell.

Source/WebCore:

Increase delay buffer size slightly so that the read and write
pointers don't become equal when the delay and the max delay are
the same.

Tests: webaudio/delaynode-max-default-delay.html
       webaudio/delaynode-max-nondefault-delay.html

* Modules/webaudio/DelayDSPKernel.cpp:
(WebCore): Moved SmoothingTimeConstant to WebCore namespace.
(WebCore::DelayDSPKernel::DelayDSPKernel): Add some additional checks to prevent crashes; use bufferLengthForDelay to compute buffer length.
(WebCore::DelayDSPKernel::bufferLengthForDelay): New function to compute buffer length.
* Modules/webaudio/DelayDSPKernel.h:
(DelayDSPKernel): Declare bufferLengthForDelay.

LayoutTests:

New tests to test the case when the delay node delay equals the
maximum allowed delay. Add one test for the default maximum delay
and a second test with a user-set maximum delay.

* webaudio/delaynode-max-default-delay-expected.txt: Added.
* webaudio/delaynode-max-default-delay.html: Added.
* webaudio/delaynode-max-nondefault-delay-expected.txt: Added.
* webaudio/delaynode-max-nondefault-delay.html: Added.

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

7 years agoAlways aggressively preload on iOS
benjamin@webkit.org [Fri, 13 Jul 2012 21:03:50 +0000 (21:03 +0000)]
Always aggressively preload on iOS
https://bugs.webkit.org/show_bug.cgi?id=91276

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-07-13
Reviewed by Simon Fraser.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::preload):

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

7 years agoRestructure V8Utilities::extractTransferables() with help of toV8Sequence()
commit-queue@webkit.org [Fri, 13 Jul 2012 20:45:55 +0000 (20:45 +0000)]
Restructure V8Utilities::extractTransferables() with help of toV8Sequence()
https://bugs.webkit.org/show_bug.cgi?id=91208

Patch by Vineet Chaudhary <rgf748@motorola.com> on 2012-07-13
Reviewed by Kentaro Hara.

Source/WebCore:

We can remove the specialised check for MessagePort from V8Utilities::extractTransferables()
using toV8Sequence() as it validates the passed object for sequence type per WebIDL spec.

No new test as just refactoring.
Existing tests under fast/dom/Window/window-* fast/dom/events/*
covers tests.

* bindings/v8/V8Utilities.cpp:
(WebCore::extractTransferables):

LayoutTests:

We can remove the specialised check for MessagePort from V8Utilities::extractTransferables()
using toV8Sequence() as it validates the passed object for sequence type per WebIDL spec.
Removing port specific expected results.

* platform/chromium-win/fast/workers/worker-context-multi-port-expected.txt: Removed.
* platform/chromium-win/fast/workers/worker-multi-port-expected.txt: Removed.
* platform/chromium/fast/dom/Window/window-postmessage-args-expected.txt: Removed.
* platform/chromium/fast/events/constructors/message-event-constructor-expected.txt: Removed.
* platform/chromium/fast/events/message-port-multi-expected.txt: Rebaselined.

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

7 years agoEWSTools should be able to build a commit-queue instance from scratch
abarth@webkit.org [Fri, 13 Jul 2012 20:40:56 +0000 (20:40 +0000)]
EWSTools should be able to build a commit-queue instance from scratch
https://bugs.webkit.org/show_bug.cgi?id=91264

Reviewed by Eric Seidel.

I've been using this script to build commit-queue instances on Google
Compute Engine and it seems to work.

* EWSTools/GoogleComputeEngine/build-commit-queue.sh: Added.

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

7 years agoPointer Lock handles disconnected DOM elements
scheib@chromium.org [Fri, 13 Jul 2012 20:37:50 +0000 (20:37 +0000)]
Pointer Lock handles disconnected DOM elements
https://bugs.webkit.org/show_bug.cgi?id=77029

Reviewed by Adrienne Walker.

Source/WebCore:

Pointer Lock Controller now checks when elements or documents are
removed, and unlocks if the target element is being removed.

Tests: pointer-lock/locked-element-iframe-removed-from-dom.html
       pointer-lock/locked-element-removed-from-dom.html

* dom/Document.cpp:
(WebCore::Document::detach):
* dom/Element.cpp:
(WebCore::Element::removedFrom):
(WebCore::Element::webkitRequestPointerLock):
* page/PointerLockController.cpp:
(WebCore::PointerLockController::requestPointerLock):
(WebCore::PointerLockController::elementRemoved):
(WebCore):
(WebCore::PointerLockController::documentDetached):
(WebCore::PointerLockController::didLosePointerLock):
(WebCore::PointerLockController::enqueueEvent):
* page/PointerLockController.h:
(WebCore):
(PointerLockController):

LayoutTests:

Two new tests that verify pointer lock is released when the target
is removed from the document.

* pointer-lock/locked-element-iframe-removed-from-dom-expected.txt: Added.
* pointer-lock/locked-element-iframe-removed-from-dom.html: Added.
* pointer-lock/locked-element-removed-from-dom-expected.txt: Added.
* pointer-lock/locked-element-removed-from-dom.html: Added.

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

7 years ago[chromium] Unreviewed gardening. storage/indexeddb/cursor-key-order.html has starting...
wjmaclean@chromium.org [Fri, 13 Jul 2012 20:35:39 +0000 (20:35 +0000)]
[chromium] Unreviewed gardening. storage/indexeddb/cursor-key-order.html has starting crashing on occassion.
https://bugs.webkit.org/show_bug.cgi?id=91275

Not sure how far back the crashes go, but happens with reasonably high frequency.

* platform/chromium/TestExpectations:

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

7 years ago[BlackBerry] Implement GCActivityCallback with platform timer
commit-queue@webkit.org [Fri, 13 Jul 2012 20:12:36 +0000 (20:12 +0000)]
[BlackBerry] Implement GCActivityCallback with platform timer
https://bugs.webkit.org/show_bug.cgi?id=90175

Patch by Yong Li <yoli@rim.com> on 2012-07-13
Reviewed by Rob Buis.

Implement GCActivityCallback and HeapTimer for BlackBerry port.

* heap/HeapTimer.cpp:
(JSC):
(JSC::HeapTimer::HeapTimer):
(JSC::HeapTimer::~HeapTimer):
(JSC::HeapTimer::timerDidFire):
(JSC::HeapTimer::synchronize):
(JSC::HeapTimer::invalidate):
(JSC::HeapTimer::didStartVMShutdown):
* heap/HeapTimer.h:
(HeapTimer):
* runtime/GCActivityCallbackBlackBerry.cpp:
(JSC):
(JSC::DefaultGCActivityCallback::doWork):
(JSC::DefaultGCActivityCallback::didAllocate):
(JSC::DefaultGCActivityCallback::willCollect):
(JSC::DefaultGCActivityCallback::cancel):

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

7 years agoMove layout checking js script into LayoutTest/resources and generalize
tony@chromium.org [Fri, 13 Jul 2012 19:58:47 +0000 (19:58 +0000)]
Move layout checking js script into LayoutTest/resources and generalize
https://bugs.webkit.org/show_bug.cgi?id=91268

Reviewed by Ojan Vafai.

flexbox.js contains helper scripts for verifying the size and position of nodes.
I will be writing similar tests for grid, so move the js file into a location
for sharing and generalize the script.

* css3/flexbox/align-absolute-child.html: Change include path and call.
* css3/flexbox/auto-height-dynamic.html:
* css3/flexbox/columns-auto-size.html:
* css3/flexbox/flex-algorithm-min-max.html:
* css3/flexbox/flex-algorithm-with-margins.html:
* css3/flexbox/flex-algorithm.html:
* css3/flexbox/flex-align-column.html:
* css3/flexbox/flex-align-end.html:
* css3/flexbox/flex-align-max.html:
* css3/flexbox/flex-align-percent-height.html:
* css3/flexbox/flex-align-stretch.html:
* css3/flexbox/flex-align-vertical-writing-mode.html:
* css3/flexbox/flex-align.html:
* css3/flexbox/flex-flow-auto-margins.html:
* css3/flexbox/flex-flow-border.html:
* css3/flexbox/flex-flow-margins-auto-size.html:
* css3/flexbox/flex-flow-margins.html:
* css3/flexbox/flex-flow-orientations.html:
* css3/flexbox/flex-flow-overflow.html:
* css3/flexbox/flex-flow-padding.html:
* css3/flexbox/flex-flow.html:
* css3/flexbox/flex-item-child-overflow.html:
* css3/flexbox/flex-item-min-size.html:
* css3/flexbox/flex-justify-content.html:
* css3/flexbox/flex-no-flex.html:
* css3/flexbox/flexitem.html:
* css3/flexbox/floated-flexbox.html:
* css3/flexbox/line-wrapping.html:
* css3/flexbox/multiline-align-content-horizontal-column.html:
* css3/flexbox/multiline-align-content.html:
* css3/flexbox/multiline-align-self.html:
* css3/flexbox/multiline-column-auto.html:
* css3/flexbox/multiline-justify-content.html:
* css3/flexbox/multiline-reverse-wrap-overflow.html:
* css3/flexbox/multiline.html:
* css3/flexbox/nested-stretch.html:
* css3/flexbox/orthogonal-flex-directions.html:
* css3/flexbox/perpendicular-writing-modes-inside-flex-item.html:
* css3/flexbox/position-absolute-child.html:
* css3/flexbox/preferred-widths-orthogonal.html:
* css3/flexbox/preferred-widths.html:
* css3/flexbox/style-change.html:
* css3/flexbox/true-centering.html:
* css3/flexbox/writing-modes.html:
* resources/check-layout.js: Renamed from LayoutTests/css3/flexbox/resources/flexbox.js.
(.): Rename checkFlexboxen to checkLayout that takes a CSS selector. Hide functions in a closure.

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

7 years agoIndexedDB: Re-enable indexeddb in test_shell
dgrogan@chromium.org [Fri, 13 Jul 2012 19:54:37 +0000 (19:54 +0000)]
IndexedDB: Re-enable indexeddb in test_shell
https://bugs.webkit.org/show_bug.cgi?id=91161

Reviewed by Tony Chang.

IDB used to be allowed to run if webView->permissionClient() was NULL,
as is the case in test_shell. This was inadvertently changed in
http://wkb.ug/90310.

We still don't have an automated test for this (http://crbug.com/113738)
Tested manually:

* In test_shell:
1) Open an IDB page
2) Verify IDB has permission to open a DB

* In chrome:
1) Open an IDB page
2) Verify IDB has permission to open a DB
3) Revoke IDB permissions in chrome://chrome/settings/content
4) Reload the IDB page
5) Verify IDB doesn't have permission to open a DB

* src/IDBFactoryBackendProxy.cpp:
(WebKit::IDBFactoryBackendProxy::allowIndexedDB):

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

7 years agoHTMLCollection should use DynamicNodeList's invalidation model
rniwa@webkit.org [Fri, 13 Jul 2012 19:48:40 +0000 (19:48 +0000)]
HTMLCollection should use DynamicNodeList's invalidation model
https://bugs.webkit.org/show_bug.cgi?id=90326

Reviewed by Anders Carlsson.

Make HTMLCollection invalidated upon attribute and children changes instead of invalidating it on demand
by comparing DOM tree versions. Node that HTMLCollections owned by Document are invalidated with other
document-rooted node lists in m_listsInvalidatedAtDocument for simplicity although this mechanism is
normally used for node lists owned by a non-Document node that contains nodes outside of its subtree.
ItemProperties and FormControls are more "traditional" users of the mechanism.

Also, merged DynamicNodeList::invalidateCache and HTMLCollection::invalidateCache.

* dom/Document.cpp:
(WebCore::Document::registerNodeListCache): Renamed. No longer takes NodeListInvalidationType or
NodeListRootType since they can be obtained from the cache base. Increment the node list counter for
InvalidateOnIdNameAttrChange when a HTMLCollection is passed in since all HTMLCollections need to be
invalidated on id or name content attribute changes due to named getters.
(WebCore::Document::unregisterNodeListCache): Ditto.
(WebCore::shouldInvalidateNodeListForType):
(WebCore::Document::shouldInvalidateNodeListCaches):
(WebCore::Document::clearNodeListCaches):
* dom/Document.h:
(WebCore): Added InvalidateOnIdNameAttrChange, InvalidateOnHRefAttrChange, and InvalidateOnAnyAttrChange.
(Document):
* dom/DynamicNodeList.cpp:
(WebCore::DynamicNodeListCacheBase::invalidateCache): Added. Invalidates caches of both DynamicNodeList
and HTMLCollection. We can't afford to use virtual function calls here because this function is called on
all node lists and HTML collections owned by ancestors of an element under which a node is added, removed,
or its attributes are changed.
(WebCore):
* dom/DynamicNodeList.h:
(WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Initializes member variables directly
instead of calling clearCache now that DynamicNodeListCacheBase::invalidateCache has become polymorphic.
(DynamicNodeListCacheBase): Increased the number of bits for m_invalidationType since we now have 9
invalidation types.
(WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
(WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
* dom/ElementRareData.h:
(ElementRareData):
(WebCore::ElementRareData::clearHTMLCollectionCaches): Added.
(WebCore::ElementRareData::adoptTreeScope): Added; similar to NodeRareData::adoptTreeScope.
* dom/Node.cpp:
(WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Clears HTML collection caches as well as
node list caches.
(WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto.
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::adoptTreeScope):
* dom/TreeScopeAdopter.cpp:
(WebCore::TreeScopeAdopter::moveTreeToNewScope): Calls ElementRareData's adoptTreeScope as well as
NodeRareData's.
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::namedItemWithIndex):
* html/HTMLCollection.cpp:
(WebCore::rootTypeFromCollectionType): Added. As mentioned above, treat all Document-owned HTML collection
as if rooted at document for convenience.
(WebCore::invalidationTypeExcludingIdAndNameAttributes): Added. Since all HTML collection requires
invalidation on id and name content attribute changes, which is taken care by the special logic in
Document::registerNodeListCache, exclude those two attributes from consideration.
(WebCore::HTMLCollection::HTMLCollection): Calls Document::registerNodeListCache.
(WebCore::HTMLCollection::~HTMLCollection): Calls Document::unregisterNodeListCache.
(WebCore::HTMLCollection::length):
(WebCore::HTMLCollection::item):
(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):
* html/HTMLCollection.h:
(WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
(HTMLCollectionCacheBase): Removed m_cacheTreeVersion and clearCache since they're no longer used.
(HTMLCollection):
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::namedItem):
(WebCore::HTMLFormCollection::updateNameCache):
* html/HTMLOptionsCollection.h:
(HTMLOptionsCollection):
* html/HTMLPropertiesCollection.cpp:
(WebCore::HTMLPropertiesCollection::updateNameCache):
* html/HTMLPropertiesCollection.h:
(WebCore::HTMLPropertiesCollection::invalidateCache):

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

7 years agoUnreviewed GTK gardening, adding a baseline required after unskipping
zandobersek@gmail.com [Fri, 13 Jul 2012 19:45:03 +0000 (19:45 +0000)]
Unreviewed GTK gardening, adding a baseline required after unskipping
fast/files/workers/worker-read-blob-async.html in r122612.

* platform/gtk/fast/files: Added.
* platform/gtk/fast/files/workers: Added.
* platform/gtk/fast/files/workers/worker-read-blob-async-expected.txt: Added.

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

7 years ago[chromium] Remove incorrect debug assertion in LayerRendererChromium.cpp
shawnsingh@chromium.org [Fri, 13 Jul 2012 19:40:30 +0000 (19:40 +0000)]
[chromium] Remove incorrect debug assertion in LayerRendererChromium.cpp
https://bugs.webkit.org/show_bug.cgi?id=91260

Reviewed by Adrienne Walker.

ASSERT(!clipped) was being triggered after skinny almost-degenerate
quads went through anti-aliasing inflation, and then were being
transformed back from device space to local space. It turns out
this assertion is too aggressive, and we don't yet have an obvious
need to change the behavior on the clipped==true case.

No new tests needed, this patch fixes only comments and debug code.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawRenderPassQuad):
   fixed a comment.

(WebCore::LayerRendererChromium::drawTileQuad):
   fixed a similar comment, removed unnecessary assertion.

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

7 years agowebkitpy: make worker.start() and worker.stop() optional in the messagepool
dpranke@chromium.org [Fri, 13 Jul 2012 19:11:12 +0000 (19:11 +0000)]
webkitpy: make worker.start() and worker.stop() optional in the messagepool
https://bugs.webkit.org/show_bug.cgi?id=91170

Reviewed by Ojan Vafai.

test-webkitpy will use messagepool workers that don't actually
have any per-worker state, so they don't need start() and stop()
methods. Now we will only call the methods if they exist; this
means that workers only need to expose a handle() method.

* Scripts/webkitpy/common/message_pool.py:
(_Worker.terminate):
(_Worker.run):

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

7 years agoUnreviewed GTK gardening, updating baselines for the fast/backgrounds/size/zero.html
zandobersek@gmail.com [Fri, 13 Jul 2012 19:10:22 +0000 (19:10 +0000)]
Unreviewed GTK gardening, updating baselines for the fast/backgrounds/size/zero.html
test as required after r121296.

* platform/gtk/TestExpectations:
* platform/gtk/fast/backgrounds/size/zero-expected.png: Added.
* platform/gtk/fast/backgrounds/size/zero-expected.txt:

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

7 years agoRemove assert in localCoordinateSpaceTransform()
pdr@google.com [Fri, 13 Jul 2012 19:08:31 +0000 (19:08 +0000)]
Remove assert in localCoordinateSpaceTransform()
https://bugs.webkit.org/show_bug.cgi?id=91189

Reviewed by Nikolas Zimmermann.

Source/WebCore:

The assert in localCoordinateSpaceTransform was added to catch subclasses forgetting
to override the method but it is better to simply return the identity matrix.

This scenario can occur when we break the SVG content model, such as asking for
the CTM of a <g> element inside a <tspan>. This is undefined in the spec because
tspan is not a subclass of SVGLocatable but both Firefox and Opera
implement this by returning the identity matrix.

Test: svg/custom/invalid-ctm.svg

* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::localCoordinateSpaceTransform):

LayoutTests:

* svg/custom/invalid-ctm-expected.txt: Added.
* svg/custom/invalid-ctm.svg: Added.

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

7 years agoNRWT doesn't print exceptions
dpranke@chromium.org [Fri, 13 Jul 2012 19:08:27 +0000 (19:08 +0000)]
NRWT doesn't print exceptions
https://bugs.webkit.org/show_bug.cgi?id=91129

Reviewed by Ojan Vafai.

Although we printed exceptions in most cases, if an unexpected
exception (like a runtime error) was raised when creating a
port, we wouldn't. This patch fixes that, and also cleans up
how we were logging exceptions from the workers to be less
verbose.

Because of the corner cases where these errors are occurring,
it's difficult to write automated unit tests for them. I've
tested it quite a bit by hand, though.

* Scripts/webkitpy/common/message_pool.py:
(_MessagePool._close):
(_MessagePool._handle_worker_exception):
(_Worker.run):
(_Worker._raise):
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._run_tests):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(main):

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

7 years ago[V8] String wrappers should be marked Independent
haraken@chromium.org [Fri, 13 Jul 2012 19:05:21 +0000 (19:05 +0000)]
[V8] String wrappers should be marked Independent
https://bugs.webkit.org/show_bug.cgi?id=91251

Reviewed by Adam Barth.

Currently V8 String wrappers are not marked Independent.
By marking them Independent, they can be reclaimed by the scavenger GC.

I tried to find some cases where this change reduces memory usage,
but couldn't due to sensitive behavior of GC.

No tests. No change in behavior.

* bindings/v8/V8Binding.cpp:
(WebCore::StringCache::v8ExternalStringSlow):

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

7 years agoIndexedDB: Add unexpectedUpgradeNeededCallback to shared.js
dgrogan@chromium.org [Fri, 13 Jul 2012 19:00:01 +0000 (19:00 +0000)]
IndexedDB: Add unexpectedUpgradeNeededCallback to shared.js
https://bugs.webkit.org/show_bug.cgi?id=91176

Reviewed by Tony Chang.

This is just used in our layout tests.  It's the simplest possible piece
I could break off of the upgradeneeded changes.

No tests because no change in behavior expected.

* storage/indexeddb/resources/shared.js:
(unexpectedBlockedCallback):
(unexpectedUpgradeNeededCallback):

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

7 years agoUnreviewed GTK gardening, removing timeout expectations for a few
zandobersek@gmail.com [Fri, 13 Jul 2012 18:50:01 +0000 (18:50 +0000)]
Unreviewed GTK gardening, removing timeout expectations for a few
File API tests while hoping the problems have now gone away.

* platform/gtk/TestExpectations:

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

7 years ago[EFL] Gardening failure cases on EFL build bot
commit-queue@webkit.org [Fri, 13 Jul 2012 18:46:43 +0000 (18:46 +0000)]
[EFL] Gardening failure cases on EFL build bot
https://bugs.webkit.org/show_bug.cgi?id=91219

Unreviewed EFL gardening. Skip the new failing tests and add
platform-specific results for fallback-content.html to get the
bot greener.

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-07-13

* platform/efl/TestExpectations:
* platform/efl/fast/canvas/fallback-content-expected.txt: Added.

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

7 years ago[Chromium] Make the v8 i18n API dependency conditional for Android, disable strict...
peter@chromium.org [Fri, 13 Jul 2012 18:45:16 +0000 (18:45 +0000)]
[Chromium] Make the v8 i18n API dependency conditional for Android, disable strict aliasing
https://bugs.webkit.org/show_bug.cgi?id=91240

Reviewed by Adam Barth.

Disable the v8 internationalization API for Chromium Android, as it's
disabled and not always available in checkouts. Furthermore, disable
strict aliasing for the webkit_remaining target, similar to what
x11-based builds are doing (see the webcore_prerequisites target).

* WebCore.gyp/WebCore.gyp:

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

7 years agoUnreviewed GTK gardening, adding baselines and expectations required
zandobersek@gmail.com [Fri, 13 Jul 2012 18:43:19 +0000 (18:43 +0000)]
Unreviewed GTK gardening, adding baselines and expectations required
after r122509 and r122528.

* platform/gtk/TestExpectations:
* platform/gtk/http/tests/w3c: Added.
* platform/gtk/http/tests/w3c/webperf: Added.
* platform/gtk/http/tests/w3c/webperf/approved: Added.
* platform/gtk/http/tests/w3c/webperf/approved/navigation-timing: Added.
* platform/gtk/http/tests/w3c/webperf/approved/navigation-timing/html: Added.
* platform/gtk/http/tests/w3c/webperf/approved/navigation-timing/html/test_timing_xserver_redirect-expected.txt: Added.
* platform/gtk/http/tests/w3c/webperf/approved/navigation-timing/html5: Added.
* platform/gtk/http/tests/w3c/webperf/approved/navigation-timing/html5/test_timing_xserver_redirect-expected.txt: Added.

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

7 years ago[CallWith=XXX] arguments should be placed at the head of method arguments
haraken@chromium.org [Fri, 13 Jul 2012 18:15:52 +0000 (18:15 +0000)]
[CallWith=XXX] arguments should be placed at the head of method arguments
https://bugs.webkit.org/show_bug.cgi?id=91217

Reviewed by Adam Barth.

The EFL build with the ENABLE_FILE_SYSTEM flag caused a build error,
because CodeGeneratorJS.pm assumes webkitEntries(ScriptExecutionContext*, HTMLInputElement*)
but the actual signature is webkitEntries(HTMLInputElement*, ScriptExecutionContext*) (bug 91185).

Per https://trac.webkit.org/wiki/WebKitIDL#CallWith, [CallWith=XXX] arguments should be placed
at the head of the arguments. (i.e. the behavior of CodeGeneratorJS.pm is correct.)

Thus the correct fix is (1) to change the signature of webkitEntries() and webkitGetAsEntry()
so that ScriptExecutionContext* comes first and (2) to modify CodeGeneratorV8.pm to support the order.

Test: bindings/scripts/test/TestObj.idl

* Modules/filesystem/DataTransferItemFileSystem.h: Placed ScriptExecutionContext* at the head of arguments.
(DataTransferItemFileSystem):
* Modules/filesystem/HTMLInputElementFileSystem.cpp: Ditto.
(WebCore::HTMLInputElementFileSystem::webkitEntries):
* Modules/filesystem/HTMLInputElementFileSystem.h: Ditto.
(HTMLInputElementFileSystem):
* Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp: Ditto.
(WebCore::DataTransferItemFileSystem::webkitGetAsEntry):

* bindings/scripts/CodeGeneratorV8.pm: Modified to support the correct order.
(GenerateNormalAttrGetter):
(GenerateNormalAttrSetter):
(GenerateFunctionCallString):

* bindings/scripts/test/V8/V8TestInterface.cpp: Updated run-bindings-tests results.
(WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):

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

7 years agoPrettyPatch.rb complains about missing checksum for new pixel results
ojan@chromium.org [Fri, 13 Jul 2012 18:11:35 +0000 (18:11 +0000)]
PrettyPatch.rb complains about missing checksum for new pixel results
https://bugs.webkit.org/show_bug.cgi?id=88368

Reviewed by Tony Chang.

When adding or removing a file, we incorrectly iterpreted not having an image
as not having a checksum.

* PrettyPatch/PrettyPatch.rb:
* PrettyPatch/PrettyPatch_test.rb:
I tried to fix the TempFile issue in these tests, but after a couple hours
of banging my head against this, I have no idea what's breaking.

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

7 years agoenable TestWebKitAPI/webkit_unit_tests apk on x86 android platform by adding abi...
commit-queue@webkit.org [Fri, 13 Jul 2012 17:57:47 +0000 (17:57 +0000)]
enable TestWebKitAPI/webkit_unit_tests apk on x86 android platform by adding abi support
https://bugs.webkit.org/show_bug.cgi?id=91194

Patch by Wei James <james.wei@intel.com> on 2012-07-13
Reviewed by Adam Barth.

Source/WebKit/chromium:

* WebKitUnitTests.gyp:

Tools:

* TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp:

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

7 years ago[GTK] Gardening: update API tests skipped list
philn@webkit.org [Fri, 13 Jul 2012 17:55:09 +0000 (17:55 +0000)]
[GTK] Gardening: update API tests skipped list
https://bugs.webkit.org/show_bug.cgi?id=91224

Unreviewed gardening.

Skip "next" and "previous" tests of FindController until bug #91083
is fixed.

Patch by Simon Pena <spena@igalia.com> on 2012-07-13

* gtk/run-api-tests:
(TestRunner):

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

7 years ago[BlackBerry] Some small changes in network code
mary.wu@torchmobile.com.cn [Fri, 13 Jul 2012 17:39:59 +0000 (17:39 +0000)]
[BlackBerry] Some small changes in network code
https://bugs.webkit.org/show_bug.cgi?id=90974

Reviewed by Rob Buis.

1. Set status in NetworkJob/SocketStreamHandleBlackBerry so that
its wrapped stream can also query the stream result.
2. pass download attribute to NetworkRequest.

RIM PR# 171555
Reviewed internally by Lyon Chen and Joe Mason.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyClose):
* platform/network/blackberry/NetworkJob.h:
(WebCore::NetworkJob::status):
* platform/network/blackberry/ResourceRequestBlackBerry.cpp:
(WebCore::platformTargetTypeForRequest):
* platform/network/blackberry/SocketStreamHandle.h:
(WebCore::SocketStreamHandle::status):
(SocketStreamHandle):
* platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
(WebCore::SocketStreamHandle::notifyStatusReceived):
(WebCore::SocketStreamHandle::notifyClose):

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

7 years agoWeb Inspector: Remove uiSourceCode from Resource.
vsevik@chromium.org [Fri, 13 Jul 2012 17:32:41 +0000 (17:32 +0000)]
Web Inspector: Remove uiSourceCode from Resource.
https://bugs.webkit.org/show_bug.cgi?id=91201

Reviewed by Pavel Feldman.

Removed Resource._uiSourceCode field as it is not used anymore.

* inspector/front-end/Resource.js:
(WebInspector.Resource.prototype.isHidden):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode):

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

7 years agowebkit_unit_test CCLayerTreeHostImplTest.testRemoveRenderPasses started failing.
danakj@chromium.org [Fri, 13 Jul 2012 17:28:37 +0000 (17:28 +0000)]
webkit_unit_test CCLayerTreeHostImplTest.testRemoveRenderPasses started failing.
https://bugs.webkit.org/show_bug.cgi?id=91245

Reviewed by Adrienne Walker.

* tests/CCLayerTreeHostImplTest.cpp:

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

7 years ago[CMake] Proper handling of ENABLE_API_TESTS build option
commit-queue@webkit.org [Fri, 13 Jul 2012 17:25:14 +0000 (17:25 +0000)]
[CMake] Proper handling of ENABLE_API_TESTS build option
https://bugs.webkit.org/show_bug.cgi?id=91221

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-07-13
Reviewed by Rob Buis.

.:

Make the flag reusable across the ports using CMake. We are about to enable the WTF,
WebCore and WebKit 2 API's at Tools/TestWebKitAPI and other ports using CMake can get
it almost for free.

* CMakeLists.txt:
* Source/cmake/OptionsEfl.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/WebKit:

Build unit tests only if ENABLE_API_TESTS is set.

* PlatformEfl.cmake:

Source/WebKit2:

Build unit tests only if ENABLE_API_TESTS is set.

* PlatformEfl.cmake:

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

7 years agoUnreviewed, rolling out r122450 and r122580.
inferno@chromium.org [Fri, 13 Jul 2012 17:24:42 +0000 (17:24 +0000)]
Unreviewed, rolling out r122450 and r122580.
http://trac.webkit.org/changeset/122450
http://trac.webkit.org/changeset/122580
https://bugs.webkit.org/show_bug.cgi?id=91263

Caused multiple regressions on ClusterFuzz (Requested by
inferno-sec on #webkit).

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

* bindings/js/ScriptWrappable.h:
(WebCore::ScriptWrappable::reportMemoryUsage):
* bindings/v8/DOMDataStore.cpp:
(WebCore::DOMDataStore::reportMemoryUsage):
* bindings/v8/IntrusiveDOMWrapperMap.h:
(WebCore::ChunkedTable::reportMemoryUsage):
* bindings/v8/ScriptWrappable.h:
(WebCore::ScriptWrappable::reportMemoryUsage):
* bindings/v8/V8Binding.cpp:
(WebCore::V8BindingPerIsolateData::reportMemoryUsage):
(WebCore::StringCache::reportMemoryUsage):
* bindings/v8/V8DOMMap.h:
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
* css/StylePropertySet.cpp:
* css/StylePropertySet.h:
(WebCore::StylePropertySet::reportMemoryUsage):
* dom/CharacterData.cpp:
(WebCore::CharacterData::reportMemoryUsage):
* dom/ContainerNode.h:
(WebCore::ContainerNode::reportMemoryUsage):
* dom/Document.cpp:
(WebCore::Document::reportMemoryUsage):
* dom/Element.cpp:
(WebCore::Element::detachAttribute):
(WebCore::Element::removeAttribute):
(WebCore::Element::attributes):
(WebCore::Element::setAttributeInternal):
(WebCore::Element::parserSetAttributes):
(WebCore::Element::hasEquivalentAttributes):
(WebCore::Element::createAttributeData):
(WebCore):
(WebCore::Element::setAttributeNode):
(WebCore::Element::removeAttributeNode):
(WebCore::Element::getAttributeNode):
(WebCore::Element::getAttributeNodeNS):
(WebCore::Element::hasAttribute):
(WebCore::Element::hasAttributeNS):
(WebCore::Element::normalizeAttributes):
(WebCore::Element::cloneAttributesFromElement):
* dom/Element.h:
(WebCore::Element::attributeData):
(Element):
(WebCore::Element::reportMemoryUsage):
(WebCore::Element::ensureAttributeData):
(WebCore::Element::updatedAttributeData):
(WebCore::Element::ensureUpdatedAttributeData):
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::attrIfExists):
(WebCore::ElementAttributeData::ensureAttr):
(WebCore::ElementAttributeData::setAttr):
(WebCore::ElementAttributeData::removeAttr):
(WebCore::ElementAttributeData::setClass):
(WebCore):
(WebCore::ElementAttributeData::ensureInlineStyle):
(WebCore::ElementAttributeData::ensureMutableInlineStyle):
(WebCore::ElementAttributeData::destroyInlineStyle):
(WebCore::ElementAttributeData::addAttribute):
(WebCore::ElementAttributeData::removeAttribute):
(WebCore::ElementAttributeData::isEquivalent):
(WebCore::ElementAttributeData::detachAttrObjectsFromElement):
(WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
(WebCore::ElementAttributeData::cloneDataFrom):
(WebCore::ElementAttributeData::clearAttributes):
(WebCore::ElementAttributeData::replaceAttribute):
(WebCore::ElementAttributeData::getAttributeNode):
* dom/ElementAttributeData.h:
(WebCore::ElementAttributeData::create):
(ElementAttributeData):
(WebCore::ElementAttributeData::setIdForStyleResolution):
(WebCore::ElementAttributeData::setAttributeStyle):
(WebCore::ElementAttributeData::length):
(WebCore::ElementAttributeData::isEmpty):
(WebCore::ElementAttributeData::attributeItem):
(WebCore::ElementAttributeData::getAttributeItem):
(WebCore::ElementAttributeData::reportMemoryUsage):
(WebCore::ElementAttributeData::ElementAttributeData):
(WebCore::ElementAttributeData::attributeVector):
(WebCore::ElementAttributeData::clonedAttributeVector):
(WebCore::ElementAttributeData::removeAttribute):
(WebCore::ElementAttributeData::getAttributeItemIndex):
* dom/MemoryInstrumentation.h:
(MemoryInstrumentation):
(MemoryObjectInfo):
(WebCore::MemoryObjectInfo::reportInstrumentedPointer):
(WebCore::MemoryObjectInfo::reportPointer):
(WebCore::MemoryObjectInfo::reportInstrumentedObject):
(WebCore::MemoryObjectInfo::reportObject):
(WebCore::MemoryObjectInfo::reportObjectInfo):
(WebCore::MemoryObjectInfo::reportHashMap):
(WebCore::MemoryObjectInfo::reportHashSet):
(WebCore::MemoryObjectInfo::reportListHashSet):
(WebCore::MemoryObjectInfo::reportVector):
(WebCore::MemoryObjectInfo::reportString):
(WebCore::MemoryObjectInfo::objectType):
(WebCore::MemoryObjectInfo::objectSize):
(WebCore::MemoryObjectInfo::memoryInstrumentation):
* dom/Node.cpp:
(WebCore::Node::reportMemoryUsage):
* dom/QualifiedName.h:
(WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
(WebCore::QualifiedName::reportMemoryUsage):
* dom/StyledElement.cpp:
(WebCore::StyledElement::style):
(WebCore::StyledElement::classAttributeChanged):
(WebCore::StyledElement::setInlineStyleProperty):
(WebCore::StyledElement::removeInlineStyleProperty):
(WebCore::StyledElement::addSubresourceAttributeURLs):
* dom/StyledElement.h:
(WebCore::StyledElement::ensureInlineStyle):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
* platform/TreeShared.h:
(WebCore::TreeShared::reportMemoryUsage):
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):

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

7 years ago[BlackBerry] Add support for attributes to define keyboard and enter key type on...
mifenton@rim.com [Fri, 13 Jul 2012 17:23:16 +0000 (17:23 +0000)]
[BlackBerry] Add support for attributes to define keyboard and enter key type on the Virtual Keyboard
https://bugs.webkit.org/show_bug.cgi?id=91248

Reviewed by Antonio Gomes.

PR 174733.

Add data-blackberry-virtual-keyboard-type and
data-blackberry-virtual-keyboard-enter-key to
enable configuration of the desired virtual keyboard
using element attributes.

Reviewed Internally by Gen Mak.

* Api/WebPageClient.h:
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::convertStringToKeyboardType):
(WebKit):
(BlackBerry::WebKit::keyboardTypeAttribute):
(BlackBerry::WebKit::convertStringToKeyboardEnterKeyType):
(BlackBerry::WebKit::keyboardEnterKeyTypeAttribute):
(BlackBerry::WebKit::InputHandler::setElementFocused):

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

7 years agoRemove down-casting to BitmapImage in GraphicsContext::drawImage.
kseo@webkit.org [Fri, 13 Jul 2012 17:19:28 +0000 (17:19 +0000)]
Remove down-casting to BitmapImage in GraphicsContext::drawImage.
https://bugs.webkit.org/show_bug.cgi?id=90755

Patch by Huang Dongsung <luxtella@company100.net> on 2012-07-13
Reviewed by Simon Fraser.

Add a BitmapImage draw method which takes RespectImageOrientationEnum enum as
the last argument for CG. Then we can remove the conditional down-casting in
GraphicsContext::drawImage.

This change is needed for parallel image decoders. Because parallel image
decoders use a Bitmap image wrapper class which extends Image (not Bitmap), the
down-casting above causes the loss of RespectImageOrientationEnum which must be
passed to BitmapImage.

No new tests, no behavior change.

* platform/graphics/BitmapImage.cpp:
* platform/graphics/BitmapImage.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImage):
* platform/graphics/Image.cpp:
(WebCore::Image::draw):
(WebCore):
* platform/graphics/Image.h:
(Image):

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

7 years ago[EFL][WK2] Make new public Ewk headers as installable
commit-queue@webkit.org [Fri, 13 Jul 2012 17:09:03 +0000 (17:09 +0000)]
[EFL][WK2] Make new public Ewk headers as installable
https://bugs.webkit.org/show_bug.cgi?id=91232

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-07-13
Reviewed by Antonio Gomes.

Make new public Ewk headers installable.

* PlatformEfl.cmake:

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

7 years ago[WIN] Fix compilation of DFGRepatch.cpp
paroga@webkit.org [Fri, 13 Jul 2012 16:53:20 +0000 (16:53 +0000)]
[WIN] Fix compilation of DFGRepatch.cpp
https://bugs.webkit.org/show_bug.cgi?id=91241

Reviewed by Geoffrey Garen.

Use intptr_t instead of uintptr_t when calling CodeLocationCommon::dataLabelPtrAtOffset(int)
to fix MSVC "unary minus operator applied to unsigned type, result still unsigned" warning.

* dfg/DFGRepatch.cpp:
(JSC::DFG::dfgResetGetByID):
(JSC::DFG::dfgResetPutByID):

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

7 years agoFix ARM_TRADITIONAL JIT for COMPILER(MSVC) and COMPILER(RVCT) after r121885
paroga@webkit.org [Fri, 13 Jul 2012 16:35:46 +0000 (16:35 +0000)]
Fix ARM_TRADITIONAL JIT for COMPILER(MSVC) and COMPILER(RVCT) after r121885
https://bugs.webkit.org/show_bug.cgi?id=91238

Reviewed by Zoltan Herczeg.

r121885 changed the assembler instruction only for COMPILER(GCC).
Use the same instructions for the other compilers too.

* jit/JITStubs.cpp:
(JSC::ctiTrampoline):
(JSC::ctiTrampolineEnd):
(JSC::ctiVMThrowTrampoline):

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

7 years agoUnreviewed gardening, updated chromium test expectations.
vsevik@chromium.org [Fri, 13 Jul 2012 16:22:33 +0000 (16:22 +0000)]
Unreviewed gardening, updated chromium test expectations.
https://bugs.webkit.org/show_bug.cgi?id=91252

* platform/chromium/TestExpectations:

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

7 years agoAlso mark its evil twin as flaky.
abarth@webkit.org [Fri, 13 Jul 2012 16:18:58 +0000 (16:18 +0000)]
Also mark its evil twin as flaky.

* platform/chromium/TestExpectations:

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

7 years agoNote this test as flaky.
abarth@webkit.org [Fri, 13 Jul 2012 16:16:53 +0000 (16:16 +0000)]
Note this test as flaky.

* platform/chromium/TestExpectations:

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

7 years agoUnreviewed gardening, updated test expectations.
vsevik@chromium.org [Fri, 13 Jul 2012 16:13:11 +0000 (16:13 +0000)]
Unreviewed gardening, updated test expectations.
http://bugs.webkit.org/show_bug.cgi?id=91255

* platform/chromium/TestExpectations:

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

7 years ago[BlackBerry] resetBitmapZoomScale called while zooming preventing pinch zoom
zhajiang@rim.com [Fri, 13 Jul 2012 16:11:13 +0000 (16:11 +0000)]
[BlackBerry] resetBitmapZoomScale called while zooming preventing pinch zoom
https://bugs.webkit.org/show_bug.cgi?id=91247

Reviewed by Antonio Gomes.
Patch by Jacky Jiang <zhajiang@rim.com>

PR: 175432
On yahoo.com, the web page stopped zooming while trying to pinch as
WebPageClient::resetBitmapZoomScale(double) was being called by
WebPagePrivate::zoomToInitialScaleOnLoad() after load finished.
And also yahoo.com was keeping updating layout, which made it really
bad that zoomToInitialScaleOnLoad() was called many times when load
finished and the load type was FrameLoadTypeStandard or FrameLoadTypeSame.
As we only care about the situation that dispatchDidFirstVisuallyNonEmptyLayout()
happens after load finished, we can move the code to that method and
set a flag for WebPage layoutFinished() and zoomToInitialScaleOnLoad()
instead. In this way, we can ensure that the flag is only enabled when
dispatchDidFirstVisuallyNonEmptyLayout() is called after load finished
and get rid of calling zoomToInitialScaleOnLoad() lots of times when
keeping updating layout in such kind of situation.

Internally reviewed by Arvid Nilsson

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
(BlackBerry::WebKit::WebPagePrivate::setLoadState):
(BlackBerry::WebKit::WebPagePrivate::layoutFinished):
* Api/WebPage_p.h:
(BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad):
(BlackBerry::WebKit::WebPagePrivate::setShouldZoomToInitialScaleAfterLoadFinished):
(WebPagePrivate):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):

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

7 years agoUnreviewed chromium gardening, updated test expectations.
vsevik@chromium.org [Fri, 13 Jul 2012 16:00:40 +0000 (16:00 +0000)]
Unreviewed chromium gardening, updated test expectations.
https://bugs.webkit.org/show_bug.cgi?id=91254

* platform/chromium/TestExpectations:

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

7 years ago[BlackBerry] Use fillBuffer() instead of a user-defined background image.
jpetsovits@rim.com [Fri, 13 Jul 2012 15:53:24 +0000 (15:53 +0000)]
[BlackBerry] Use fillBuffer() instead of a user-defined background image.
https://bugs.webkit.org/show_bug.cgi?id=91180
RIM PR 171458

Reviewed by Rob Buis.
Internally reviewed by Andrew Lo.

By using Platform::Graphics::fillBuffer() to fill the
overscroll area, we save graphics memory for the buffer
that the background image was occupying.

Also adapt checkerboard drawing as it is now done using
fillBuffer() which replaces checkerBuffer().

In the same go, use the opportunity of the WebSettings
API change to make it more consistent, renaming the
OverZoomColor setting to OverScrollColor.

* Api/BackingStore.cpp:
(WebKit):
(BlackBerry::WebKit::BackingStorePrivate::paintDefaultBackground):
(BlackBerry::WebKit::BackingStorePrivate::blitContents):
(BlackBerry::WebKit::BackingStorePrivate::fillWindow):
* Api/BackingStore_p.h:
(BackingStorePrivate):
* Api/WebSettings.cpp:
(WebKit):
(BlackBerry::WebKit::WebSettings::standardSettings):
(BlackBerry::WebKit::WebSettings::overScrollColor):
(BlackBerry::WebKit::WebSettings::setOverScrollColor):
(BlackBerry::WebKit::WebSettings::isEnableDefaultOverScrollBackground):
(BlackBerry::WebKit::WebSettings::setEnableDefaultOverScrollBackground):
* Api/WebSettings.h:

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

7 years agoFix QtWebKit build with OpenGLES after GC3D/E3D refactor
commit-queue@webkit.org [Fri, 13 Jul 2012 15:51:58 +0000 (15:51 +0000)]
Fix QtWebKit build with OpenGLES after GC3D/E3D refactor
https://bugs.webkit.org/show_bug.cgi?id=91156

Patch by Lauro Neto <lauro.neto@openbossa.org> on 2012-07-13
Reviewed by Noam Rosenthal.

Adds several build fixes.

* platform/graphics/GraphicsContext3D.h:
    Use E3DOpenGLES instead of previously removed E3DQt.

* platform/graphics/OpenGLESShims.h:
    Enable defines for Qt.

* platform/graphics/opengl/Extensions3DOpenGLES.cpp:
(WebCore::Extensions3DOpenGLES::blitFramebuffer):
(WebCore):
(WebCore::Extensions3DOpenGLES::renderbufferStorageMultisample):
(WebCore::Extensions3DOpenGLES::copyTextureCHROMIUM):
    Added pure virtual stubs.

(WebCore::Extensions3DOpenGLES::supportsExtension):
    Remove PROC suffix. See bug #91130.

* platform/graphics/opengl/Extensions3DOpenGLES.h:
(Extensions3DOpenGLES):
    Added pure virtual stubs.

* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::reshapeFBOs):
    Readded missing function after removed in r122250.

(WebCore):
    Use PLATFORM(BLACKBERRY) guard around port-specific include.

* platform/graphics/qt/GraphicsContext3DQt.cpp:
    Added USE(OPENGL_ES_2) guard instead of always loading the OpenGL extensions.

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

7 years agoUnreviewed gardening, marked chromium test as flaky.
vsevik@chromium.org [Fri, 13 Jul 2012 15:47:50 +0000 (15:47 +0000)]
Unreviewed gardening, marked chromium test as flaky.
https://bugs.webkit.org/show_bug.cgi?id=91252

* platform/chromium/TestExpectations:

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

7 years agoForm of FormAssociatedElement is not updated when id target changes.
keishi@webkit.org [Fri, 13 Jul 2012 15:36:50 +0000 (15:36 +0000)]
Form of FormAssociatedElement is not updated when id target changes.
https://bugs.webkit.org/show_bug.cgi?id=91042

Reviewed by Kent Tamura.

Source/WebCore:

Test: fast/forms/update-form-attribute-element.html

This patch introduces the IdTargetObserver and IdTargetObserverRegistry class.
They can be used to be notified when the element that an id is pointing to (the id target)
changes.

* CMakeLists.txt: Added IdTargetObserverRegistry.{h,cpp} and IdTargetObserver.{h,cpp}
* GNUmakefile.list.am: Ditto.
* Target.pri: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* dom/DOMAllInOne.cpp:
* dom/IdTargetObserver.cpp: Added. When you want notified of changes to an id target, you should create a new class that inherits this.
(WebCore):
(WebCore::IdTargetObserver::IdTargetObserver):
(WebCore::IdTargetObserver::~IdTargetObserver):
* dom/IdTargetObserver.h: Added.
(WebCore):
(IdTargetObserver):
* dom/IdTargetObserverRegistry.cpp: Added.
(WebCore):
(WebCore::IdTargetObserverRegistry::create):
(WebCore::IdTargetObserverRegistry::addObserver): Register an IdTargetObserver to observe an id target.
(WebCore::IdTargetObserverRegistry::removeObserver): Unregisters an IdTargetObserver from observing.
(WebCore::IdTargetObserverRegistry::notifyObserversInternal):
* dom/IdTargetObserverRegistry.h: Added.
(WebCore):
(IdTargetObserverRegistry):
(WebCore::IdTargetObserverRegistry::IdTargetObserverRegistry):
(WebCore::IdTargetObserverRegistry::notifyObservers): Calls idTargetChanged on all observers for an id. Inlining first part of function for performance.
* dom/TreeScope.cpp:
(WebCore::TreeScope::TreeScope):
(WebCore::TreeScope::addElementById): Calls IdTargetObserverRegistry::notifyObservers because the id target might have changed.
(WebCore::TreeScope::removeElementById): Ditto.
* dom/TreeScope.h:
(WebCore):
(WebCore::TreeScope::idTargetObserverRegistry):
(TreeScope):
* html/FormAssociatedElement.cpp: Observer for id targets defined by the form attribute.
(WebCore::FormAssociatedElement::didMoveToNewDocument):
(WebCore::FormAssociatedElement::insertedInto):
(WebCore::FormAssociatedElement::removedFrom):
(WebCore::FormAssociatedElement::formAttributeChanged):
(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): Creates and sets up a new FormAttributeTargetObserver.
(WebCore):
(WebCore::FormAssociatedElement::formAttributeTargetChanged):
(WebCore::FormAttributeTargetObserver::create):
(WebCore::FormAttributeTargetObserver::FormAttributeTargetObserver):
(WebCore::FormAttributeTargetObserver::idTargetChanged):
* html/FormAssociatedElement.h:
(FormAssociatedElement):
* html/FormController.cpp:
* html/FormController.h:
(FormController):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::removedFrom):
(WebCore::HTMLFormElement::formElementIndexWithFormAttribute): Modified to take a range. It
scans the range and returns the index to insert the element in m_associatedElement.
(WebCore::HTMLFormElement::formElementIndex): Modified to only scan the elements in
m_associatedElement that precede and follow the form element.
* html/HTMLFormElement.h:
(HTMLFormElement):

LayoutTests:

* fast/forms/update-form-attribute-element-expected.txt: Added.
* fast/forms/update-form-attribute-element.html: Added.

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

7 years agoUnreviewed gardneing, skip failing chromium test.
vsevik@chromium.org [Fri, 13 Jul 2012 15:32:03 +0000 (15:32 +0000)]
Unreviewed gardneing, skip failing chromium test.

* platform/chromium/TestExpectations:

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

7 years agoOptimizing blend filter to ARM-NEON with intrinsics
rgabor@webkit.org [Fri, 13 Jul 2012 15:31:06 +0000 (15:31 +0000)]
Optimizing blend filter to ARM-NEON with intrinsics
https://bugs.webkit.org/show_bug.cgi?id=90949

Reviewed by Zoltan Herczeg.

The feBlend SVG filter modes can be greatly fasten up with ARM-NEON since
we are able to calculate with 2 pixels (8 channels) at the same time.
The code is written with NEON intrinsics and it doesn't affect the
general - it has the same behaviour as the original algorithm.
With this NEON optimization the calculation is ~4.5 times faster for each mode.

Existing tests cover this issue.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/filters/FEBlend.cpp:
(WebCore::FEBlend::platformApplyGeneric):
(WebCore):
(WebCore::FEBlend::platformApplySoftware):
* platform/graphics/filters/FEBlend.h:
(FEBlend):
* platform/graphics/filters/arm/FEBlendNEON.h: Added.
(WebCore):
(FEBlendUtilitiesNEON):
(WebCore::FEBlendUtilitiesNEON::div255): integer divison with 255
(WebCore::FEBlendUtilitiesNEON::normal): calculate normal mode blending for two pixels
(WebCore::FEBlendUtilitiesNEON::multiply): calculate multiply mode blending for two pixels
(WebCore::FEBlendUtilitiesNEON::screen): calculate screen mode blending for two pixels
(WebCore::FEBlendUtilitiesNEON::darken): calculate darken mode blending for two pixels
(WebCore::FEBlendUtilitiesNEON::lighten): calculate lighten mode blending for two pixels
(WebCore::FEBlend::platformApplyNEON):

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

7 years agoUnreviewed gardening chromium tests rebaseline.
vsevik@chromium.org [Fri, 13 Jul 2012 15:15:40 +0000 (15:15 +0000)]
Unreviewed gardening chromium tests rebaseline.

* platform/chromium-mac/css3/font-feature-settings-rendering-expected.txt:

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

7 years agoWeb Inspector: native memory instrumentation: extract instrumentation methods into...
loislo@chromium.org [Fri, 13 Jul 2012 15:09:10 +0000 (15:09 +0000)]
Web Inspector: native memory instrumentation: extract instrumentation methods into MemoryClassInfo
https://bugs.webkit.org/show_bug.cgi?id=91227

Reviewed by Pavel Feldman.

void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
    MemoryClassInfo<Node> info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
    info.visitBaseClass<ScriptWrappable>(this);

    info.addMember(m_notInstrumentedPointer); // automatically detects poniter/reference
    info.addInstrumentedMember(m_next);
    info.addHashSet<MemoryInstrumentation::NonClass>(m_aHash);                // NonClass value_type (report only size of internal template structures)
    info.addHashSet<MemoryInstrumentation::NotInstrumentedClass>(m_aHashSet); // not instrumented value_type (use sizeof)
    info.addHashSet<MemoryInstrumentation::InstrumentedClass>(m_aHashSet);    // instrumented value_type (call visit)
}

The change is covered by existing tests for native memory snapshot.

* bindings/v8/DOMDataStore.cpp:
(WebCore::DOMDataStore::reportMemoryUsage):
* bindings/v8/IntrusiveDOMWrapperMap.h:
(WebCore::ChunkedTable::reportMemoryUsage):
* bindings/v8/ScriptWrappable.h:
(WebCore::ScriptWrappable::reportMemoryUsage):
* bindings/v8/V8Binding.cpp:
(WebCore::V8BindingPerIsolateData::reportMemoryUsage):
(WebCore::StringCache::reportMemoryUsage):
* bindings/v8/V8DOMMap.h:
* css/StylePropertySet.h:
(WebCore::StylePropertySet::reportMemoryUsage):
* dom/CharacterData.cpp:
(WebCore::CharacterData::reportMemoryUsage):
* dom/ContainerNode.h:
(WebCore::ContainerNode::reportMemoryUsage):
* dom/Document.cpp:
(WebCore::Document::reportMemoryUsage):
* dom/Element.h:
(WebCore::Element::reportMemoryUsage):
* dom/ElementAttributeData.h:
(WebCore::ElementAttributeData::reportMemoryUsage):
* dom/MemoryInstrumentation.h:
(MemoryInstrumentation):
(WebCore::MemoryObjectInfo::objectType):
(WebCore::MemoryObjectInfo::objectSize):
(WebCore::MemoryObjectInfo::memoryInstrumentation):
(MemoryObjectInfo):
(WebCore::MemoryObjectInfo::reportObjectInfo):
(WebCore):
(MemoryClassInfo):
(WebCore::MemoryClassInfo::MemoryClassInfo):
(WebCore::MemoryClassInfo::visitBaseClass):
(WebCore::MemoryClassInfo::reportInstrumentedPointer):
(WebCore::MemoryClassInfo::reportInstrumentedObject):
(WebCore::MemoryClassInfo::reportPointer):
(WebCore::MemoryClassInfo::reportObject):
(WebCore::MemoryClassInfo::reportHashMap):
(WebCore::MemoryClassInfo::reportHashSet):
(WebCore::MemoryClassInfo::reportListHashSet):
(WebCore::MemoryClassInfo::reportVector):
(WebCore::MemoryClassInfo::reportString):
* dom/Node.cpp:
(WebCore::Node::reportMemoryUsage):
* dom/QualifiedName.h:
(WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
(WebCore::QualifiedName::reportMemoryUsage):
* platform/TreeShared.h:
(WebCore::TreeShared::reportMemoryUsage):

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

7 years ago[Qt] Unreviewed gardening after r122528. Skipped some new tests.
rgabor@webkit.org [Fri, 13 Jul 2012 15:05:00 +0000 (15:05 +0000)]
[Qt] Unreviewed gardening after r122528. Skipped some new tests.
https://bugs.webkit.org/show_bug.cgi?id=91218

Patch by Szilard Ledan <szledan@inf.u-szeged.hu> on 2012-07-13

* platform/qt/Skipped:

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

7 years agoWeb Inspector: align scope filters
pfeldman@chromium.org [Fri, 13 Jul 2012 15:02:22 +0000 (15:02 +0000)]
Web Inspector: align scope filters
https://bugs.webkit.org/show_bug.cgi?id=91213

Reviewed by Vsevolod Vlasov.

* inspector/front-end/elementsPanel.css:
(.crumbs):
* inspector/front-end/inspector.css:
(.status-bar > div):
(.scope-bar):
(.scope-bar li):
(.scope-bar li.all):
* inspector/front-end/networkLogView.css:

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

7 years ago[GTK] Gardening: new baseline after r122550 and rebaseline after r122556
commit-queue@webkit.org [Fri, 13 Jul 2012 14:58:55 +0000 (14:58 +0000)]
[GTK] Gardening: new baseline after r122550 and rebaseline after r122556
https://bugs.webkit.org/show_bug.cgi?id=91235

Unreviewed gardening.

Add new baseline for fast/canvas/fallback-content.html added in r122550, and
rebaseline fast/regions/region-style-block-background-color2.html after r122556.

Patch by Simon Pena <spena@igalia.com> on 2012-07-13

* platform/gtk/fast/canvas/fallback-content-expected.txt: Added.
* platform/gtk/fast/regions/region-style-block-background-color2-expected.txt:

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

7 years agoUnreviewed gardening: skip failing webkit unit test.
vsevik@chromium.org [Fri, 13 Jul 2012 14:48:45 +0000 (14:48 +0000)]
Unreviewed gardening: skip failing webkit unit test.

* tests/CCLayerTreeHostImplTest.cpp:

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

7 years agoUnreviewed gardening, skip failing webkit_unit_tests.
vsevik@chromium.org [Fri, 13 Jul 2012 14:41:12 +0000 (14:41 +0000)]
Unreviewed gardening, skip failing webkit_unit_tests.

* tests/DecimalTest.cpp:
(TEST_F):

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

7 years agoWeb Inspector: too many hardcoded strings in InspectorBackendDispatcher.
loislo@chromium.org [Fri, 13 Jul 2012 14:30:14 +0000 (14:30 +0000)]
Web Inspector: too many hardcoded strings in InspectorBackendDispatcher.
https://bugs.webkit.org/show_bug.cgi?id=89198

Patch by Peter Rybin <peter.rybin@gmail.com> on 2012-07-13
Reviewed by Yury Semikhatsky.

Instead of generating error message string on every call (mostly for nothing),
error message is generated deeper inside the handler and only command name
is passed every time.

* inspector/CodeGeneratorInspector.py:
(Generator.process_command):

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

7 years ago[BlackBerry] Update about:* pages
commit-queue@webkit.org [Fri, 13 Jul 2012 14:00:06 +0000 (14:00 +0000)]
[BlackBerry] Update about:* pages
https://bugs.webkit.org/show_bug.cgi?id=91121

Patch by Joshua Netterfield <jnetterfield@rim.com> on 2012-07-13
Reviewed by Yong Li.

Update the about:config pages, and improve the aesthetics of the about:build, about:version, about:credits, about:memory, about:config, and similar pages.

No new tests, because there is no new funtionality.

Source/WebCore:

* platform/network/blackberry/NetworkJob.cpp: Update the aesthetics of about:* pages

Source/WebKit/blackberry:

* WebCoreSupport/AboutData.cpp:
(WebCore):
(WebCore::writeFeatures):
(WebCore::numberToHTMLTr): Converted to template function, added bool specialization to write "true" and "false" instead of "1" and "0"
(WebCore::configPage):
(WebCore::memoryPage):
* WebCoreSupport/AboutTemplate.html.cpp: Template for BlackBerry about:* pages.

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

7 years agoFix checking for optional DeviceOrientationEvent.absolute in JSC bindings
commit-queue@webkit.org [Fri, 13 Jul 2012 13:53:29 +0000 (13:53 +0000)]
Fix checking for optional DeviceOrientationEvent.absolute in JSC bindings
https://bugs.webkit.org/show_bug.cgi?id=91225

Patch by Olivier Blin <olivier.blin@softathome.com> on 2012-07-13
Reviewed by Steve Block.

This issue comes from r105036

* bindings/js/JSDeviceOrientationEventCustom.cpp:
(WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):

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

7 years ago[GTK] Implement disk cache in WebKit2
carlosgc@webkit.org [Fri, 13 Jul 2012 13:47:01 +0000 (13:47 +0000)]
[GTK] Implement disk cache in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=90797

Reviewed by Xan Lopez.

* WebProcess/gtk/WebProcessGtk.cpp:
(WebKit::getCacheDiskFreeSize): Use an ASSERT instead of an early
return since the cache feature is now always added to the session.
(WebKit::WebProcess::platformSetCacheModel): Get the cache from
the session and set the maximum cache size as computed by
calculateCacheSizes().
(WebKit::WebProcess::platformClearResourceCaches): Call
soup_cache_clear().
(WebKit::WebProcess::platformTerminate): Make sure all pending
data is saved to the disk before the web process finishes.
* WebProcess/gtk/WebProcessMainGtk.cpp:
(WebKit::WebProcessMainGtk): Create a SoupCache feature and add it
to the default SoupSession.

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

7 years ago[GTK] Fix disk cache size computation in WebKit2
carlosgc@webkit.org [Fri, 13 Jul 2012 13:41:51 +0000 (13:41 +0000)]
[GTK] Fix disk cache size computation in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=91226

Reviewed by Xan Lopez.

We are passing the free disk space value in bytes to
calculateCacheSizes() which expects values in MB.

* WebProcess/gtk/WebProcessGtk.cpp:
(WebKit::WebProcess::platformSetCacheModel):

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

7 years ago[CSS Regions] Fix build for bug 89000
commit-queue@webkit.org [Fri, 13 Jul 2012 12:56:44 +0000 (12:56 +0000)]
[CSS Regions] Fix build for bug 89000
https://bugs.webkit.org/show_bug.cgi?id=91215

Patch by Andrei Bucur <abucur@adobe.com> on 2012-07-13
Reviewed by Kentaro Hara.

Remove the unused variable m_state that was a leftover from a previous version of the patch.

Tests: No new tests, build fix.

* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::WebKitNamedFlow):
* dom/WebKitNamedFlow.h:
(WebKitNamedFlow):

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

7 years ago[Qt] Unreviewed gardening. Rebase test after r122550.
kkristof@inf.u-szeged.hu [Fri, 13 Jul 2012 12:53:44 +0000 (12:53 +0000)]
[Qt] Unreviewed gardening. Rebase test after r122550.

Patch by Zoltan Arvai <zarvai@inf.u-szeged.hu> on 2012-07-13

* platform/qt/fast/canvas/fallback-content-expected.txt: Added.

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

7 years ago[GTK] WebKit2 crash when going back/forward
carlosgc@webkit.org [Fri, 13 Jul 2012 12:08:00 +0000 (12:08 +0000)]
[GTK] WebKit2 crash when going back/forward
https://bugs.webkit.org/show_bug.cgi?id=91220

Reviewed by Xan Lopez.

For some reason when a page is loaded from the backforward list,
when the didCommitLoadForFrame callback is called for the main
frame, the callback didInitiateLoadForResource hasn't been called
yet, so we don't even have a main resource at that point. We were
assuming we always had a main resource with a response. For now we
just check whether we have a resource before trying to set the
certificate to fix the crash, but we need to figue out why this is
happening an how to properly fix it.

* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(didCommitLoadForFrame): Check whether we have a main resource
before setting the certificate.

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

7 years ago[EFL][WK2] Use eina stringsharing for Ewk_Web_Resource's url
commit-queue@webkit.org [Fri, 13 Jul 2012 12:03:40 +0000 (12:03 +0000)]
[EFL][WK2] Use eina stringsharing for Ewk_Web_Resource's url
https://bugs.webkit.org/show_bug.cgi?id=91200

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

Use eina stringsharing for Ewk_Web_Resource's url
for consistency.

* UIProcess/API/efl/ewk_web_resource.cpp:
(_Ewk_Web_Resource):
(_Ewk_Web_Resource::_Ewk_Web_Resource):
(ewk_web_resource_unref):
(ewk_web_resource_url_get):
* UIProcess/API/efl/ewk_web_resource.h:

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

7 years ago[GTK] WebKitWebView::mouse-target-changed is not emitted when moved to/from edtiable...
carlosgc@webkit.org [Fri, 13 Jul 2012 11:44:10 +0000 (11:44 +0000)]
[GTK] WebKitWebView::mouse-target-changed is not emitted when moved to/from edtiable content
https://bugs.webkit.org/show_bug.cgi?id=91216

Reviewed by Xan Lopez.

The problem is that the function to check whether two hit test
results are equal doesn't check the editable flag.

* UIProcess/API/gtk/WebKitHitTestResult.cpp:
(webkitHitTestResultCompare): Check also the editable flag.

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

7 years ago[EFL] Add const to the parameter of getters in ewk_security_origin
commit-queue@webkit.org [Fri, 13 Jul 2012 11:43:43 +0000 (11:43 +0000)]
[EFL] Add const to the parameter of getters in ewk_security_origin
https://bugs.webkit.org/show_bug.cgi?id=90954

Patch by Kihong Kwon <kihong.kwon@samsung.com> on 2012-07-13
Reviewed by Kentaro Hara.

Move initialization of strings for protocol and host to the ewk_security_origin_new method,
which allows to add const qualifier for ewk_security_origin_protocol_get and ewk_security_origin_host_get.
In addition, add null checks to the getters.

* ewk/ewk_security_origin.cpp:
(ewk_security_origin_protocol_get):
(ewk_security_origin_host_get):
(ewk_security_origin_new):
* ewk/ewk_security_origin.h:

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

7 years ago[EFL] Add *explicit* keyword to constructor which has a parameter
gyuyoung.kim@samsung.com [Fri, 13 Jul 2012 11:24:25 +0000 (11:24 +0000)]
[EFL] Add *explicit* keyword to constructor which has a parameter
https://bugs.webkit.org/show_bug.cgi?id=91207

Reviewed by Zoltan Herczeg.

Add *explicit* keyword to contructor which has a parameter in order to avoid implicit type conversion.

Source/WebKit/efl:

* WebCoreSupport/EditorClientEfl.h:
(EditorClientEfl):
* WebCoreSupport/InspectorClientEfl.h:
(InspectorClientEfl):
* WebCoreSupport/PageClientEfl.h:
(PageClientEfl):
* WebCoreSupport/VibrationClientEfl.h:
(VibrationClientEfl):

Source/WebKit2:

* WebProcess/WebCoreSupport/efl/WebFrameNetworkingContext.h:
(WebFrameNetworkingContext::WebFrameNetworkingContext):

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

7 years ago[Chromium] Fix bugs in HarfBuzzShaper
bashi@chromium.org [Fri, 13 Jul 2012 11:16:50 +0000 (11:16 +0000)]
[Chromium] Fix bugs in HarfBuzzShaper
https://bugs.webkit.org/show_bug.cgi?id=90951

Reviewed by Tony Chang.

Source/WebCore:

The current implementation has following problems:
- Cannot render RTL text if the TextRun is divided into more than two
  HarfBuzzRun.
- Script handling in TextRun partitioning is incorrect.
- Inaccurate calculation of selection rect.
- Wrong rendering position when the first glyph of the TextRun have
  non-zero offsets in terms of HarfBuzz.

To fix these problems I rewrote HarfBuzzShaper class. Here is the summary:
- Divide the whole range of TextRun first, then shape them in visual
  order.
- Divide TextRun in the same way of old-harfbuzz's
  hb_utf16_script_run_next().
- Prefer float than int when calculating selection.
- Adjust the drawing point after shaping.

Added tests covers the fix except for the last problem. The last problem will be covered
by fast/text/international/complex-joining-using-gpos.html after chromium linux port switches
to use HarfBuzzShaper.

Tests: fast/text/shaping/shaping-script-order.html
       fast/text/shaping/shaping-selection-rect.html

* platform/graphics/harfbuzz/FontHarfBuzz.cpp:
(WebCore::Font::drawComplexText): Adjusts point after shaping.
* platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
(WebCore):
(WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult): Added.
(WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndAdvance): Offsets are no longer needed.
(WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset): Calculates character offset based on advance.
(WebCore::normalizeCharacters): Added.
(WebCore::HarfBuzzShaper::HarfBuzzShaper):
(WebCore::HarfBuzzShaper::~HarfBuzzShaper):
(WebCore::HarfBuzzShaper::shape): Divides TextRun first, then shapes them.
(WebCore::HarfBuzzShaper::adjustStartPoint): Added.
(WebCore::HarfBuzzShaper::collectHarfBuzzRuns): Added.
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Added.
(WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): Followed other changes.
(WebCore::HarfBuzzShaper::selectionRect): Use float for calculating selection.
* platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
(HarfBuzzShaper): Holds the start index of character. Removed unnecessary variables.
(WebCore::HarfBuzzShaper::HarfBuzzRun::create): Ditto.
(HarfBuzzRun):
(WebCore::HarfBuzzShaper::HarfBuzzRun::fontData): Added.
(WebCore::HarfBuzzShaper::HarfBuzzRun::startIndex): Ditto.
(WebCore::HarfBuzzShaper::HarfBuzzRun::glyphs): Ditto.
(WebCore::HarfBuzzShaper::HarfBuzzRun::advances): Ditto.

LayoutTests:

Add tests for harfbuzz-ng shaper. I tried to use -expected.html style expectations,
but it didn't work because there are very slight difference between CoreText and HarfBuzz in
rendering result.

* fast/text/shaping/shaping-script-order.html: Added.
* fast/text/shaping/shaping-selection-rect.html: Added.
* platform/chromium/TestExpectations: Need rebaseline.
* platform/efl/TestExpectations: Skip added tests because the port doesn't use harfbuzz.
* platform/gtk/TestExpectations: Ditto.
* platform/mac/TestExpectations: Ditto.
* platform/qt/TestExpectations: Ditto.
* platform/win/Skipped: Ditto.
* platform/wincairo/Skipped: Ditto.
* platform/wk2/Skipped: Ditto.

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

7 years agoUnreviewed, rolling out r122545.
haraken@chromium.org [Fri, 13 Jul 2012 11:03:08 +0000 (11:03 +0000)]
Unreviewed, rolling out r122545.
http://trac.webkit.org/changeset/122545
https://bugs.webkit.org/show_bug.cgi?id=91185

We found that this was a wrong fix

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):

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

7 years agoUnreviewed, rolling out r122553.
haraken@chromium.org [Fri, 13 Jul 2012 11:01:35 +0000 (11:01 +0000)]
Unreviewed, rolling out r122553.
http://trac.webkit.org/changeset/122553
https://bugs.webkit.org/show_bug.cgi?id=91198

We found that this was a wrong fix

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):

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

7 years agoChange the timing of form state restore
tkent@chromium.org [Fri, 13 Jul 2012 10:59:59 +0000 (10:59 +0000)]
Change the timing of form state restore
https://bugs.webkit.org/show_bug.cgi?id=89962

Reviewed by Hajime Morita.

For a preparation to fix a form identification problem (Bug 91209),
restore controls states when the parsing of their owner forms is
completed. For controls without owners, their states are restored when
their parsing is completed as ever.

No new tests. This doesn't change observable behavior.

* html/FormController.cpp:
(WebCore::ownerFormForState):
Added. This code was used in formKey(), and restoreControlState*() use it.
(WebCore::FormKeyGenerator::formKey): Use ownerFormForState(). No behavior change.
(WebCore::FormController::restoreControlStateFor):
Moved some code from HTMLFormControlElementWithState::finishParsingChildren().
The difference is we don't resotre state if this control is owned by a form.
(WebCore::FormController::restoreControlStateIn):
Restore states of associated controls. This is called from
finishParsingChildren() for <form>.
* html/FormController.h:
(FormController):
- Declare restoreControlStateFor() and restoreControlStateIn().
- Make takeStateForFormElement() private.

* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::isFormControlElementWithState):
Added. The default implementation returns false.
* html/FormAssociatedElement.h:
(FormAssociatedElement):
Added isFormControlElementWithState() for FormController::restoreControlStateIn().
* html/HTMLFormControlElementWithState.cpp:
(WebCore::HTMLFormControlElementWithState::finishParsingChildren):
Some code was moved to FormController:restoreControlStateFor().
(WebCore::HTMLFormControlElementWithState::isFormControlElementWithState):
Added. Returns true.
* html/HTMLFormControlElementWithState.h:
(HTMLFormControlElementWithState): Declare isFormControlElementWithState().
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::finishParsingChildren):
Added. Calls FormController::restoreControlStateIn().
* html/HTMLFormElement.h:
(HTMLFormElement): Declare finishParsingChildren().

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

7 years agoMake calendar pickers testable
tkent@chromium.org [Fri, 13 Jul 2012 10:35:57 +0000 (10:35 +0000)]
Make calendar pickers testable
https://bugs.webkit.org/show_bug.cgi?id=84827

Reviewed by Hajime Morita.

Source/WebCore:

WebCore:
- Add PagePopupDriver, an interface to open/close a PagePopup.
- Add setPagePopupDriver() to ChromeClient in order to inject a
PagePopupDriver for testing.

Internals:
Add MockPagePopupDriver, which creates a MockPagePopup, which creates a
normal <iframe> in the top-level document, and load the popup content on
it. MockPagePopupDriver is enabled by
internals.settings.setEnableMockPagePopup(true).

Test: fast/forms/date/calendar-picker-appearance.html

* WebCore.gypi: Add new files.
* WebCore.xcodeproj/project.pbxproj: Add files to make this buildable.
* page/ChromeClient.h:
(ChromeClient): Add function for PagePopupDriver.
* loader/EmptyClients.h: Add empty implementations for PagePopupDriver functions.
* page/PagePopupDriver.h: Added.
(PagePopupDriver):
(WebCore::PagePopupDriver::~PagePopupDriver):

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::restoreTo): Reset the mock PagePopupDriver.
(WebCore::InternalSettings::setEnableMockPagePopup):
Register MockPagePopupDriver to ChromeClient.
* testing/InternalSettings.h:
(InternalSettings): Declare setEnableMockPagePopup().
* testing/InternalSettings.idl: ditto.
* testing/MockPagePopupDriver.cpp: Added.
(MockPagePopup): Pseudo PagePopup implementation with the standard <iframe>.
(WebCore::MockPagePopupDriver::MockPagePopupDriver): Added.
(WebCore::MockPagePopupDriver::create): Added.
(WebCore::MockPagePopupDriver::~MockPagePopupDriver): Added.
(WebCore::MockPagePopupDriver::openPagePopup):
Added. An override of PagePopupDriver function. This creates a MockPagePopup.
(WebCore::MockPagePopupDriver::closePagePopup):
Added. An override of PagePopupDriver function. This deletes the MockPagePopup.
* testing/MockPagePopupDriver.h:
(MockPagePopupDriver): Added.

* testing/v8/WebCoreTestSupport.cpp:
(WebCoreTestSupport::injectPagePopupController):
Added. Production code uses per-Page context feature framework. However
MockPagePopup uses the same page as the host page. So we can't use the
framework and need to inject window.pagePopupController manually.
* testing/v8/WebCoreTestSupport.h:
(WebCoreTestSupport): Add injectPagePopupController().

Source/WebKit/chromium:

* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::ChromeClientImpl):
Initialize m_pagePopupDriver with the WebViewImpl.
(WebKit::ChromeClientImpl::openPagePopup):
Just calls PagePoupDriver::openPagePopup().
(WebKit::ChromeClientImpl::closePagePopup):
Just calls PagePoupDriver::closePagePopup().
(WebKit::ChromeClientImpl::setPagePopupDriver):
* src/ChromeClientImpl.h:
(ChromeClientImpl): Add setPagePopupDriver
* src/WebViewImpl.h:
(WebViewImpl):
WebViewImpl implements PagePopupDriver. openPagePopup() and
closePagePopup() override members of PagePopupDriver.

LayoutTests:

* fast/forms/date/calendar-picker-appearance-expected.txt: Added.
* fast/forms/date/calendar-picker-appearance.html: Added.
* platform/chromium-mac-snowleopard/fast/forms/date/calendar-picker-appearance-expected.png: Added.
* platform/chromium/TestExpectations:

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

7 years agoWeb Inspector: mute the native looks of the selects in the console.
pfeldman@chromium.org [Fri, 13 Jul 2012 10:21:04 +0000 (10:21 +0000)]
Web Inspector: mute the native looks of the selects in the console.
https://bugs.webkit.org/show_bug.cgi?id=91120

Reviewed by Vsevolod Vlasov.

This is necessary for Mac now that we don't use border images for select.

* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype.get statusBarItems):
(WebInspector.ConsoleView.prototype.addContext):
(WebInspector.ConsoleView.prototype.removeContext):
(WebInspector.ConsoleView.prototype._updateIsolatedWorldSelector):
(WebInspector.ConsoleView.prototype._appendIsolatedContextOption):
(WebInspector.ConsoleView.prototype._currentEvaluationContext):
(WebInspector.ConsoleView.prototype._currentIsolatedContextId):
* inspector/front-end/StatusBarButton.js:
(WebInspector.StatusBarComboBox):
(WebInspector.StatusBarComboBox.prototype.addOption):
(WebInspector.StatusBarComboBox.prototype.removeOption):
(WebInspector.StatusBarComboBox.prototype.removeOptions):
(WebInspector.StatusBarComboBox.prototype.selectedOption):
* inspector/front-end/inspector.css:
(.status-bar-select-container):
(select.status-bar-item):
(.console-context):

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

7 years ago[CSS Regions] Fix the lifecycle for the flow objects and their renderers
commit-queue@webkit.org [Fri, 13 Jul 2012 10:01:38 +0000 (10:01 +0000)]
[CSS Regions] Fix the lifecycle for the flow objects and their renderers
https://bugs.webkit.org/show_bug.cgi?id=89000

Patch by Andrei Bucur <abucur@adobe.com> on 2012-07-13
Reviewed by Eric Seidel.

Source/WebCore:

This patch adds the concept of a NamedFlowCollection, owned by the document, that keeps track of
all the named flows that exist in the Document. This collection contains a ListHashSet of weak references to
all the existing NamedFlows in the document. This is not a managed set because the CREATED flows are referenced from the renderer and
the NULL flows are only cached, they should be destructible.
Two named flows are considered to be equal if they have the same name.
I've changed the NamedFlow state to depend on the existence of its renderer. A flow thread that has a renderer will also have a NamedFlow object.
A flow thread without a renderer can have a NamedFlow object, but only in the NULL state. It's possible for a NamedFlow object to jump from the
NULL state to the CREATED state if it was not destroyed (e.g. it was referenced from JS). Keeping track of the NULL state flows that have listeners will be important
so when they go back to the CREATED state, the listeners would still be there.

Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/

Tests: The old tests have been modified to take into account the new behavior

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMAllInOne.cpp:
* dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore):
(WebCore::Document::webkitGetFlowByName):
(WebCore::Document::namedFlows):
* dom/Document.h:
(WebCore):
(Document):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::WebKitNamedFlow):
(WebCore::WebKitNamedFlow::~WebKitNamedFlow):
(WebCore::WebKitNamedFlow::create):
(WebCore):
(WebCore::WebKitNamedFlow::name):
(WebCore::WebKitNamedFlow::overset):
(WebCore::nodeInFlowThread):
(WebCore::WebKitNamedFlow::getRegionsByContentNode):
(WebCore::WebKitNamedFlow::getContent):
(WebCore::WebKitNamedFlow::setRenderer):
* dom/WebKitNamedFlow.h:
(WebCore):
(WebKitNamedFlow):
(WebCore::WebKitNamedFlow::getFlowState):
(WebCore::WebKitNamedFlow::switchFlowState):
* dom/WebKitNamedFlowCollection.cpp: Added.
(WebCore):
(WebCore::WebKitNamedFlowCollection::WebKitNamedFlowCollection):
(WebCore::WebKitNamedFlowCollection::length): An O(1) operation
(WebCore::WebKitNamedFlowCollection::item): An O(N) operation
(WebCore::WebKitNamedFlowCollection::flowByName): An O(1) operation
(WebCore::WebKitNamedFlowCollection::ensureNamedFlowInCreatedState): An O(1) operation
(WebCore::WebKitNamedFlowCollection::moveNamedFlowToNullState): An O(1) operation
(WebCore::WebKitNamedFlowCollection::discardNamedFlow): An O(1) operation
(WebCore::WebKitNamedFlowCollection::documentDestroyed):
(WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::hash):
(WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::equal):
(WebKitNamedFlowCollection::NamedFlowHashFunctions):
(WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::hash):
(WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::equal):
* dom/WebKitNamedFlowCollection.h: Copied from Source/WebCore/dom/WebKitNamedFlow.h.
(WebCore):
(WebKitNamedFlowCollection):
(WebCore::WebKitNamedFlowCollection::create):
(WebCore::WebKitNamedFlowCollection::document):
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
(WebCore::FlowThreadController::removeFlowThread):
(WebCore):
* rendering/FlowThreadController.h:
(FlowThreadController):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore):
(WebCore::RenderNamedFlowThread::~RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::removeRegionFromThread):
(WebCore::RenderNamedFlowThread::unregisterNamedFlowContentNode):
(WebCore::RenderNamedFlowThread::flowThreadName):
(WebCore::RenderNamedFlowThread::willBeDestroyed):
* rendering/RenderNamedFlowThread.h:
(RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::contentNodes):
(WebCore::RenderNamedFlowThread::canBeDestroyed):

LayoutTests:

These tests expected getFlowByName() to return a valid object even for the NULL flows. They've been modified to
reflect the new behavior.

* fast/regions/get-regions-by-content-node2-expected.txt:
* fast/regions/get-regions-by-content-node2.html:
* fast/regions/webkit-named-flow-flow-added.html:
* fast/regions/webkit-named-flow-get-content-expected.txt:
* fast/regions/webkit-named-flow-get-content.html:
* fast/regions/webkit-named-flow-invalid-name.html:
* fast/regions/webkit-named-flow-modified-flow.html:
* fast/regions/webkit-named-flow-non-existing-flow.html:
* fast/regions/webkit-named-flow-removed-flow.html:
* platform/chromium-win/fast/regions/region-style-block-background-color2-expected.txt:
* platform/mac/fast/regions/region-style-block-background-color2-expected.txt:

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

7 years ago[V8Bindings] Implement generalised method to validates that the passed object is...
commit-queue@webkit.org [Fri, 13 Jul 2012 09:38:50 +0000 (09:38 +0000)]
[V8Bindings] Implement generalised method to validates that the passed object is a sequence type.
https://bugs.webkit.org/show_bug.cgi?id=91056

Patch by Vineet Chaudhary <rgf748@motorola.com> on 2012-07-13
Reviewed by Kentaro Hara.

Currently the V8 implementation validates that the passed object is a sequence type only
for MessagePort in V8Utilities::extractTransferables().
There should be generalised method for other types too.
Spec URL: http://www.w3.org/TR/2012/WD-WebIDL-20120207/#es-sequence

No new test, Just refactoring. There should be no behavioral changes.

* bindings/v8/V8Binding.h:
(WebCore::toV8Sequence): Added implementation of toV8Sequence().

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