blob: 6bc680135da106aa5a71a62702fa4c81074db7d7 [file] [log] [blame]
2012-01-10 Jer Noble <jer.noble@apple.com>
REGRESSION (r102024): Having the Bing homepage open prevents idle sleep
https://bugs.webkit.org/show_bug.cgi?id=75972
Reviewed by Oliver Hunt.
No new tests; no testing infrastructure exists to test display sleep assertions.
Only disable idle and display sleep when a video element is not paused, not looping, and
has both a video and audio track.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerRateChanged): Factor into updateDisableSleep() and
shouldDisplaySleep().
(WebCore::HTMLMediaElement::setLoop): Ditto.
(WebCore::HTMLMediaElement::attributeChanged): Ditto.
(WebCore::HTMLMediaElement::updateDisableSleep):
(WebCore::HTMLMediaElement::shouldDisableSleep):
* html/HTMLMediaElement.h:
2012-01-09 Matthew Delaney <mdelaney@apple.com>
[Mac] Accelerate canvas layers with the same logic as accelerating the canvas itself
https://bugs.webkit.org/show_bug.cgi?id=75921
Reviewed by Simon Fraser.
No new tests. Does not affect detectable behavior.
* rendering/RenderLayerCompositor.cpp: Use canvas's shouldAccelerate to avoid asking
uninitialized canvas's if they're accelerated or not.
(WebCore::RenderLayerCompositor::updateBacking):
2012-01-10 Daniel Sievers <sievers@chromium.org>
[Chromium] Do not recreate texture updater for image layer if one exists.
https://bugs.webkit.org/show_bug.cgi?id=75589
Reviewed by James Robinson.
Test: platform/chromium/compositing/img-layer-grow.html
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerChromium::createTextureUpdater):
2012-01-10 Mike Reed <reed@google.com>
[skia] not all convex paths are convex, so recompute convexity for the problematic ones
https://bugs.webkit.org/show_bug.cgi?id=75960
Reviewed by Stephen White.
No new tests.
See related chrome issue
http://code.google.com/p/chromium/issues/detail?id=108605
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::setPathFromConvexPoints):
2012-01-10 Gavin Barraclough <barraclough@apple.com>
Do not allow Array length to be set if it is non-configurable
https://bugs.webkit.org/show_bug.cgi?id=75935
Reviewed by Sam Weinig.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::deserialize):
- remove unnecessary call to JSArray::setLength.
2012-01-10 Adrienne Walker <enne@google.com>
[chromium] Draw debug tile borders on composited layers
https://bugs.webkit.org/show_bug.cgi?id=75680
Reviewed by James Robinson.
On tiled layers, draw debug borders on the tiles themselves. By
default, these are one pixel wide and transparent, so should be
unobtrusive but informative. They are triggered when the layer itself
would have a debug border via the existing flags.
Also, fix the drawDebugBorderQuad function to handle arbitrarily
positioned quads, not just full layer quads. Also, fix alpha issue
with debug borders.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawDebugBorderQuad):
* platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp:
(WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::appendDebugBorderQuad):
(WebCore::CCLayerImpl::quadTransform):
(WebCore::CCLayerImpl::hasDebugBorders):
* platform/graphics/chromium/cc/CCLayerImpl.h:
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::CCTiledLayerImpl::appendQuads):
2012-01-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Missing Implementation of Public InspectorDOMAgent Function
https://bugs.webkit.org/show_bug.cgi?id=75759
Follow-up: Remove the unused method. Keep the setter private.
Reviewed by Pavel Feldman.
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorDOMAgent.h:
2012-01-10 Pavel Feldman <pfeldman@google.com>
Not reviewed, follow up to r104586: fix assertion within the loop.
* inspector/DOMEditor.cpp:
(WebCore::DOMEditor::patchChildren):
2012-01-10 Brady Eidson <beidson@apple.com>
<rdar://problem/9328684> and https://bugs.webkit.org/show_bug.cgi?id=62764
Frequent crashes due to null frame below ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
Reviewed by Maciej Stachowiak.
This is a non-reproducible high volume crash, so no test :(.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::stopLoading): Don't re-run actual "stop loading" logic if the document loader is already
stopping loading. Also add an ASSERT that might catch cases where new loads may have been started while old loads
were being stopped.
(WebCore::DocumentLoader::detachFromFrame): Be conservative and stop loading when we detach a document loader from a frame.
2012-01-10 Pavel Feldman <pfeldman@google.com>
Not reviewed: fixing the Mac build.
* inspector/DOMEditor.cpp:
(WebCore::DOMEditor::patchChildren):
2012-01-09 Jer Noble <jer.noble@apple.com>
Elements can appear over fullscreen video
https://bugs.webkit.org/show_bug.cgi?id=75913
Reviewed by Simon Fraser.
No new tests; updated fullscreen/full-screen-zIndex.html to trigger error condition.
RenderFullScreenPlaceholder inherits the pre-fullscreen element's style, causing a stacking
context to be created. Instead of making the placeholder the parent of the RenderFullScreen
object, make the two renderers siblings. Then the stacking context created by the placeholder
will not affect the z-ordering of the RenderFullScreen.
* rendering/RenderFullScreen.cpp:
(RenderFullScreen::wrapRenderer):
(RenderFullScreen::unwrapRenderer):
(RenderFullScreen::createPlaceholder):
2012-01-10 Pavel Feldman <pfeldman@google.com>
Web Inspector: add "free flow DOM editing" experiment.
https://bugs.webkit.org/show_bug.cgi?id=75955
This change enables HTML editing from Resources panel experiment.
Reviewed by Yury Semikhatsky.
* CMakeLists.txt:
* English.lproj/localizedStrings.js:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* inspector/DOMEditor.cpp: Added.
(WebCore::DOMEditor::DOMEditor):
(WebCore::DOMEditor::~DOMEditor):
(WebCore::DOMEditor::patch):
(WebCore::DOMEditor::NodeDigest::NodeDigest):
(WebCore::DOMEditor::patchElement):
(WebCore::DOMEditor::patchNode):
(WebCore::DOMEditor::patchChildren):
(WebCore::addStringToSHA1):
(WebCore::DOMEditor::createNodeDigest):
* inspector/DOMEditor.h: Added.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setOuterHTML):
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMAgent):
(WebInspector.DOMModelResourceBinding):
(WebInspector.DOMModelResourceBinding.prototype.setContent):
(WebInspector.DOMModelResourceBinding.prototype.canSetContent):
* inspector/front-end/Settings.js:
(WebInspector.ExperimentsSettings):
2012-01-10 Stephen Chenney <schenney@chromium.org>
[Chromium] Shift PathSkia to use Skia's new RawIter
https://bugs.webkit.org/show_bug.cgi?id=75703
Reviewed by Nikolas Zimmermann.
No new tests required - covered by existing tests.
* platform/graphics/Path.h: Added comments ont he return values from iteration.
* platform/graphics/skia/PathSkia.cpp:
(WebCore::Path::apply): Switched to SkPath::RawIter
2012-01-10 Peter Beverloo <peter@chromium.org>
[Chromium] Use SkFontHost::GetUnitsPerEm instead of advanced type
metrics for Android in FontPlatformData
https://bugs.webkit.org/show_bug.cgi?id=75702
Reviewed by Stephen White.
Since Skia for Android doesn't implement advanced type metric routines,
use an alternative method to calculate the number of font units for an
em size. This will be exercized by existing layout tests, as it's being
used by the ComplexTextController.
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
(WebCore::FontPlatformData::emSizeInFontUnits):
2012-01-10 Vsevolod Vlasov <vsevik@chromium.org>
Unreviewed, inspector style fix.
Web Inspector: elements tree is shifted 12px to the right.
https://bugs.webkit.org/show_bug.cgi?id=75609
* inspector/front-end/elementsPanel.css:
(#elements-content):
2012-01-10 Zoltan Herczeg <zherczeg@webkit.org>
Fix style errors in CSSParser.cpp
https://bugs.webkit.org/show_bug.cgi?id=75854
Reviewed by Nikolas Zimmermann.
Minor style fixes.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseShadow):
(WebCore::isBorderImageRepeatKeyword):
(WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
(WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
(WebCore::filterInfoForName):
2012-01-10 Julien Chaffraix <jchaffraix@webkit.org>
REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling
https://bugs.webkit.org/show_bug.cgi?id=67100
Reviewed by Dan Bernstein.
Tests: fast/layers/scroll-with-transform-composited-layer.html
fast/layers/scroll-with-transform-layer.html
The regression came from a previous optimization that was wrongly kept after r93614.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositionsAfterScroll):
Remove the early return for transformed layer. This change worked as we used
to call updateLayerPositions from scrollTo which would call updateLayerPosition on
all our descendants. After r93614, this is no longer the case and we explicitely need
to call updateLayerPosition on our descendants from updateLayerPositionsAfterScroll.
2012-01-10 Stephen White <senorblanco@chromium.org>
Fix Chrome/Mac build.
Build fix; unreviewed.
* platform/graphics/filters/skia/FEColorMatrixSkia.cpp:
(WebCore::luminanceToAlphaMatrix):
2012-01-06 Stephen White <senorblanco@chromium.org>
[Skia] Switch FEColorMatrix to use a skia-based implementation when
compiling with USE(SKIA). This change will also switch the software
implementation of FEGaussianBlur to the skia implementation (ie.,
it removes the acceleration check).
https://bugs.webkit.org/show_bug.cgi?id=75582
Reviewed by Dirk Schulze.
Covered by svg/W3C-SVG-1.1/filters-color-01-b.svg and friends (will
need a rebaseline).
* WebCore.gypi:
Add FEColorMatrixSkia.cpp to the build.
* platform/graphics/filters/FEColorMatrix.h:
Add platformApplySkia().
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplySoftware):
Remove skia-specific code from FEGaussianBlur::platformApplySoftware().
* platform/graphics/filters/FEGaussianBlur.h:
Make platformApplySkia() virtual, and put it behind #if USE(SKIA).
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::apply):
Call out to platformApplySkia(), or fall back to
platformApplySoftware().
* platform/graphics/filters/FilterEffect.h:
Add platformApplySkia().
* platform/graphics/filters/skia/FEColorMatrixSkia.cpp: Added.
(WebCore::saturateMatrix):
(WebCore::hueRotateMatrix):
(WebCore::luminanceToAlphaMatrix):
(WebCore::FEColorMatrix::platformApplySkia):
Process color matrix effect, by calling out to generic matrix
version of SkColorMatrixFilter.
* platform/graphics/filters/skia/FEGaussianBlurSkia.cpp:
(WebCore::FEGaussianBlur::platformApplySkia):
Change the signature of FEGaussianBlur::platformApplySkia to be an
override of the new FilterEffect base class version.
2012-01-10 Pavel Feldman <pfeldman@google.com>
Web Inspector: fix DebuggerPresentationModel::uiSourceCodes - do not iterate
over same raw source code multiple times.
https://bugs.webkit.org/show_bug.cgi?id=75953
Reviewed by Yury Semikhatsky.
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel):
(WebInspector.DebuggerPresentationModel.prototype._bindScriptToRawSourceCode):
(WebInspector.DebuggerPresentationModel.prototype.uiSourceCodes):
(WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
(WebInspector.DebuggerPresentationModel.prototype._consoleCleared):
(WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
2012-01-10 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt] Enable CSS_FILTERS in Qt build
https://bugs.webkit.org/show_bug.cgi?id=75777
Enable CSS_FILTERS and unskip the tests.
Reviewed by Kenneth Rohde Christiansen.
Filter tests are now unskipped for Qt.
* Target.pri: add missing files to build.
2012-01-10 Pavel Feldman <pfeldman@google.com>
Web Inspector: typo: NetworkAgent.canClearBrowserCache -> NetworkAgent.canClearBrowserCookies.
https://bugs.webkit.org/show_bug.cgi?id=75949
Reviewed by Andreas Kling.
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView):
2012-01-10 pfeldman@chomium.org <pavel.feldman@gmail.com>
Web Inspector: restore front-end compilation
https://bugs.webkit.org/show_bug.cgi?id=75625
Reviewed by Yury Semikhatsky.
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.replaceSourceFrames):
* inspector/front-end/TabbedPane.js:
* inspector/front-end/externs.js:
(WebInspector.isCompactMode):
* inspector/front-end/treeoutline.js:
2012-01-10 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Add NULL checks to setting access obtained on frame and document.
https://bugs.webkit.org/show_bug.cgi?id=72002
Reviewed by Andreas Kling.
Adds NULL checks to setting object where it's required.
Generally WebCore checks NULL which may be returned from setting object obtained
on frame or document but in some cases these are skipped. These checks are not
needed to setting's access on page object.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::shouldAccelerate):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::scheduleArchiveLoad):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestPlugin):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
* page/DragController.cpp:
(WebCore::DragController::draggableNode):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseReleaseEvent):
* page/FocusController.cpp:
(WebCore::FocusController::advanceFocusInDocumentOrder):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::flattenFrameSet):
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::flattenFrame):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
* rendering/RenderText.cpp:
(WebCore::SecureTextTimer::restartWithNewText):
2012-01-10 Andreas Kling <awesomekling@apple.com>
Matched declaration cache should support mapped attribute declarations.
<http://webkit.org/b/75948>
Reviewed by Antti Koivisto.
Support caching of matches that include mapped attribute declarations.
To make this possible, let the cache hold references to the matched style declarations.
Otherwise, declarations are assumed to survive until ~CSSStyleSelector, which may not
be the case for CSSMappedAttributeDeclaration.
To avoid hoarding of stale CSSMappedAttributeDeclarations in the cache, do a sweep for
every 100 additions and garbage collect any entries containing a declaration that is
only referenced by the cache.
This increases cache hit rate by up to ~10% on the Alexa top sites.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::CSSStyleSelector):
(WebCore::CSSStyleSelector::sweepMatchedDeclarationCache):
(WebCore::CSSStyleSelector::matchAllRules):
(WebCore::CSSStyleSelector::applyDeclarations):
(WebCore::CSSStyleSelector::addToMatchedDeclarationCache):
* css/CSSStyleSelector.h:
2012-01-10 Kenichi Ishibashi <bashi@chromium.org>
Complex path should be used when UVS exists in text run
https://bugs.webkit.org/show_bug.cgi?id=75289
Uses complex path when a text run contains UVS. The range from U+180B to U+180D already uses complex path.
Removes unnecessary functions that were added by r102915.
Reviewed by Dan Bernstein.
No new tests. fast/text/unicode-variation-selector.html should take care of this change.
* platform/graphics/Font.cpp:
(WebCore::Font::codePath): Use Complex path when the text run contains UVS.
* platform/graphics/SimpleFontData.h: Removed updateGlyphWithVariationSelector().
* platform/graphics/SurrogatePairAwareTextIterator.cpp: Removed unnecessary static functions.
* platform/graphics/SurrogatePairAwareTextIterator.h: Removed hasTrailingVariationSelector().
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advance): Removed UVS detection code.
* platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: Removed updateGlyphWithVariationSelector().
* platform/graphics/freetype/SimpleFontDataFreeType.cpp: Ditto.
* platform/graphics/harfbuzz/SimpleFontDataSkia.cpp: Ditto.
* platform/graphics/mac/SimpleFontDataMac.mm: Ditto.
* platform/graphics/pango/SimpleFontDataPango.cpp: Ditto.
* platform/graphics/qt/SimpleFontDataQt.cpp: Ditto.
* platform/graphics/win/SimpleFontDataWin.cpp: Ditto.
* platform/graphics/wince/SimpleFontDataWinCE.cpp: Ditto.
* platform/graphics/wx/SimpleFontDataWx.cpp: Ditto.
2012-01-10 Kenichi Ishibashi <bashi@chromium.org>
WebFonts are re-fetched from the server upon Document::styleSelectorChanged call.
https://bugs.webkit.org/show_bug.cgi?id=73419
Holds the CachedFont handle in CSSFontFaceSrcValue so that avoiding re-validation during style recalculation.
Reviewed by Dan Bernstein.
Test: http/tests/css/font-face-src-loading.html
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::cachedFont): Added.
* css/CSSFontFaceSrcValue.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Gets the CachedFont from CSSFontFaceSrcValue object. The object will request the resource if it doesn't exist.
2012-01-10 pfeldman@chomium.org <pavel.feldman@gmail.com>
Web Inspector: introduce experimental setting that makes source files always editable
https://bugs.webkit.org/show_bug.cgi?id=75626
Reviewed by Timothy Hatcher.
* English.lproj/localizedStrings.js:
* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame):
(WebInspector.JavaScriptSourceFrame.prototype.setReadOnly):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView):
* inspector/front-end/ScriptsNavigator.js:
(WebInspector.NavigatorScriptTreeElement.prototype.onselect):
* inspector/front-end/Settings.js:
(WebInspector.ExperimentsSettings):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame):
(WebInspector.SourceFrame.prototype.get statusBarItems):
(WebInspector.SourceFrame.prototype.setReadOnly):
* inspector/front-end/inspector.js:
(WebInspector.loaded):
2012-01-09 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r104507.
http://trac.webkit.org/changeset/104507
https://bugs.webkit.org/show_bug.cgi?id=75936
Broke webkit_unit_tests (Requested by dimich on #webkit).
* WebCore.gypi:
* platform/graphics/chromium/RenderSurfaceChromium.h:
* platform/graphics/chromium/cc/CCLayerIterator.cpp: Removed.
* platform/graphics/chromium/cc/CCLayerIterator.h: Removed.
* platform/graphics/chromium/cc/CCLayerIteratorPosition.h: Removed.
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::paintLayerContents):
(WebCore::CCLayerTreeHost::updateCompositorResources):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::walkLayersAndCalculateVisibleLayerRects):
* platform/graphics/chromium/cc/CCRenderSurface.h:
2012-01-09 Rob Buis <rbuis@rim.com>
Upstream change to disable input[color] css rules for BlackBerry port
https://bugs.webkit.org/show_bug.cgi?id=75719
Reviewed by Antonio Gomes.
Do not enable default css color rules for input["color"] for BlackBerry port.
* CMakeLists.txt:
2012-01-09 Greg Billock <gbillock@google.com>
Implement navigator.startActivity; add IntentRequest object for managing web intents callbacks.
Web content will invoke navigator.startActivity to launch a new Web
Intents call. Each such call will map to an IntentRequest broker
object which is used by client code to correlate any return data to
the (optional) callbacks supplied by web content calls.
https://bugs.webkit.org/show_bug.cgi?id=75756
Reviewed by Adam Barth.
Test: webintents/web-intents-api.html
* Modules/intents/Intent.cpp: Added.
(WebCore::Intent::identifier):
(WebCore::Intent::setIdentifier):
* Modules/intents/Intent.h: Added.
* Modules/intents/Intent.idl: Added.
* Modules/intents/IntentResultCallback.h: Added.
(WebCore::IntentResultCallback::~IntentResultCallback):
* Modules/intents/IntentResultCallback.idl: Added.
* Modules/intents/IntentsRequest.cpp: Added.
* Modules/intents/IntentsRequest.h: Added.
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* bindings/scripts/CodeGeneratorV8.pm:
(GetNativeTypeForCallbacks):
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::dispatchIntent):
2012-01-09 Dan Bernstein <mitz@apple.com>
-[DOMRange renderedImageForcingBlackText:] fails with non-user-selectable text
https://bugs.webkit.org/show_bug.cgi?id=75920
Reviewed by Darin Adler.
Test: added to TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm
* page/mac/FrameMac.mm:
(WebCore::Frame::rangeImage): Removed the requirement that the start and end positions used
for setting the selection in the render tree be candidates.
2012-01-06 Hajime Morrita <morrita@chromium.org>
[Refactoring] Moving between TreeScopes should be done by its own class.
https://bugs.webkit.org/show_bug.cgi?id=75290
Reviewed by Ryosuke Niwa.
This change extracted Node::setTreeScopeRecursively(),
setDocumentRecursively() and a part of setDocument() into a new
class called TreeScopeAdopter. By doing this, the idea of
moving a node from scope to scope, that was originally hidden
behind the forest of Node APIs, has become clearer.
Note that this change is a preparation for Bug 59816.
No new tests. No behavioral change.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/ContainerNode.cpp: Followed the renaming.
(WebCore::ContainerNode::takeAllChildrenFrom):
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::removeBetween):
(WebCore::ContainerNode::removeChildren):
(WebCore::ContainerNode::appendChild):
(WebCore::ContainerNode::parserAddChild):
* dom/DOMAllInOne.cpp:
* dom/Document.cpp: Followed te renaming.
(WebCore::Document::setDocType):
(WebCore::Document::adoptNode):
* dom/Element.cpp: Followed te renaming.
(WebCore::Element::removeShadowRoot):
* dom/Node.cpp:
(WebCore::Node::setDocument):
(WebCore::Node::setTreeScope):
(WebCore::Node::didMoveToNewDocument):
* dom/Node.h:
* dom/TreeScope.h:
* dom/TreeScope.cpp:
(WebCore::TreeScope::adoptIfNeeded): moved from setTreeScopeRecursively()
* dom/TreeScopeAdopter.cpp: Added.
(WebCore::TreeScopeAdopter::TreeScopeAdopter):
(WebCore::TreeScopeAdopter::moveTreeToNewScope):
(WebCore::TreeScopeAdopter::moveTreeToNewDocument):
(WebCore::TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled):
(WebCore::TreeScopeAdopter::moveNodeToNewDocument):
* dom/TreeScopeAdopter.h: Added.
(WebCore::TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled):
(WebCore::TreeScopeAdopter::execute):
(WebCore::TreeScopeAdopter::needsScopeChange()):
(WebCore::TreeScopeAdopter::shadowRootFor):
2012-01-09 Adam Barth <abarth@webkit.org>
run-bindings-tests should exercise all the IDL attributes we use
https://bugs.webkit.org/show_bug.cgi?id=75900
Reviewed by Eric Seidel.
I just grepped through the code generator script for IDL attributes and
wrote tests for them.
* bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.cpp: Added.
* bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.h: Added.
* bindings/scripts/test/CPP/WebDOMTestEventTarget.cpp: Added.
* bindings/scripts/test/CPP/WebDOMTestEventTarget.h: Added.
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/CPP/WebDOMTestOverridingNameGetter.cpp: Added.
* bindings/scripts/test/CPP/WebDOMTestOverridingNameGetter.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp: Added.
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObjectPrivate.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp: Added.
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestEventTargetPrivate.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestOverridingNameGetter.cpp: Added.
* bindings/scripts/test/GObject/WebKitDOMTestOverridingNameGetter.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestOverridingNameGetterPrivate.h: Added.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Added.
* bindings/scripts/test/JS/JSTestActiveDOMObject.h: Added.
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp: Added.
* bindings/scripts/test/JS/JSTestEventTarget.h: Added.
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverridingNameGetter.cpp: Added.
* bindings/scripts/test/JS/JSTestOverridingNameGetter.h: Added.
* bindings/scripts/test/ObjC/DOMTestActiveDOMObjectInternal.h: Added.
* bindings/scripts/test/ObjC/DOMTestEventTarget.h: Added.
* bindings/scripts/test/ObjC/DOMTestEventTarget.mm: Added.
* bindings/scripts/test/ObjC/DOMTestEventTargetInternal.h: Added.
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
* bindings/scripts/test/ObjC/DOMTestOverridingNameGetter.h: Added.
* bindings/scripts/test/ObjC/DOMTestOverridingNameGetter.mm: Added.
* bindings/scripts/test/ObjC/DOMTestOverridingNameGetterInternal.h: Added.
* bindings/scripts/test/TestDomainSecurity.idl: Added.
* bindings/scripts/test/TestEventConstructor.idl:
* bindings/scripts/test/TestEventTarget.idl: Added.
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestOverridingNameGetter.idl: Added.
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: Added.
* bindings/scripts/test/V8/V8TestActiveDOMObject.h: Added.
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
* bindings/scripts/test/V8/V8TestEventTarget.cpp: Added.
* bindings/scripts/test/V8/V8TestEventTarget.h: Added.
* bindings/scripts/test/V8/V8TestInterface.h:
* bindings/scripts/test/V8/V8TestObj.cpp:
* bindings/scripts/test/V8/V8TestOverridingNameGetter.cpp: Added.
* bindings/scripts/test/V8/V8TestOverridingNameGetter.h: Added.
2012-01-09 Nat Duca <nduca@chromium.org>
[chromium] Add documentation to updater classes
https://bugs.webkit.org/show_bug.cgi?id=75866
Reviewed by James Robinson.
* platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
* platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
* platform/graphics/chromium/CanvasLayerTextureUpdater.h:
* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h:
* platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
2012-01-09 Adam Barth <abarth@webkit.org>
Remove unused variable from CodeGeneratorV8
https://bugs.webkit.org/show_bug.cgi?id=75895
Reviewed by Eric Seidel.
Unused variables aren't worth keeping around.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
(GenerateImplementation):
2012-01-09 Dana Jansens <danakj@chromium.org>
[chromium] Create iterators for the RenderSurface-Layer tree
https://bugs.webkit.org/show_bug.cgi?id=74203
Reviewed by James Robinson.
New unit tests: CCLayerIteratorTest.cpp
* WebCore.gypi:
* platform/graphics/chromium/RenderSurfaceChromium.h:
* platform/graphics/chromium/cc/CCLayerIterator.cpp: Added.
(WebCore::CCLayerIteratorActions::BackToFront::begin):
(WebCore::CCLayerIteratorActions::BackToFront::end):
(WebCore::CCLayerIteratorActions::BackToFront::next):
(WebCore::CCLayerIteratorActions::FrontToBack::begin):
(WebCore::CCLayerIteratorActions::FrontToBack::end):
(WebCore::CCLayerIteratorActions::FrontToBack::next):
(WebCore::CCLayerIteratorActions::FrontToBack::goToHighestInSubtree):
* platform/graphics/chromium/cc/CCLayerIterator.h: Added.
(WebCore::CCLayerIterator::CCLayerIterator):
(WebCore::CCLayerIterator::begin):
(WebCore::CCLayerIterator::end):
(WebCore::CCLayerIterator::operator++):
(WebCore::CCLayerIterator::operator==):
(WebCore::CCLayerIterator::operator!=):
(WebCore::CCLayerIterator::operator->):
(WebCore::CCLayerIterator::operator*):
(WebCore::CCLayerIterator::representsTargetRenderSurface):
(WebCore::CCLayerIterator::representsContributingRenderSurface):
(WebCore::CCLayerIterator::representsItself):
(WebCore::CCLayerIterator::targetRenderSurfaceLayer):
* platform/graphics/chromium/cc/CCLayerIteratorPosition.h: Added.
(WebCore::CCLayerIteratorPosition::CCLayerIteratorPosition):
(WebCore::CCLayerIteratorPosition::currentLayer):
(WebCore::CCLayerIteratorPosition::currentLayerRepresentsContributingRenderSurface):
(WebCore::CCLayerIteratorPosition::currentLayerRepresentsTargetRenderSurface):
(WebCore::CCLayerIteratorPosition::targetRenderSurfaceLayer):
(WebCore::CCLayerIteratorPosition::targetRenderSurface):
(WebCore::CCLayerIteratorPosition::targetRenderSurfaceChildren):
(WebCore::CCLayerIteratorPosition::operator==):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::paintLayerContents):
(WebCore::CCLayerTreeHost::updateCompositorResources):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::walkLayersAndCalculateVisibleLayerRects):
* platform/graphics/chromium/cc/CCRenderSurface.h:
2012-01-09 Joshua Bell <jsbell@chromium.org>
IndexedDB: Throw exception if IDBCursor.continue() called with lower key than current
https://bugs.webkit.org/show_bug.cgi?id=74213
Reviewed by Tony Chang.
* storage/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::continueFunction):
2012-01-09 Justin Novosad <junov@chromium.org>
[chromium win] Creating lots of temporary canvas contexts will crash.
https://bugs.webkit.org/show_bug.cgi?id=68420
When using the skia port, the allocation of 2d canvas backing stores
no longer needs to be done through a platform API (GDI/CG) because
canvases now use skia for drawing text. Removing the allocation through
GDI on windows prevents resource exhaustion due to unreferenced canvases
that are awaiting garbage collection.
Reviewed by Stephen White.
No new tests: Relying on existing canvas layout tests.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createImageBuffer):
* platform/graphics/ImageBuffer.h:
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::createNonPlatformCanvas):
(WebCore::ImageBuffer::ImageBuffer):
2012-01-09 Avi Drissman <avi@chromium.org>
https://bugs.webkit.org/show_bug.cgi?id=75860
[Chromium Mac] no background is drawn for input elements
Reviewed by Dimitri Glazkov.
Reverts r104240 for Chromium. Unfortunately the code that uses Cocoa
API misbehaves when built with the 10.5 SDK, so we use SPI. For now.
* rendering/RenderThemeChromiumMac.h:
* rendering/RenderThemeChromiumMac.mm:
(WebCore::RenderThemeChromiumMac::paintTextField):
2012-01-09 Pablo Flouret <pablof@motorola.com>
Compilation error on build-webkit --debug --no-3d-canvas on mac.
https://bugs.webkit.org/show_bug.cgi?id=75878
Reviewed by Alexey Proskuryakov.
* html/canvas/WebGLContextEvent.cpp:
2012-01-09 Tom Sepez <tsepez@chromium.org>
Treat code="" attribute in embed tags similarly to applet tags.
https://bugs.webkit.org/show_bug.cgi?id=75871
Reviewed by Daniel Bates.
Tests: http/tests/security/xssAuditor/embed-tag-code-attribute-2.html
http/tests/security/xssAuditor/embed-tag-code-attribute.html
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::filterEmbedToken):
2012-01-09 Justin Novosad <junov@chromium.org>
[Chromium] remove all references to the legacy accelerated 2d Canvas
implementation
https://bugs.webkit.org/show_bug.cgi?id=75108
Purging an old settings flag that is no longer referenced
Reviewed by Darin Fisher.
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
2012-01-09 Eric Carlson <eric.carlson@apple.com>
REGRESSION(r104327?): media/track/track-cues-cuechange.html and track-cues-enter-exit.html
intermittently time out, media/track/track-cues-seeking and fails
https://bugs.webkit.org/show_bug.cgi?id=75817
Unreviewed, fix a problem introduced in r104327.
No new tests, covered by existing tests.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_ignoreTrackDisplayUpdate.
2012-01-09 Raymond Toy <rtoy@google.com>
Add normalize attribute to ConvolverNode to disable normalization.
https://bugs.webkit.org/show_bug.cgi?id=75126
Reviewed by Kenneth Russell.
Tests added in convolution-mono-mono.html.
* platform/audio/Reverb.cpp:
(WebCore::Reverb::Reverb): Add extra arg to indicate whether
normalization is enabled or not, and do it.
* platform/audio/Reverb.h: Update declaration.
* webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::ConvolverNode): Initialize attribute (to
true).
(WebCore::ConvolverNode::setBuffer): Call Reverb with
normalization argument.
* webaudio/ConvolverNode.h:
(WebCore::ConvolverNode::normalize): New method to return
normalization.
(WebCore::ConvolverNode::setNormalize): New method to set
normalization.
* webaudio/ConvolverNode.idl: Add normalize attribute.
* LayoutTests/webaudio/convolution-mono-mono.html:
* LayoutTests/webaudio/convolution-mono-mono-expected.txt:
* LayoutTests/webaudio/resources/convolution-testing.js:
Test for convolution. Tests only work when normalization is
disabled.
2012-01-09 Judy Hao <judy.liqiong-hao@nokia.com>
[GStreamer] webkitwebsrc: pad template is leaked
https://bugs.webkit.org/show_bug.cgi?id=74224
Reviewed by Philippe Normand.
Use a GstPadTemplate smart pointer in webkit_web_src_init to
avoid a memory leak.
Fixing memory leaks. So, no new test case is introduced.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webkit_web_src_init):
2012-01-09 Xianzhu Wang <wangxianzhu@chromium.org>
Avoid unnecessary TextureManager::reduceMemoryToLimit().
https://bugs.webkit.org/show_bug.cgi?id=75632
Unnecessary TextureManager::reduceMemoryToLimit() will cause some tile
textures that are required soon to be unnecessarily removed/replaced,
and degrade performance, sometimes significantly.
For example, CCLayerTreeHost::setViewport will be called during
scrolling. The original code would call TextureManager::reduceMemoryToLimit(),
causing some textures unnecessarily discarded and then recreated
repeatedly during scrolling.
It's also unnecessary to call TextureManager::reduceMemoryToLimit()
from TextureManager::setPreferredMemoryLimitBytes() because the limit
is not a hard limit. The callers should call reduceMemoryToLimit()
explicitly if it wants it when setting the preferred memory limit.
Reviewed by James Robinson.
Tests: webkit_unit_tests --gtest_filter=TextureManagerTest.*:CCLayerTreeHostTestSetViewportSize.*
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::finishDrawingFrame): Call reduceMemoryToLimit() explicitly
* platform/graphics/chromium/TextureManager.cpp:
(WebCore::TextureManager::setPreferredMemoryLimitBytes): Removed call to reduceMemoryToLimit().
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::finishCommitOnImplThread):
(WebCore::CCLayerTreeHost::setViewportSize): Changed name from setViewport(). Check change of viewportSize.
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::setViewportSize): Changed name from setViewport()
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2012-01-09 Sami Kyostila <skyostil@chromium.org>
[Chromium] JPEG RGB swizzling order should match platform pixel format
https://bugs.webkit.org/show_bug.cgi?id=75861
Choose between JCS_EXT_BGRX and JCS_EXT_RGBX channel swizzling
based on the configured Skia 32-bit pixel format.
Reviewed by Kenneth Russell.
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(rgbOutputColorSpace):
2012-01-09 Alexis Menard <alexis.menard@openbossa.org>
getComputedStyle for border-radius is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=75630
Reviewed by Tony Chang.
Implement getComputedStyle for border-radius shorthand property.
Test: fast/css/getComputedStyle/getComputedStyle-border-radius-shorthand.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::getBorderRadiusCornerValues):
(WebCore::getBorderRadiusCornerValue):
(WebCore::getBorderRadiusShorthandValue):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2012-01-09 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r104418.
http://trac.webkit.org/changeset/104418
https://bugs.webkit.org/show_bug.cgi?id=75855
we still need to build against CG on Mac sometimes (Requested
by epoger on #webkit).
* WebCore.gyp/WebCore.gyp:
2012-01-09 Martin Robinson <mrobinson@igalia.com>
[GTK] [AC] Simplify accelerated compositing build options
https://bugs.webkit.org/show_bug.cgi?id=75518
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am: Automatically enable 3D rendering when AC is available.
* GNUmakefile.list.am: Clean up a comment.
2012-01-09 Antti Koivisto <antti@apple.com>
possible regression: r104060 maybe causing crashes
https://bugs.webkit.org/show_bug.cgi?id=75676
Reviewed by Andreas Kling.
Based on the stacks, CSSStyleSelector may be getting deleted from under the
CSSStyleSelector::appendAuthorStylesheets call. Protect by temporarily detaching
from the document. Also add assertions to catch the case.
No test, there is no known repro and the fix is speculative.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setDocType):
(WebCore::Document::childrenChanged):
(WebCore::Document::clearStyleSelector):
(WebCore::Document::updateActiveStylesheets):
* dom/Document.h:
2012-01-09 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Use Vector<OwnPtr> for m_viewportDependentMediaQueryResults in CSSStyleSelector
https://bugs.webkit.org/show_bug.cgi?id=75723
Reviewed by Andreas Kling.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::~CSSStyleSelector):
(WebCore::CSSStyleSelector::addViewportDependentMediaQueryResult):
* css/CSSStyleSelector.h:
2012-01-09 Alexis Menard <alexis.menard@openbossa.org>
Extend CSSValueList to allow slash separated lists.
https://bugs.webkit.org/show_bug.cgi?id=75841
Reviewed by Andreas Kling.
Multiple CSS properties are using slash to separate
various parts (e.g. border-radius) so having this
feature available in CSSValueList will make it easier
in the future to support these properties.
No new tests : existing ones should cover the refactor.
* css/CSSInitialValue.h:
(WebCore::CSSInitialValue::isImplicit):
(WebCore::CSSInitialValue::CSSInitialValue):
* css/CSSValue.cpp:
(WebCore::CSSValue::isImplicitInitialValue):
* css/CSSValue.h:
In order for CSSValue to not grow I moved m_isImplicitInitialValue
back to CSSInitialValue as this object is used only in CSSValuePool
and is allocated only twice.
(WebCore::CSSValue::CSSValue):
* css/CSSValueList.cpp:
(WebCore::CSSValueList::CSSValueList):
(WebCore::CSSValueList::copy):
Fix also usage of PassRefPtr.
(WebCore::CSSValueList::customCssText):
Refactor to use StringBuilder.
* css/CSSValueList.h:
(WebCore::CSSValueList::createCommaSeparated):
(WebCore::CSSValueList::createSpaceSeparated):
(WebCore::CSSValueList::createSlashSeparated):
* css/WebKitCSSFilterValue.cpp:
(WebCore::WebKitCSSFilterValue::WebKitCSSFilterValue):
* css/WebKitCSSTransformValue.cpp:
(WebCore::WebKitCSSTransformValue::WebKitCSSTransformValue):
2012-01-09 No'am Rosenthal <noam.rosenthal@nokia.com>
[Texmap] Move surface management from TextureMapperNode to TextureMapper
https://bugs.webkit.org/show_bug.cgi?id=75779
Instead of a TextureMapperSurfaceManager class inside of TextureMapperNode.cpp, we now
maintain that surface pool inside of the TextureMapper class. This will later allow us to
allocate intermediate surface from within TextureMapperGL, a functionality we need for
filters.
Also, surfaces are not automatically created with the viewport size, but rather with the
size passed as a parameter. The surface from the pool is the smallest texture that is
larger than the required size, or any texture if such texture is not yet allocated.
Reviewed by Kenneth Rohde Christiansen.
Tests in LayoutTests/compositing already cover this.
* GNUmakefile.list.am: Added TextureMapper.cpp to the build.
* Target.pri: Added TextureMapper.cpp to the build.
* WebCore.gypi: Added TextureMapper.cpp to the build.
* platform/graphics/texmap/TextureMapper.cpp: Added.
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/texmap/TextureMapperNode.cpp:
(WebCore::TextureMapperNode::paint):
(WebCore::TextureMapperNode::paintReflection):
(WebCore::TextureMapperNode::paintRecursive):
* platform/graphics/texmap/TextureMapperNode.h:
(WebCore::TextureMapperNode::TextureMapperNode):
2012-01-09 Mario Sanchez Prada <msanchez@igalia.com>
[Gtk] Regression: text-inserted events lack text inserted and current line
https://bugs.webkit.org/show_bug.cgi?id=72830
Reviewed by Martin Robinson.
Fix issue getting the exposed text for an accessibility object at,
before of after a given offset, after changing it at least once.
* accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
(webkit_accessible_class_init): Don't initialize
gailTextUtilQuark, it won't be used anymore.
(getGailTextUtilForAtk): Don't cache the GailTextUtil as object
data, but create a new one each time this function is called.
(webkit_accessible_text_get_caret_offset): Simplified code by
using the new focusedObjectAndCaretOffsetUnignored function,
instead of the old objectAndOffsetUnignored function.
(focusedObjectAndCaretOffsetUnignored): Rewrite of the old
objectAndOffsetUnignored function so it now needs less
parameters than before and takes care of carefully selecting the
start and end visible positions to calculate the position of the
caret from the point of view of the accessibility object of
reference passed as the only input parameter now. Updated callers.
* accessibility/gtk/AccessibilityObjectWrapperAtk.h:
* editing/gtk/FrameSelectionGtk.cpp:
(WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
Simplified code by calling to focusedObjectAndCaretOffsetUnignored
function, instead of the old objectAndOffsetUnignored function.
2012-01-09 Antti Koivisto <antti@apple.com>
Subtree invalidation on stylesheet change
https://bugs.webkit.org/show_bug.cgi?id=75834
Reviewed by Andreas Kling.
Currently if we add a stylesheet with scoped selectors and matching scope elements exist,
we recalculate the entire document style. It is sufficient to invalidate the subtrees
matching the scope only.
This allows us to do less full style recalcs on many popular web sites (nytimes.com for example).
Subtree recalcs are typically much cheaper.
Test: fast/css/id-or-class-before-stylesheet.html
* dom/Document.cpp:
(WebCore::Document::testAddedStylesheetRequiresStyleRecalc):
(WebCore::Document::analyzeStylesheetChange):
(WebCore::Document::updateActiveStylesheets):
* dom/Document.h:
2012-01-09 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck issues.
* GNUmakefile.list.am: Add missing header.
2012-01-09 Kentaro Hara <haraken@chromium.org>
[Refactoring] Use join(", ", @arguments) to build a method argument string
in CodeGeneratorJS.pm
https://bugs.webkit.org/show_bug.cgi?id=75830
Reviewed by Adam Barth.
The code in CodeGeneratorJS.pm to build a method argument string is dirty
and error-prone. It is concatenating arguments one by one judging whether
", " is necessary or not. This patch refactors the code so that it pushes
all arguments into @arguments and then builds a method string by
join(", ", @arguments).
Test: bindings/scripts/test/*
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateImplementationFunctionCall):
2012-01-09 Andreas Kling <awesomekling@apple.com>
CSSMutableStyleDeclaration: Remove propertiesEqual().
<http://webkit.org/b/75829>
Reviewed by Antti Koivisto.
Remove propertiesEqual() since it was wrong (it only compared CSSValue pointers,
not the actual values.)
Skip comparing the style declarations in NamedNodeMap::mappedMapsEquivalent()
and just compare pointers instead. This is possible because the declarations
all come from the mapped attribute/declaration table.
* css/CSSMutableStyleDeclaration.h:
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::mappedMapsEquivalent):
2012-01-09 Adam Barth <abarth@webkit.org>
insertAdjacentHTML doesn't play nice with DocumentFragment
https://bugs.webkit.org/show_bug.cgi?id=75826
Reviewed by Eric Seidel.
Test: fast/dom/insertAdjacentHTML-DocumentFragment-crash.html
Document nodes aren't the only non-Element ContainerNodes.
* html/HTMLElement.cpp:
(WebCore::contextElementForInsertion):
2012-01-09 Andreas Kling <awesomekling@apple.com>
CSSStyleSelector: Any attribute with a decl() can be assumed to be mapped.
<http://webkit.org/b/75832>
Reviewed by Antti Koivisto.
Replace isMappedAttribute() check with an assertion. Only a mapped attribute
will have an associated style declaration.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::matchAllRules):
2012-01-09 Kentaro Hara <haraken@chromium.org>
[Refactoring] Use join(", ", @arguments) to build a method argument
string in CodeGeneratorV8.pm
https://bugs.webkit.org/show_bug.cgi?id=75828
Reviewed by Darin Adler.
The code in CodeGeneratorV8.pm to build a method argument string is dirty
and error-prone. It is concatenating arguments one by one judging whether
", " is necessary or not. This patch refactors the code so that it pushes
all arguments into @arguments and then builds a method string by
join(", ", @arguments).
Test: bindings/scripts/test/*
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateFunctionCallString):
2012-01-08 Benjamin Poulain <benjamin@webkit.org>
Build fix: ScrollAnimatorMac has missing initializer in systemUptime()
https://bugs.webkit.org/show_bug.cgi?id=75827
Reviewed by Darin Adler.
Explicitly initialize the struct timeval to avoid compiler warnings.
* platform/mac/ScrollAnimatorMac.mm:
(systemUptime):
2012-01-08 ChangSeok Oh <shivamidow@gmail.com>
Memory allocation mismatch by using adoptArrayPtr in GraphicsContext3DOpenGL.cpp
https://bugs.webkit.org/show_bug.cgi?id=75820
Reviewed by Darin Adler.
Dbates submitted a patch to release fastMalloc allocation
in GraphicsContext3DOpenGL.cpp properly.
See http://trac.webkit.org/browser/trunk/Source/WebCore/ChangeLog?rev=104395
But one thing similar to the above still remains mismatched.
No new tests required.
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::getShaderInfoLog):
2012-01-08 Leo Yang <leo.yang@torchmobile.com.cn>
[BlackBerry] Use the concrete FrameNetworkingContextBlackBerry to access Frame
https://bugs.webkit.org/show_bug.cgi?id=75611
Reviewed by Antonio Gomes.
In platform/network/blackberry/ResourceHandleBlackBerry.cpp, we were using
NetworkingContext::wrappedFrame() to access the frame associated with the
networking context. NetworkingContext::wrappedFrame() was added as a virtual
function by the BlackBerry porting internally. It's unnecessary because
FrameNetworkingContextBlackBerry inherits from FrameNetworkingContext which
has a protected frame() member which is exported as public in
FrameNetworkingContextBlackBerry. We don't want to upstream wrappedFrame()
as a specific change of the BlackBerry porting in
platform/network/NetworkingContext.h, so use the concrete networking context
FrameNetworkingContextBlackBerry to access the associated frame.
No functionalities changed, no new tests.
* platform/network/blackberry/ResourceHandleBlackBerry.cpp:
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::loadResourceSynchronously):
2012-01-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r104421.
http://trac.webkit.org/changeset/104421
https://bugs.webkit.org/show_bug.cgi?id=75816
Need to rebaseline some tests on Linux (Requested by noamr on
#webkit).
* Target.pri:
2012-01-08 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt] Enable CSS_FILTERS in Qt build
https://bugs.webkit.org/show_bug.cgi?id=75777
Enable CSS_FILTERS and unskip the tests.
Reviewed by Kenneth Rohde Christiansen.
Filter tests are now unskipped for Qt.
* Target.pri: add missing files to build.
2012-01-08 Adam Barth <abarth@webkit.org>
[Chromium] Remove use_skia option from GYP
https://bugs.webkit.org/show_bug.cgi?id=75811
Reviewed by Ryosuke Niwa.
The CG configuration of Chromium Mac is no longer supported.
* WebCore.gyp/WebCore.gyp:
2012-01-08 Benjamin Poulain <benjamin@webkit.org>
Valid canonical URLs should have a lowercase hostname
https://bugs.webkit.org/show_bug.cgi?id=75771
Reviewed by Adam Barth.
According to the RFC 3986 (and other browsers implementation), the hostname
of valid canonical URLs should be lowercase.
This patch lowercase the hostname in KURL::parse() similarily to what we
do for the scheme.
Tests: fast/url/host-lowercase-per-scheme.html
fast/url/safari-extension.html
* platform/KURL.cpp:
(WebCore::isCanonicalHostnameLowercaseForScheme):
(WebCore::KURL::parse):
2012-01-08 Adam Barth <abarth@webkit.org>
Rename checkNodeSecurity and allowsAccessFromFrame to have sensible names
https://bugs.webkit.org/show_bug.cgi?id=75796
Reviewed by Sam Weinig.
This patch contains only renames and FIXME comments. No behavior change.
* bindings/js/JSDOMBinding.cpp:
(WebCore::allowAccessToNode):
(WebCore::allowAccessToFrame):
* bindings/js/JSDOMBinding.h:
* bindings/js/JSHTMLFrameElementCustom.cpp:
(WebCore::allowSettingJavascriptURL):
* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::getOwnPropertySlotDelegate):
(WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
(WebCore::JSHistory::putDelegate):
(WebCore::JSHistory::deleteProperty):
(WebCore::JSHistory::getOwnPropertyNames):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::getOwnPropertySlotDelegate):
(WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
(WebCore::JSLocation::putDelegate):
(WebCore::JSLocation::deleteProperty):
(WebCore::JSLocation::getOwnPropertyNames):
(WebCore::JSLocation::toStringFunction):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::canAccessFromCurrentOrigin):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertyDescriptorBody):
(GenerateImplementation):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
(GenerateFunctionCallback):
2012-01-08 Adam Barth <abarth@webkit.org>
Remove deprecated toDynamicFrame and unused [CallWith=DynamicFrame]
https://bugs.webkit.org/show_bug.cgi?id=75795
Reviewed by Eric Seidel.
We've succeeded in removing all the callers fo this function, including
all the uses of CallWith=DynamicFrame in IDL files.
* bindings/js/JSDOMBinding.cpp:
* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateFunctionCallString):
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/V8/V8TestObj.cpp:
2012-01-08 Adam Barth <abarth@webkit.org>
NeedsUserGestureCheck IDL attribute is no longer used
https://bugs.webkit.org/show_bug.cgi?id=75794
Reviewed by Eric Seidel.
This IDL attribute is no longer used because we use static state to
keep track of the user gesture state. We can delete the code that
supports it.
* bindings/scripts/CodeGeneratorCPP.pm:
* bindings/scripts/CodeGeneratorGObject.pm:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorV8.pm:
* bindings/scripts/test/TestObj.idl:
2012-01-08 Adam Barth <abarth@webkit.org>
Remove unused security functions from V8 bindings
https://bugs.webkit.org/show_bug.cgi?id=75797
Reviewed by Eric Seidel.
This functions have no callers. They can be removed.
* bindings/v8/ScriptController.cpp:
* bindings/v8/ScriptController.h:
* bindings/v8/specialization/V8BindingState.cpp:
* bindings/v8/specialization/V8BindingState.h:
2012-01-08 Pratik Solanki <psolanki@apple.com>
Assertion failure under SharedBuffer::append() when NETWORK_CFDATA_ARRAY_CALLBACK is enabled
https://bugs.webkit.org/show_bug.cgi?id=75656
Reviewed by Darin Adler.
Update the implementation of SubresourceLoader::didReceiveDataArray() to conform to the
refactoring done as part of bug 71149 in r100311.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveData):
(WebCore::SubresourceLoader::errorLoadingResource):
* loader/SubresourceLoader.h:
* loader/cf/SubresourceLoaderCF.cpp:
(WebCore::SubresourceLoader::didReceiveDataArray):
2012-01-08 Steve Block <steveblock@google.com>
Remove V8-specific Java Bridge code
https://bugs.webkit.org/show_bug.cgi?id=75801
Reviewed by Darin Adler.
Also remove superfluous JSC and V8 guards, as the code is now used only
with JSC.
No new tests, removing dead code only.
* WebCore.gypi:
* bridge/jni/JNIUtility.cpp:
(JSC::Bindings::javaTypeFromClassName):
(JSC::Bindings::signatureFromJavaType):
(JSC::Bindings::getJNIField):
(JSC::Bindings::callJNIMethod):
* bridge/jni/JavaType.h:
* bridge/jni/jsc/JavaMethodJSC.cpp:
(appendClassName):
(JavaMethod::signature):
* bridge/jni/v8/JNIUtilityPrivate.cpp: Removed.
* bridge/jni/v8/JNIUtilityPrivate.h: Removed.
* bridge/jni/v8/JavaClassV8.h: Removed.
* bridge/jni/v8/JavaFieldV8.h: Removed.
* bridge/jni/v8/JavaInstanceV8.h: Removed.
* bridge/jni/v8/JavaMethodV8.h: Removed.
* bridge/jni/v8/JavaNPObjectV8.cpp: Removed.
* bridge/jni/v8/JavaNPObjectV8.h: Removed.
* bridge/jni/v8/JavaValueV8.h: Removed.
* bridge/jsc/BridgeJSC.h:
2012-01-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r104403.
http://trac.webkit.org/changeset/104403
https://bugs.webkit.org/show_bug.cgi?id=75803
It broke all tests on Qt5 (Requested by Ossy_weekend on
#webkit).
* Target.pri:
2012-01-08 Antti Koivisto <antti@apple.com>
Don't create style selector in Element::recalcStyleIfNeededAfterAttributeChanged if it doesn't exist
https://bugs.webkit.org/show_bug.cgi?id=75802
Rubber-stamped by Andreas Kling.
Element::recalcStyleIfNeededAfterAttributeChanged shouldn't create style selector for attribute
check if it doesn't already exist. We are going to need a full style recalc anyway in that case
and the constructed style selector may get throw out again.
* dom/Element.cpp:
(WebCore::Element::recalcStyleIfNeededAfterAttributeChanged):
2012-01-08 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt] Enable CSS_FILTERS in Qt build
https://bugs.webkit.org/show_bug.cgi?id=75777
Enable CSS_FILTERS and unskip the tests.
Reviewed by Kenneth Rohde Christiansen.
Filter tests are now unskipped for Qt.
* Target.pri: add missing files to build.
2012-01-07 Antti Koivisto <antti@apple.com>
REGRESSION (r104060): Layout Test fast/media/viewport-media-query.html is occasionally failing
https://bugs.webkit.org/show_bug.cgi?id=75633
Reviewed by Andreas Kling.
If something triggers CSSStyleSelector construction very early, before documentElement is known,
it won't be able to resolve viewport-related media queries. In the included test case
the attribute on <html> element triggers the style selector creation. I can't repro
the fast/media/viewport-media-query.html failure but I suspect it is the same issue with
a different mechanism for early CSSStyleSelector construction.
- Reset style selector on documentElement change.
- Remove the code for lazy documentElement initialization. It is not an useful optimization,
the children of Document rarely change.
Test: fast/media/viewport-media-query-synchronous.html
* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::childrenChanged):
* dom/Document.h:
(WebCore::Document::documentElement):
2012-01-07 Andreas Kling <awesomekling@apple.com>
Attempt to regenerate bindings on the Windows bot.
* html/HTMLCollection.h:
2012-01-07 Daniel Bates <dbates@webkit.org>
Memory allocator mismatch; Use operator new[] with OwnArrayPtr instead of fastMalloc()
Rubber-stamped by Adam Barth.
Currently getProgramInfoLog() in GraphicsContext3DOpenGL.cpp assumes that operator new[]
and fastMalloc() are equivalent when it adopts a fastMalloc() allocated buffer. Notice,
OwnArrayPtr ultimately calls delete[] on destruction. When GLOBAL_FASTMALLOC_NEW is disabled,
it isn't true that operator new[], operator delete[] are equivalent to fastMalloc(), fastFree(),
respectively. Hence, there may be a mismatch between the allocation and deallocation
routines. Therefore, we should allocate the array to be adopted by OwnArrayPtr using
operator new[].
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::getProgramInfoLog):
2012-01-07 Chris Marrin <cmarrin@apple.com>
Fixed ANGLE build for GNU and QT broken in https://trac.webkit.org/changeset/104363
Unreviewed.
* GNUmakefile.list.am:
* Target.pri:
2012-01-07 Andreas Kling <awesomekling@apple.com>
Unreviewed C++ bindings build fix after r104383.
Use WTF::getPtr() to grab at impl pointer since they could be either RefPtr or raw.
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateImplementation):
* bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
(WebDOMTestCallback::impl):
* bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp:
(WebDOMTestEventConstructor::impl):
* bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
(WebDOMTestInterface::impl):
* bindings/scripts/test/CPP/WebDOMTestMediaQueryListListener.cpp:
(WebDOMTestMediaQueryListListener::impl):
* bindings/scripts/test/CPP/WebDOMTestNamedConstructor.cpp:
(WebDOMTestNamedConstructor::impl):
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::impl):
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
(WebDOMTestSerializedScriptValueInterface::impl):
2012-01-07 Andreas Kling <awesomekling@apple.com>
Simplify HTMLCollection ownership model.
<http://webkit.org/b/75437>
Reviewed by Sam Weinig.
Remove HTMLCollection's inheritance from RefCounted and use OwnPtr to store it.
Added ref()/deref() methods that forward to the collection's base node, these
are only ever used by DOM wrappers.
This is a behavior change, HTMLCollection wrappers now keep the base node alive.
Test: fast/dom/htmlcollection-protects-base.html
* html/HTMLCollection.h:
(WebCore::HTMLCollection::ref):
(WebCore::HTMLCollection::deref):
Removed inheritance from RefCounted. Added ref/deref that forward the refs
to the collection's base Node.
* dom/Element.cpp:
(WebCore::Element::~Element):
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::~Document):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::~HTMLFormElement):
* html/HTMLSelectElement.h:
* html/HTMLSelectElement.cpp:
Remove HTMLCollection::detachFromNode() and call sites.
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::namedItemWithIndex):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::invalidateCacheIfNeeded):
(WebCore::HTMLCollection::itemAfter):
(WebCore::HTMLCollection::calcLength):
(WebCore::HTMLCollection::length):
(WebCore::HTMLCollection::item):
(WebCore::HTMLCollection::nextItem):
(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):
(WebCore::HTMLCollection::hasNamedItem):
(WebCore::HTMLCollection::namedItems):
(WebCore::HTMLCollection::tags):
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::calcLength):
(WebCore::HTMLFormCollection::item):
(WebCore::HTMLFormCollection::getNamedItem):
(WebCore::HTMLFormCollection::namedItem):
(WebCore::HTMLFormCollection::updateNameCache):
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::itemAfter):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::add):
(WebCore::HTMLOptionsCollection::remove):
(WebCore::HTMLOptionsCollection::selectedIndex):
(WebCore::HTMLOptionsCollection::setSelectedIndex):
(WebCore::HTMLOptionsCollection::setLength):
* html/HTMLPropertiesCollection.cpp:
(WebCore::HTMLPropertiesCollection::length):
(WebCore::HTMLPropertiesCollection::item):
(WebCore::HTMLPropertiesCollection::names):
Removed base node null-checks and assertions. Added one assertion to
the HTMLCollection constructor (that m_base is non-null.)
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::openSearchDescriptionURL):
(WebCore::Document::cachedCollection):
(WebCore::Document::images):
(WebCore::Document::applets):
(WebCore::Document::embeds):
(WebCore::Document::plugins):
(WebCore::Document::objects):
(WebCore::Document::scripts):
(WebCore::Document::links):
(WebCore::Document::forms):
(WebCore::Document::anchors):
(WebCore::Document::all):
(WebCore::Document::windowNamedItems):
(WebCore::Document::documentNamedItems):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::nameGetter):
(WebCore::JSHTMLDocument::all):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8DOMWindow::namedPropertyGetter):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::V8HTMLDocument::GetNamedProperty):
* dom/ElementRareData.h:
(WebCore::ElementRareData::ensureCachedHTMLCollection):
* dom/NodeRareData.h:
(WebCore::NodeRareData::properties):
* html/HTMLAllCollection.h:
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::create):
* html/HTMLCollection.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::create):
(WebCore::HTMLCollection::HTMLCollection):
* html/HTMLDataListElement.cpp:
(WebCore::HTMLDataListElement::options):
* html/HTMLDataListElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::children):
* html/HTMLElement.h:
* html/HTMLSelectElement.h:
(WebCore::HTMLSelectElement::options):
* html/HTMLFormCollection.h:
* html/HTMLFormElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::elements):
* html/HTMLNameCollection.h:
(WebCore::HTMLNameCollection::create):
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::create):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement):
(WebCore::HTMLMapElement::areas):
* html/HTMLMapElement.h:
* html/HTMLPropertiesCollection.h:
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::rows):
(WebCore::HTMLTableElement::tBodies):
* html/HTMLTableElement.h:
* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::insertCell):
(WebCore::HTMLTableRowElement::deleteCell):
(WebCore::HTMLTableRowElement::cells):
* html/HTMLTableRowElement.h:
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::create):
(WebCore::HTMLTableRowsCollection::itemAfter):
* html/HTMLTableRowsCollection.h:
* html/HTMLTableSectionElement.h:
* html/HTMLTableSectionElement.cpp:
(WebCore::HTMLTableSectionElement::insertRow):
(WebCore::HTMLTableSectionElement::deleteRow):
(WebCore::HTMLTableSectionElement::rows):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::selectedOption):
* html/HTMLOptionsCollection.h:
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::create):
* html/HTMLPropertiesCollection.cpp:
(WebCore::HTMLPropertiesCollection::create):
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::getDocumentLinks):
Store cached HTMLCollections in OwnPtrs. Methods that used to return
PassRefPtr<HTMLCollection> now simply return HTMLCollection*.
Updated call sites as appropriate.
2012-01-07 Adam Barth <abarth@webkit.org>
Attempt to fix Qt build.
* page/Geolocation.cpp:
(WebCore::Geolocation::Geolocation):
2012-01-06 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r104210): Crash inside DynamicSubtreeNodeList::length
https://bugs.webkit.org/show_bug.cgi?id=75731
Reviewed by Andreas Kling.
The crash was caused by DynamicSubtreeNodeList::SubtreeCaches::domVersionIsConsistent
using m_cachedItem as a way to access the document. Changed SubtreeCaches to use
DynamicSubtreeNodeList's m_node instead.
Test: fast/dom/node-list-length-after-removing-node.html
* dom/DynamicNodeList.cpp:
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::setLengthCache):
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::setItemCache):
(WebCore::DynamicSubtreeNodeList::length):
(WebCore::DynamicSubtreeNodeList::item):
* dom/DynamicNodeList.h:
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::isLengthCacheValid):
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::isItemCacheValid):
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItem):
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::domVersionIsConsistent):
2012-01-07 Adam Barth <abarth@webkit.org>
Disconnecting DOMWindow properties is fragile and overly complicated
https://bugs.webkit.org/show_bug.cgi?id=75699
Reviewed by Alexey Proskuryakov.
Previously, we had to carefully check every object tree hanging off of
DOMWindow to make sure that every property correctly disconnected
itself and all its subobjects from the Frame when the DOMWindow
disconnected from the Frame.
This patch introduces DOMWindowProperty, which is a base class that
handles this work automagically, ensuring that we won't have any
dangling Frame pointers and removing a bunch of boilerplate code.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* css/StyleMedia.cpp:
(WebCore::StyleMedia::StyleMedia):
* css/StyleMedia.h:
(WebCore::StyleMedia::create):
* loader/appcache/DOMApplicationCache.cpp:
(WebCore::DOMApplicationCache::DOMApplicationCache):
(WebCore::DOMApplicationCache::disconnectFrame):
* loader/appcache/DOMApplicationCache.h:
* page/BarInfo.cpp:
(WebCore::BarInfo::BarInfo):
* page/BarInfo.h:
* page/Console.cpp:
(WebCore::Console::Console):
(WebCore::Console::memory):
* page/Console.h:
* page/DOMSelection.cpp:
(WebCore::DOMSelection::DOMSelection):
* page/DOMSelection.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::registerProperty):
(WebCore::DOMWindow::unregisterProperty):
(WebCore::DOMWindow::clear):
* page/DOMWindow.h:
* page/Geolocation.cpp:
(WebCore::Geolocation::Geolocation):
(WebCore::Geolocation::disconnectFrame):
* page/Geolocation.h:
* page/History.cpp:
(WebCore::History::History):
* page/History.h:
* page/Location.cpp:
(WebCore::Location::Location):
* page/Location.h:
* page/Navigator.cpp:
(WebCore::Navigator::Navigator):
(WebCore::Navigator::~Navigator):
* page/Navigator.h:
* page/Performance.cpp:
(WebCore::Performance::Performance):
(WebCore::Performance::memory):
* page/Performance.h:
* page/PerformanceNavigation.cpp:
(WebCore::PerformanceNavigation::PerformanceNavigation):
* page/PerformanceNavigation.h:
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::PerformanceTiming):
* page/PerformanceTiming.h:
* page/Screen.cpp:
(WebCore::Screen::Screen):
* page/Screen.h:
* plugins/DOMMimeTypeArray.cpp:
(WebCore::DOMMimeTypeArray::DOMMimeTypeArray):
* plugins/DOMMimeTypeArray.h:
* plugins/DOMPluginArray.cpp:
(WebCore::DOMPluginArray::DOMPluginArray):
* plugins/DOMPluginArray.h:
* storage/Storage.cpp:
(WebCore::Storage::Storage):
* storage/Storage.h:
2012-01-06 Mark Rowe <mrowe@apple.com>
REGRESSION (r83075): Save as PDF does not generate any links for webkit.org and others
<http://webkit.org/b/75768> <rdar://problem/10659258>
Use RenderObject::hasOutline when determining whether to always create line boxes so that
we take in to consideration whether we'll be creating PDF link rects.
Reviewed by Dan Bernstein.
* rendering/RenderInline.cpp:
(WebCore::RenderInline::styleDidChange):
2012-01-06 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r104373 and r104374.
http://trac.webkit.org/changeset/104373
http://trac.webkit.org/changeset/104374
https://bugs.webkit.org/show_bug.cgi?id=75769
Too many assertion failures. (Requested by kling on #webkit).
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::nameGetter):
(WebCore::JSHTMLDocument::all):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8DOMWindow::namedPropertyGetter):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::V8HTMLDocument::GetNamedProperty):
* dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::Document::openSearchDescriptionURL):
(WebCore::Document::cachedCollection):
(WebCore::Document::images):
(WebCore::Document::applets):
(WebCore::Document::embeds):
(WebCore::Document::plugins):
(WebCore::Document::objects):
(WebCore::Document::scripts):
(WebCore::Document::links):
(WebCore::Document::forms):
(WebCore::Document::anchors):
(WebCore::Document::all):
(WebCore::Document::windowNamedItems):
(WebCore::Document::documentNamedItems):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::~Element):
* dom/ElementRareData.h:
(WebCore::ElementRareData::cachedHTMLCollection):
(WebCore::ElementRareData::ensureCachedHTMLCollection):
* dom/NodeRareData.h:
(WebCore::NodeRareData::properties):
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::create):
(WebCore::HTMLAllCollection::namedItemWithIndex):
* html/HTMLAllCollection.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::create):
(WebCore::HTMLCollection::detachFromNode):
(WebCore::HTMLCollection::invalidateCacheIfNeeded):
(WebCore::HTMLCollection::itemAfter):
(WebCore::HTMLCollection::calcLength):
(WebCore::HTMLCollection::length):
(WebCore::HTMLCollection::item):
(WebCore::HTMLCollection::nextItem):
(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):
(WebCore::HTMLCollection::hasNamedItem):
(WebCore::HTMLCollection::namedItems):
(WebCore::HTMLCollection::tags):
* html/HTMLCollection.h:
* html/HTMLDataListElement.cpp:
(WebCore::HTMLDataListElement::options):
* html/HTMLDataListElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::children):
* html/HTMLElement.h:
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::create):
(WebCore::HTMLFormCollection::calcLength):
(WebCore::HTMLFormCollection::item):
(WebCore::HTMLFormCollection::getNamedItem):
(WebCore::HTMLFormCollection::namedItem):
(WebCore::HTMLFormCollection::updateNameCache):
* html/HTMLFormCollection.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::~HTMLFormElement):
(WebCore::HTMLFormElement::elements):
* html/HTMLFormElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::selectedOption):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement):
(WebCore::HTMLMapElement::areas):
* html/HTMLMapElement.h:
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::itemAfter):
* html/HTMLNameCollection.h:
(WebCore::HTMLNameCollection::create):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::create):
(WebCore::HTMLOptionsCollection::add):
(WebCore::HTMLOptionsCollection::remove):
(WebCore::HTMLOptionsCollection::selectedIndex):
(WebCore::HTMLOptionsCollection::setSelectedIndex):
(WebCore::HTMLOptionsCollection::setLength):
* html/HTMLOptionsCollection.h:
* html/HTMLPropertiesCollection.cpp:
(WebCore::HTMLPropertiesCollection::create):
(WebCore::HTMLPropertiesCollection::length):
(WebCore::HTMLPropertiesCollection::item):
(WebCore::HTMLPropertiesCollection::names):
* html/HTMLPropertiesCollection.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::~HTMLSelectElement):
(WebCore::HTMLSelectElement::options):
* html/HTMLSelectElement.h:
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::~HTMLTableElement):
2012-01-06 Andreas Kling <awesomekling@apple.com>
Unreviewed build fix after r104373.
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::~HTMLTableElement):
2012-01-06 Andreas Kling <awesomekling@apple.com>
Simplify HTMLCollection ownership model.
<http://webkit.org/b/75437>
Reviewed by Sam Weinig.
Remove HTMLCollection's inheritance from RefCounted and use OwnPtr to store it.
Added ref()/deref() methods that forward to the collection's base node, these
are only ever used by DOM wrappers.
This is a behavior change, HTMLCollection wrappers now keep the base node alive.
Test: fast/dom/htmlcollection-protects-base.html
* html/HTMLCollection.h:
(WebCore::HTMLCollection::ref):
(WebCore::HTMLCollection::deref):
Removed inheritance from RefCounted. Added ref/deref that forward the refs
to the collection's base Node.
* dom/Element.cpp:
(WebCore::Element::~Element):
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::~Document):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::~HTMLFormElement):
* html/HTMLSelectElement.h:
* html/HTMLSelectElement.cpp:
Remove HTMLCollection::detachFromNode() and call sites.
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::namedItemWithIndex):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::invalidateCacheIfNeeded):
(WebCore::HTMLCollection::itemAfter):
(WebCore::HTMLCollection::calcLength):
(WebCore::HTMLCollection::length):
(WebCore::HTMLCollection::item):
(WebCore::HTMLCollection::nextItem):
(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):
(WebCore::HTMLCollection::hasNamedItem):
(WebCore::HTMLCollection::namedItems):
(WebCore::HTMLCollection::tags):
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::calcLength):
(WebCore::HTMLFormCollection::item):
(WebCore::HTMLFormCollection::getNamedItem):
(WebCore::HTMLFormCollection::namedItem):
(WebCore::HTMLFormCollection::updateNameCache):
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::itemAfter):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::add):
(WebCore::HTMLOptionsCollection::remove):
(WebCore::HTMLOptionsCollection::selectedIndex):
(WebCore::HTMLOptionsCollection::setSelectedIndex):
(WebCore::HTMLOptionsCollection::setLength):
* html/HTMLPropertiesCollection.cpp:
(WebCore::HTMLPropertiesCollection::length):
(WebCore::HTMLPropertiesCollection::item):
(WebCore::HTMLPropertiesCollection::names):
Removed base node null-checks and assertions. Added one assertion to
the HTMLCollection constructor (that m_base is non-null.)
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::openSearchDescriptionURL):
(WebCore::Document::cachedCollection):
(WebCore::Document::images):
(WebCore::Document::applets):
(WebCore::Document::embeds):
(WebCore::Document::plugins):
(WebCore::Document::objects):
(WebCore::Document::scripts):
(WebCore::Document::links):
(WebCore::Document::forms):
(WebCore::Document::anchors):
(WebCore::Document::all):
(WebCore::Document::windowNamedItems):
(WebCore::Document::documentNamedItems):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::nameGetter):
(WebCore::JSHTMLDocument::all):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8DOMWindow::namedPropertyGetter):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::V8HTMLDocument::GetNamedProperty):
* dom/ElementRareData.h:
(WebCore::ElementRareData::ensureCachedHTMLCollection):
* dom/NodeRareData.h:
(WebCore::NodeRareData::properties):
* html/HTMLAllCollection.h:
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::create):
* html/HTMLCollection.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::create):
(WebCore::HTMLCollection::HTMLCollection):
* html/HTMLDataListElement.cpp:
(WebCore::HTMLDataListElement::options):
* html/HTMLDataListElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::children):
* html/HTMLElement.h:
* html/HTMLSelectElement.h:
(WebCore::HTMLSelectElement::options):
* html/HTMLFormCollection.h:
* html/HTMLFormElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::elements):
* html/HTMLNameCollection.h:
(WebCore::HTMLNameCollection::create):
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::create):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement):
(WebCore::HTMLMapElement::areas):
* html/HTMLMapElement.h:
* html/HTMLPropertiesCollection.h:
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::rows):
(WebCore::HTMLTableElement::tBodies):
* html/HTMLTableElement.h:
* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::insertCell):
(WebCore::HTMLTableRowElement::deleteCell):
(WebCore::HTMLTableRowElement::cells):
* html/HTMLTableRowElement.h:
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::create):
(WebCore::HTMLTableRowsCollection::itemAfter):
* html/HTMLTableRowsCollection.h:
* html/HTMLTableSectionElement.h:
* html/HTMLTableSectionElement.cpp:
(WebCore::HTMLTableSectionElement::insertRow):
(WebCore::HTMLTableSectionElement::deleteRow):
(WebCore::HTMLTableSectionElement::rows):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::selectedOption):
* html/HTMLOptionsCollection.h:
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::create):
* html/HTMLPropertiesCollection.cpp:
(WebCore::HTMLPropertiesCollection::create):
Store cached HTMLCollections in OwnPtrs. Methods that used to return
PassRefPtr<HTMLCollection> now simply return HTMLCollection*.
Updated call sites as appropriate.
2012-01-06 Adam Barth <abarth@webkit.org>
DOMWindow should be a FrameDestructionObserver
https://bugs.webkit.org/show_bug.cgi?id=75697
Reviewed by Alexey Proskuryakov.
DOMWindow plays exactly the role of a FrameDestructionObserver, just
with special-case code. It should just use the general-case code.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::DOMWindow):
(WebCore::DOMWindow::~DOMWindow):
(WebCore::DOMWindow::frameDestroyed):
* page/DOMWindow.h:
* page/Frame.cpp:
(WebCore::Frame::~Frame):
(WebCore::Frame::clearDOMWindow):
(WebCore::Frame::setDOMWindow):
* page/Frame.h:
2012-01-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Missing Implementation of Public InspectorDOMAgent Function
https://bugs.webkit.org/show_bug.cgi?id=75759
Implement missing accessor and make setter public.
Reviewed by Timothy Hatcher.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::searchingForNodeInPage):
* inspector/InspectorDOMAgent.h:
2012-01-06 W. James MacLean <wjmaclean@chromium.org>
[Chromium] Cull occluded tiles in tiled layers
https://bugs.webkit.org/show_bug.cgi?id=70533
Reviewed by James Robinson.
Unit test provided, must pass all existing GPU layout tests.
* WebCore.gypi:
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::appendQuads):
(WebCore::CCLayerImpl::quadTransform):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
(WebCore::CCLayerTreeHostImpl::optimizeRenderPasses):
(WebCore::CCLayerTreeHostImpl::drawLayers):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
* platform/graphics/chromium/cc/CCQuadCuller.cpp: Added.
(std::swap):
(WebCore::regionContainsRect):
(WebCore::CCQuadCuller::cullOccludedQuads):
* platform/graphics/chromium/cc/CCQuadCuller.h: Added.
(WebCore::CCQuadCuller::CCQuadCuller):
* platform/graphics/chromium/cc/CCRenderPass.cpp:
(WebCore::CCRenderPass::optimizeQuads):
* platform/graphics/chromium/cc/CCRenderPass.h:
2012-01-06 Anders Carlsson <andersca@apple.com>
Move more rubberbanding code into ScrollAnimatorMac::smoothScrollWithEvent
https://bugs.webkit.org/show_bug.cgi?id=75750
Reviewed by Sam Weinig.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::handleWheelEvent):
Move rubberbanding related code into smoothScrollWithEvent.
(WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
Move code here from handleWheelEvent and made the function return a boolean.
(WebCore::ScrollAnimatorMac::snapRubberBand):
Call the client.
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
Ditto.
2012-01-06 Greg Billock <gbillock@google.com>
WebCore implementation of the Intent object
See http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html
for draft spec.
https://bugs.webkit.org/show_bug.cgi?id=73051
Reviewed by Adam Barth.
Test: web-intents/web-intents-api.html
* WebCore.gypi:
* page/DOMWindow.idl:
* Modules/intents/Intent.cpp: Added.
(WebCore::Intent::Intent):
(WebCore::Intent::action):
(WebCore::Intent::setAction):
(WebCore::Intent::type):
(WebCore::Intent::setType):
(WebCore::Intent::data):
(WebCore::Intent::setData):
(WebCore::Intent::create):
* Modules/intents/Intent.h: Added.
* Modules/intents/Intent.idl: Added.
2012-01-06 Tim Horton <timothy_horton@apple.com>
[cg] userSpaceOnUse SVG Patterns have the wrong origin
https://bugs.webkit.org/show_bug.cgi?id=75741
<rdar://problem/9383222>
Reviewed by Simon Fraser.
The transformation from pattern space to user space should use the userToBase CTM,
not the current CTM.
Test: svg/custom/pattern-userSpaceOnUse-userToBaseTransform.xhtml
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::applyStrokePattern):
(WebCore::GraphicsContext::applyFillPattern):
(WebCore::GraphicsContext::getCTM):
* platform/graphics/cg/TransformationMatrixCG.cpp:
(WebCore::AffineTransform::AffineTransform): Add a AffineTransform(CGAffineTransform) constructor
* platform/graphics/transforms/AffineTransform.h:
2012-01-05 Simon Fraser <simon.fraser@apple.com>
Avoid falling into tiled layers more often when the device scale factor is > 1
<rdar://problem/10588725>
Reviewed by John Sullivan.
Stop taking the device scale factor into account when deciding to make
tiled layers.
Test: compositing/tiled-layers-hidpi.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::requiresTiledLayer):
2012-01-06 Ryosuke Niwa <rniwa@webkit.org>
Touch a bunch of files in an attempt to fix Mac release builds.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::get):
* accessibility/AccessibilityAllInOne.cpp:
* editing/visible_units.cpp:
(WebCore::previousBoundary):
2012-01-06 No'am Rosenthal <noam.rosenthal@nokia.com>
Enable a compositing trigger for filters
https://bugs.webkit.org/show_bug.cgi?id=75658
This will enable forcing the compositing code path when filters exist for a RenderObject.
Reviewed by Simon Fraser.
No new functionality so no new tests.
* page/ChromeClient.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingLayer):
(WebCore::RenderLayerCompositor::requiresCompositingForFilters):
* rendering/RenderLayerCompositor.h:
2012-01-06 Anders Carlsson <andersca@apple.com>
Add and use ScrollElasticityControllerClient::absoluteScrollPosition
https://bugs.webkit.org/show_bug.cgi?id=75744
Reviewed by Dan Bernstein.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::absoluteScrollPosition):
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
* platform/mac/ScrollElasticityController.h:
2012-01-06 Adam Barth <abarth@webkit.org>
Move FrameDestructionObserver to its own file
https://bugs.webkit.org/show_bug.cgi?id=75693
Reviewed by Eric Seidel.
We should have one class per file, on general principles. Also, this
make it possible to use this class in DOMWindow without introducing a
circular include dependency.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* page/Frame.cpp:
* page/Frame.h:
* page/FrameDestructionObserver.cpp: Added.
(WebCore::FrameDestructionObserver::FrameDestructionObserver):
(WebCore::FrameDestructionObserver::~FrameDestructionObserver):
(WebCore::FrameDestructionObserver::frameDestroyed):
* page/FrameDestructionObserver.h: Added.
(WebCore::FrameDestructionObserver::frame):
* plugins/DOMMimeType.h:
* plugins/DOMPlugin.h:
2012-01-06 Anders Carlsson <andersca@apple.com>
Fix Snow Leopard build.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::immediateScrollBy):
Move the function definition inside #if ENABLE(RUBBER_BANDING).
2012-01-04 Jon Lee <jonlee@apple.com>
Clicking on the cancel button on readonly and disabled search fields darkens as if the search field was editable
https://bugs.webkit.org/show_bug.cgi?id=69886
<rdar://problem/10070187>
Reviewed by Adele Peterson.
Tests: ManualTests/search-cancel-button.html
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSearchFieldCancelButton): If the input is readonly and/or disabled, force the cell to
render without highlight.
2012-01-06 Simon Fraser <simon.fraser@apple.com>
Mitigate scrollbar differences when running pixel tests
https://bugs.webkit.org/show_bug.cgi?id=67217
Reviewed by Dan Bernstein.
Export WebCore::Settings::mockScrollbarsEnabled() for DRT.
* WebCore.exp.in:
2012-01-06 Tom Sepez <tsepez@chromium.org>
Pass Content-Security-Policy directives to worker threads.
https://bugs.webkit.org/show_bug.cgi?id=73242
Reviewed by David Levin.
Tests: http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed.html
http/tests/security/contentSecurityPolicy/shared-worker-connect-src-blocked.html
http/tests/security/contentSecurityPolicy/worker-connect-src-allowed.html
http/tests/security/contentSecurityPolicy/worker-connect-src-blocked.html
* page/ContentSecurityPolicy.h:
(WebCore::ContentSecurityPolicy::policy):
(WebCore::ContentSecurityPolicy::headerType):
* workers/DedicatedWorkerContext.cpp:
(WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
* workers/DedicatedWorkerContext.h:
(WebCore::DedicatedWorkerContext::create):
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::create):
(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
(WebCore::DedicatedWorkerThread::createWorkerContext):
* workers/DedicatedWorkerThread.h:
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerScriptLoader::notifyFinished):
(WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
* workers/DefaultSharedWorkerRepository.h:
* workers/SharedWorkerContext.cpp:
(WebCore::SharedWorkerContext::SharedWorkerContext):
* workers/SharedWorkerContext.h:
(WebCore::SharedWorkerContext::create):
* workers/SharedWorkerThread.cpp:
(WebCore::SharedWorkerThread::create):
(WebCore::SharedWorkerThread::SharedWorkerThread):
(WebCore::SharedWorkerThread::createWorkerContext):
* workers/SharedWorkerThread.h:
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::WorkerContext):
* workers/WorkerContext.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerContext):
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::create):
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::workerThread):
* workers/WorkerThread.h:
2012-01-06 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions]Crash while collecting svg elements in render flow thread.
https://bugs.webkit.org/show_bug.cgi?id=73735
Reviewed by David Hyatt.
Tests: fast/regions/svg-doc-fragment-not-collected-expected.html
fast/regions/svg-doc-fragment-not-collected.html
fast/regions/svg-element-not-collected-expected.html
fast/regions/svg-element-not-collected.html
fast/regions/svg-root-element-collected.html
By allowing only svg root elements to be collected in a render flow thread,
the svg render tree is properly constructed, thus prevented a possible further crash.
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
2012-01-06 Eric Carlson <eric.carlson@apple.com>
Make TextTrackCue more mutable
https://bugs.webkit.org/show_bug.cgi?id=72555
Reviewed by Anders Carlsson.
Test: media/track/track-cue-mutable.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Do nothing if the "ignore cue updates"
flag is set
(WebCore::HTMLMediaElement::textTrackAddCues): Block cue updates until all of the new cues have
been added, then call updateActiveTextTrackCues so update the display if necessary.
(WebCore::HTMLMediaElement::textTrackRemoveCues): Block cue updates until all of the new cues have
been removed, then call updateActiveTextTrackCues so update the display if necessary.
(WebCore::HTMLMediaElement::textTrackAddCue): Call updateActiveTextTrackCues so update the display if necessary.
(WebCore::HTMLMediaElement::textTrackRemoveCue): Ditto.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::ignoreTrackDisplayUpdateRequests):
(WebCore::HTMLMediaElement::beginIgnoringTrackDisplayUpdateRequests):
(WebCore::HTMLMediaElement::endIgnoringTrackDisplayUpdateRequests):
* html/TextTrack.cpp:
(WebCore::TextTrack::cueWillChange): New, remove the cue from the media element because its
position in the interval tree is based on start and end times.
(WebCore::TextTrack::cueDidChange): Add the cue to the media element.
* html/TextTrack.h:
* html/TextTrackCue.cpp:
(WebCore::startKeyword): New, use a static String for the constant.
(WebCore::middleKeyword): Ditto.
(WebCore::endKeyword): Ditto.
(WebCore::horizontalKeyword): Ditto.
(WebCore::verticalKeyword): Ditto.
(WebCore::verticallrKeyword): Ditto.
(WebCore::TextTrackCue::cueWillChange): New, tell the track the cue is about to change.
(WebCore::TextTrackCue::cueDidChange): New, tell the track the cue has changed.
(WebCore::TextTrackCue::setId): New, attribute is mutable.
(WebCore::TextTrackCue::setStartTime): Ditto.
(WebCore::TextTrackCue::setEndTime): Ditto.
(WebCore::TextTrackCue::setPauseOnExit): Ditto.
(WebCore::TextTrackCue::direction): Ditto.
(WebCore::TextTrackCue::setDirection): Ditto.
(WebCore::TextTrackCue::setSnapToLines): Ditto.
(WebCore::TextTrackCue::setLinePosition): Ditto.
(WebCore::TextTrackCue::setTextPosition): Ditto.
(WebCore::TextTrackCue::setSize): Ditto.
(WebCore::TextTrackCue::alignment): Ditto.
(WebCore::TextTrackCue::setAlignment): Ditto.
(WebCore::TextTrackCue::parseSettings): Use the static strings.
* html/TextTrackCue.h:
(WebCore::TextTrackCue::id):
(WebCore::TextTrackCue::startTime):
(WebCore::TextTrackCue::endTime):
(WebCore::TextTrackCue::pauseOnExit):
* html/TextTrackCue.idl:
2012-01-06 Oliver Hunt <oliver@apple.com>
DFG no longer optimises CanvasPixelArray
https://bugs.webkit.org/show_bug.cgi?id=75729
Reviewed by Gavin Barraclough.
Remove the custom ClassInfo for CanvasPixelArray as that is
defeating ByteArray optimisation, and is no longer needed
anyway as it was only there to change the visible name.
* bindings/js/JSImageDataCustom.cpp:
(WebCore::toJS):
2012-01-06 Ken Buchanan <kenrb@chromium.org>
ASSERT failure due to combine-text with preceding spaces
https://bugs.webkit.org/show_bug.cgi?id=65147
Reviewed by David Hyatt.
A couple of ASSERTs were failing due to a parsing problem when
advancing an inline iterator to the next linebreak in a
RenderCombineText. skipLeadingWhitespace advances the iterator
over leading whitespace but when searching for the line break
nextLineBreak would call RenderCombineText::combineText(),
collapsing the text so that the iterator is pointing past the
end of it.
This patch causes combineText() to be called during
skipLeadingWhiteSpace before iteration over the RenderCombineText
begins.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextLineBreak):
(WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
2012-01-06 Anders Carlsson <andersca@apple.com>
Make ScrollAnimatorMac::snapRubberBandTimerFired use m_scrollElasticityController in more places
https://bugs.webkit.org/show_bug.cgi?id=75726
Reviewed by Sam Weinig.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::canScrollHorizontally):
(WebCore::ScrollAnimatorMac::canScrollVertically):
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
* platform/mac/ScrollElasticityController.h:
2012-01-06 Pratik Solanki <psolanki@apple.com>
WebKit1 fails to compile with USE(CFNETWORK) and HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
https://bugs.webkit.org/show_bug.cgi?id=75675
Reviewed by Oliver Hunt.
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::willCacheResponse):
2012-01-06 Abhishek Arya <inferno@chromium.org>
Crash with range selection across different documents.
https://bugs.webkit.org/show_bug.cgi?id=74285
Reviewed by Ryosuke Niwa.
Test: fast/dom/Range/range-selection-across-documents-crash.html
* page/DOMSelection.cpp:
(WebCore::DOMSelection::addRange):
2012-01-06 Sam Weinig <sam@webkit.org>
Remove unused OwnFastMallocPtr class.
https://bugs.webkit.org/show_bug.cgi?id=75722
Reviewed by Geoffrey Garen.
* ForwardingHeaders/wtf/OwnFastMallocPtr.h: Removed.
* bindings/js/JSWebGLRenderingContextCustom.cpp:
2012-01-06 Tony Chang <tony@chromium.org>
Need to relayout when stretching the height of a flex item
https://bugs.webkit.org/show_bug.cgi?id=75661
Reviewed by Ojan Vafai.
Test: css3/flexbox/flex-align-stretch.html
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computePreferredMainAxisExtent): Always clear the override size since
it may be set when aligning.
(WebCore::RenderFlexibleBox::alignChildren): Only relayout if the height changed.
2012-01-06 Anders Carlsson <andersca@apple.com>
Add ScrollElasticityControllerClient::immediateScrollBy
https://bugs.webkit.org/show_bug.cgi?id=75720
Reviewed by Andreas Kling.
Add a new ScrollElasticityControllerClient::immediateScrollBy client member function.
Also, make ScrollAnimatorMac::smoothScrollWithEvent calls go through the ScrollElasticityController
in preparation for moving that function to ScrollElasticityController.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
* platform/mac/ScrollElasticityController.h:
2012-01-06 Wei James <james.wei@intel.com>
Use VectorMath lib when possible to optimize the processing in WebAudio AudioBus
https://bugs.webkit.org/show_bug.cgi?id=75334
Reviewed by Kenneth Russell.
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::processWithGainFromMonoStereo):
2012-01-06 Jer Noble <jer.noble@apple.com>
Fullscreen video controller can't be dragged the first time I enter fullscreen
https://bugs.webkit.org/show_bug.cgi?id=75709
Reviewed by Eric Carlson.
No new tests; updated video-controls-drag.html.
When the media controls are created, check to see if we are full screen, and pass
that information to the newly created controls.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::createMediaControls):
2012-01-05 Jer Noble <jer.noble@apple.com>
Media Element: scrubbing in full-screen mode breaks playback.
https://bugs.webkit.org/show_bug.cgi?id=75650
Reviewed by John Sullivan.
Test: fullscreen/video-controls-timeline.html
Only begin scrubbing if the panel itself is the mousedown event target.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::defaultEventHandler):
2012-01-05 Jer Noble <jer.noble@apple.com>
REGRESSION (r90797): Full screen video HUD cannot be dragged horizontally
https://bugs.webkit.org/show_bug.cgi?id=75200
Reviewed by Eric Carlson.
Test: fullscreen/video-controls-drag.html
The !important rules in fullscreenQuickTime.css are overriding the styles added by the
drag operation in MediaControlElements.cpp. Give the panel a "dragged" class in setPosition
(clearing it in resetPosition) that allows the !important rules to apply only when the
panel is not dragged.
* css/fullscreenQuickTime.css:
(video:-webkit-full-screen::-webkit-media-controls-panel):
(video:-webkit-full-screen::-webkit-media-controls-panel:not(.dragged)):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::setPosition):
(WebCore::MediaControlPanelElement::resetPosition):
2012-01-05 Antti Koivisto <antti@apple.com>
REGRESSION (r104060): fast/forms/textarea-metrics.html is failing
https://bugs.webkit.org/show_bug.cgi?id=75644
Reviewed by Alexey Proskuryakov.
We need to clear the style selector on doc type change as the doc type
may affect interpretation of the stylesheets. r104060 extended the life
of the style selector in some cases, exposing this problem.
* dom/Document.cpp:
(WebCore::Document::setDocType):
2012-01-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Move listing of include paths and libs to pri files in sources
Includepaths are sometimes modified by non-Qt contributors so keeping
them in files inside Sources makes it more likely that they are updated
along with project files for the other ports.
Using pri files instead of prf files for this also has the benefit that
the include() from the main target file can be parsed and followed by
Qt Creator -- something that does not work with load().
Dependency from a target to a library through the WEBKIT variable are
handled through forwarding-files in Tools/qmake/mkspecs/modules, which
set the source root of the module and include the right pri file.
Ideally we'd use the variant of include() that takes an optional
namespace to read the variables into, or the fromfile() function,
but both of these add an overhead of about 40% on the total qmake
runtime, due to making a deep copy of all the variables in the
project or re-reading all the prf files from scratch.
Reviewed by Simon Hausmann.
Reviewed by Ossy.
* Target.pri:
* WebCore.pri: Renamed from Tools/qmake/mkspecs/features/webcore.prf.
2012-01-06 Adam Barth <abarth@webkit.org>
FrameDestructionObserver should be more full-service
https://bugs.webkit.org/show_bug.cgi?id=75690
Reviewed by Eric Seidel.
This patch moves code common to both subclasses of
FrameDestructionObserver into FrameDestructionObserver itself. As we
add more subclasses, we don't want to keep copy/pasting this code.
* page/Frame.cpp:
(WebCore::FrameDestructionObserver::FrameDestructionObserver):
(WebCore::FrameDestructionObserver::~FrameDestructionObserver):
(WebCore::FrameDestructionObserver::frameDestroyed):
* page/Frame.h:
(WebCore::FrameDestructionObserver::frame):
* plugins/DOMMimeType.cpp:
(WebCore::DOMMimeType::DOMMimeType):
(WebCore::DOMMimeType::~DOMMimeType):
* plugins/DOMMimeType.h:
* plugins/DOMPlugin.cpp:
(WebCore::DOMPlugin::DOMPlugin):
(WebCore::DOMPlugin::~DOMPlugin):
* plugins/DOMPlugin.h:
2012-01-06 Dale Curtis <dalecurtis@chromium.org>
Move MediaDocument styles into CSS. Set black background for chromium.
https://bugs.webkit.org/show_bug.cgi?id=74123
Reviewed by Eric Seidel.
Test: platform/chromium/media/video-black-bg-in-media-document.html
* css/mediaControls.css:
(body:-webkit-full-page-media):
(video:-webkit-full-page-media):
* css/mediaControlsChromium.css:
(body:-webkit-full-page-media):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
2012-01-06 Alice Boxhall <aboxhall@chromium.org>
Report correct line number for non-native editable text elements.
https://bugs.webkit.org/show_bug.cgi?id=71263
Reviewed by Ryosuke Niwa.
A non-native editable text element is an element with an ARIA role of "textbox", which is
set on an element which behaves like an editable text element (such as a textarea, text
input field or contenteditable text), but whose behaviour is controlled by the author rather
than the browser.
This change makes certain methods on Node, and related methods in htmlediting and
visible_units, aware of the notion that an element may be editable only from the point of
view of assistive technology (via the ARIA textbox role), via the EditableType enum added to
EditingBoundary.h.
This is so that AccessibilityObject::lineForPosition() can use previousLinePosition(), and
AccessibilityRenderObject::indexForVisiblePosition() can use highestEditableRoot(), in a way
that respects non-native editability.
Test: accessibility/textbox-role-reports-line-number.html
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::rootAXEditableElement): Returns the root element which is
editable from the point of view of assistive technology, whether natively or otherwise.
(WebCore::AXObjectCache::nodeIsTextControl): Whether the given node is considered an
editable text element by assistive technology, natively or otherwise.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::lineForPosition): Modified to request the previous line
position in an element which is editable to Accessibility.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::indexForVisiblePosition): Modified to request the
highest root element which is editable to Accessibility.
* dom/Node.cpp:
(WebCore::Node::rendererIsEditableToAccessibility): Whether this node is editable to
Accessibility for the given EditableLevel.
(WebCore::Node::rootEditableElement): Overloaded version of this method which takes an
EditableType enum value indicating whether non-native editability is to be respected.
* dom/Node.h:
(WebCore::Node::rendererIsEditable): Overloaded version of this method which takes an
EditableType enum value indicating whether non-native editability is to be respected.
(WebCore::Node::rendererIsRichlyEditable): Overloaded version of this method which takes
an EditableType enum value indicating whether non-native editability is to be respected.
* editing/EditingBoundary.h:
* editing/htmlediting.cpp:
(WebCore::highestEditableRoot): Added optional EditableType parameter.
(WebCore::isEditablePosition): Added optional EditableType parameter.
(WebCore::isRichlyEditablePosition): Added optional EditableType parameter.
(WebCore::editableRootForPosition): Added optional EditableType parameter.
* editing/htmlediting.h:
* editing/visible_units.cpp:
(WebCore::previousLeafWithSameEditability): Added optional EditableType parameter.
(WebCore::previousLinePosition): Added optional EditableType parameter.
(WebCore::nextLeafWithSameEditability): Added optional EditableType parameter.
(WebCore::nextLinePosition): Added optional EditableType parameter.
* editing/visible_units.h:
2012-01-05 Kent Tamura <tkent@chromium.org>
Fix a crash by importing an element of which local name ends with ":input".
https://bugs.webkit.org/show_bug.cgi?id=75103
Reviewed by Ryosuke Niwa.
Test: fast/dom/importNode-confusing-localName.html
* dom/Document.cpp:
(WebCore::Document::importNode): Pass QualifiedName of the source elemnt
to createElement() in order to avoid unnecessary serialization and
parsing of the qualified name
2012-01-06 Alexis Menard <alexis.menard@openbossa.org>
Move HTMLFormControlElementWithState class in its own header file.
https://bugs.webkit.org/show_bug.cgi?id=75482
Reviewed by Kent Tamura.
Move HTMLFormControlElementWithState class which was mixed in HTMLFormControlElement
files into its own header file and its own implementation file.
No new tests : the existing ones should cover the refactoring.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLElementsAllInOne.cpp:
* html/HTMLFormControlElement.cpp:
* html/HTMLFormControlElement.h:
* html/HTMLKeygenElement.h:
* html/HTMLSelectElement.h:
* html/HTMLTextFormControlElement.h:
2012-01-06 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r104268.
http://trac.webkit.org/changeset/104268
https://bugs.webkit.org/show_bug.cgi?id=75689
It broke the mac build (Requested by Ossy on #webkit).
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLElementsAllInOne.cpp:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
(WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
(WebCore::HTMLFormControlElementWithState::didMoveToNewDocument):
(WebCore::HTMLFormControlElementWithState::shouldAutocomplete):
(WebCore::HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState):
(WebCore::HTMLFormControlElementWithState::finishParsingChildren):
* html/HTMLFormControlElement.h:
(WebCore::HTMLFormControlElementWithState::canContainRangeEndPoint):
(WebCore::HTMLFormControlElementWithState::saveFormControlState):
(WebCore::HTMLFormControlElementWithState::restoreFormControlState):
* html/HTMLFormControlElementWithState.cpp: Removed.
* html/HTMLFormControlElementWithState.h: Removed.
* html/HTMLKeygenElement.h:
* html/HTMLSelectElement.h:
* html/HTMLTextFormControlElement.h:
2012-01-06 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r104259 and r104261.
http://trac.webkit.org/changeset/104259
http://trac.webkit.org/changeset/104261
https://bugs.webkit.org/show_bug.cgi?id=75688
Caused assertion failures (Requested by rniwa on #webkit).
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::takeAllChildrenFrom):
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::removeBetween):
(WebCore::ContainerNode::removeChildren):
(WebCore::ContainerNode::appendChild):
(WebCore::ContainerNode::parserAddChild):
* dom/DOMAllInOne.cpp:
* dom/Document.cpp:
(WebCore::Document::setDocType):
(WebCore::Document::adoptNode):
* dom/Element.cpp:
(WebCore::Element::removeShadowRoot):
* dom/Node.cpp:
(WebCore::Node::setDocument):
(WebCore::Node::setTreeScopeRecursively):
(WebCore::Node::setDocumentRecursively):
(WebCore::Node::didMoveToNewDocument):
* dom/Node.h:
* dom/TreeScope.cpp:
* dom/TreeScope.h:
* dom/TreeScopeAdopter.cpp: Removed.
* dom/TreeScopeAdopter.h: Removed.
2012-01-05 Dan Bernstein <mitz@apple.com>
<rdar://problem/10633760> Update copyright strings
Reviewed by Mark Rowe.
* Info.plist:
2012-01-05 Alexis Menard <alexis.menard@openbossa.org>
Move HTMLFormControlElementWithState class in its own header file.
https://bugs.webkit.org/show_bug.cgi?id=75482
Reviewed by Kent Tamura.
Move HTMLFormControlElementWithState class which was mixed in HTMLFormControlElement
files into its own header file and its own implementation file.
No new tests : the existing ones should cover the refactoring.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLElementsAllInOne.cpp:
* html/HTMLFormControlElement.cpp:
* html/HTMLFormControlElement.h:
* html/HTMLKeygenElement.h:
* html/HTMLSelectElement.h:
* html/HTMLTextFormControlElement.h:
2012-01-05 Wei James <james.wei@intel.com>
Optimize with memcpy instead of copying frame by frame in Realtimeanalyser::doFFTAnalysis
https://bugs.webkit.org/show_bug.cgi?id=74693
Reviewed by Kenneth Russell.
* webaudio/RealtimeAnalyser.cpp:
(WebCore::RealtimeAnalyser::doFFTAnalysis):
2012-01-05 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r104210): Dromaeo DOM test score is lower
https://bugs.webkit.org/show_bug.cgi?id=75679
Reviewed by Andreas Kling.
The regression was caused by isDomVersionConsistent not being able to obtain the tree version
inside isLengthCacheValid when m_cachedItem is null. Fix the regression by always setting
m_cachedItem to some node when caching the length so that we can obtain the tree version later.
Also address Antti's review comment to fit m_cachedLength, m_isLengthCacheValid, and
m_isItemCacheValid all in 32-bit.
* dom/DynamicNodeList.cpp:
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::setLengthCache):
2012-01-05 Hajime Morrita <morrita@chromium.org>
Unreviewed bad merge fix for r104259 which dropped a line from r104210.
* dom/TreeScopeAdopter.cpp:
(WebCore::TreeScopeAdopter::moveTreeToNewScope):
2012-01-05 Yongjun Zhang <yongjun_zhang@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=75593
Reviewed by Alexey Proskuryakov.
Null-check 'page' variable before use, to follow the common usage pattern of m_frame->page()
throughout the rest of FrameView.cpp.
* page/FrameView.cpp:
(WebCore::FrameView::notifyPageThatContentAreaWillPaint):
2012-01-04 Hajime Morrita <morrita@chromium.org>
[Refactoring] Moving between TreeScopes should be done by its own class.
https://bugs.webkit.org/show_bug.cgi?id=75290
Reviewed by Ryosuke Niwa.
This change extracted Node::setTreeScopeRecursively(),
setDocumentRecursively() and a part of setDocument() into a new
class called TreeScopeAdopter. By doing this, the idea of
moving a node from scope to scope, that was originally hidden
behind the forest of Node APIs, has become clearer.
Note that this change is a preparation for Bug 59816.
No new tests. No behavioral change.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/ContainerNode.cpp: Followed the renaming.
(WebCore::ContainerNode::takeAllChildrenFrom):
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::removeBetween):
(WebCore::ContainerNode::removeChildren):
(WebCore::ContainerNode::appendChild):
(WebCore::ContainerNode::parserAddChild):
* dom/DOMAllInOne.cpp:
* dom/Document.cpp: Followed te renaming.
(WebCore::Document::setDocType):
(WebCore::Document::adoptNode):
* dom/Element.cpp: Followed te renaming.
(WebCore::Element::removeShadowRoot):
* dom/Node.cpp:
(WebCore::Node::setDocument):
(WebCore::Node::setTreeScope):
(WebCore::Node::didMoveToNewDocument):
* dom/Node.h:
* dom/TreeScope.h:
* dom/TreeScope.cpp:
(WebCore::TreeScope::adoptIfNeeded): moved from setTreeScopeRecursively()
* dom/TreeScopeAdopter.cpp: Added.
(WebCore::TreeScopeAdopter::TreeScopeAdopter):
(WebCore::TreeScopeAdopter::moveTreeToNewScope):
(WebCore::TreeScopeAdopter::moveTreeToNewDocument):
(WebCore::TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled):
(WebCore::TreeScopeAdopter::moveNodeToNewDocument):
* dom/TreeScopeAdopter.h: Added.
(WebCore::TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled):
(WebCore::TreeScopeAdopter::execute):
(WebCore::TreeScopeAdopter::needsScopeChange()):
(WebCore::TreeScopeAdopter::shadowRootFor):
2012-01-05 Jochen Eisinger <jochen@chromium.org>
Disallow access to DOM storage from detached frames.
https://bugs.webkit.org/show_bug.cgi?id=61326
Reviewed by Adam Barth.
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame):
2012-01-05 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][Texmap] Convert shaders in TextureMapperGL to use a macro
https://bugs.webkit.org/show_bug.cgi?id=75598
Use VERTEX_SHADER() and FRAGMENT_SHADER() macros, instead of quoted string literals when
declaring shaders in TextureMapperGL.
We need two macros to account for the differences between OpenGL and OpenGL ES2.
Reviewed by Martin Robinson.
2012-01-05 Ryosuke Niwa <rniwa@webkit.org>
sizeof(CSSRule) is 20 instead of 12 on Windows
https://bugs.webkit.org/show_bug.cgi?id=75665
Reviewed by Darin Fisher.
Unlike gcc and clang, MSVC pads each consecutive member variables of the same type
in bitfields. e.g. if you have:
sturct AB {
unsigned m_1 : 31;
bool m_2 : 1;
}
then MSVC pads m_1 and allocates sizeof(unsigned) * 2 for AB whereas gcc and clang
only allocate sizeof(unsigned) * 1 for AB.
Fix the bloat by turning all bitfields in CSSRule either signed or unsigned integers.
* css/CSSRule.cpp:
* css/CSSRule.h:
(WebCore::CSSRule::sourceLine):
(WebCore::CSSRule::setSourceLine):
(WebCore::CSSRule::hasCachedSelectorText):
(WebCore::CSSRule::setHasCachedSelectorText):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::CSSStyleRule):
(WebCore::CSSStyleRule::cleanup):
(WebCore::CSSStyleRule::selectorText):
(WebCore::CSSStyleRule::setSelectorText):
* css/CSSStyleRule.h:
2012-01-05 David Grogan <dgrogan@chromium.org>
IndexedDB: fix cursor prefetch crash
http://crbug.com/108071
https://bugs.webkit.org/show_bug.cgi?id=75596
Reviewed by Tony Chang.
Test: storage/indexeddb/prefetch-bugfix-108071.html
Note: DumpRenderTree doesn't exercise the bug, it only occurs in
multi-process chromium. The layout test will soon be run as a
chromium ui test: http://codereview.chromium.org/9108004
* storage/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
(WebCore::IDBCursorBackendImpl::~IDBCursorBackendImpl): Destroy
cursors before their objectstores.
(WebCore::IDBCursorBackendImpl::prefetchReset): Don't run continue if
the cursor is closed.
(WebCore::IDBCursorBackendImpl::close): Set a closed flag.
* storage/IDBCursorBackendImpl.h:
2012-01-04 James Robinson <jamesr@chromium.org>
[chromium] Route all animate calls through CCLayerTreeHost in composited mode to simplify rate limiting logic
https://bugs.webkit.org/show_bug.cgi?id=75577
Reviewed by Darin Fisher.
This internalizes the animation rate limiting logic to CCLayerTreeHost and removes the setters/getters for the
m_animating flag. This requires that all animation updates have to go through CCLayerTreeHost to get the right
rate limiting behavior, regardless of which proxy is being used.
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::updateAnimations):
(WebCore::CCLayerTreeHost::layout):
(WebCore::CCLayerTreeHost::startRateLimiter):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::beginFrameAndCommit):
2012-01-05 Justin Novosad <junov@chromium.org>
[Chromium] NativeImageSkia should mark SkBitmaps as immutable
https://bugs.webkit.org/show_bug.cgi?id=74962
Removed m_isDataComplete from class NativeImageSkia. Instead, data
completeness will be tracked through SkBitmap::setImmutable/
isImmutable. The immutable state signifies that the pixel data
will no longer change for the lifetime of the bitmap, which corresponds
to the semantic of the old m_isDataComplete member. setImmutable is
also called on the cached resized bitmap, since it too is invariant for
its life time. Temporary resized bitmaps are also marked as immutable
since they technically are.
Reviewed by Stephen White.
* platform/graphics/skia/NativeImageSkia.cpp:
(WebCore::NativeImageSkia::NativeImageSkia):
(WebCore::NativeImageSkia::resizedBitmap):
(WebCore::NativeImageSkia::shouldCacheResampling):
* platform/graphics/skia/NativeImageSkia.h:
(WebCore::NativeImageSkia::setDataComplete):
(WebCore::NativeImageSkia::isDataComplete):
2012-01-05 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r104231.
http://trac.webkit.org/changeset/104231
https://bugs.webkit.org/show_bug.cgi?id=75668
Breaks the Qt build (Requested by abarth on #webkit).
* platform/SchemeRegistry.cpp:
* platform/SchemeRegistry.h:
2012-01-05 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=75654
Text fields should draw using NSTextFieldCell instead of WebKitSystemInterface
Reviewed by John Sullivan.
This change should not have any affect on tests or real web sites. It just changed
the implementation under the hood to the more modern NSCell approach.
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintTextField):
(WebCore::RenderThemeMac::textField):
2012-01-05 Ryosuke Niwa <rniwa@webkit.org>
Add a compile-time assertion for the size of CSSValue
https://bugs.webkit.org/show_bug.cgi?id=75635
Reviewed by Tony Chang.
Tightened the compile-time assertion.
* css/CSSValue.cpp:
2012-01-05 Adam Barth <abarth@webkit.org>
[V8] CodeGeneration for SerializedScriptValue doesn't play nice with [Constructor]
https://bugs.webkit.org/show_bug.cgi?id=75641
Reviewed by David Levin.
Rather than generate getters for SerializedScriptValues, we eagerly
deserialize them into JavaScript objects. However, previously, we were
only doing that for DOM wrappers created by taking an existing C++
object and wrapping it. For objects created with Constructors (e.g.,
those with the [Constructor] attribute), we need to do this eager
deserialization during the constructor as well.
This bug isn't observable yet, but it is causing the WebIntent test
being added in Bug 73051 to fail.
Test: TestSerializedScriptValueInterface.idl
webintents/web-intents-api.html (after Bug 73051 lands)
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateEagerDeserialization):
(GenerateConstructorCallback):
(GenerateNamedConstructorCallback):
(GenerateImplementation):
(GenerateToV8Converters):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::getConstructData):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/TestSerializedScriptValueInterface.idl:
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::V8TestInterface::constructorCallback):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructorConstructorCallback):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::V8TestObj::constructorCallback):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
(WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2012-01-05 Adam Barth <abarth@webkit.org>
Introduce Platform namespace for WebCore/platform
https://bugs.webkit.org/show_bug.cgi?id=75653
Reviewed by Eric Seidel.
This patch introduces the Platform namespace for WebCore/platform.
Introducing this namespace will help us find and fix layering
violations in preparation for moving WebCore/platform to Platform.
* platform/SchemeRegistry.cpp:
* platform/SchemeRegistry.h:
2012-01-05 Ryosuke Niwa <rniwa@webkit.org>
Inserting nodes is slow due to Node::notifyNodeListsAttributeChanged (20%+)
https://bugs.webkit.org/show_bug.cgi?id=73853
Reviewed by Antti Koivisto.
Lazily invalidate the node list caches instead of invaliding them at the time of modification. We use
the DOM tree version to detect whether caches need to be invalidated or not. We now invalidate caches more
frequently after this patch (in particular, invalidates caches that are stored on nodes not present in
the ancestry of the modified nodes); however, our study on major Web sites such as Gmail, Facebook, Twitter,
etc... indicate that about 1% of real-world usage benefits from keeping the caches alive across different
DOM tree versions.
In order to invalidate caches lazily, this patch adds replaces the type of m_caches in DynamicSubtreeNodeList
by DynamicSubtreeNodeList::SubtreeCaches which encapsulates member variables in DynamicNodeList::Caches and
invalidates values as needed. Also this change allows m_caches to be allocated as a part of
DynamicSubtreeNodeList instead of a separate ref-counted object.
* dom/Attr.cpp:
(WebCore::Attr::setValue):
(WebCore::Attr::childrenChanged):
* dom/DynamicNodeList.cpp:
(WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
(WebCore::DynamicSubtreeNodeList::length):
(WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
(WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
(WebCore::DynamicSubtreeNodeList::item):
(WebCore::DynamicSubtreeNodeList::invalidateCache):
(WebCore::DynamicNodeList::Caches::create):
(WebCore::DynamicNodeList::Caches::reset):
* dom/DynamicNodeList.h:
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::SubtreeCaches): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::isLengthCacheValid): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::isItemCacheValid): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedLength): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItem): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItemOffset): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::setLengthCache): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::setItemCache): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::reset): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::domVersionIsConsistent): Added.
* dom/Element.cpp:
(WebCore::Element::updateAfterAttributeChanged):
* dom/Node.cpp:
(WebCore::Node::setTreeScopeRecursively): Clear caches when a node moves from one document to another.
(WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Only clears child node list of Attr.
(WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Only clears child node list.
(WebCore::NodeListsNodeData::invalidateCaches): Merged with invalidateCachesThatDependOnAttributes.
* dom/Node.h:
* dom/NodeRareData.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseMappedAttribute):
* html/HTMLLabelElement.cpp:
* html/HTMLLabelElement.h:
2012-01-05 Ojan Vafai <ojan@chromium.org>
IE quirk for percentage size on a table element doesn't work with orthogonal writing modes
https://bugs.webkit.org/show_bug.cgi?id=70195
Reviewed by Eric Seidel.
Remove this quirk entirely. Mozilla and Opera don't implement it and IE
doesn't restrict the quirk to standards mode. As it's unlikely for
webkit-only content to hit this quirk (e.g. use tables for layout),
it should be relatively safe to match Mozilla/Opera here.
Test: fast/writing-mode/table-percent-width-quirk.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
2012-01-05 Tien Ren Chen <trchen@chromium.org>
[chromium] Add CCTimer class for the compositor
https://bugs.webkit.org/show_bug.cgi?id=74769
Reviewed by James Robinson.
Add a simple timer class for CCThread that the timered task can be
manually cancelled.
* WebCore.gypi:
* platform/graphics/chromium/cc/CCTimer.cpp: Added.
(WebCore::CCTimerTask::CCTimerTask):
(WebCore::CCTimerTask::~CCTimerTask):
(WebCore::CCTimerTask::performTask):
(WebCore::CCTimer::CCTimer):
(WebCore::CCTimer::~CCTimer):
(WebCore::CCTimer::startOneShot):
(WebCore::CCTimer::stop):
* platform/graphics/chromium/cc/CCTimer.h: Added.
(WebCore::CCTimerClient::~CCTimerClient):
(WebCore::CCTimer::isActive):
2012-01-05 Eric Carlson <eric.carlson@apple.com>
Implement temporal dimension portion of Media Fragments URI specification for video/audio
https://bugs.webkit.org/show_bug.cgi?id=65838
Reviewed by Sam Weinig.
Tests: media/media-fragments/TC0001-TC0009.html
media/media-fragments/TC0010-TC0019.html
media/media-fragments/TC0020-TC0029.html
media/media-fragments/TC0030-TC0039.html
media/media-fragments/TC0040-TC0049.html
media/media-fragments/TC0050-TC0059.html
media/media-fragments/TC0060-TC0069.html
media/media-fragments/TC0070-TC0079.html
media/media-fragments/TC0080-TC0089.html
media/media-fragments/TC0090-TC0099.html
* CMakeLists.txt: Add fragment parser files.
* GNUmakefile.list.am: Ditto.
* Target.pri: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_fragmentStartTime and m_fragmentEndTime.
(WebCore::HTMLMediaElement::setReadyState): Check for and parse a media fragment once readyState
reaches HAVE_METADATA, apply it once it reaches HAVE_CURRENT_DATA.
(WebCore::HTMLMediaElement::initialTime): Return the fragment start time if possible.
(WebCore::HTMLMediaElement::playbackProgressTimerFired): Pause if the time is >= the fragment
end time.
(WebCore::HTMLMediaElement::prepareMediaFragmentURI): Look for a temporal fragment.
(WebCore::HTMLMediaElement::applyMediaFragmentURI): Apply the fragment, if any.
* html/HTMLMediaElement.h:
* html/MediaFragmentURIParser.cpp: Added.
(WebCore::skipWhiteSpace):
(WebCore::collectDigits):
(WebCore::collectFraction):
(WebCore::MediaFragmentURIParser::invalidTimeValue):
(WebCore::MediaFragmentURIParser::MediaFragmentURIParser):
(WebCore::MediaFragmentURIParser::startTime):
(WebCore::MediaFragmentURIParser::endTime):
(WebCore::MediaFragmentURIParser::parseFragments):
(WebCore::MediaFragmentURIParser::parseTimeFragment):
(WebCore::MediaFragmentURIParser::parseNPTFragment):
(WebCore::MediaFragmentURIParser::parseNPTTime):
* html/MediaFragmentURIParser.h: Added.
(WebCore::MediaFragmentURIParser::~MediaFragmentURIParser):
(WebCore::MediaFragmentURIParser::create):
2012-01-05 ChangSeok Oh <shivamidow@gmail.com>
Remove style warning in GraphicsContext3DOpenGL.cpp
https://bugs.webkit.org/show_bug.cgi?id=75466
Reviewed by Kenneth Russell.
Relocated some headers according to alphabetical order & modified indentation.
And used OwnArrayPtr to deal with character array.
No new tests required.
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::getString):
(WebCore::GraphicsContext3D::releaseShaderCompiler):
(WebCore::GraphicsContext3D::getProgramInfoLog):
(WebCore::GraphicsContext3D::getShaderiv):
(WebCore::GraphicsContext3D::getShaderInfoLog):
(WebCore::GraphicsContext3D::getShaderSource):
2012-01-05 Ken Buchanan <kenrb@chromium.org>
Crash due to reparenting of relpositioned object under anonymous block
https://bugs.webkit.org/show_bug.cgi?id=70848
The associated test case creates a condition where a relative
positioned renderer is a descendant of an anonymous block for a
table column. The anonymous block is the containingBlock() for the
relpositioned renderer. Removal of a div causes the anonymous blocks to
be merged, and the renderer becomes a descendant of a different block.
Since the new containingBlock() has an empty positionedObject list,
the relpositioned renderer does not get layout after being dirtied.
This patch changes containingBlock() so that it returns the container
of an anonymous block for positioned objects, not the anonymous
block itself. It also adds an ASSERT to insertPositionedObject()
to flag any other cases where something is trying to create a
positioned object list on an anonymous block.
Reviewed by David Hyatt.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::insertPositionedObject):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock):
2012-01-05 Jian Li <jianli@chromium.org>
FileReader needs addEventListener
https://bugs.webkit.org/show_bug.cgi?id=42723
Reviewed by Adam Barth.
Test: fast/files/file-reader-event-listener.html
* fileapi/FileReader.idl:
2012-01-04 Pratik Solanki <psolanki@apple.com>
Remove deprecated calls from CookieJarCFNet.cpp
https://bugs.webkit.org/show_bug.cgi?id=68958
Reviewed by Sam Weinig.
* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::cookieDomain):
(WebCore::cookieExpirationTime):
(WebCore::cookieName):
(WebCore::cookiePath):
(WebCore::cookieValue):
2012-01-05 Fady Samuel <fsamuel@chromium.org>
Move scalePageBy from eventSender to window.internals
https://bugs.webkit.org/show_bug.cgi?id=64512
Reviewed by Simon Fraser.
Added setPageScaleFactor to window.internals.
Renamed window.internals.getPageScaleFactor to window.internals.pageScaleFactor
to match the webkit style.
* testing/Internals.cpp:
(WebCore::Internals::pageScaleFactor):
(WebCore::Internals::setPageScaleFactor):
* testing/Internals.h:
* testing/Internals.idl:
2012-01-05 Cary Clark <caryclark@google.com>
[Skia Mac] Rounded bezel style button needs one more local graphics context to scale
https://bugs.webkit.org/show_bug.cgi?id=75623
http://code.google.com/p/chromium/issues/detail?id=108749
In paintButton(), the local context is set up first, and later the context is
scaled if there's a zoomFactor. Skia creates the CoreGraphics context to draw the
button into without that scale factor. To fix this, another local context is added
after the parameter context scale, before the button draw. The first local context
is still required to restore the parameter context state.
Reviewed by Stephen White.
* platform/chromium/ThemeChromiumMac.mm:
(WebCore::paintButton):
2012-01-05 Alexis Menard <alexis.menard@openbossa.org>
getComputedStyle for background is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=75539
Reviewed by Tony Chang.
Implement getComputedStyle for background.
Test: fast/css/getComputedStyle/getComputedStyle-background-shorthand.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2012-01-05 Ryosuke Niwa <rniwa@webkit.org>
DOM Attribute tests on Dromaeo spends 2.7% of time in hasSelectorForAttribute
https://bugs.webkit.org/show_bug.cgi?id=75569
Reviewed by Andreas Kling.
Check needsStyleRecalc() first to avoid unnecessary hash lookups.
* dom/Element.cpp:
(WebCore::Element::recalcStyleIfNeededAfterAttributeChanged):
2012-01-05 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[EFL] Replace alloca to C++ new placement.
https://bugs.webkit.org/show_bug.cgi?id=72017
Reviewed by Andreas Kling.
Replaces alloca to C++ new placement as it is not very portable.
It allows to skip checking of memory allocation as new never returns NULL.
According to Edje's documentation type of val (member of Edje_Message_Float_Set)
is double so I changed it to avoid undefined behaviour.
* platform/efl/ScrollbarEfl.cpp:
(ScrollbarEfl::updateThumbPositionAndProportion):
2012-01-05 Benjamin Poulain <bpoulain@apple.com>
Remove duplicate file references from WebCore.xcodeproj
https://bugs.webkit.org/show_bug.cgi?id=75581
Reviewed by Andreas Kling.
Many generated DOMSVG files had two references.
In platform/graphics, there was two arm directory
with the same files related to ARM Neon.
* WebCore.xcodeproj/project.pbxproj:
2012-01-05 Antti Koivisto <antti@apple.com>
Improve SelectorChecker::determineSelectorScopes
https://bugs.webkit.org/show_bug.cgi?id=75619
Reviewed by Andreas Kling.
SelectorChecker::determineSelectorScopes currently searches to the end of the selector chain and
then sees if the last one is suitable to be a scope. A better algorithm will find a scope from
anywhere in the chain.
With this patch we search the whole chain for potential scopes. We now prefer id scopes
over class scopes. Scopes can be found for rules using sibling selectors too.
On both engadget.com and nytimes.com, we can now skip one more full style recalc due to
the improved stylesheet analysis.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::determineSelectorScopes):
2012-01-05 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use the default screen in PlatformScreenGtk methods when they are called with a NULL widget
https://bugs.webkit.org/show_bug.cgi?id=75620
Reviewed by Philippe Normand.
We are currently retuning an empty rectangle for
screenRect/screenAvailableRect and 0 for getVisual.
* platform/gtk/PlatformScreenGtk.cpp:
(WebCore::getVisual):
(WebCore::screenRect):
(WebCore::screenAvailableRect):
2012-01-05 Alpha Lam <hclam@chromium.org>
Unreviewed. Build fix.
Adding missing const_cast<> to fix compilation failures due to r104143.
* platform/audio/VectorMath.cpp:
(WebCore::VectorMath::zvmul):
2012-01-05 Adam Barth <abarth@webkit.org>
Move Gamepad declarations from Navigator.idl into Modules/gamepad
https://bugs.webkit.org/show_bug.cgi?id=75559
Reviewed by Eric Seidel.
This patch moves the gamepad-related declarations in Navigator.idl into
Modules/gamepad. The next step is to move the state into
Modules/gamepad as well.
* Modules/gamepad/NavigatorGamepad.cpp: Added.
(WebCore::NavigatorGamepad::NavigatorGamepad):
(WebCore::NavigatorGamepad::~NavigatorGamepad):
(WebCore::NavigatorGamepad::webkitGamepads):
* Modules/gamepad/NavigatorGamepad.h: Added.
* Modules/gamepad/NavigatorGamepad.idl: Added.
* WebCore.gypi:
* page/Navigator.cpp:
(WebCore::Navigator::gamepads):
* page/Navigator.h:
* page/Navigator.idl:
2012-01-05 Alexis Menard <alexis.menard@openbossa.org>
getComputedStyle for border-image is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=75347
Reviewed by Tony Chang.
Implement getComputedStyle for border-color.
fast/css/getComputedStyle/computed-style-border-image.html was extended to cover the
new feature.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2012-01-05 Xingnan Wang <xingnan.wang@intel.com>
Add a SSE2 optimized function zvmul in VectorMatch
https://bugs.webkit.org/show_bug.cgi?id=74842
Reviewed by Kenneth Russell.
Use zvmul in FFTFrameFFMPEG.cpp::multiply() and FFTFrameMac.cpp::multiply().
* platform/audio/VectorMath.cpp:
(WebCore::VectorMath::zvmul):
* platform/audio/VectorMath.h:
* platform/audio/ffmpeg/FFTFrameFFMPEG.cpp:
(WebCore::FFTFrame::multiply):
* platform/audio/mac/FFTFrameMac.cpp:
(WebCore::FFTFrame::multiply):
2012-01-05 Alpha Lam <hclam@chromium.org>
Unreviewed. Build fix for Chromium Mac Clang build.
Push using namespace WTF to .cpp file from .h file.
* platform/text/TextCodecASCIIFastPath.h:
* platform/text/TextCodecLatin1.cpp:
* platform/text/TextCodecUTF8.cpp:
2012-01-05 Max Vujovic <mvujovic@adobe.com>
WebKit adds vertical paddings and borders to the fixed width of CSS tables
https://bugs.webkit.org/show_bug.cgi?id=74955
Reviewed by Julien Chaffraix.
Test: fast/table/css-table-width.html
* rendering/RenderTable.cpp:
(WebCore::RenderTable::computeLogicalWidth):
Changed the width calculation for CSS tables to take into account horizontal
paddings and borders instead of vertical paddings and borders.
2012-01-05 Peter Beverloo <peter@chromium.org>
[Chromium] Upstream the RenderTheme and ScrollbarTheme for Android
https://bugs.webkit.org/show_bug.cgi?id=74614
Reviewed by Adam Barth.
Upstream the RenderTheme and ScrollbarTheme for Android. These are
mostly derived from their Linux variants.
RenderThemeChromiumAndroid inherits from RenderThemeChromiumLinux and
only overrides the three methods which have different behavior.
Scrollbars will be drawn in the threaded compositor for Android (which
will be upstreamed later), but for increased layout test parity we'll
match Chromium-Linux.
No new tests. This code will be exercised by existing layout tests, and
by manually verifying that theme parts render as expected.
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* platform/chromium/ScrollbarThemeChromiumAndroid.cpp: Added.
(WebCore::ScrollbarTheme::nativeTheme):
(WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
(WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
(WebCore::ScrollbarThemeChromiumAndroid::shouldCenterOnThumb):
(WebCore::ScrollbarThemeChromiumAndroid::buttonSize):
(WebCore::ScrollbarThemeChromiumAndroid::minimumThumbLength):
* platform/chromium/ScrollbarThemeChromiumAndroid.h: Added.
* rendering/RenderThemeChromiumAndroid.cpp: Added.
(WebCore::RenderThemeChromiumAndroid::create):
(WebCore::RenderTheme::themeForPage):
(WebCore::RenderThemeChromiumAndroid::~RenderThemeChromiumAndroid):
(WebCore::RenderThemeChromiumAndroid::systemColor):
(WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle):
* rendering/RenderThemeChromiumAndroid.h: Added.
* rendering/RenderThemeChromiumLinux.cpp:
* rendering/RenderThemeChromiumLinux.h:
2012-01-05 Allan Sandfeld Jensen <allan.jensen@nokia.com>
Fix potential superlinear runtime of multiple indirect adjenceny combinators.
https://bugs.webkit.org/show_bug.cgi?id=75083
Reviewed by Antti Koivisto.
A sequence of indirect adjencency combinator such as "li ~ li ~ la" could with the
former algorithm potentially do an quadratic number of element matches.
The recursive matching algorithm now detects cases where all siblings have
failed one indirect sibling match and fails the entire selector.
Test: perf/nested-combined-selectors.html
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkSelector): Return SelectorFailsAllSiblings when
all siblings have failed a selector component.
* css/SelectorChecker.h: Add SelectorFailsAllSiblings enum value
2012-01-05 Andreas Kling <awesomekling@apple.com>
InspectorStyleSheet: Avoid cloning CSSRuleLists.
<http://webkit.org/b/75603>
Reviewed by Ryosuke Niwa.
Don't filter out @charset rules from CSSRuleLists. This was forcing us to clone
the stylesheet rule list, and is unnecessary since InspectorStyleSheet disregards
any rule that isn't either a style rule or a rule with an internal rule list.
* inspector/InspectorStyleSheet.cpp:
(WebCore::asCSSRuleList):
(WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
Don't pass omitCharsetRules=true to the CSSRuleList constructor.
2012-01-05 Andreas Kling <awesomekling@apple.com>
Make elements with attributes smaller by eliminating the ref count in NamedNodeMap.
<http://webkit.org/b/75068>
Reviewed by Antti Koivisto.
Remove NamedNodeMap's inheritance from RefCounted and forward the ref()/deref()
calls to its owner Element, effectively reducing the size of an element that has
attributes by 4 bytes.
This reduces memory consumption by 311 kB when viewing the full HTML5 spec.
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::ref):
(WebCore::NamedNodeMap::deref):
Added. Forwards the operation to m_element. Only ever used by the DOM wrappers.
* dom/NamedNodeMap.h:
(WebCore::NamedNodeMap::create):
* dom/DocumentType.h:
* dom/Element.cpp:
(WebCore::Element::parserSetAttributeMap):
* dom/Element.h:
* html/parser/HTMLConstructionSite.cpp:
* html/parser/HTMLToken.h:
(WebCore::AtomicHTMLToken::AtomicHTMLToken):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processFakeStartTag):
(WebCore::HTMLTreeBuilder::attributesForIsindexInput):
* html/parser/HTMLTreeBuilder.h:
* html/parser/TextDocumentParser.cpp:
(WebCore::TextDocumentParser::insertFakePreElement):
* xml/parser/MarkupTokenBase.h:
(WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
(WebCore::AtomicMarkupTokenBase::takeAttributes):
* xml/parser/XMLToken.h:
(WebCore::AtomicXMLToken::AtomicXMLToken):
Store NamedNodeMap in OwnPtr/PassOwnPtr, rather than RefPtr/PassRefPtr.
2012-01-05 Benjamin Poulain <benjamin@webkit.org>
Improve charactersAreAllASCII() to compare multiple characters at a time
https://bugs.webkit.org/show_bug.cgi?id=74063
Reviewed by Darin Adler.
Move some part of TextCodecASCIIFastPath.h to WTF in ASCIIFastPath.h.
The function isAllASCII() is changed to the template version which now works
with both LChar and UChar.
* ForwardingHeaders/wtf/text/ASCIIFastPath.h: Added.
* platform/text/TextCodecASCIIFastPath.h:
(WebCore::copyASCIIMachineWord):
* platform/text/TextCodecLatin1.cpp:
(WebCore::TextCodecLatin1::decode):
* platform/text/TextCodecUTF8.cpp:
(WebCore::TextCodecUTF8::decode):
2012-01-05 Eric Uhrhane <ericu@chromium.org>
[fileapi] WebKitFlags should not be constructable per Directories & System spec
https://bugs.webkit.org/show_bug.cgi?id=68916
Reviewed by Eric Seidel.
Remove IDL for the object and all DOM references to it.
* fileapi/WebKitFlags.idl: Removed.
* page/DOMWindow.idl:
* workers/WorkerContext.idl:
Remove references to the JSC/V8 objects compiled from the IDL.
* bindings/js/JSDirectoryEntryCustom.cpp:
(WebCore::JSDirectoryEntry::getFile):
(WebCore::JSDirectoryEntry::getDirectory):
* bindings/js/JSDirectoryEntrySyncCustom.cpp:
(WebCore::getFlags):
* bindings/v8/custom/V8DirectoryEntryCustom.cpp:
(WebCore::V8DirectoryEntry::getDirectoryCallback):
(WebCore::V8DirectoryEntry::getFileCallback):
* bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp:
(WebCore::getFlags):
Fix up build files.
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* WebCore/CMakeLists.txt:
* WebCore/CodeGenerators.pri:
* WebCore/DerivedSources.cpp:
* WebCore/DerivedSources.make:
* WebCore/GNUmakefile.list.am:
2012-01-05 Ken Buchanan <kenrb@chromium.org>
Crash due to first-letter block processing
https://bugs.webkit.org/show_bug.cgi?id=74009
Fixing the way updateFirstLetter() finds the remaining text fragment
for a given first-letter. Previously this was unreliable in some
circumstances.
This patch provides a reliable mechanism to identify the remaining
text by storing first-letter to remaining text associations in a
hash map, managed by methods in RenderBoxModelObject.
Reviewed by David Hyatt.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateFirstLetter)
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::willBeDestroyed):
(WebCore::RenderBoxModelObject::setFirstLetterRemainingText): Added
(WebCore::RenderBoxModelObject::firstLetterRemainingText): Added
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::setFirstLetterRemainingText): Added
(WebCore::RenderBoxModelObject::firstLetterRemainingText): Added
2012-01-05 Mihnea Ovidenie <mihnea@adobe.com>
Crash in RenderRegion::getRegionRangeForBox.
https://bugs.webkit.org/show_bug.cgi?id=74781
Reviewed by David Hyatt.
Test: fast/regions/region-range-for-box-crash.html
This patch fixes 2 issues:
1. When removing a region from a flow thread, we clear the region range information for boxes since
this information is accurate only after the regions are laid out.
2. While the regions are invalidated (content of flow thread is not yet laid out in regions), the
functions that ask for properties of content in regions should bail out early.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::regionAtBlockOffset):
(WebCore::RenderBlock::logicalWidthChangedInRegions):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::clearRenderBoxRegionInfo):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::removeRegionFromThread):
(WebCore::RenderFlowThread::repaintRectangleInRegions):
(WebCore::RenderFlowThread::mapFromFlowToRegion):
(WebCore::RenderFlowThread::contentLogicalWidthOfFirstRegion):
(WebCore::RenderFlowThread::contentLogicalHeightOfFirstRegion):
(WebCore::RenderFlowThread::contentLogicalLeftOfFirstRegion):
(WebCore::RenderFlowThread::firstRegion):
(WebCore::RenderFlowThread::lastRegion):
(WebCore::RenderFlowThread::getRegionRangeForBox):
* rendering/RenderFlowThread.h:
2012-01-04 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r104084.
http://trac.webkit.org/changeset/104084
https://bugs.webkit.org/show_bug.cgi?id=75600
Likely kills dom-perf benchmark in chromium
http://build.chromium.org/f/chromium/perf/linux-
release/dom_perf/report.html?history=150&rev=116444 (Requested
by dslomov on #webkit).
* dom/Attr.cpp:
(WebCore::Attr::setValue):
(WebCore::Attr::childrenChanged):
* dom/DynamicNodeList.cpp:
(WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
(WebCore::DynamicSubtreeNodeList::length):
(WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
(WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
(WebCore::DynamicSubtreeNodeList::item):
(WebCore::DynamicSubtreeNodeList::invalidateCache):
(WebCore::DynamicSubtreeNodeList::Caches::create):
(WebCore::DynamicSubtreeNodeList::Caches::reset):
* dom/DynamicNodeList.h:
* dom/Element.cpp:
(WebCore::Element::updateAfterAttributeChanged):
* dom/Node.cpp:
(WebCore::Node::setTreeScopeRecursively):
(WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
(WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged):
(WebCore::Node::notifyLocalNodeListsLabelChanged):
(WebCore::Node::itemTypeAttributeChanged):
(WebCore::NodeListsNodeData::invalidateCaches):
(WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes):
* dom/Node.h:
* dom/NodeRareData.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseMappedAttribute):
* html/HTMLLabelElement.cpp:
(WebCore::HTMLLabelElement::parseMappedAttribute):
* html/HTMLLabelElement.h:
2012-01-04 James Robinson <jamesr@chromium.org>
[chromium] Remove chromium compositor support for unused zoomAnimatorTransform
https://bugs.webkit.org/show_bug.cgi?id=75585
Reviewed by Kenneth Russell.
Removes compositor support for zoomAnimatorTransform property. This code is unused and never was used.
Zoom animations are handled by adjusting the page scale factor and scroll offsets.
* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
* platform/graphics/chromium/cc/CCLayerImpl.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::finishCommitOnImplThread):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::calculateDrawTransformsAndVisibilityInternal):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2012-01-04 Kenneth Russell <kbr@google.com>
Fix semantics of WEBKIT_WEBGL_lose_context
https://bugs.webkit.org/show_bug.cgi?id=75053
Reviewed by James Robinson.
Updated WEBGL_lose_context extension to match WebGL spec's
behavior:
- loseContext() causes the context to be lost immediately, but
the webglcontextlost event isn't dispatched until JavaScript
returns.
- restoreContext() may only be called once dispatch of the
webglcontextlost event has completed, *and* if that event handler
prevented the default behavior of the event.
- restoreContext() performs its work asynchronously. The context
is not restored until just before the webglcontextrestored event
is dispatched.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::WebGLRenderingContext):
(WebCore::WebGLRenderingContext::forceLostContext):
(WebCore::WebGLRenderingContext::forceRestoreContext):
(WebCore::WebGLRenderingContext::dispatchContextLostEvent):
(WebCore::WebGLRenderingContext::maybeRestoreContext):
* html/canvas/WebGLRenderingContext.h:
2011-12-30 Ryosuke Niwa <rniwa@webkit.org>
Inserting nodes is slow due to Node::notifyNodeListsAttributeChanged (20%+)
https://bugs.webkit.org/show_bug.cgi?id=73853
Reviewed by Antti Koivisto.
Lazily invalidate the node list caches instead of invaliding them at the time of modification. We use
the DOM tree version to detect whether caches need to be invalidated or not. We now invalidate caches more
frequently after this patch (in particular, invalidates caches that are stored on nodes not present in
the ancestry of the modified nodes); however, our study on major Web sites such as Gmail, Facebook, Twitter,
etc... indicate that about 1% of real-world usage benefits from keeping the caches alive across different
DOM tree versions.
In order to invalidate caches lazily, this patch adds replaces the type of m_caches in DynamicSubtreeNodeList
by DynamicSubtreeNodeList::SubtreeCaches which encapsulates member variables in DynamicNodeList::Caches and
invalidates values as needed. Also this change allows m_caches to be allocated as a part of
DynamicSubtreeNodeList instead of a separate ref-counted object.
* dom/Attr.cpp:
(WebCore::Attr::setValue):
(WebCore::Attr::childrenChanged):
* dom/DynamicNodeList.cpp:
(WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
(WebCore::DynamicSubtreeNodeList::length):
(WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
(WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
(WebCore::DynamicSubtreeNodeList::item):
(WebCore::DynamicSubtreeNodeList::invalidateCache):
(WebCore::DynamicNodeList::Caches::create):
(WebCore::DynamicNodeList::Caches::reset):
* dom/DynamicNodeList.h:
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::SubtreeCaches): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::isLengthCacheValid): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::isItemCacheValid): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedLength): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItem): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItemOffset): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::setLengthCache): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::setItemCache): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::reset): Added.
(WebCore::DynamicSubtreeNodeList::SubtreeCaches::domVersionIsConsistent): Added.
* dom/Element.cpp:
(WebCore::Element::updateAfterAttributeChanged):
* dom/Node.cpp:
(WebCore::Node::setTreeScopeRecursively): Clear caches when a node moves from one document to another.
(WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Only clears child node list of Attr.
(WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Only clears child node list.
(WebCore::NodeListsNodeData::invalidateCaches): Merged with invalidateCachesThatDependOnAttributes.
* dom/Node.h:
* dom/NodeRareData.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseMappedAttribute):
* html/HTMLLabelElement.cpp:
* html/HTMLLabelElement.h:
2012-01-04 Ryosuke Niwa <rniwa@webkit.org>
Revert unintentional changes to Element.cpp in r104068.
* dom/Element.cpp:
(WebCore::Element::recalcStyleIfNeededAfterAttributeChanged):
2012-01-03 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION (r92823): Background color not preserved when copying and pasting a table row
https://bugs.webkit.org/show_bug.cgi?id=75330
Reviewed by Tony Chang.
The bug was caused by the background color of the wrapping style overriding the background color
in a matched rule of a highest element to be serialized. Fixed the bug by removing the conflicting
background color prior to the merge.
Tests: editing/pasteboard/copy-element-with-conflicting-background-color-from-rule-expected.html
editing/pasteboard/copy-element-with-conflicting-background-color-from-rule.html
* editing/EditingStyle.cpp:
(WebCore::editingStyleFromComputedStyle):
(WebCore::EditingStyle::removeStyleAddedByNode):
(WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
2012-01-03 Antti Koivisto <antti@apple.com>
Reviewed by Dave Hyatt.
Analyze stylesheet scope to minimize style recalcs
https://bugs.webkit.org/show_bug.cgi?id=75508
It is a relatively common pattern to use inline stylesheets in document body where all rules are scoped using descendant selector
<style>
#foo {...}
#foo div {...}
#foo .bar {...}
</style>
When this pattern is used it is also common that the rules only apply to elements that come after the style element.
When the set of active stylesheets changes we invalidate and recompute the entire document style. This is very expensive. We can
detect the case above and avoid the style recalc.
On engadget.com, this patch cuts the time spent in style recalcs to roughly half. There are further savings from reduced
relayouts. In total the engine CPU time used over the page load is reduced by ~10%.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::CSSStyleSelector):
(WebCore::CSSStyleSelector::collectFeatures):
Refactor feature collection from constructor to a separate function.
(WebCore::CSSStyleSelector::appendAuthorStylesheets):
New function for non-destructively updating the style selector.
(WebCore::CSSStyleSelector::Features::clear):
Clear the features for another collection.
(WebCore::CSSStyleSelector::determineStylesheetSelectorScopes):
Find if all rules on a stylesheetare scoped to some set of ids and classes.
(WebCore::CSSStyleSelector::styleForDocument):
Add optional font selector argument. We updated the correct base style font on style selector construction but that is no longer sufficient
as font selector may be updated without reconstructing the style selector.
(WebCore::RuleSet::addRulesFromSheet):
Invalidate the matched declaration cache in case of new font-face rules.
* css/CSSStyleSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::determineSelectorScopes):
Find if all rules on a selector list are scoped to some set of ids and classes.
* css/SelectorChecker.h:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::recalcStyle):
Pass the font selector, if exists, to styleForDocument so we always have the base font up to date.
(WebCore::Document::combineCSSFeatureFlags):
(WebCore::Document::resetCSSFeatureFlags):
(WebCore::Document::createStyleSelector):
Refactor css feature flag resetting to functions.
(WebCore::Document::removePendingSheet):
Use new PendingStylesheetCompleted flag when new stylesheets arrive.
(WebCore::Document::styleSelectorChanged):
Skip style recalc if it is not needed.
(WebCore::Document::collectActiveStylesheets):
Refactor collecting stylesheets to a separate function.
(WebCore::Document::testAddedStylesheetRequiresStyleRecalc):
Determine the scopes and use hasElementWithId/getElementsByClassName to figure out if any scoped elements currently exist in the tree.
(WebCore::Document::analyzeStylesheetChange):
Figure out if we can update the style selector incrementally and if we can skip the style recalc.
(WebCore::Document::updateActiveStylesheets):
Renamed from recalcStyleSelector.
Invoke the new analysis functions.
* dom/Document.h:
2012-01-04 Igor Oliveira <igor.oliveira@openbossa.org>
Share fractional time code between AnimationBase and KeyframeAnimation
https://bugs.webkit.org/show_bug.cgi?id=75549
Remove left over from changeset 104045.
Unreviewed trivial fix.
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::fractionalTime):
2012-01-04 Igor Oliveira <igor.oliveira@openbossa.org>
Share fractional time code between AnimationBase and KeyframeAnimation
https://bugs.webkit.org/show_bug.cgi?id=75549
Share fractional time calculation between AnimationBase and KeyframeAnimation.
Reviewed by Simon Fraser.
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::fractionalTime):
(WebCore::AnimationBase::progress):
* page/animation/AnimationBase.h:
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
2012-01-03 Vangelis Kokkevis <vangelis@chromium.org>
[chromium] Bypass the shadow texture copy for accelerated
canvas when running the compositor in single threaded mode.
https://bugs.webkit.org/show_bug.cgi?id=75146
The texture copy fails on Windows as glCopyTexImage2D() doesn't
support BGRA source textures.
This change also modifies Canvas2DLayerChromium::updateCompositorResources
to call glCopyTexSubImage2D() instead of glCopyTexImage2D() so that
the copy can work with texture allocated via the glTexStorage2D
extension.
Reviewed by James Robinson.
Tests: Canvas2DLayerChromiumTest.cpp
* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
(WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
(WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
(WebCore::Canvas2DLayerChromium::setTextureManager):
(WebCore::Canvas2DLayerChromium::updateCompositorResources):
(WebCore::Canvas2DLayerChromium::pushPropertiesTo):
(WebCore::Canvas2DLayerChromium::unreserveContentsTexture):
(WebCore::Canvas2DLayerChromium::cleanupResources):
* platform/graphics/chromium/Canvas2DLayerChromium.h:
2012-01-04 Adam Roben <aroben@apple.com>
Use one big printf command instead of many chained echo commands to generate idl_files.tmp
This works around a bug in Cygwin where sh.exe will crash if given a too-long sequence of
&&-chained commands.
Fixes <http://webkit.org/b/75546> <rdar://problem/10622193> REGRESSION (r103519): WebCore's
DerivedSources.make crashes sh.exe if path to WebKit source tree is long enough
Reviewed by Antti Koivisto.
* DerivedSources.make: Change the '(echo foo && echo bar && echo baz && echo -n) >
./idl_files.tmp' command to 'printf "foo\nbar\nbaz\n" > ./idl_files.tmp'. We use the
patsubst function to append "\n" to each IDL filename, then use the subst function to remove
the spaces between the filenames.
2012-01-04 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions]Rollout support for background-color region styling
https://bugs.webkit.org/show_bug.cgi?id=75007
Reviewed by Tony Chang.
Removed functionality, therefore no new tests. Since this is a temporary rollout,
the tests for region-style with background-color are not removed in this patch, just skipped.
* WebCore.exp.in:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::CSSStyleSelector):
(WebCore::CSSStyleSelector::addMatchedDeclaration):
(WebCore::CSSStyleSelector::matchRules):
(WebCore::CSSStyleSelector::matchAllRules):
(WebCore::CSSStyleSelector::styleForElement):
(WebCore::CSSStyleSelector::pseudoStyleForElement):
(WebCore::RuleData::RuleData):
(WebCore::RuleSet::RuleSet):
(WebCore::RuleSet::addToRuleSet):
(WebCore::CSSStyleSelector::applyDeclarations):
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSStyleSelector.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::setRegionRangeForBox):
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paint):
(WebCore::RenderLayer::hitTest):
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::removeChildNode):
* rendering/RenderRegion.cpp:
* rendering/RenderRegion.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
* rendering/RenderView.h:
2012-01-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Introduce new qmake variable 'WEBKIT' for signaling dependencies
The custom qmake variable 'WEBKIT' is used for signaling that a
target depends in some way on other subproject of the WebKit
project. For now this is limited to the set of intermediate
libraries: wtf, javascriptcore, webcore, and webkit2.
This replaces the previous convension of using load(foo) for
just include paths, and CONFIG += foo to also link against foo.
Adding a dependency results in additional include paths being
available, and potentially linking to the library. This is
decided by the build system based on conditions such as what
kind of target is being built and the general build config.
An advantage to his approach is that it simplifies the individual
foo.prf files, for example by allowing us to use INCLUDEPATH +=
and LIBS += as normal instead of prepending.
Reviewed by Simon Hausmann.
* Target.pri:
2012-01-03 Adam Barth <abarth@webkit.org>
HTMLConstructionSite::attach shouldn't return a value
https://bugs.webkit.org/show_bug.cgi?id=75520
Reviewed by Eric Seidel.
We used to return a value to avoid some refchurn, but now that we're
using tasks, we always need to take that reference. Removing the
return value lets us remove the template parameter, which is a boon.
This patch has no impact on the html-parser.html benchmark.
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::attachLater):
(WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
(WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
(WebCore::HTMLConstructionSite::insertDoctype):
(WebCore::HTMLConstructionSite::insertComment):
(WebCore::HTMLConstructionSite::insertCommentOnDocument):
(WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
(WebCore::HTMLConstructionSite::insertHTMLHeadElement):
(WebCore::HTMLConstructionSite::insertHTMLBodyElement):
(WebCore::HTMLConstructionSite::insertHTMLFormElement):
(WebCore::HTMLConstructionSite::insertHTMLElement):
(WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
(WebCore::HTMLConstructionSite::insertScriptElement):
(WebCore::HTMLConstructionSite::insertForeignElement):
(WebCore::HTMLConstructionSite::insertTextNode):
(WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
(WebCore::HTMLConstructionSite::fosterParent):
* html/parser/HTMLConstructionSite.h:
2012-01-03 Adam Barth <abarth@webkit.org>
Fix assert when foster parenting self-closing elements
https://bugs.webkit.org/show_bug.cgi?id=75527
Unreviewed.
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::fosterParent):
- We can't execute this task immediately because the code for
self-closing elements wants to set the self-closing flag.
Instead, we queue the task.
2012-01-03 Charles Wei <charles.wei@torchmobile.com.cn>
[BlackBerry] Need to support credentials in the URL
https://bugs.webkit.org/show_bug.cgi?id=75341
Reviewed by George Staikos.
No new tests required.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::sendRequestWithCredentials):
2012-01-03 Noel Gordon <noel.gordon@gmail.com>
[chromium] Use data decoding swizzle for turbo JPEG grayscale images
https://bugs.webkit.org/show_bug.cgi?id=75189
Reviewed by Adam Barth.
No new tests. Covered by exiting tests, in particular for grayscale
images that were corrupted by earlier versions on libjpeg-turbo:
tables/mozilla/bugs/bug29314.html
tables/mozilla/bugs/bug13169.html
tables/mozilla/bugs/bug10565.html
tables/mozilla/bugs/bug11026.html
fast/repaint/backgroundSizeRepaint.html
fast/repaint/block-layout-inline-children-replaced.html
fast/repaint/clipped-relative.html
fast/repaint/selected-replaced.html
tables/mozilla/bugs/bug12908-1.html
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageReader::decode): Use a data decoding swizzle for
JCS_GRAYSCALE images.
2012-01-03 Adam Barth <abarth@webkit.org>
Minor speed improvement in HTML parser
https://bugs.webkit.org/show_bug.cgi?id=75517
Reviewed by Eric Seidel.
This improves the html-parser.html benchmark by 0.3%. I don't think
that's actually anything to write home about, but this patch makes me
feel better about my life.
* html/parser/HTMLFormattingElementList.cpp:
(WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
2012-01-03 Kentaro Hara <haraken@chromium.org>
Remove temporary code that we've inserted to implement the [Supplemental] IDL incrementally
https://bugs.webkit.org/show_bug.cgi?id=75510
Reviewed by Adam Barth.
Now all build systems support the [Supplemental] IDL. This patch removes all
temporary code that we've inserted to implement the [Supplemental] IDL.
No tests. No change in behavior. Confirm that all builds pass.
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/generate-bindings.pl:
* page/DOMWindow.idl: Removed all attributes with a temporal [Supplemented] IDL.
2012-01-03 Karl Koscher <supersat@chromium.org>
Give embedders a chance to handle postMessage calls
https://bugs.webkit.org/show_bug.cgi?id=73883
To support cross-process postMessage calls in Chromium (bug 73337), we need to intercept
postMessage calls to proxy windows. Originally we were just going to add a native event
listener on the Chromium side, but that required more changes to WebKit and was a bit of
a hack. See bug 73359 for a discuss about moving to this approach.
Reviewed by Adam Barth.
Test: platform/chromium/fast/events/intercept-postmessage.html
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::willCheckAndDispatchPostMessage): new method to allow the
embedder to intercept postMessage calls
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessageTimerFired): add a call to
FrameLoaderClient::willCheckAndDispatchPostMessage
2012-01-03 Eric Penner <epenner@google.com>
[chromium] Prevent crashing due to NULL texture updater.
https://bugs.webkit.org/show_bug.cgi?id=75288
Reviewed by James Robinson.
* platform/graphics/chromium/ContentLayerChromium.cpp:
* platform/graphics/chromium/ContentLayerChromium.h:
* platform/graphics/chromium/ImageLayerChromium.cpp:
* platform/graphics/chromium/ImageLayerChromium.h:
2012-01-03 Shawn Singh <shawnsingh@chromium.org>
[chromium] CCLayerSorter accidentally reverses order of some layers.
https://bugs.webkit.org/show_bug.cgi?id=75046
Reviewed by James Robinson.
Unit test added to CCLayerSorterTest.cpp
Fixes two related bugs that were causing z-ordering problems in
layers when preserves3D triggers the need for layer sorting.
The first problem was that CCLayerSorter accidentally reversed the
order of layers when there was no sorting dependency between them.
The second problem was that zDiff had numerical precision problems
that forced sorting dependencies that were sometimes incorrect,
when the dependencies should not have existed.
* platform/graphics/chromium/cc/CCLayerSorter.cpp:
(WebCore::CCLayerSorter::checkOverlap):
(WebCore::CCLayerSorter::sort):
2012-01-03 Leo Yang <leo.yang@torchmobile.com.cn>
[BlackBerry] Add support of blob form data to the BlackBerry port
https://bugs.webkit.org/show_bug.cgi?id=75218
Pass FormDataElement::encodedBlob type of form data to the BlackBerry
platform request to support blob data and blob file range.
Reviewed by George Staikos.
The port can't be built now, no new tests so far.
* platform/network/blackberry/ResourceRequestBlackBerry.cpp:
(WebCore::ResourceRequest::initializePlatformRequest):
2012-01-03 Adam Barth <abarth@webkit.org>
Two null crashes in Treebuilder
https://bugs.webkit.org/show_bug.cgi?id=66101
Reviewed by Eric Seidel.
The underly issue with causing the crash is that we're re-entering the
tree builder. We've done a bunch of point fixes around tree builder
re-entrancy, but neither the implementation nor the specification are
really designed to handle re-entrancy.
Firefox avoids this problem by putting the parser on its own thread. I
don't think we're quite ready to do that yet (although we will
eventually, presumably, as computers become ever more parallel). The
approach in this patch is to queue up the DOM mutations and actually
perform them on a shallower stack. That's essentially the approach
we've used for executing <scripts>.
This patch queues up DOM modifications and executes them from a clean
call stack, stopping us from re-entering the tree builder. We might
need to experiment with exactly where to kick off the queue, but this
location seems reasonable and fixes the crash.
Test: fast/parser/re-enter-and-crash.html
* html/parser/HTMLConstructionSite.cpp:
(WebCore::executeTask):
- Add a helper function for actually executing a queue DOM
mutation.
(WebCore::HTMLConstructionSite::attach):
- Instead of actually attaching the element to the DOM, this
function now queues the element for attachment. In a follow-up
patch, I plan to change this function to return void (and I'll
probably rename it to something that makes it clear that it only
queues the attachment).
(WebCore::HTMLConstructionSite::executeQueuedTasks):
(WebCore::HTMLConstructionSite::insertDoctype):
- Setting the compatmode from the Doctype requires the doctype to
actually be in the DOM, so we need to execute our queued tasks
synchronously. We can likely improve this function by passing
the Doctype element explicitly in a follow-up patch.
(WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
(WebCore::HTMLConstructionSite::insertTextNode):
(WebCore::HTMLConstructionSite::findFosterSite):
(WebCore::HTMLConstructionSite::fosterParent):
* html/parser/HTMLConstructionSite.h:
(WebCore::HTMLConstructionSiteTask::HTMLConstructionSiteTask):
- Add a task object that holds on to the relevant elements. We
define some vector traits for this object to match the traits on
RefPtr (which make Vector operations faster by explaining that
this type is moveable without having to churn reference counts).
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLElementStack::pushCommon):
- We delay the "begin parsing" call until we actually attach the
element to the DOM. That splits the responsibility for calling
begin/finished, which is less than ideal, but I didn't see
another solution.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
- Kick off the queued mutations.
2012-01-03 Adam Barth <abarth@webkit.org>
view-source doesn't colorize </script> correctly
https://bugs.webkit.org/show_bug.cgi?id=62971
Reviewed by Eric Seidel.
The reason these tags weren't colorized correctly was because the
characters for the end tags where consumed by the tokenizer at the same
time as it consumed the text of the script tag. These characters are
buffered internally by the tokenizer because the tokenizer is searching
for "an appropriate end tag", which is "</script>" in this case.
I tried a number of different approaches to fixing this bug. The
approach in this patch adds an accessor to the tokenizer to read out
the buffered characters. This approach makes it easier for the
HTMLSourceTracker to get exactly the right value for these buffered
characters without having to do a complicated simulation of the
buffering itself.
Tests: fast/frames/viewsource-plain-text-tags.html:
* html/parser/HTMLViewSourceParser.cpp:
(WebCore::HTMLViewSourceParser::pumpTokenizer):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpTokenizer):
- Give the HTMLSourceTracker a pointer to the tokenizer so it can ask
for the buffered characters.
* html/parser/HTMLSourceTracker.cpp:
(WebCore::HTMLSourceTracker::start):
- The idea here is to treat characters buffered internally by the
tokenizer the same way we treat characters that were contained in a
previous segment of source. We copy them into our accumulation
buffer and adjust the token base offset to account for the extra
characters.
(WebCore::HTMLSourceTracker::end):
- Don't consier the character buffered by the tokenizer to be part of
the token we've just finished.
(WebCore::HTMLSourceTracker::sourceForToken):
- Remove the assumption that all of the m_previousSource is contained
in the source for the current token. Because we now understand
that the tokenizer can buffer some characters internally, we might
not exhaust the m_previousSource.
* html/parser/HTMLSourceTracker.h:
- Rename m_sourceFromPreviousSegments to m_previousSource and changed
to a SegementedString to avoid extra mallocs we keep appending tiny
segments.
- Rename m_source to m_currentSource to contrast nicely with
m_previousSource.
* html/parser/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::flushBufferedEndTag):
(WebCore::HTMLTokenizer::nextToken):
- Previously, we cleared the temporary buffer lazily when we needed
to add new characters to it. Now we clear it eagerly so that it's
length tells us whether we're currently using it to store
characters.
- Previously, we weren't storing the character that we used to
terminate the appropriate end tag (e.g., the > in </script>)
because we didn't need to "unbuffer" that character into the
HTMLToken::appendToCharacter. Now, we do store that character in
the temporary buffer so that the HTMLSourceTracker can see that
character.
(WebCore::HTMLTokenizer::bufferedCharacters):
* html/parser/HTMLTokenizer.h:
(WebCore::HTMLTokenizer::numberOfBufferedCharacters):
- Add accessor methods to copy out the buffered characters.
- Also, unrelated to the rest of this patch, I made the constructor
for HTMLTokenizer explicit because it takes only a single
paramater, per the style guide.
* platform/text/SegmentedString.cpp:
(WebCore::SegmentedString::clear):
- SegmentedString::clear wasn't clearing all of its state. I don't
think this issue was actually observable, but I noticed it when
working on this patch, so I fixed it.
2012-01-03 Benjamin Poulain <bpoulain@apple.com>
Exclude Mac's PlatformEventFactory from iOS
https://bugs.webkit.org/show_bug.cgi?id=75493
Reviewed by Sam Weinig.
Move PlatformEventFactory.(h|cpp) to PlatformEventFactoryMac(h|cpp) and exclude the file
from iOS build.
* Configurations/WebCore.xcconfig: Also exclude EventHandlerMac for consistency.
* WebCore.xcodeproj/project.pbxproj:
* page/mac/EventHandlerMac.mm:
* platform/mac/PlatformEventFactoryMac.h: Renamed from Source/WebCore/platform/mac/PlatformEventFactory.h.
* platform/mac/PlatformEventFactoryMac.mm: Renamed from Source/WebCore/platform/mac/PlatformEventFactory.mm.
(WebCore::globalPoint):
(WebCore::globalPointForEvent):
(WebCore::pointForEvent):
(WebCore::mouseButtonForEvent):
(WebCore::mouseEventTypeForEvent):
(WebCore::clickCountForEvent):
(WebCore::momentumPhaseForEvent):
(WebCore::phaseForEvent):
(WebCore::gestureEventTypeForEvent):
(WebCore::textFromEvent):
(WebCore::unmodifiedTextFromEvent):
(WebCore::keyIdentifierForKeyEvent):
(WebCore::isKeypadEvent):
(WebCore::windowsKeyCodeForKeyEvent):
(WebCore::isKeyUpEvent):
(WebCore::modifiersForEvent):
(WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
(WebCore::PlatformEventFactory::createPlatformMouseEvent):
(WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
(WebCore::PlatformEventFactory::createPlatformWheelEvent):
(WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
(WebCore::PlatformEventFactory::createPlatformKeyboardEvent):
(WebCore::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
(WebCore::PlatformEventFactory::createPlatformGestureEvent):
2012-01-03 Wei James <james.wei@intel.com>
Optimize AudioBufferSourceNode process by avoiding interpolation when pitchRate==1
https://bugs.webkit.org/show_bug.cgi?id=74592
Reviewed by Kenneth Russell.
Covered by existing webaudio layout tests, especially webaudio/audiobuffersource-playbackrate.html
* webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::renderSilenceAndFinishIfNotLooping):
(WebCore::AudioBufferSourceNode::renderFromBuffer):
* webaudio/AudioBufferSourceNode.h:
2012-01-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Access to Node Highlighting info without drawing
https://bugs.webkit.org/show_bug.cgi?id=75504
Provide a "getHighlight" method alongside "drawHighlight" that
gets most of the important node highlighting information. This
can be used by a port to do its own node highlighting or provide
extra content without interfering with the highlight rects.
Reviewed by Timothy Hatcher.
* WebCore.xcodeproj/project.pbxproj:
Privately expose the Highlight struct in DOMNodeHighlighter.h.
* inspector/DOMNodeHighlighter.cpp:
(WebCore::DOMNodeHighlighter::drawHighlight):
(WebCore::DOMNodeHighlighter::getHighlight):
* inspector/DOMNodeHighlighter.h:
Reuse the existing draw code to instead populate
the Highlight struct with the information it is
about to draw, and only draw if there is a context.
* inspector/InspectorController.cpp:
(WebCore::InspectorController::getHighlight):
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::getHighlight):
* inspector/InspectorDOMAgent.h:
Get highlight information by going through getHighlight
in InspectorController. This is alongside drawHighlight.
2012-01-03 Shawn Singh <shawnsingh@chromium.org>
[chromium] Push drawsContent and contentsVisible into accelerated compositor
https://bugs.webkit.org/show_bug.cgi?id=71209
Reviewed by James Robinson.
Tests: compositing/visibility/visibility-simple-canvas2d-layer.html
compositing/visibility/visibility-simple-video-layer.html
compositing/visibility/visibility-simple-webgl-layer.html
Rebaselined compositing/visibility/visibility-image-layers.html
The CSS visibility property was not being properly obeyed by many
specialized layer types in the accelerated compositor. The root of
the problem was that drawsContent and contentsVisible flags were
not properly propagated into the compositor. This patch removes
the drawsContent() callback, and instead makes sure that
drawsContent and contentsVisible are "pushed" through the
accelerated compositor.
* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::drawsContent):
* platform/graphics/chromium/ContentLayerChromium.cpp:
* platform/graphics/chromium/ContentLayerChromium.h:
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setDrawsContent):
(WebCore::GraphicsLayerChromium::setContentsVisible):
(WebCore::GraphicsLayerChromium::setContentsToImage):
(WebCore::GraphicsLayerChromium::setContentsToCanvas):
(WebCore::GraphicsLayerChromium::setContentsToMedia):
(WebCore::GraphicsLayerChromium::updateLayerIsDrawable):
(WebCore::GraphicsLayerChromium::setupContentsLayer):
* platform/graphics/chromium/GraphicsLayerChromium.h:
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
(WebCore::LayerChromium::setIsDrawable):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::drawsContent):
* platform/graphics/chromium/PluginLayerChromium.h:
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::drawsContent):
* platform/graphics/chromium/VideoLayerChromium.h:
* platform/graphics/chromium/WebGLLayerChromium.cpp:
(WebCore::WebGLLayerChromium::drawsContent):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::dumpLayerProperties):
2012-01-03 Shawn Singh <shawnsingh@chromium.org>
[chromium] Make sure root damage rect gets passed to renderer
https://bugs.webkit.org/show_bug.cgi?id=74893
Reviewed by James Robinson.
Unit test added to CCLayerTreeHostImplTest.cpp
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::swapBuffers):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
(WebCore::CCLayerTreeHostImpl::swapBuffers):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2012-01-03 Yuzhu Shen <yzshen@chromium.org>
v8 binding: npCreateV8ScriptObject() should not returned an existing V8NPObject if the rootObject doesn't match
https://bugs.webkit.org/show_bug.cgi?id=74515
Reviewed by Nate Chapin.
Test: http/tests/plugins/create-v8-script-objects.html
* bindings/v8/NPV8Object.cpp:
(WebCore::freeV8NPObject):
(WebCore::npCreateV8ScriptObject):
2012-01-03 Jon Lee <jonlee@apple.com>
Leak of WebNotificationClient when page is destroyed
https://bugs.webkit.org/show_bug.cgi?id=74980
<rdar://problem/10611231>
Reviewed by Mark Rowe.
* notifications/NotificationController.cpp:
(WebCore::NotificationController::~NotificationController): Notify the client
that the controller has been destroyed.
* notifications/NotificationPresenter.h: Add notificationControllerDestroyed()
callback to the client interface.
2012-01-03 Alexis Menard <alexis.menard@openbossa.org>
getComputedStyle for list-style is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=75443
Reviewed by Tony Chang.
Implement getComputedStyle for list-style.
Test: fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2012-01-03 Adrienne Walker <enne@google.com>
[chromium] Remove unneeded content vs. layer space distinction in tiled layers
https://bugs.webkit.org/show_bug.cgi?id=75498
Reviewed by James Robinson.
Long ago, before scrollbars became their own layers, tiled layers had
a distinction between content space (what's mostly called layer space
elsewhere) and layer space (the transformed content space). It seemed
like this transform could get reused for supporting RTL pages, but as
that's not the case, it should be eradicated.
Tiled layers now deal with everything in "layer space", which is a 2d
rectangle starting at (0, 0) in the top left of the layer and
extending to contentBounds() in the bottom right.
As no code actually set the tiler position, this change should be a
no-op.
Test: LayoutTests/compositing/
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::UpdatableTile::isDirty):
(WebCore::UpdatableTile::clearDirty):
(WebCore::TiledLayerChromium::updateCompositorResources):
(WebCore::TiledLayerChromium::createTile):
(WebCore::TiledLayerChromium::invalidateRect):
(WebCore::TiledLayerChromium::protectTileTextures):
(WebCore::TiledLayerChromium::prepareToUpdateTiles):
(WebCore::TiledLayerChromium::prepareToUpdate):
(WebCore::TiledLayerChromium::prepareToUpdateIdle):
(WebCore::TiledLayerChromium::needsIdlePaint):
(WebCore::TiledLayerChromium::idlePaintRect):
* platform/graphics/chromium/TiledLayerChromium.h:
* platform/graphics/chromium/cc/CCLayerTilingData.cpp:
(WebCore::CCLayerTilingData::operator=):
(WebCore::CCLayerTilingData::layerRectToTileIndices):
(WebCore::CCLayerTilingData::tileRect):
* platform/graphics/chromium/cc/CCLayerTilingData.h:
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::CCTiledLayerImpl::appendQuads):
2011-12-22 Joseph Pecoraro <pecoraro@apple.com>
Implement Date and Time Input Value Sanitization
https://bugs.webkit.org/show_bug.cgi?id=59951
Sanitize non-parsable incoming strings to the empty string.
Reviewed by Kent Tamura.
Covered by existing tests.
* html/BaseDateAndTimeInputType.h:
* html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::sanitizeValue): check if the
incoming string is valid. If not just return the empty string.
2012-01-03 Julien Chaffraix <jchaffraix@webkit.org>
RenderLayer::backgroundClipRect should not check parent()
https://bugs.webkit.org/show_bug.cgi?id=73731
Reviewed by Simon Fraser.
Clean-up only, no expected change in behavior.
* rendering/RenderLayer.cpp:
(WebCore::backgroundClipRectForPosition): Changed RenderObject::isPositioned() to
a check for AbsolutePosition for consistency but also as this is equivalent due to:
- the previous check for FixedPosition.
- RenderView, which is positioned, will never goes to this code as it has no parent().
(WebCore::RenderLayer::backgroundClipRect): Removed the parent() check. While at
it, also moved the inline initialization of |backgroundClipRect| to its own function
and removed a |view| check as the associated ASSERT seems to never have been reached.
2012-01-03 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/10637779> REGRESSION (r102247): Focus ring is not drawn around a button
Rubber-stamped by Dan Bernstein.
* platform/mac/ThemeMac.mm: (WebCore::updateStates): Flip an incorrect conditional, this code
should run on Snow Leopard and Lion.
2012-01-03 Alexis Menard <alexis.menard@openbossa.org>
getComputedStyle should return shorthands property with the minimum number of sides possible.
https://bugs.webkit.org/show_bug.cgi?id=75434
Reviewed by Tony Chang.
As stated in http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties we should
return shorthands properties with the minimum number of sides possible.
Existing tests have been updated accordingly.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
(WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
* css/CSSComputedStyleDeclaration.h:
2012-01-03 Martin Robinson <mrobinson@igalia.com>
[GTK] GTK+ 3 theming code does not use the GtkOrientable style class
https://bugs.webkit.org/show_bug.cgi?id=72789
Reviewed by Philippe Normand.
No new tests. Testing GTK+ theming is quite difficult
because no two distributions have the same set of themes.
Current tests prevent regressions.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::applySliderStyleContextClasses): Added this helper that
properly handles the orientable style class.
(WebCore::RenderThemeGtk::paintSliderTrack): Use the new helper.
(WebCore::RenderThemeGtk::paintSliderThumb): Ditto.
* platform/gtk/ScrollbarThemeGtk3.cpp:
(WebCore::applyScrollbarStyleContextClasses): Added this helper that
properly handles the orientable style class.
(WebCore::ScrollbarThemeGtk::paintTrackBackground): Use the new helper.
(WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
(WebCore::ScrollbarThemeGtk::paintThumb): Ditto.
(WebCore::ScrollbarThemeGtk::paintButton): Ditto.
2012-01-03 Florin Malita <fmalita@google.com>
NULL ptr in WebCore::SVGStyledTransformableElement::animatedLocalTransform
https://bugs.webkit.org/show_bug.cgi?id=75227
Reviewed by Dirk Schulze.
Test: svg/custom/webkit-transform-crash.html
* svg/SVGStyledTransformableElement.cpp:
(WebCore::SVGStyledTransformableElement::animatedLocalTransform):
Add a null-renderer check.
2012-01-03 Alexis Menard <alexis.menard@openbossa.org>
getComputedStyle for border is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=75319
Reviewed by Tony Chang.
Implement getComputedStyle for border.
fast/css/getComputedStyle/getComputedStyle-border-shorthand.html was extented.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2012-01-03 Alexis Menard <alexis.menard@openbossa.org>
Sort the WebCore Xcode project file
Reviewed by Dimitri Glazkov.
* WebCore.xcodeproj/project.pbxproj:
2012-01-03 Adrienne Walker <enne@google.com>
[chromium] Set tiler bounds explicitly rather than growing them
https://bugs.webkit.org/show_bug.cgi?id=75331
Reviewed by James Robinson.
Rather than only growing bounds, make the bounds on the tiler be set
explicitly by TiledLayerChromium. This patch now properly invalidates
regions when the bounds change.
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::updateBounds):
(WebCore::TiledLayerChromium::prepareToUpdate):
(WebCore::TiledLayerChromium::prepareToUpdateIdle):
* platform/graphics/chromium/TiledLayerChromium.h:
* platform/graphics/chromium/cc/CCLayerTilingData.cpp:
(WebCore::CCLayerTilingData::setBounds):
(WebCore::CCLayerTilingData::bounds):
* platform/graphics/chromium/cc/CCLayerTilingData.h:
2012-01-03 Martin Robinson <mrobinson@igalia.com>
[GTK] Slider thumb is not centered on the track with the unico theme
https://bugs.webkit.org/show_bug.cgi?id=72802
Reviewed by Philippe Normand.
No new tests. This only applies to certain GTK+ themes.
Existing tests cover the default GTK+ theme.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::RenderThemeGtk::paintSliderThumb): Do not resize the
slider thumb by the trough border.
2012-01-03 Adrienne Walker <enne@google.com>
[chromium] Make tiled layer's tiler always exist
https://bugs.webkit.org/show_bug.cgi?id=75329
Reviewed by James Robinson.
TiledLayerChromium has some awkward code to handle lazily creating the
tiler, including lots of null checks and shadowing the tile size.
Instead, always create the tiler up front. As values change that
invalidate all tiles, reset it rather than clear the pointer.
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setIsNonCompositedContent):
* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::TiledLayerChromium):
(WebCore::TiledLayerChromium::cleanupResources):
(WebCore::TiledLayerChromium::setTileSize):
(WebCore::TiledLayerChromium::setBorderTexelOption):
(WebCore::TiledLayerChromium::drawsContent):
(WebCore::TiledLayerChromium::updateCompositorResources):
(WebCore::TiledLayerChromium::setTilingOption):
(WebCore::TiledLayerChromium::pushPropertiesTo):
(WebCore::TiledLayerChromium::setIsNonCompositedContent):
(WebCore::TiledLayerChromium::invalidateRect):
(WebCore::TiledLayerChromium::protectTileTextures):
(WebCore::TiledLayerChromium::prepareToUpdate):
(WebCore::TiledLayerChromium::prepareToUpdateIdle):
(WebCore::TiledLayerChromium::needsIdlePaint):
(WebCore::TiledLayerChromium::idlePaintRect):
* platform/graphics/chromium/TiledLayerChromium.h:
* platform/graphics/chromium/cc/CCLayerTilingData.cpp:
(WebCore::CCLayerTilingData::setBorderTexelOption):
* platform/graphics/chromium/cc/CCLayerTilingData.h:
* platform/graphics/gpu/TilingData.cpp:
(WebCore::TilingData::setHasBorderTexels):
* platform/graphics/gpu/TilingData.h:
2012-01-03 Kentaro Hara <haraken@chromium.org>
Unreviewed. Rebaselined run-bindings-tests results.
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructor::destroy):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::destroy):
* bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::JSTestInterface::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListener::destroy):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructor::destroy):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::JSTestNamedConstructor::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::destroy):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterface::destroy):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::releaseImplIfNotNull):
2012-01-03 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix scrollbars size with GTK+ 3.x
https://bugs.webkit.org/show_bug.cgi?id=75467
Reviewed by Xan Lopez.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::getStyleContext): Add the style class for the given
widget type to the GtkWidgetPath when creating GtkStyleContext
objects.
2012-01-03 Alexis Menard <alexis.menard@openbossa.org>
getComputedStyle for outline is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=75441
Reviewed by Antonio Gomes.
Implement getComputedStyle for outline.
Test: fast/css/getComputedStyle/getComputedStyle-outline-shorthand.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2012-01-03 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use gdk_screen_get_monitor_workarea() when available for screenAvailableRect()
https://bugs.webkit.org/show_bug.cgi?id=75435
Reviewed by Martin Robinson.
* platform/gtk/GtkVersioning.c:
(getScreenCurrentDesktop):
(getScreenWorkArea):
(gdk_screen_get_monitor_workarea): Implement it when GTK+ < 3.3.6.
* platform/gtk/GtkVersioning.h:
* platform/gtk/PlatformScreenGtk.cpp:
(WebCore::screenAvailableRect): Use
gdk_screen_get_monitor_workarea() instead of our own
implementation.
2012-01-02 Kentaro Hara <haraken@chromium.org>
REGRESSION(r103919): Remove resolve-supplemental.pl from the WebCore target in Xcode
https://bugs.webkit.org/show_bug.cgi?id=75458
Reviewed by Adam Barth.
At r103919, we added resolve-supplemental.pl to WebCore.framework/Resources,
but we should have added it to the project without adding it to any target.
This patch fixes it.
No tests. No change in behavior.
* WebCore.xcodeproj/project.pbxproj:
2012-01-02 Kentaro Hara <haraken@chromium.org>
Enable the [Supplemental] IDL on GTK/GObject
https://bugs.webkit.org/show_bug.cgi?id=75411
Reviewed by Adam Barth.
This patch enables the [Supplemental] IDL on GObject bindings of GTK
by changing the build flow of bindings/gobject/GNUmakefile.am as follows.
- Previous build flow:
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl;
generate-bindings.pl reads $idl;
generate-bindings.pl generates .h and .cpp files for $idl;
}
- New build flow (See the discussions in bug 72138 for more details):
resolve-supplemental.pl depends on all IDL files;
resolve-supplemental.pl reads all IDL files;
resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
resolve-supplemental.pl outputs supplemental_dependency.tmp;
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
generate-bindings.pl reads $idl;
generate-bindings.pl reads supplemental_dependency.tmp;
generate-bindings.pl generates .h and .cpp files for $idl,
including all attributes in the IDL files that are implementing $idl;
}
Tests: Confirm that build succeeds.
http/tests/websocket/tests/*
* GNUmakefile.am:
* bindings/gobject/GNUmakefile.am:
2012-01-02 Kentaro Hara <haraken@chromium.org>
Add resolve-supplemental.pl to project.pbxproj
https://bugs.webkit.org/show_bug.cgi?id=75426
Reviewed by Adam Barth.
We should have added "resolve-supplemental.pl" to build scripts of AppleWebKit
when we enabled the [Supplemental] IDL on AppleWebKit at r103519.
This is a follow-up patch for it.
No tests. Just confirm that the AppleWebKit build passes.
* WebCore.xcodeproj/project.pbxproj:
2012-01-02 Kentaro Hara <haraken@chromium.org>
Add resolve-supplemental.pl to build scripts of AppleWin
https://bugs.webkit.org/show_bug.cgi?id=75412
Reviewed by Adam Barth.
We should have added "resolve-supplemental.pl" to build scripts of AppleWin
when we enabled the [Supplemental] IDL on AppleWin at r103519.
This is a follow-up patch for it.
No tests. Just confirm that the AppleWin build passes.
* WebCore.vcproj/MigrateScripts:
* WebCore.vcproj/WebCore.vcproj:
2012-01-02 Sam Weinig <sam@webkit.org>
Fix the build.
* bindings/scripts/CodeGeneratorJS.pm:
2012-01-02 Andy Estes <aestes@apple.com>
Fix the Windows build after r103888.
* WebCore.vcproj/WebCore.vcproj: Remove CollectionCache.{cpp, h} from
the WebCore vcproj.
2012-01-02 Sam Weinig <sam@webkit.org>
REGRESSION(r100517): We're leaking many, many DOM objects!
https://bugs.webkit.org/show_bug.cgi?id=75451
Reviewed by Mark Rowe.
* bindings/scripts/CodeGeneratorJS.pm:
Add a temporary workaround to the problem of handle finalizers
not getting called by adding back the destructors (or rather
their replacement, destroy() functions).
2012-01-02 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Fix chromium mac build after r103905
https://bugs.webkit.org/show_bug.cgi?id=75436
Reviewed by Csaba Osztrogonác.
Adding parenthesis to disambiguate because clang gives error
"expression is not assignable".
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::RenderSVGResourceGradient::applyResource):
2011-12-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Use HashMap<OwnPtr> in RenderSVGResourceGradient
https://bugs.webkit.org/show_bug.cgi?id=75364
Reviewed by Daniel Bates.
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::RenderSVGResourceGradient::removeAllClientsFromCache):
(WebCore::RenderSVGResourceGradient::removeClientFromCache):
(WebCore::RenderSVGResourceGradient::applyResource): avoid looking
up the hash twice by using HashMap::add().
* rendering/svg/RenderSVGResourceGradient.h: rename m_gradient to m_gradientMap.
2012-01-02 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Fix qmake warning about unescaped backslashes
Reviewed by Ossy.
* DerivedSources.pri:
2012-01-02 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck issue.
* GNUmakefile.am: Add resolve-supplemental.pl script to
EXTRA_DIST.
2012-01-01 Andreas Kling <awesomekling@apple.com>
Clear HTMLCollection's internal cache on construction.
<http://webkit.org/b/75423>
Reviewed by Antti Koivisto.
* html/HTMLCollection.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::invalidateCacheIfNeeded):
2012-01-01 Eunmi Lee <eunmi15.lee@samsung.com>
[EFL] Move function to get dpi to the WebCore/platform/efl/EflScreenUtilities.cpp.
https://bugs.webkit.org/show_bug.cgi?id=75292
Reviewed by Andreas Kling.
Move ewk_util_dpi_get() function in the ewk_util.cpp to the
WebCore/platform/efl/EflScreenUtilities.cpp in order to use it in the WebKit2.
The function's name is changed to getDPI().
* PlatformEfl.cmake:
* platform/efl/EflScreenUtilities.cpp: Added.
(WebCore::getDPI):
* platform/efl/EflScreenUtilities.h: Added.
2012-01-01 Andreas Kling <awesomekling@apple.com>
Merge CollectionCache into HTMLCollection.
<http://webkit.org/b/75423>
Reviewed by Anders Carlsson.
- Move the members of CollectionCache into HTMLCollection.
- Renamed resetCollectionInfo() to invalidateCacheIfNeeded().
- Removed a bunch of overkill HashMap::checkConsistency() calls.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* html/CollectionCache.cpp: Removed.
* html/CollectionCache.h: Removed.
Remove CollectionCache.
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::namedItemWithIndex):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::~HTMLCollection):
(WebCore::HTMLCollection::invalidateCacheIfNeeded):
(WebCore::HTMLCollection::length):
(WebCore::HTMLCollection::item):
(WebCore::HTMLCollection::nextItem):
(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):
(WebCore::HTMLCollection::hasNamedItem):
(WebCore::HTMLCollection::namedItems):
(WebCore::HTMLCollection::append):
* html/HTMLCollection.h:
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::item):
(WebCore::HTMLFormCollection::getNamedItem):
(WebCore::HTMLFormCollection::nextItem):
(WebCore::HTMLFormCollection::namedItem):
(WebCore::HTMLFormCollection::updateNameCache):
HTMLCollection's m_info and info() become "struct m_cache" (protected.)
* html/HTMLOptionsCollection.cpp:
* html/HTMLOptionsCollection.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::setRecalcListItems):
Expose HTMLCollection::invalidateCacheIfNeeded() so we can call it from
HTMLSelectElement::setRecalcListItems().
* html/HTMLFormCollection.h:
Remove stale declaration of formCollectionInfo() which no longer exists.
2012-01-01 Andreas Kling <awesomekling@apple.com>
Move the remaining collections to caching on their respective base nodes.
<http://webkit.org/b/75416>
Reviewed by Anders Carlsson.
Add a (lazily-allocated) array of HTMLCollections to ElementRareData and cache
the various collections on their base node rather than recreating them every time.
Test: fast/dom/collection-idempotence.html
fast/dom/gc-9.html
* html/CollectionType.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::hasCachedHTMLCollections):
(WebCore::ElementRareData::cachedHTMLCollection):
(WebCore::ElementRareData::ensureCachedHTMLCollection):
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::ensureCachedHTMLCollection):
Plumbing to cache HTMLCollections on ElementRareData.
(WebCore::Element::~Element):
Detach any cached collections from an element when it's destroyed.
* html/HTMLCollection.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::create):
(WebCore::HTMLCollection::~HTMLCollection):
(WebCore::HTMLCollection::detachFromNode):
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::HTMLFormCollection):
* dom/Document.cpp:
(WebCore::Document::cachedCollection):
Consolidate the HTMLCollection constructors and get rid of the hacks to
optionally retain the base node.
* html/HTMLDataListElement.cpp:
(WebCore::HTMLDataListElement::options):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::children):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::areas):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::tBodies):
* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::cells):
* html/HTMLTableSectionElement.cpp:
(WebCore::HTMLTableSectionElement::rows):
Cached collections!
2012-01-01 Raymond Liu <raymond.liu@intel.com>
Use overload methods to implement [Optional] parameters in AudioNode.idl
https://bugs.webkit.org/show_bug.cgi?id=75402
Reviewed by Adam Barth.
No new tests required.
* GNUmakefile.list.am:
* UseV8.cmake:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSAudioNodeCustom.cpp: Removed.
* bindings/v8/custom/V8AudioNodeCustom.cpp: Removed.
* webaudio/AudioNode.cpp:
(WebCore::AudioNode::connect):
(WebCore::AudioNode::disconnect):
* webaudio/AudioNode.h:
* webaudio/AudioNode.idl:
2011-12-20 Robert Hogan <robert@webkit.org>
CSS 2.1 failure: border-collapse-offset-002.htm fails
https://bugs.webkit.org/show_bug.cgi?id=71705
Reviewed by Julien Chaffraix.
Tests: css2.1/20110323/border-collapse-offset-002-expected.html
fast/css/caption-width-absolute-position-offset-top.htm
fast/css/caption-width-absolute-position.htm
fast/css/caption-width-fixed-position-offset-top.htm
fast/css/caption-width-fixed-position.htm
fast/css/caption-width-relative-position-offset-top.htm
fast/css/caption-width-relative-position.htm
Table captions are implemented as children of the table but have a special
requirement to expand to the full width of the table rather than just the 'available'
width, i.e. the full width minus padding and borders.
To accomodate this create a RenderTableCaption object that reimplements containingBlockLogicalWidthForContent()
to return the full width of the containing block (i.e. the table) rather than the available width.
* CMakeLists.txt: Add RenderTableCaption.[cpp|h]
* GNUmakefile.list.am: Add RenderTableCaption.[cpp|h]
* Target.pri: Add RenderTableCaption.[cpp|h]
* WebCore.gypi: Add RenderTableCaption.[cpp|h]
* WebCore.vcproj/WebCore.vcproj: Add RenderTableCaption.[cpp|h]
* WebCore.xcodeproj/project.pbxproj: Add RenderTableCaption.[cpp|h]
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Use RenderTableCaption
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject): Add RenderTableCaption.[cpp|h]
(WebCore::RenderObject::addChild): ditto
* rendering/RenderObject.h:
(WebCore::RenderObject::isTableCaption):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild):
* rendering/RenderTable.h:
* rendering/RenderTableCaption.cpp: Added.
(WebCore::RenderTableCaption::RenderTableCaption): Implement RenderTableCaption
(WebCore::RenderTableCaption::~RenderTableCaption):
(WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Return the containing block's full width rather than it's available width.
* rendering/RenderTableCaption.h: Added.
(WebCore::RenderTableCaption::isTableCaption):
(WebCore::toRenderTableCaption):
* rendering/RenderingAllInOne.cpp:
2012-01-01 Kentaro Hara <haraken@chromium.org>
Unreviewed. Rebaselined run-bindings-tests results.
* bindings/scripts/test/CPP/WebDOMTestSupplemental.cpp: Added.
* bindings/scripts/test/CPP/WebDOMTestSupplemental.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestSupplemental.cpp: Added.
* bindings/scripts/test/GObject/WebKitDOMTestSupplemental.h: Added.
* bindings/scripts/test/ObjC/DOMTestSupplemental.cpp: Added.
* bindings/scripts/test/ObjC/DOMTestSupplemental.h: Added.
2012-01-01 Andreas Kling <awesomekling@apple.com>
Make HTMLCollections play nice after their base node is gone.
<http://webkit.org/b/75410>
Reviewed by Anders Carlsson.
Added HTMLCollection::detachFromNode() and call that from destructors of nodes
with cached collections.
Sprinkled checks/assertions where applicable to make sure HTMLCollections are
empty after their associated node has been destroyed.
This is a slight change in behavior, as collections would previously keep
their nodes alive indefinitely. Added a test to document this.
Test: fast/dom/htmlcollection-zombies.html
* dom/Document.cpp:
(WebCore::Document::~Document):
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::namedItemWithIndex):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::detachFromNode):
(WebCore::HTMLCollection::resetCollectionInfo):
(WebCore::HTMLCollection::itemAfter):
(WebCore::HTMLCollection::calcLength):
(WebCore::HTMLCollection::length):
(WebCore::HTMLCollection::item):
(WebCore::HTMLCollection::nextItem):
(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):
(WebCore::HTMLCollection::hasNamedItem):
(WebCore::HTMLCollection::namedItems):
(WebCore::HTMLCollection::tags):
* html/HTMLCollection.h:
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::calcLength):
(WebCore::HTMLFormCollection::item):
(WebCore::HTMLFormCollection::getNamedItem):
(WebCore::HTMLFormCollection::getNamedFormItem):
(WebCore::HTMLFormCollection::namedItem):
(WebCore::HTMLFormCollection::updateNameCache):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::~HTMLFormElement):
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::itemAfter):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::add):
(WebCore::HTMLOptionsCollection::remove):
(WebCore::HTMLOptionsCollection::selectedIndex):
(WebCore::HTMLOptionsCollection::setSelectedIndex):
(WebCore::HTMLOptionsCollection::setLength):
* html/HTMLPropertiesCollection.cpp:
(WebCore::HTMLPropertiesCollection::length):
(WebCore::HTMLPropertiesCollection::item):
(WebCore::HTMLPropertiesCollection::names):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::~HTMLSelectElement):
* html/HTMLSelectElement.h:
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::~HTMLTableElement):
* html/HTMLTableElement.h:
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::itemAfter):
2012-01-01 Andreas Kling <awesomekling@apple.com>
HTMLCollection: Remove the constructor's custom CollectionCache* argument.
<http://webkit.org/b/75414>
Reviewed by Anders Carlsson.
We no longer need to initialize HTMLCollections with a custom CollectionCache,
so remove the argument from the constructor.
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
* html/HTMLCollection.h:
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::HTMLFormCollection):
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::HTMLNameCollection):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
2011-12-31 Dan Bernstein <mitz@apple.com>
WebCore changes for: REGRESSION (WebKit2): Cursor, hover states not updated when page scrolls under stationary mouse pointer
https://bugs.webkit.org/show_bug.cgi?id=75405
Reviewed by Anders Carlsson.
Test: fast/events/frame-scroll-fake-mouse-move.html
* page/FrameView.cpp:
(WebCore::FrameView::scrollPositionChanged): Added a call to
EventHandler::dispatchFakeMouseMoveEventSoon().
2012-01-01 Andreas Kling <awesomekling@apple.com>
Cache named item collections on Document, not just their caches.
<http://webkit.org/b/75403>
Reviewed by Anders Carlsson.
Keep two maps of name -> RefPtr<HTMLNameCollection> on Document. We already
had maps for the CollectionCaches and were creating the HTMLNameCollections
every time they were accessed. We now let the collections create and manage
the CollectionCaches instead of Document.
No new tests since these collections are not exposed to the web.
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::windowNamedItems):
(WebCore::Document::documentNamedItems):
Replace the name/CollectionCache maps by name/HTMLNameCollection maps.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::nameGetter):
Pass names as AtomicStrings to Document's collection getters.
* html/HTMLNameCollection.h:
(WebCore::HTMLNameCollection::create):
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::HTMLNameCollection):
Store the name in an AtomicString instead of a String, incidentally
making traversal of HTMLNameCollections more efficient.
* html/CollectionType.h:
Remove two now-unneeded constants.
2012-01-01 Andreas Kling <awesomekling@apple.com>
Remove Document::collectionInfo() and let collections manage their caches.
<http://webkit.org/b/75401>
Reviewed by Anders Carlsson.
Remove the CollectionCaches from Document and have the document's collections
create and manage the caches on-demand instead. This is a step towards merging
CollectionCache into HTMLCollection.
* dom/Document.h:
* dom/Document.cpp:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
* html/HTMLOptionsCollection.cpp:
2012-01-01 Andreas Kling <awesomekling@apple.com>
RenderThemeMac: Avoid double hash lookup in systemColor().
<http://webkit.org/b/75409>
Reviewed by Anders Carlsson.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemColor):
2012-01-01 Andreas Kling <awesomekling@apple.com>
CSSStyleSelector: Avoid double hash lookup in keyframeStylesForAnimation().
<http://webkit.org/b/75408>
Reviewed by Anders Carlsson.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::keyframeStylesForAnimation):
2012-01-01 Andreas Kling <awesomekling@apple.com>
KeyframeAnimation: Use hash lookups to determine if property is animated.
<http://webkit.org/b/75407>
Reviewed by Anders Carlsson.
Clean out an old FIXME about using hash lookups instead of iterating over
the properties.
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::hasAnimationForProperty):
(WebCore::KeyframeAnimation::affectsProperty):
2011-12-31 Dan Bernstein <mitz@apple.com>
WebCore change for <rdar://problem/10463059> Cannot print USPS shipping labels
http://webkit.org/b/72801
Reviewed by Anders Carlsson and Alexey Proskuryakov.
* WebCore.exp.in: Exported Chrome::print().
2011-12-31 Dan Bernstein <mitz@apple.com>
WebCore changes for <rdar://problem/8750356> REGRESSION (WebKit2): Printing a subframe containing a PDF prints the on-screen view instead of the entire PDF document
<http://webkit.org/b/75232>
Reviewed by Alexey Proskuryakov.
* WebCore.exp.in: Exported PluginDocument::pluginWidget().
* WebCore.xcodeproj/project.pbxproj: Promoted PluginDocument.h to private.
* html/PluginDocument.h: Fixed a typo in a comment.
2011-12-30 Andreas Kling <awesomekling@apple.com>
Cache and reuse the HTMLTableElement.rows collection.
<http://webkit.org/b/75398>
Reviewed by Anders Carlsson.
Let HTMLTableElement::rows() cache the returned collection and tie it to the
lifetime of the form.
Test: fast/dom/table-rows-collection-idempotence.html
fast/dom/gc-9.html
* html/HTMLTableElement.h:
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::rows):
Cache the HTMLTableRowsCollection returned by rows() on the HTMLTableElement.
Remove the per-table CollectionCache and let the collection manage that.
* html/HTMLTableRowsCollection.h:
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
(WebCore::HTMLTableRowsCollection::create):
Tell the base class constructor to not retain the back-pointer to the table.
2011-12-30 Andreas Kling <awesomekling@apple.com>
Cache and reuse the HTMLSelectElement.options collection.
<http://webkit.org/b/75399>
Reviewed by Anders Carlsson.
Let HTMLSelectElement::options() cache the returned collection and tie it to the
lifetime of the form. This shrinks HTMLSelectElement by sizeof(CollectionCache)
minus one pointer.
Test: fast/dom/select-options-collection-idempotence.html
fast/gc-9.html
* html/HTMLSelectElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::options):
Cache the HTMLOptionsCollection returned by options() on the HTMLSelectElement.
Remove the per-select CollectionCache and let the collection manage that.
* html/HTMLOptionsCollection.h:
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::create):
(WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
Tell the base class constructor to not retain the back-pointer to the element.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::setRecalcListItems):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::invalidateCache):
Added so HTMLSelectElement can invalidate the collection without triggering
unnecessary instantiation of a CollectionCache.
2011-12-30 Kentaro Hara <haraken@chromium.org>
Enable the [Supplemental] IDL on CMake
https://bugs.webkit.org/show_bug.cgi?id=75345
Reviewed by Daniel Bates.
This patch enables the [Supplemental] IDL on CMake by changing the build
flow of CMake as follows.
- Previous build flow:
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl;
generate-bindings.pl reads $idl;
generate-bindings.pl generates .h and .cpp files for $idl;
}
- New build flow (See the discussions in bug 72138 for more details):
resolve-supplemental.pl depends on all IDL files;
resolve-supplemental.pl reads all IDL files;
resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
resolve-supplemental.pl outputs supplemental_dependency.tmp;
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
generate-bindings.pl reads $idl;
generate-bindings.pl reads supplemental_dependency.tmp;
generate-bindings.pl generates .h and .cpp files for $idl,
including all attributes in the IDL files that are implementing $idl;
}
Tests: Confirm that build succeeds.
http/tests/websocket/tests/*
* CMakeLists.txt:
* UseJSC.cmake: Modified to reflect the new build flow as described above.
* UseV8.cmake: Ditto.
2011-12-30 Robert Hogan <robert@webkit.org>
REGRESSION (r94492): Text is shifted to the right in some buttons in the Mac App Store
https://bugs.webkit.org/show_bug.cgi?id=74723
Reviewed by Dan Bernstein.
Tests: fast/css/absolute-inline-alignment-2.html
fast/css/absolute-inline-alignment.html
Inline positioned elements in the leading spaces of an inline run need to align to
adjacent text, so add them to the run as they're encountered.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineInfo::LineInfo): Keep a count of positioned objects encountered when
skipping leading whitespace.
(WebCore::LineInfo::runsFromLeadingWhitespace):
(WebCore::LineInfo::resetRunsFromLeadingWhitespace):
(WebCore::LineInfo::incrementRunsFromLeadingWhitespace):
(WebCore::RenderBlock::constructLine): Leading positioned objects should not be considered
when deciding the number of runs in a line. Otherwise they would contribute towards line
height themselves and prevent a free-standing BR following the positioned object from providing a full
20px of height.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Since a run containing line-breaks will enter
skipLeadingWhitespace for each new line we reset the count every time so that the count of positioned
objects we encounter only affects the line they appear on. This case is covered by
fast/inline/styledEmptyInlinesWithBRs.html
(WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace): Add a run for each inline positioned object
encountered in leading white space. Keep a count of them so that they can be excluded from
the total number of runs in constructLine.
2011-12-30 Raymond Liu <raymond.liu@intel.com>
Remove unnecessary [Custom] attribute in CanvasRenderingContext2D.idl
https://bugs.webkit.org/show_bug.cgi?id=75376
Reviewed by Adam Barth.
No new tests required.
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
* html/canvas/CanvasRenderingContext2D.idl:
2011-12-30 Andreas Kling <awesomekling@apple.com>
Cache and reuse the HTMLFormElement.elements collection.
<http://webkit.org/b/75375>
Reviewed by Anders Carlsson.
Let HTMLFormElement::elements() cache the returned collection and tie it to the
lifetime of the form. This reduces memory consumption by ~70 kB (on 64-bit) when
viewing your average popular post on reddit.com.
Test: fast/dom/form-elements-collection-idempotence.html
fast/dom/gc-9.html
* html/HTMLFormElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::elements):
Cache the HTMLFormCollection returned by elements() on the HTMLFormElement.
Remove the per-form CollectionCache and let the collection manage that.
* html/HTMLCollection.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::create):
Have the HTMLCollection constructor take a bool argument that decides whether
we retain the base node pointer or not. This mechanism is a temporary measure
until all collection types are owned by their respective base nodes.
* html/HTMLFormCollection.h:
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::HTMLFormCollection):
(WebCore::HTMLFormCollection::create):
Tell the base class constructor to not retain the back-pointer to the form.
2011-12-30 Andreas Kling <awesomekling@apple.com>
Unreviewed buildfix after r103841.
* inspector/InspectorMemoryAgent.cpp:
2011-12-30 Andreas Kling <awesomekling@apple.com>
CSSStyleDeclaration: Only allow setting parent rule at construction.
<http://webkit.org/b/75391>
Reviewed by Dan Bernstein.
A CSSStyleDeclaration should only ever belong to one CSSRule. Enforce this
at compile-time by replacing setParentRule(CSSRule*) with clearParentRule().
* css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::~CSSFontFaceRule):
* css/CSSStyleDeclaration.h:
(WebCore::CSSStyleDeclaration::clearParentRule):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::~CSSStyleRule):
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::WebKitCSSKeyframeRule::~WebKitCSSKeyframeRule):
2011-12-30 Andreas Kling <awesomekling@apple.com>
WebKitCSSKeyframeRule.style.parentRule should point to the keyframe rule.
<http://webkit.org/b/75336>
Reviewed by Antti Koivisto.
Let CSS animation keyframe rules .style.parentRule point back to the keyframe
board, rather than the keyframes rule containing it.
Test: fast/css/css-keyframe-style-parentRule.html
* css/CSSParser.cpp:
(WebCore::CSSParser::createKeyframeRule):
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::WebKitCSSKeyframeRule::setDeclaration):
Set the CSSMutableStyleDeclaration's parent rule when creating it instead
of in WebKitCSSKeyframeRule::setDeclaration(). Add assertion to make sure
it's only called with declarations already parented to the keyframe rule.
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
(WebCore::WebKitCSSKeyframesRule::append):
(WebCore::WebKitCSSKeyframesRule::deleteRule):
Stop reparenting keyframe rules' style declarations to the keyframes rule.
2011-12-30 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: use typed front-end API in the memory agent
https://bugs.webkit.org/show_bug.cgi?id=75382
Memory agent now uses generate C++ API for communicating to the front-end.
Reviewed by Pavel Feldman.
* inspector/InspectorMemoryAgent.cpp:
(WebCore::DOMTreeStatistics::CounterVisitor::CounterVisitor):
(WebCore::DOMTreeStatistics::CounterVisitor::counters):
(WebCore::DOMTreeStatistics::CounterVisitor::visitNode):
2011-12-30 Pavel Feldman <pfeldman@google.com>
Web Inspector: migrate from "attached" to "compact" styles.
https://bugs.webkit.org/show_bug.cgi?id=75381
When front-end is docked to right, it should look like "detached", but is still "attached".
Use "compact" mode instead of "attached" mode in the styles to mitigate it.
Reviewed by Yury Semikhatsky.
* inspector/front-end/SearchController.js:
(WebInspector.SearchController.prototype.updateSearchLabel):
* inspector/front-end/Toolbar.js:
(WebInspector.Toolbar.prototype.set compact):
(WebInspector.Toolbar.prototype._toolbarDragStart):
(WebInspector.Toolbar.prototype._toolbarDrag):
* inspector/front-end/helpScreen.css:
(body.compact .help-window-outer):
(body.compact .help-window-main):
(body.compact .help-window-caption):
(body.compact .help-close-button):
(body.compact .help-content):
* inspector/front-end/inspector.css:
(body.compact #toolbar):
(body.compact.port-qt #toolbar):
(body.compact.inactive #toolbar):
(body.compact #search-toolbar-label):
(body.compact #toolbar-dropdown-arrow):
(body.compact #search):
(body.compact.port-qt .toolbar-item.close-left, body.compact.port-qt .toolbar-item.close-right):
(body.compact #main):
* inspector/front-end/inspector.js:
(WebInspector.set attached):
(WebInspector.get isCompactMode):
(WebInspector.get _setCompactMode):
(WebInspector._installDockToRight.listener.get if):
(WebInspector._installDockToRight.listener):
* inspector/front-end/inspectorCommon.css:
(body.dock-to-right):
(body.dock-to-right.inactive):
2011-12-30 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r103794.
http://trac.webkit.org/changeset/103794
https://bugs.webkit.org/show_bug.cgi?id=75379
the ASSERT is triggered by several tests (Requested by
jchaffraix on #webkit).
* rendering/RenderTable.cpp:
(WebCore::RenderTable::RenderTable):
(WebCore::RenderTable::addChild):
(WebCore::RenderTable::layout):
(WebCore::RenderTable::recalcSections):
(WebCore::RenderTable::outerBorderAfter):
(WebCore::RenderTable::sectionAbove):
(WebCore::RenderTable::sectionBelow):
* rendering/RenderTable.h:
(WebCore::RenderTable::header):
(WebCore::RenderTable::footer):
(WebCore::RenderTable::firstBody):
(WebCore::RenderTable::hasSections):
(WebCore::RenderTable::topSection):
2011-12-29 Pavel Feldman <pfeldman@google.com>
Web Inspector: enable dock-to-right view (still need embedders to support it).
https://bugs.webkit.org/show_bug.cgi?id=75360
Reviewed by Yury Semikhatsky.
* English.lproj/localizedStrings.js:
* inspector/front-end/Settings.js:
(WebInspector.Settings):
* inspector/front-end/SettingsScreen.js:
(WebInspector.SettingsScreen):
* inspector/front-end/inspector.js:
(WebInspector.set attached):
(WebInspector._renderAsAttached.get return):
(WebInspector._renderAsAttached):
(WebInspector._installDockToRight.updateToolbar):
2011-12-29 Raymond Liu <raymond.liu@intel.com>
Use IDL overloads in AudioContext.idl for createBuffer
https://bugs.webkit.org/show_bug.cgi?id=75293
Reviewed by Adam Barth.
No new tests required.
* bindings/js/JSAudioContextCustom.cpp:
* bindings/v8/custom/V8AudioContextCustom.cpp:
* webaudio/AudioContext.cpp:
(WebCore::AudioContext::createBuffer):
* webaudio/AudioContext.h:
* webaudio/AudioContext.idl:
2011-12-29 Andreas Kling <awesomekling@apple.com>
HTMLDivElement: Remove unnecessary variable in parseMappedAttribute().
<http://webkit.org/b/75363>
Reviewed by Daniel Bates.
* html/HTMLDivElement.cpp:
(WebCore::HTMLDivElement::parseMappedAttribute):
2011-12-29 Andreas Kling <awesomekling@apple.com>
HTMLParagraphElement: Remove unnecessary variable in parseMappedAttribute().
<http://webkit.org/b/75362>
Reviewed by Daniel Bates.
* html/HTMLParagraphElement.cpp:
(WebCore::HTMLParagraphElement::parseMappedAttribute):
2011-12-29 Andreas Kling <awesomekling@apple.com>
Use HashMap<OwnPtr> for Document's named item collection caches.
<http://webkit.org/b/75335>
Reviewed by Daniel Bates.
* dom/Document.cpp:
(WebCore::Document::~Document):
Remove now-unneeded deleteAllValues() loop.
(WebCore::Document::nameCollectionInfo):
Use add() instead of find()/add() to avoid one extra hash lookup.
* dom/Document.h:
Switch the value type of m_nameCollectionInfo to use OwnPtr.
2011-12-29 David Barton <dbarton@mathscribe.com>
mfenced skips the first separator if the separators attribute contains multiple separators
https://bugs.webkit.org/show_bug.cgi?id=57697
Reviewed by Dan Bernstein.
Added 2 test cases.
* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::addChild):
- Thanks to Xun Sun <xun.sun@intel.com> for the off-by-one error fix.
2011-12-29 Alexis Menard <alexis.menard@openbossa.org>
Enable the [Supplemental] IDL on Qt.
https://bugs.webkit.org/show_bug.cgi?id=75274
Reviewed by Andreas Kling.
http://trac.webkit.org/changeset/103783 broke the Qt SL bot.
This patch fixes the problem by using 'tr' rather than 'sed' which
seems to be more consistent between Mac and Linux.
* DerivedSources.pri:
2011-12-29 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Scripts navigator should support incremental search by typing.
https://bugs.webkit.org/show_bug.cgi?id=75349
Reviewed by Pavel Feldman.
* inspector/front-end/ScriptsNavigator.js:
(WebInspector.ScriptsNavigator):
(WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement):
(WebInspector.ScriptsNavigator.prototype.show):
(WebInspector.ScriptsNavigator.prototype._reset):
(WebInspector.NavigatorTreeOutline):
(WebInspector.NavigatorTreeOutline.prototype.scriptTreeElements):
(WebInspector.NavigatorTreeOutline.prototype.searchStarted):
(WebInspector.NavigatorTreeOutline.prototype.searchFinished):
(WebInspector.BaseNavigatorTreeElement.prototype.onreveal):
(WebInspector.BaseNavigatorTreeElement.prototype.set titleText):
(WebInspector.BaseNavigatorTreeElement.prototype.matchesSearchText):
* inspector/front-end/inspector.css:
(.outline-disclosure ol.search-match-not-found li.selected .selection):
(.outline-disclosure ol.search-match-found li.selected):
(.outline-disclosure ol.search-match-found li.selected *):
(.outline-disclosure ol.search-match-found li.parent.selected::before):
(.outline-disclosure ol.search-match-found li.parent.expanded.selected::before):
* inspector/front-end/scriptsPanel.css:
(#scripts-navigator-tree-search-box):
(#scripts-navigator-tree-search-box.visible):
(#scripts-navigator-tree-search-box > input):
(.scripts.panel .navigator .search-match-found li.selected .selection):
(.scripts.panel .navigator .search-match-not-found li.selected .selection):
(.scripts.panel .navigator .searching li.selected .selection):
* inspector/front-end/treeoutline.js:
(TreeOutline):
(TreeOutline.prototype._treeKeyPress):
(TreeOutline.prototype._startSearch.focusSearchInput):
(TreeOutline.prototype._startSearch):
(TreeOutline.prototype._searchTextChanged):
(TreeOutline.prototype._showSearchMatchElement):
(TreeOutline.prototype._searchInputKeyDown):
(TreeOutline.prototype._nextSearchMatch):
(TreeOutline.prototype._previousSearchMatch):
(TreeOutline.prototype._searchInputBlur):
(TreeOutline.prototype._searchFinished):
(TreeOutline.prototype.stopSearch):
2011-12-29 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Scripts navigator should trim long file names and show full url in tooltip.
https://bugs.webkit.org/show_bug.cgi?id=75343
Reviewed by Pavel Feldman.
Test: inspector/debugger/ui-source-code-display-name.html
* inspector/front-end/ScriptsNavigator.js:
(WebInspector.ScriptsNavigator.prototype.setScriptSourceIsDirty):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.EditorContainer.prototype.showSourceFrame):
(WebInspector.ScriptsPanel.EditorContainer.prototype.replaceSourceFrames):
(WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.showSourceFrame):
(WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.replaceSourceFrames):
* inspector/front-end/TabbedEditorContainer.js:
(WebInspector.TabbedEditorContainer):
(WebInspector.TabbedEditorContainer.prototype._appendSourceFrameTab):
(WebInspector.TabbedEditorContainer.prototype._tabClosed):
(WebInspector.TabbedEditorContainer.prototype._replaceSourceFrameTab.get if):
(WebInspector.TabbedEditorContainer.prototype._replaceSourceFrameTab):
(WebInspector.TabbedEditorContainer.prototype.get replaceSourceFrames):
(WebInspector.TabbedEditorContainer.prototype.reset):
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPane.prototype.appendTab):
(WebInspector.TabbedPane.prototype.changeTabTooltip):
(WebInspector.TabbedPaneTab):
(WebInspector.TabbedPaneTab.prototype.get tooltip):
(WebInspector.TabbedPaneTab.prototype.set tooltip):
(WebInspector.TabbedPaneTab.prototype._createTabElement):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode.prototype._parseURL):
* inspector/front-end/utilities.js:
():
2011-12-29 Alexis Menard <alexis.menard@openbossa.org>
getComputedStyle for margin is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=75358
Reviewed by Andreas Kling.
Implement getComputedStyle for margin.
Test: fast/css/getComputedStyle/getComputedStyle-margin-shorthand.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2011-12-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Use HashMap<OwnPtr> in RenderSVGResourcePattern
https://bugs.webkit.org/show_bug.cgi?id=75361
Reviewed by Andreas Kling.
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::removeAllClientsFromCache):
(WebCore::RenderSVGResourcePattern::removeClientFromCache):
(WebCore::RenderSVGResourcePattern::applyResource): use HashMap::add() to avoid
looking up the hash twice.
* rendering/svg/RenderSVGResourcePattern.h: rename m_pattern to m_patternMap to
improve readability a little bit.
2011-12-29 Alexis Menard <alexis.menard@openbossa.org>
getComputedStyle for padding is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=75352
Reviewed by Andreas Kling.
Implement getComputedStyle for padding shorthand property.
Test: fast/css/getComputedStyle/getComputedStyle-padding-shorthand.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2011-12-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Use HashMap<OwnPtr> in OriginAccessMap
https://bugs.webkit.org/show_bug.cgi?id=75327
Reviewed by Andreas Kling.
* page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
(WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry):
(WebCore::SecurityPolicy::resetOriginAccessWhitelists):
2011-12-29 Pavel Podivilov <podivilov@chromium.org>
Web Inspector: support sourceMappingURL magic comment.
https://bugs.webkit.org/show_bug.cgi?id=75356
Reviewed by Pavel Feldman.
* inspector/ContentSearchUtils.cpp:
(WebCore::ContentSearchUtils::findSourceMapURL):
* inspector/ContentSearchUtils.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::sourceMapURLForScript):
2011-12-29 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Suggest pop-over doesn't hide on tab switch
https://bugs.webkit.org/show_bug.cgi?id=73611
Reviewed by Pavel Feldman.
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype.willHide):
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype.complete):
(WebInspector.TextPrompt.prototype._completionsReady):
(WebInspector.TextPrompt.prototype.acceptSuggestion):
(WebInspector.TextPrompt.prototype.hideSuggestBox):
(WebInspector.TextPrompt.SuggestBox.prototype._completionsReady):
2011-12-28 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Implement CSS selector profiler
https://bugs.webkit.org/show_bug.cgi?id=74004
Reviewed by Pavel Feldman.
This implementation of CSS selector profiler measures the total time required to match a certain selector
against DOM nodes and apply the style declaration properties to the particular element,
as well as the number of selector matches (i.e. the number of nodes that matched the selector.)
The results are approximate due to internal matching algorithm optimizations (shared styles et al.)
Multiple selectors with the same selectorText are coalesced into a single record.
* English.lproj/localizedStrings.js:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.sh:
* inspector/front-end/CSSSelectorProfileView.js: Added.
(WebInspector.CSSSelectorDataGridNode):
(WebInspector.CSSSelectorDataGridNode.prototype.get rawData):
(WebInspector.CSSSelectorProfileView):
(WebInspector.CSSSelectorProfileView.prototype.get statusBarItems):
(WebInspector.CSSSelectorProfileView.prototype.get profile):
(WebInspector.CSSSelectorProfileView.prototype.set profile):
(WebInspector.CSSSelectorProfileView.prototype._createProfileNodes):
(WebInspector.CSSSelectorProfileView.prototype.rebuildGridItems):
(WebInspector.CSSSelectorProfileView.prototype.refreshData):
(WebInspector.CSSSelectorProfileView.prototype.refreshShowAsPercents):
(WebInspector.CSSSelectorProfileView.prototype._sortProfile.get selectorComparator):
(WebInspector.CSSSelectorProfileView.prototype._sortProfile.timeComparator):
(WebInspector.CSSSelectorProfileView.prototype._sortProfile.matchesComparator):
(WebInspector.CSSSelectorProfileView.prototype._sortProfile):
(WebInspector.CSSSelectorProfileType):
(WebInspector.CSSSelectorProfileType.prototype.get buttonTooltip):
(WebInspector.CSSSelectorProfileType.prototype.buttonClicked):
(WebInspector.CSSSelectorProfileType.prototype.get treeItemTitle):
(WebInspector.CSSSelectorProfileType.prototype.get description):
(WebInspector.CSSSelectorProfileType.prototype.reset):
(WebInspector.CSSSelectorProfileType.prototype.isRecordingProfile):
(WebInspector.CSSSelectorProfileType.prototype.setRecordingProfile):
(WebInspector.CSSSelectorProfileType.prototype.startRecordingProfile):
(WebInspector.CSSSelectorProfileType.prototype.stopRecordingProfile):
(WebInspector.CSSSelectorProfileType.prototype.createSidebarTreeElementForProfile):
(WebInspector.CSSSelectorProfileType.prototype.createView):
* inspector/front-end/DetailedHeapshotView.js:
* inspector/front-end/ProfileView.js:
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfileType.prototype.reset):
(WebInspector.ProfilesPanel.prototype._reset):
(WebInspector.ProfilesPanel.prototype.addProfileHeader):
(WebInspector.ProfilesPanel.prototype._removeTemporaryProfile):
(WebInspector.ProfilesPanel.prototype.setRecordingProfile):
(WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
(WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
(WebInspector.ProfilerDispatcher.prototype.addProfileHeader):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
* inspector/front-end/profilesPanel.css:
2011-12-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r103798.
http://trac.webkit.org/changeset/103798
https://bugs.webkit.org/show_bug.cgi?id=75353
some small scrollbar differences are making the tests fail on
several platforms (Requested by jchaffraix on #webkit).
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositionsAfterScroll):
2011-12-29 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Focus of the DOM tree is not restored when switching to the Elements panel
https://bugs.webkit.org/show_bug.cgi?id=75351
Reviewed by Yury Semikhatsky.
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype.wasShown):
2011-12-29 Julien Chaffraix <jchaffraix@webkit.org>
REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling
https://bugs.webkit.org/show_bug.cgi?id=67100
Reviewed by Dan Bernstein.
Tests: fast/layers/scroll-with-transform-composited-layer-expected.html
fast/layers/scroll-with-transform-composited-layer.html
fast/layers/scroll-with-transform-layer-expected.html
fast/layers/scroll-with-transform-layer.html
The regression came from a previous optimization that was wrongly kept after r93614.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositionsAfterScroll):
Remove the early return for transformed layer. This change worked as we used
to call updateLayerPositions from scrollTo which would call updateLayerPosition on
all our descendants. After r93614, this is no longer the case and we explicitely need
to call updateLayerPosition on our descendants from updateLayerPositionsAfterScroll.
2011-12-29 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Tree views can be collapsed/hidden using the keyboard arrows
https://bugs.webkit.org/show_bug.cgi?id=46272
Reviewed by Yury Semikhatsky.
WebInspector.SidebarSectionTreeElement which is not selectable has also been made non-collapsible
and expanded by default.
* inspector/front-end/AuditsPanel.js:
(WebInspector.AuditsPanel):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._registerProfileType):
* inspector/front-end/SidebarTreeElement.js:
(WebInspector.SidebarSectionTreeElement):
(WebInspector.SidebarSectionTreeElement.prototype.selectable.false.collapse):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel):
2011-12-29 Pavel Feldman <pfeldman@google.com>
Web Inspector: [chromium] pass dock to side request to the embedder.
https://bugs.webkit.org/show_bug.cgi?id=75344
Reviewed by Yury Semikhatsky.
I'd like to enable dock-to-right for the front-end window. This is a background work
to pass control flow from the front-end to the front-end host.
* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendClientLocal.h:
(WebCore::InspectorFrontendClientLocal::requestSetDockSide):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::requestSetDockSide):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.requestAttachWindow):
(.WebInspector.InspectorFrontendHostStub.prototype.requestDetachWindow):
(.WebInspector.InspectorFrontendHostStub.prototype.requestSetDockSide):
2011-12-28 Pavel Podivilov <podivilov@chromium.org>
Web Inspector: add "enable source maps" checkbox setting.
https://bugs.webkit.org/show_bug.cgi?id=75311
Reviewed by Pavel Feldman.
When "enable source maps" is on, all auto detected source maps are silently applied.
* English.lproj/localizedStrings.js:
* inspector/front-end/DebuggerPresentationModel.js:
* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
* inspector/front-end/RawSourceCode.js:
(WebInspector.RawSourceCode):
(WebInspector.RawSourceCode.prototype.setFormatted):
(WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping):
(WebInspector.RawSourceCode.prototype._updateSourceMapping):
(WebInspector.RawSourceCode.prototype._createUISourceCode):
* inspector/front-end/Settings.js:
(WebInspector.Settings):
* inspector/front-end/SettingsScreen.js:
(WebInspector.SettingsScreen):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode):
* inspector/front-end/inspector.js:
(WebInspector._toolbarItemClicked):
2011-12-29 Julien Chaffraix <jchaffraix@webkit.org>
Tighten our checks for needsSectionRecalc in RenderTable
https://bugs.webkit.org/show_bug.cgi?id=73972
Reviewed by Adam Barth.
Refactoring covered under the new tests.
Now most of the functions use the header, first body and footer's
getters that checks if we need a section recalculation. The only
exceptions are addChild and recalcSections as they can be called
with the bit set.
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
(WebCore::RenderTable::outerBorderAfter):
(WebCore::RenderTable::sectionAbove):
(WebCore::RenderTable::sectionBelow):
Updated the previous functions to use the sections' getters.
(WebCore::RenderTable::RenderTable):
(WebCore::RenderTable::addChild):
(WebCore::RenderTable::recalcSections):
Update the previous functions after the 2 renames
(see below).
* rendering/RenderTable.h:
(WebCore::RenderTable::header):
(WebCore::RenderTable::footer):
(WebCore::RenderTable::firstBody):
Added some ASSERT here. Also renamed m_head to m_header
and m_foot to m_footer to match the getter and to avoid
unneeded abbreviation.
(WebCore::RenderTable::hasSections):
(WebCore::RenderTable::topSection):
Updated the previous functions to use the section getters.
2011-12-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Use HashMap<OwnPtr> for UserScriptMap and UserStyleSheetMap
https://bugs.webkit.org/show_bug.cgi?id=75323
Reviewed by Darin Adler.
* dom/Document.cpp:
(WebCore::Document::pageGroupUserSheets):
* page/PageGroup.cpp:
(WebCore::PageGroup::addUserScriptToWorld):
(WebCore::PageGroup::addUserStyleSheetToWorld):
(WebCore::PageGroup::removeUserScriptFromWorld):
(WebCore::PageGroup::removeUserStyleSheetFromWorld): fix a small mistake in
previous code. Now the entry for world is removed (and deleted) only if its
stylesheet vector is empty.
(WebCore::PageGroup::removeUserScriptsFromWorld):
(WebCore::PageGroup::removeUserStyleSheetsFromWorld):
(WebCore::PageGroup::removeAllUserContent):
* page/UserScriptTypes.h:
* page/UserStyleSheetTypes.h:
2011-12-28 Andreas Kling <awesomekling@apple.com>
Reduce memory used by NamedNodeMap.
<http://webkit.org/b/75333>
Reviewed by Sam Weinig.
Give NamedNodeMap's attribute vector an inline capacity of 4. The vast majority
of elements have <= 4 attributes, and if they don't have any we normally don't
allocate an attribute map at all.
This reduces memory consumption by 1.2MB (on 64-bit) when loading the full HTML5
spec at <http://whatwg.org/c>.
* dom/NamedNodeMap.h:
2011-12-28 Andreas Kling <awesomekling@apple.com>
Reduce memory used by SpaceSplitString.
<http://webkit.org/b/75315>
Reviewed by Sam Weinig.
Split the string upon creation instead of waiting until it's accessed.
This allows us to get rid of all data members except the substring vector.
Since we're storing AtomicStrings, this is way more memory-efficient than
the previous implementation in the majority of cases.
Also reduced the inline capcity of the vector to 2 (from 8), after testing
showed this to cover 90% of the cases on the Alexa top sites.
All in all this reduces memory consumption by 1.1MB (on 64-bit) when
loading the full HTML5 spec at <http://whatwg.org/c>. On that same page,
less than 2ms is spent (on my MBP) splitting the ~20000 strings.
* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitStringData::createVector):
(WebCore::SpaceSplitStringData::containsAll):
(WebCore::SpaceSplitStringData::remove):
* dom/SpaceSplitString.h:
(WebCore::SpaceSplitStringData::SpaceSplitStringData):
(WebCore::SpaceSplitStringData::contains):
(WebCore::SpaceSplitStringData::size):
(WebCore::SpaceSplitStringData::operator[]):
2011-12-28 ChangSeok Oh <shivamidow@gmail.com>
[GTK] Fix compilation issue when selecting opengl for Accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=75309
Reviewed by Martin Robinson.
Add TextureMapperGL and TextureMapperGLCairo files.
They define new classes required to implement TextureMapperGL for GTK port.
No new tests required.
* GNUmakefile.list.am:
* platform/graphics/cairo/TextureMapperGLCairo.cpp: Added.
(WebCore::BGRA32PremultimpliedBufferCairo::BGRA32PremultimpliedBufferCairo):
(WebCore::BGRA32PremultimpliedBufferCairo::~BGRA32PremultimpliedBufferCairo):
(WebCore::BGRA32PremultimpliedBufferCairo::beginPaint):
(WebCore::BGRA32PremultimpliedBufferCairo::data):
(WebCore::BGRA32PremultimpliedBufferCairo::endPaint):
(WebCore::uidForImage):
(WebCore::BGRA32PremultimpliedBuffer::create):
* platform/graphics/cairo/TextureMapperGLCairo.h: Added.
2011-12-28 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r103782.
http://trac.webkit.org/changeset/103782
https://bugs.webkit.org/show_bug.cgi?id=75328
broke origin-whitelisting-removal.html (Requested by kling on
#webkit).
* page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
(WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry):
(WebCore::SecurityPolicy::resetOriginAccessWhitelists):
2011-12-28 Kentaro Hara <haraken@chromium.org>
Enable the [Supplemental] IDL on Qt
https://bugs.webkit.org/show_bug.cgi?id=75274
Reviewed by Adam Barth.
This patch enables the [Supplemental] IDL on Qt by changing the build
flow of Qt as follows.
- Previous build flow:
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl;
generate-bindings.pl reads $idl;
generate-bindings.pl generates .h and .cpp files for $idl;
}
- New build flow (See the discussions in bug 72138 for more details):
resolve-supplemental.pl depends on all IDL files;
resolve-supplemental.pl reads all IDL files;
resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
resolve-supplemental.pl outputs supplemental_dependency.tmp;
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
generate-bindings.pl reads $idl;
generate-bindings.pl reads supplemental_dependency.tmp;
generate-bindings.pl generates .h and .cpp files for $idl,
including all attributes in the IDL files that are implementing $idl;
}
Tests: Confirm that build succeeds.
http/tests/websocket/tests/*
* DerivedSources.pri: Described the above build flow.
2011-12-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Use HashMap<OwnPtr> in OriginAccessMap
https://bugs.webkit.org/show_bug.cgi?id=75327
Reviewed by Andreas Kling.
* page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
(WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry):
(WebCore::SecurityPolicy::resetOriginAccessWhitelists):
2011-12-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Use HashMap<OwnPtr> for ProgressTracker's items
https://bugs.webkit.org/show_bug.cgi?id=75326
Reviewed by Andreas Kling.
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::~ProgressTracker): although is empty, the destructor was
kept so in the header file we can forward declare ProgressItem and use in an OwnPtr.
(WebCore::ProgressTracker::reset):
(WebCore::ProgressTracker::incrementProgress):
(WebCore::ProgressTracker::completeProgress): removed a useless assignment to item
member just before it is deleted.
* loader/ProgressTracker.h:
2011-12-28 Alexis Menard <alexis.menard@openbossa.org>
getComputedStyle for border-color is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=75324
Reviewed by Andreas Kling.
Implement getComputedStyle for border-color.
Test: fast/css/getComputedStyle/getComputedStyle-border-color-shorthand.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2011-12-28 Darin Adler <darin@apple.com>
Use OwnPtr to handle lifetime and deletion of FontFace objects
https://bugs.webkit.org/show_bug.cgi?id=75221
Reviewed by Daniel Bates.
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData): Use add instead of get/set to read and
then later fill a cache. Use new version of registerCustomFont that takes PassOwnPtr.
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::getFontData): Ditto.
* dom/Document.cpp:
(WebCore::Document::registerCustomFont): Take a PassOwnPtr instead of raw pointer.
* dom/Document.h: Ditto.
2011-12-28 Adam Barth <abarth@webkit.org>
"Fake" insertion mode in HTMLTreeBuilder doesn't do anything
https://bugs.webkit.org/show_bug.cgi?id=75322
Reviewed by Darin Adler.
This machinery isn't needed anymore now that we're using the new
foreign content hotness.
* html/parser/HTMLTreeBuilder.cpp:
* html/parser/HTMLTreeBuilder.h:
(WebCore::HTMLTreeBuilder::setInsertionMode):
2011-12-28 Alexis Menard <alexis.menard@openbossa.org>
getComputedStyle for border-style is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=75312
Reviewed by Andreas Kling.
Implement getComputedStyle for border-style.
Test: fast/css/getComputedStyle/getComputedStyle-border-style-shorthand.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2011-12-28 Alexis Menard <alexis.menard@openbossa.org>
getComputedStyle for border-bottom, border-top, border-left, border-right is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=74743
Reviewed by Tony Chang.
Implement getComputedStyle for border-top, border-bottom, border-right, border-left.
Test: fast/css/getComputedStyle/getComputedStyle-border-shorthand.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
(WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForShorthandProperties):
* css/CSSComputedStyleDeclaration.h:
2011-12-28 Robert Hogan <robert@webkit.org>
Inline flow not learning height of all text descendants
https://bugs.webkit.org/show_bug.cgi?id=75305
Reviewed by Dan Bernstein.
Tests: fast/inline/nested-text-descendants-expected.html
fast/inline/nested-text-descendants.html
The root inline box would only learn it had text descendants if its first grandchild
was text. It wasn't informed of subsequent text grandchildren so could not factor them
into its calculation of the line height.
To fix this, propagate the existence of a text descendant to the root inline box
by walking up through the text child's ancestors.
* rendering/InlineFlowBox.cpp:
(WebCore::setHasTextDescendantsOnAncestors):
(WebCore::InlineFlowBox::addToLine):
* rendering/InlineFlowBox.h:
(WebCore::InlineFlowBox::setHasTextDescendants):
2011-12-28 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r103620.
http://trac.webkit.org/changeset/103620
https://bugs.webkit.org/show_bug.cgi?id=75316
Causes many crashes (Requested by abarth on #webkit).
* loader/FrameLoaderClient.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessageTimerFired):
2011-12-28 Alexander Pavlov <apavlov@chromium.org>
[V8][Chromium] 'randomString' in document.body.style always returns true
https://bugs.webkit.org/show_bug.cgi?id=75313
Reviewed by Adam Barth.
* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
(WebCore::V8CSSStyleDeclaration::namedPropertyQuery):
2011-12-28 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Add domain.png to WebCore.gypi / WebKit.qrc.
https://bugs.webkit.org/show_bug.cgi?id=75310
Reviewed by Pavel Feldman.
* WebCore.gypi:
* inspector/front-end/WebKit.qrc:
2011-12-28 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: ExperimentsSettings causes warning on chromium when reading localizedStrings.
https://bugs.webkit.org/show_bug.cgi?id=75299
Reviewed by Pavel Feldman.
* inspector/front-end/Settings.js:
(WebInspector.ExperimentsSettings):
* inspector/front-end/SettingsScreen.js:
(WebInspector.SettingsScreen.prototype._createExperimentCheckbox):
2011-12-28 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Scripts panel: add debug sidebar resizer to TabbedEditorContainer.
https://bugs.webkit.org/show_bug.cgi?id=75300
Reviewed by Pavel Feldman.
* inspector/front-end/ScriptsPanel.js:
* inspector/front-end/scriptsPanel.css:
(#scripts-debug-sidebar-resizer-widget):
2011-12-28 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Introduce a Profiler launcher view similar to that in the Audits panel
https://bugs.webkit.org/show_bug.cgi?id=75228
Reviewed by Pavel Feldman.
* English.lproj/localizedStrings.js:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/front-end/AuditLauncherView.js:
(WebInspector.AuditLauncherView):
* inspector/front-end/AuditsPanel.js:
(WebInspector.AuditsPanel):
* inspector/front-end/DetailedHeapshotView.js:
(WebInspector.DetailedHeapshotProfileType):
(WebInspector.DetailedHeapshotProfileType.prototype.get treeItemTitle):
(WebInspector.DetailedHeapshotProfileType.prototype.get description):
* inspector/front-end/ProfileLauncherView.js: Added.
(WebInspector.ProfileLauncherView):
(WebInspector.ProfileLauncherView.prototype.setUpEventListeners):
(WebInspector.ProfileLauncherView.prototype.addProfileType):
(WebInspector.ProfileLauncherView.prototype._controlButtonClicked):
(WebInspector.ProfileLauncherView.prototype._updateControls):
(WebInspector.ProfileLauncherView.prototype._profileTypeChanged):
(WebInspector.ProfileLauncherView.prototype._onProfileStarted):
(WebInspector.ProfileLauncherView.prototype._onProfileFinished):
* inspector/front-end/ProfileView.js:
(WebInspector.CPUProfileType):
(WebInspector.CPUProfileType.prototype.get treeItemTitle):
(WebInspector.CPUProfileType.prototype.get description):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfileType.prototype.get treeItemTitle):
(WebInspector.ProfileType.prototype.get description):
(WebInspector.ProfilesPanel.prototype.get statusBarItems):
(WebInspector.ProfilesPanel.prototype.toggleRecordButton):
(WebInspector.ProfilesPanel.prototype._onProfileTypeSelected):
(WebInspector.ProfilesPanel.prototype._reset):
(WebInspector.ProfilesPanel.prototype._showLauncherView):
(WebInspector.ProfilesPanel.prototype._registerProfileType):
(WebInspector.ProfilesPanel.prototype._addProfileHeader):
(WebInspector.ProfilesPanel.prototype._updateInterface):
(WebInspector.ProfileTypeTreeElement):
(WebInspector.ProfileTypeTreeElement.prototype.collapse):
(WebInspector.ProfilesSidebarTreeElement):
(WebInspector.ProfilesSidebarTreeElement.prototype.onattach):
(WebInspector.ProfilesSidebarTreeElement.prototype.onselect):
(WebInspector.ProfilesSidebarTreeElement.prototype.get selectable):
(WebInspector.ProfilesSidebarTreeElement.prototype.refresh):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/WelcomeView.js: Removed.
* inspector/front-end/auditsPanel.css:
(.audit-launcher-view .audit-launcher-view-content):
(.audit-launcher-view div.button-container):
(.panel-enabler-view.audit-launcher-view label):
(.panel-enabler-view.audit-launcher-view label.disabled):
* inspector/front-end/inspector.html:
* inspector/front-end/panelEnablerView.css:
(.panel-enabler-view img):
(.panel-enabler-view .flexible-space):
(.panel-enabler-view button:not(.status-bar-item)):
(body.inactive .panel-enabler-view button, .panel-enabler-view button:disabled):
(.panel-enabler-view input[type="radio"]):
(.panel-enabler-view input[type="radio"]:active:not(:disabled)):
(.panel-enabler-view input[type="radio"]:checked):
(.panel-enabler-view input[type="radio"]:checked:active):
* inspector/front-end/profilesPanel.css:
(.profile-launcher-view-tree-item > .icon):
(.profile-launcher-view-content):
(.profile-launcher-view-content h1):
(.panel-enabler-view.profile-launcher-view form):
(.panel-enabler-view.profile-launcher-view label):
(.profile-launcher-view-content p):
(.panel-enabler-view.profile-launcher-view button:not(.status-bar-item)):
(.profile-launcher-view-content button.running:not(.status-bar-item)):
(body.inactive .profile-launcher-view-content button.running:not(.status-bar-item)):
2011-12-28 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r103763.
http://trac.webkit.org/changeset/103763
https://bugs.webkit.org/show_bug.cgi?id=75307
"Compilation fails on Snow Leopard" (Requested by yurys on
#webkit).
* inspector/CodeGeneratorInspector.py:
(Helper):
(create_ad_hoc_type_declaration.Helper):
(CodeGenerator.generate_type_builder):
(get_in_c_type_text):
2011-12-28 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: CodeGeneratorInspector.py: generate enum types.
https://bugs.webkit.org/show_bug.cgi?id=74954
Reviewed by Yury Semikhatsky.
Internal map of string contants is created. C enums are created for
each JSON enum.
* inspector/CodeGeneratorInspector.py:
(EnumConstants.add_constant):
(EnumConstants):
(EnumConstants.get_enum_constant_code):
(TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder):
(TypeBindings.create_type_declaration_.EnumBinding.get_in_c_type_text):
(TypeBindings.create_type_declaration_.EnumBinding.get_setter_value_expression_pattern):
(TypeBindings.create_type_declaration_.PlainString.reduce_to_raw_type):
(TypeBindings.create_type_declaration_.PlainString.get_setter_value_expression_pattern):
(get_in_c_type_text):
(get_setter_value_expression_pattern):
(PlainObjectBinding.get_in_c_type_text):
(PlainObjectBinding.get_setter_value_expression_pattern):
(RawTypesBinding.get_in_c_type_text):
(RawTypesBinding.get_setter_value_expression_pattern):
(get_annotated_type_text):
(MethodGenerateModes.get_modes):
(MethodGenerateModes.StrictParameterMode.get_c_param_type_text):
(MethodGenerateModes.StrictParameterMode):
(MethodGenerateModes.StrictParameterMode.get_setter_value_expression):
(MethodGenerateModes.RawParameterMode.get_c_param_type_text):
(MethodGenerateModes.RawParameterMode):
(MethodGenerateModes.RawParameterMode.get_setter_value_expression):
(MethodGenerateModes.CombinedMode.get_c_param_type_text):
(MethodGenerateModes):
(MethodGenerateModes.CombinedMode):
(MethodGenerateModes.CombinedMode.get_setter_value_expression):
2011-12-28 Hans Wennborg <hans@chromium.org>
IndexedDB: IDBKeyRange constructor should throw when lower > upper
https://bugs.webkit.org/show_bug.cgi?id=74705
Reviewed by Tony Chang.
Make IDBKeyRange throw an exception when lower > upper,
or lower == upper and one or both of the bounds is open.
Tested in storage/indexeddb/keyrange.html.
* storage/IDBKeyRange.cpp:
(WebCore::IDBKeyRange::bound):
2011-12-28 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: [protocol] empty enum constant should be replaced with identifier
https://bugs.webkit.org/show_bug.cgi?id=75273
Reviewed by Yury Semikhatsky.
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::asInspectorStyleSheet):
(WebCore::InspectorCSSAgent::detectOrigin):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::buildObjectForRule):
* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSRule.prototype.get isRegular):
2011-12-27 Pavel Feldman <pfeldman@google.com>
Web Inspector: complete annotating SDK component.
https://bugs.webkit.org/show_bug.cgi?id=75259
Reviewed by Yury Semikhatsky.
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype._addScript):
* inspector/front-end/NetworkManager.js:
(WebInspector.NetworkManager.prototype._cacheDisabledSettingChanged):
(WebInspector.NetworkDispatcher.prototype._isNull):
(WebInspector.NetworkDispatcher.prototype.webSocketCreated):
* inspector/front-end/Resource.js:
(WebInspector.Resource.displayName):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype._onResourceUpdated):
(WebInspector.ResourceTreeModel.prototype._consoleMessageAdded):
(WebInspector.ResourceTreeFrame.prototype.get name):
* inspector/front-end/TabbedEditorContainer.js:
2011-12-27 Anantanarayanan G Iyengar <ananta@chromium.org>
Crash in the WebKit accessibility code while attempting to retrieve the title UI element.
https://bugs.webkit.org/show_bug.cgi?id=75279
Reviewed by Ryosuke Niwa.
Fix a crash in the the WebKit accessibility code which occurs while retrieving
the title UI clement. The fix is to NULL check the RenderObject::node return value.
No test added as there is no reduction.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::titleUIElement):
2011-12-27 Dominic Cooney <dominicc@chromium.org>
Remove initWebKitAnimationEvent method
https://bugs.webkit.org/show_bug.cgi?id=71698
Reviewed by Ojan Vafai.
Now that WebKitAnimationEvent has a constructor, we don't need
this
method. <https://www.w3.org/Bugs/Public/show_bug.cgi?id=15338> is
tracking the change to the CSS Animations spec.
* dom/WebKitAnimationEvent.cpp:
* dom/WebKitAnimationEvent.h:
* dom/WebKitAnimationEvent.idl:
2011-12-27 Dominic Cooney <dominicc@chromium.org>
Remove initWebKitTransitionEvent method
https://bugs.webkit.org/show_bug.cgi?id=71701
Reviewed by Ojan Vafai.
Now that WebKitTransitionEvent has a constructor, we don't need
this
method. <https://www.w3.org/Bugs/Public/show_bug.cgi?id=15339> is
tracking the change to the CSS Transitions spec.
* dom/WebKitTransitionEvent.cpp:
* dom/WebKitTransitionEvent.h:
* dom/WebKitTransitionEvent.idl:
2011-12-27 Tony Chang <tony@chromium.org>
Move HarfBuzz files into their own directory
https://bugs.webkit.org/show_bug.cgi?id=72780
Reviewed by Daniel Bates.
FontCacheLinux.cpp got moved to platform/graphics/skia/FontCacheSkia.cpp since it wasn't HarfBuzz specific.
I used HarfBuzz in filenames since that seems to be how the name is capitalized on the project home page.
Fixed some style errors caught by the style checker.
* PlatformBlackBerry.cmake:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* platform/graphics/chromium/FontPlatformData.h:
* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: Renamed from Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp.
* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.h: Renamed from Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.h.
* platform/graphics/harfbuzz/FontHarfBuzz.cpp: Renamed from Source/WebCore/platform/graphics/chromium/FontLinux.cpp.
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Renamed from Source/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp.
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Renamed from Source/WebCore/platform/graphics/chromium/FontPlatformDataLinux.h.
* platform/graphics/harfbuzz/HarfBuzzSkia.cpp: Renamed from Source/WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp.
* platform/graphics/harfbuzz/HarfBuzzSkia.h: Renamed from Source/WebCore/platform/graphics/chromium/HarfbuzzSkia.h.
* platform/graphics/harfbuzz/SimpleFontDataSkia.cpp: Renamed from Source/WebCore/platform/graphics/chromium/SimpleFontDataLinux.cpp.
* platform/graphics/skia/FontCacheSkia.cpp: Renamed from Source/WebCore/platform/graphics/chromium/FontCacheLinux.cpp.
* platform/graphics/skia/GlyphPageTreeNodeSkia.cpp:
2011-12-27 Huang Dongsung <luxtella@company100.net>
[TexMap][QT] The fragment shader in OpenGL ES2 requires the default precision
qualifier.
https://bugs.webkit.org/show_bug.cgi?id=75168
Reviewed by Noam Rosenthal.
No new functionality so no new tests.
* platform/graphics/opengl/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::initializeShaders):
2011-12-27 Ryosuke Niwa <rniwa@webkit.org>
[Chromium] uninitialized variable in fakeMouseMoveEventTimerFired
https://bugs.webkit.org/show_bug.cgi?id=75263
Reviewed by Tony Chang.
The failure was caused by PlatformKeyboardEvent::getCurrentModifierState in PlatformKeyboardEventChromium.cpp
not initializing arguments on Linux. Fixed the failure by always assigning false to the arguments.
But we should really fix this function for Linux. Not recognizing any modifier isn't great.
* platform/chromium/PlatformKeyboardEventChromium.cpp:
(WebCore::PlatformKeyboardEvent::getCurrentModifierState):
2011-12-27 Kentaro Hara <haraken@chromium.org>
WIP: Enable the [Supplemental] IDL on Gtk
https://bugs.webkit.org/show_bug.cgi?id=74972
Reviewed by Adam Barth.
This patch enables the [Supplemental] IDL on Gtk by changing the build
flow of Gtk as follows.
- Previous build flow:
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl;
generate-bindings.pl reads $idl;
generate-bindings.pl generates .h and .cpp files for $idl;
}
- New build flow (See the discussions in bug 72138 for more details):
resolve-supplemental.pl depends on all IDL files;
resolve-supplemental.pl reads all IDL files;
resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
resolve-supplemental.pl outputs supplemental_dependency.tmp;
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
generate-bindings.pl reads $idl;
generate-bindings.pl reads supplemental_dependency.tmp;
generate-bindings.pl generates .h and .cpp files for $idl,
including all attributes in the IDL files that are implementing $idl;
}
Tests: Confirm that build succeeds.
http/tests/websocket/tests/*
* GNUmakefile.am: Described the above build flow.
* GNUmakefile.list.am: Added a list of IDL files. Instead, removed a list of JS*.h and JS*.cpp
that are generated by the IDL files.
2011-12-27 Tony Chang <tony@chromium.org>
[chromium] When building with clang, enable -Wglobal-constructors
https://bugs.webkit.org/show_bug.cgi?id=74365
Reviewed by Adam Barth.
* WebCore.gyp/WebCore.gyp:
2011-12-27 Tony Chang <tony@chromium.org>
[chromium] really enable wpo for WebCore libs and for WTF
https://bugs.webkit.org/show_bug.cgi?id=75264
Reviewed by Adam Barth.
* WebCore.gyp/WebCore.gyp: The variable was getting clobbered by the
value set in common.gypi. Use a target_defaults instead to set the
variable. I tested manually on my Windows machine and
WholeProgramOptimization is getting set when buildtype is Official.
2011-12-27 Tony Chang <tony@chromium.org>
[chromium] remove references to files no longer in the tree
https://bugs.webkit.org/show_bug.cgi?id=75262
Reviewed by Adam Barth.
* WebCore.gypi: platform/mac/PlatformMouseEventMac.mm and platform/mac/WheelEventMac.mm
were removed in r103652.
2011-12-27 Vsevolod Vlasov <vsevik@chromium.org>
Unreviewed web inspector localizedStrings.js fix.
* English.lproj/localizedStrings.js:
2011-12-27 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Introduce support for experimental settings.
https://bugs.webkit.org/show_bug.cgi?id=75250
Reviewed by Pavel Feldman.
* English.lproj/localizedStrings.js:
* inspector/front-end/ScriptsPanel.js:
* inspector/front-end/Settings.js:
(WebInspector.ExperimentsSettings):
(WebInspector.ExperimentsSettings.prototype.get experiments):
(WebInspector.ExperimentsSettings.prototype.get experimentsEnabled):
(WebInspector.ExperimentsSettings.prototype._createExperiment):
(WebInspector.ExperimentsSettings.prototype.set _cleanUpSetting.get var):
(WebInspector.ExperimentsSettings.prototype.set _cleanUpSetting):
(set WebInspector.Experiment):
(WebInspector.Experiment.prototype.get name):
(WebInspector.Experiment.prototype.get title):
(WebInspector.Experiment.prototype.isEnabled):
(WebInspector.Experiment.prototype.setEnabled):
(set WebInspector):
* inspector/front-end/SettingsScreen.js:
(WebInspector.SettingsScreen):
(WebInspector.SettingsScreen.prototype._createExperimentsWarningSubsection):
(WebInspector.SettingsScreen.prototype._createExperimentCheckbox.listener):
(WebInspector.SettingsScreen.prototype._createExperimentCheckbox):
* inspector/front-end/helpScreen.css:
(.settings-experiments-warning-subsection-warning):
(.settings-experiments-warning-subsection-message):
2011-12-27 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: exception when scrolling in JavaScriptOutline dialog with empty query
https://bugs.webkit.org/show_bug.cgi?id=75255
Reviewed by Pavel Feldman.
* inspector/front-end/JavaScriptOutlineDialog.js:
(WebInspector.JavaScriptOutlineDialog.prototype._onScroll):
2011-12-27 Pavel Feldman <pfeldman@google.com>
Web Inspector: add more annotations on SDK classes.
https://bugs.webkit.org/show_bug.cgi?id=75247
Reviewed by Yury Semikhatsky.
* inspector/Inspector.json:
* inspector/compile-front-end.sh:
* inspector/front-end/ApplicationCacheModel.js:
(WebInspector.ApplicationCacheDispatcher.prototype.networkStateUpdated):
* inspector/front-end/BreakpointManager.js:
(WebInspector.BreakpointManager.prototype._breakpoint):
* inspector/front-end/Color.js:
(WebInspector.Color.prototype.get shorthex):
(WebInspector.Color.prototype.get hex):
(WebInspector.Color.prototype.get rgb):
(WebInspector.Color.prototype.get hsl):
(WebInspector.Color.prototype.get nickname):
(WebInspector.Color.prototype.hasShortHex):
(WebInspector.Color.prototype._individualRGBValueToFloatValue):
(WebInspector.Color.prototype._rgbStringsToHex):
(WebInspector.Color.prototype._parse.this.nickname.set 2):
(WebInspector.Color.prototype._parse.this.hsla.set 1):
(WebInspector.Color.prototype._parse.this.rgba.set 0):
(WebInspector.Color.prototype._parse.set WebInspector):
(WebInspector.Color.prototype._parse):
* inspector/front-end/CompilerSourceMapping.js:
* inspector/front-end/ConsoleModel.js:
* inspector/front-end/ContentProviders.js:
(WebInspector.ScriptContentProvider):
(WebInspector.ConcatenatedScriptsContentProvider):
(WebInspector.CompilerSourceMappingContentProvider):
(WebInspector.StaticContentProvider):
* inspector/front-end/CookieParser.js:
(WebInspector.CookieParser.KeyValue):
(WebInspector.CookieParser.prototype.parseCookie):
(WebInspector.CookieParser.prototype.parseSetCookie):
(WebInspector.CookieParser.prototype._extractKeyValue):
* inspector/front-end/DOMStorage.js:
* inspector/front-end/Database.js:
(WebInspector.DatabaseDispatcher.prototype.sqlTransactionSucceeded):
(WebInspector.DatabaseDispatcher.prototype.sqlTransactionFailed):
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.Location):
(WebInspector.DebuggerModel.prototype._failedToParseScriptSource):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent):
* inspector/front-end/ElementsTreeOutline.js:
* inspector/front-end/HAREntry.js:
* inspector/front-end/NetworkLog.js:
(WebInspector.NetworkLog.prototype._mainFrameNavigated):
* inspector/front-end/Placard.js:
* inspector/front-end/RawSourceCode.js:
(WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation):
(WebInspector.RawSourceCode.CompilerSourceMapping.prototype.uiLocationToRawLocation):
* inspector/front-end/RemoteObject.js:
(WebInspector.RemoteObject.fromPrimitiveValue):
(WebInspector.RemoteObject.prototype.setPropertyValue.propertySetCallback):
(WebInspector.RemoteObject.prototype.setPropertyValue):
(WebInspector.LocalJSONObject.prototype.get hasChildren):
(WebInspector.LocalJSONObject.prototype._children):
* inspector/front-end/Resource.js:
(WebInspector.Resource.restoreRevisions):
(WebInspector.Resource.prototype.get queryParameters):
(WebInspector.Resource.prototype.get formParameters):
(WebInspector.Resource.prototype.isHttpFamily):
* inspector/front-end/ResourceCategory.js:
* inspector/front-end/ResourceUtils.js:
* inspector/front-end/ScopeChainSidebarPane.js:
(WebInspector.ScopeChainSidebarPane.prototype.update):
* inspector/front-end/Script.js:
(WebInspector.Script.prototype.isInlineScript):
* inspector/front-end/ScriptFormatter.js:
(WebInspector.ScriptFormatter.positionToLocation):
* inspector/front-end/WelcomeView.js:
(WebInspector.WelcomeView.prototype.addMessage):
* inspector/front-end/externs.js:
(Array.prototype.upperBound):
2011-12-27 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Scripts panel tabbed editor does not reopen closed tabs.
https://bugs.webkit.org/show_bug.cgi?id=75245
Reviewed by Pavel Feldman.
* inspector/front-end/NetworkItemView.js:
(WebInspector.NetworkItemView):
* inspector/front-end/TabbedEditorContainer.js:
(WebInspector.TabbedEditorContainer):
(WebInspector.TabbedEditorContainer.prototype._tabClosed):
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPane.prototype.closeTab):
(WebInspector.TabbedPane.prototype.selectTab):
2011-12-27 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: report per document JS event listener count
https://bugs.webkit.org/show_bug.cgi?id=74298
This patch adds JS event listener count to the memory agent
report.
Reviewed by Pavel Feldman.
Test: inspector/dom-statistics.html
* inspector/Inspector.json:
* inspector/InspectorMemoryAgent.cpp:
2011-12-27 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: [REGRESSION] Go to Function dialog always has a minimal height
https://bugs.webkit.org/show_bug.cgi?id=75254
Reviewed by Yury Semikhatsky.
* inspector/front-end/scriptsPanel.css:
(.script-view):
2011-12-26 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Create tabbed editor for scripts panel.
https://bugs.webkit.org/show_bug.cgi?id=75230
Reviewed by Pavel Feldman.
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.sh:
* inspector/front-end/ScriptsNavigator.js:
(WebInspector.ScriptsNavigator.prototype.replaceUISourceCodes.get if):
(WebInspector.ScriptsNavigator.prototype.replaceUISourceCodes):
(WebInspector.NavigatorScriptTreeElement.prototype.ondblclick):
(WebInspector.NavigatorScriptTreeElement.prototype.onenter):
* inspector/front-end/ScriptsPanel.js:
* inspector/front-end/TabbedEditorContainer.js: Added.
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPane.prototype.get visibleView):
(WebInspector.TabbedPane.prototype.get selectedTabId):
(WebInspector.TabbedPane.prototype.closeAllTabs):
(WebInspector.TabbedPane.prototype.changeTabTitle):
(WebInspector.TabbedPane.prototype.changeTabView):
(WebInspector.TabbedPaneTab):
(WebInspector.TabbedPaneTab.prototype.get title):
(WebInspector.TabbedPaneTab.prototype.set title):
(WebInspector.TabbedPaneTab.prototype.get view):
(WebInspector.TabbedPaneTab.prototype.set view):
(WebInspector.TabbedPaneTab.prototype._createTabElement):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
* inspector/front-end/scriptsPanel.css:
(.scripts-views-container):
(.script-view):
(#scripts-editor-container-tabbed-pane .tabbed-pane-header):
(#scripts-editor-container-tabbed-pane .tabbed-pane-header-contents):
(#scripts-editor-container-tabbed-pane .tabbed-pane-content):
2011-12-27 Pavel Feldman <pfeldman@google.com>
Not reviewed: Rolling out r103703 for breaking Canvas2DLayerChromiumTest.testFullLifecycle.
* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
(WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
(WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
(WebCore::Canvas2DLayerChromium::setTextureManager):
(WebCore::Canvas2DLayerChromium::updateCompositorResources):
(WebCore::Canvas2DLayerChromium::pushPropertiesTo):
(WebCore::Canvas2DLayerChromium::unreserveContentsTexture):
(WebCore::Canvas2DLayerChromium::cleanupResources):
* platform/graphics/chromium/Canvas2DLayerChromium.h:
2011-12-22 Vangelis Kokkevis <vangelis@chromium.org>
[chromium] Bypass the shadow texture copy for accelerated
canvas when running the compositor in single threaded mode.
https://bugs.webkit.org/show_bug.cgi?id=75146
The texture copy fails on Windows as glCopyTexImage2D() doesn't
support BGRA source textures.
This change also modified Canvas2DLayerChromium::updateCompositorResources
to call glCopyTexSubImage2D() instead of glCopyTexImage2D() so that
the copy can work with texture allocated via the glTexStorage2D
extension.
Reviewed by James Robinson.
* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
(WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
(WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
(WebCore::Canvas2DLayerChromium::setTextureManager):
(WebCore::Canvas2DLayerChromium::updateCompositorResources):
(WebCore::Canvas2DLayerChromium::pushPropertiesTo):
(WebCore::Canvas2DLayerChromium::unreserveContentsTexture):
(WebCore::Canvas2DLayerChromium::cleanupResources):
* platform/graphics/chromium/Canvas2DLayerChromium.h:
2011-12-26 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL][WK2] Implement context menu for EFL port.
https://bugs.webkit.org/show_bug.cgi?id=74995
Reviewed by Anders Carlsson.
Implement missing ContextMenuEfl class in order to support WK2's context menu.
Because WK2's context menu still needs WebCore's context menu implementation.
And of course, this patch also can be used for WK1 without CROSS_PLATFORM_CONTEXT_MENU
option.
* platform/ContextMenu.h:
* platform/ContextMenuItem.h:
* platform/PlatformMenuDescription.h:
* platform/efl/ContextMenuEfl.cpp:
(WebCore::ContextMenu::~ContextMenu):
(WebCore::ContextMenu::appendItem):
(WebCore::ContextMenu::insertItem):
(WebCore::ContextMenu::itemCount):
(WebCore::ContextMenu::setPlatformDescription):
(WebCore::ContextMenu::platformDescription):
(WebCore::ContextMenu::releasePlatformDescription):
(WebCore::platformMenuDescription):
(WebCore::contextMenuItemVector):
* platform/efl/ContextMenuItemEfl.cpp:
(WebCore::ContextMenuItem::ContextMenuItem):
(WebCore::ContextMenuItem::~ContextMenuItem):
(WebCore::ContextMenuItem::setType):
(WebCore::ContextMenuItem::type):
(WebCore::ContextMenuItem::setAction):
(WebCore::ContextMenuItem::action):
(WebCore::ContextMenuItem::setTitle):
(WebCore::ContextMenuItem::title):
(WebCore::ContextMenuItem::setChecked):
(WebCore::ContextMenuItem::checked):
(WebCore::ContextMenuItem::setEnabled):
(WebCore::ContextMenuItem::enabled):
2011-12-26 Hajime Morrita <morrita@chromium.org>
[Refactoring] Node::setTreeScopeRecursively() doesn't need includeRoot parameter
https://bugs.webkit.org/show_bug.cgi?id=75240
Reviewed by Anders Carlsson.
No new tests. No behavior change.
* dom/Node.cpp:
(WebCore::Node::setTreeScopeRecursively):
* dom/Node.h:
2011-12-26 Darin Adler <darin@apple.com>
Use OwnPtr and OwnArrayPtr in a couple more places
https://bugs.webkit.org/show_bug.cgi?id=75211
Reviewed by Andreas Kling.
I had a patch with some changes from a while back from going through all sorts of
classes and changing code to use adoptPtr. Most were landed long ago, these are the
ones that still apply.
There are six pieces here that could each be landed separately.
The big one is CSSParser.
* css/CSSGrammar.y: Update for members and functions that now
return PassOwnPtr instead of raw pointers.
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser): Remove explicit construction
for m_valueList and m_data since OwnPtr and OwnArrayPtr initialize
to zero without it.
(WebCore::CSSParser::~CSSParser): Removed delete m_valueList and
fastFree(m_data) since OwnPtr and OwnArrayPtr handle that.
(WebCore::CSSParser::setupParser): Use adoptArrayPtr and new for
the character array instead of fastFree/fastMalloc. Added get
function calls as needed.
(WebCore::CSSParser::parseValue): Added get function calls as needed.
(WebCore::CSSParser::parseContent): Ditto.
(WebCore::CSSParser::parseFillProperty): Ditto.
(WebCore::CSSParser::parseTransformOriginShorthand): Ditto.
(WebCore::CSSParser::parseBorderImage): Ditto.
(WebCore::CSSParser::parseTransformOrigin): Ditto.
(WebCore::CSSParser::parsePerspectiveOrigin): Ditto.
(WebCore::CSSParser::sinkFloatingValueList): Changed to return PassOwnPtr.
The adoptPtr call is here.
(WebCore::CSSParser::sinkFloatingFunction): Ditto.
(WebCore::CSSParser::markSelectorListStart): Added get function calls as needed.
(WebCore::CSSParser::markSelectorListEnd): Ditto.
(WebCore::CSSParser::markRuleBodyStart): Ditto.
(WebCore::CSSParser::markRuleBodyEnd): Ditto.
(WebCore::CSSParser::markPropertyStart): Ditto.
(WebCore::CSSParser::markPropertyEnd): Ditto.
* css/CSSParser.h: Moved conditional includes to their own paragraph.
Made sinkFloatingValueList and sinkFloatingFunction return PassOwnPtr.
Made m_valueList an OwnPtr and m_data an OwnArrayPtr.
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue): Added a call to the get function.
* html/PluginDocument.h: Made isPluginDocument private. Also marked all the
functions that are overriding here as OVERRIDE since I was touching the header.
* html/parser/HTMLToken.h:
(WebCore::HTMLTokenTypes::DoctypeData::DoctypeData): Removed an unneeded line
explicitly initializing the base class.
* page/animation/AnimationBase.cpp:
(WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper): Fixed indent.
* rendering/style/RenderStyle.h: Moved conditional includes to their own paragraph.
* xml/parser/MarkupTokenBase.h:
(WebCore::MarkupTokenBase::beginDOCTYPE): Removed unneeded parentheses.
2011-12-26 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Extract FileEditor from ScriptsPanel.
https://bugs.webkit.org/show_bug.cgi?id=75229
Reviewed by Pavel Feldman.
* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame.prototype.suggestedFileName):
* inspector/front-end/ScriptsNavigator.js:
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._reset):
(WebInspector.ScriptsPanel.prototype.get visibleView):
(WebInspector.ScriptsPanel.prototype._updateScriptViewStatusBarItems):
(WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced.get if):
(WebInspector.ScriptsPanel.EditorContainer):
(WebInspector.ScriptsPanel.EditorContainer.prototype.get currentSourceFrame):
(WebInspector.ScriptsPanel.EditorContainer.prototype.show):
(WebInspector.ScriptsPanel.EditorContainer.prototype.showSourceFrame):
(WebInspector.ScriptsPanel.EditorContainer.prototype.isSourceFrameOpen):
(WebInspector.ScriptsPanel.EditorContainer.prototype.replaceSourceFrames):
(WebInspector.ScriptsPanel.EditorContainer.prototype.setSourceFrameIsDirty):
(WebInspector.ScriptsPanel.EditorContainer.prototype.reset):
(WebInspector.ScriptsPanel.SingleFileEditorContainer):
(WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.get currentSourceFrame):
(WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.show):
(WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.showSourceFrame):
(WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.isSourceFrameOpen):
(WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.replaceSourceFrames):
(WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.setSourceFrameIsDirty):
(WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.reset):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode.prototype.get domain):
(WebInspector.UISourceCode.prototype.get folderName):
(WebInspector.UISourceCode.prototype.get fileName):
(WebInspector.UISourceCode.prototype.get displayName):
(WebInspector.UISourceCode.prototype._parseURL):
2011-12-26 Darin Adler <darin@apple.com>
Fix mutation observer build after didMoveToNewDocument change
https://bugs.webkit.org/show_bug.cgi?id=75224
Reviewed by Hajime Morita.
* dom/Node.cpp:
(WebCore::willCallDidMoveToNewDocument): Added.
(WebCore::didMoveToNewDocumentWasCalled): Added.
(WebCore::Node::setDocument): Call new debugging function.
(WebCore::Node::didMoveToNewDocument): Ditto. Also use ASSERT_UNUSED
unconditionally rather than UNUSED_PARAM inside and #if. Also added
a new assertion that checks that hte old document was passed through
properly.
2011-12-26 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: [Scripts] Implement iterative match highlighting in the "Go to Function" dialog item list
https://bugs.webkit.org/show_bug.cgi?id=75226
Reviewed by Pavel Feldman.
* inspector/front-end/JavaScriptOutlineDialog.js:
(WebInspector.JavaScriptOutlineDialog):
(WebInspector.JavaScriptOutlineDialog.prototype._createSearchRegExp):
(WebInspector.JavaScriptOutlineDialog.prototype._filterFunctions):
(WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.previousItem):
(WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.nextItem):
(WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown):
(WebInspector.JavaScriptOutlineDialog.prototype._updateSelection):
(WebInspector.JavaScriptOutlineDialog.prototype._onScroll):
(WebInspector.JavaScriptOutlineDialog.MatchHighlighter):
(WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype.highlightViewportItems):
(WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype.clearHighlight):
(WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype._highlightItem):
(WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype._viewportRowRange):
* inspector/front-end/javaScriptOutlineDialog.css:
(.js-outline-dialog > .container > div.item > span.highlight):
2011-12-26 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Extract FileSelector from ScriptsPanel.
https://bugs.webkit.org/show_bug.cgi?id=75173
Reviewed by Pavel Feldman.
* inspector/front-end/ScriptsNavigator.js:
(WebInspector.ScriptsNavigator):
(WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement):
(WebInspector.ScriptsNavigator.prototype.show):
(WebInspector.ScriptsNavigator.prototype.setScriptSourceIsDirty):
(WebInspector.ScriptsNavigator.prototype.replaceUISourceCodes):
(WebInspector.ScriptsNavigator.prototype.scriptSelected):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.get defaultFocusedElement):
(WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded.get if):
(WebInspector.ScriptsPanel.prototype.setScriptSourceIsBeingEdited):
(WebInspector.ScriptsPanel.prototype._reset):
(WebInspector.ScriptsPanel.prototype._showSourceLine):
(WebInspector.ScriptsPanel.prototype._showAndRevealInFileSelector):
(WebInspector.ScriptsPanel.prototype._createSourceFrame):
(WebInspector.ScriptsPanel.prototype._updateExecutionLine):
(WebInspector.ScriptsPanel.prototype._scriptSelected):
(WebInspector.ScriptsPanel.FileSelector):
(WebInspector.ScriptsPanel.FileSelector.prototype.get defaultFocusedElement):
(WebInspector.ScriptsPanel.FileSelector.prototype.show):
(WebInspector.ScriptsPanel.FileSelector.prototype.addUISourceCode):
(WebInspector.ScriptsPanel.FileSelector.prototype.isScriptSourceAdded):
(WebInspector.ScriptsPanel.FileSelector.prototype.revealUISourceCode):
(WebInspector.ScriptsPanel.FileSelector.prototype.setScriptSourceIsDirty):
(WebInspector.ScriptsPanel.FileSelector.prototype.replaceUISourceCodes):
(WebInspector.ScriptsPanel.ComboBoxFileSelector):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.get defaultFocusedElement):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.show):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.showDebugSidebarResizeWidget):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.addUISourceCode):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.isScriptSourceAdded):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.revealUISourceCode):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._innerRevealUISourceCode):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addToHistory):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.replaceUISourceCodes):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._showScriptFoldersSettingChanged):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._reset):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.setScriptSourceIsDirty):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._createEditorToolbar):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect.get var):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect.insertOrdered.optionCompare):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect.insertOrdered):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._resetFilesSelect):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._updateBackAndForwardButtons):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goBack):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goForward):
(WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._filesSelectChanged):
* inspector/front-end/inspector.html:
* inspector/front-end/utilities.js:
():
2011-12-26 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Implement "Go to Function" dialog for JavaScript
https://bugs.webkit.org/show_bug.cgi?id=75092
Reviewed by Pavel Feldman.
* English.lproj/localizedStrings.js:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.sh:
* inspector/front-end/JavaScriptOutlineDialog.js: Added.
(WebInspector.JavaScriptOutlineDialog.onMouseDown):
(WebInspector.JavaScriptOutlineDialog):
(WebInspector.JavaScriptOutlineDialog.didAddChunk):
(WebInspector.JavaScriptOutlineDialog.install):
(WebInspector.JavaScriptOutlineDialog._show):
(WebInspector.JavaScriptOutlineDialog.createShortcut):
(WebInspector.JavaScriptOutlineDialog.prototype._resizeWindow):
(WebInspector.JavaScriptOutlineDialog.prototype._appendItemElements):
(WebInspector.JavaScriptOutlineDialog.prototype._createSearchRegExp):
(WebInspector.JavaScriptOutlineDialog.prototype._filterFunctions):
(WebInspector.JavaScriptOutlineDialog.prototype._selectFirstItem):
(WebInspector.JavaScriptOutlineDialog.prototype._hide):
(WebInspector.JavaScriptOutlineDialog.prototype._onBlur):
(WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.previousItem):
(WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.nextItem):
(WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown):
(WebInspector.JavaScriptOutlineDialog.prototype._scheduleFilter):
(WebInspector.JavaScriptOutlineDialog.prototype._updateSelection):
(WebInspector.JavaScriptOutlineDialog.prototype._onClick):
(WebInspector.JavaScriptOutlineDialog.prototype._onMouseMove):
(WebInspector.JavaScriptOutlineDialog.prototype._highlightFunctionLine):
* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame.prototype.get uiSourceCode):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._didBuildOutlineChunk):
(WebInspector.ScriptsPanel.prototype._reset):
(WebInspector.ScriptsPanel.prototype.requestVisibleScriptOutline):
(WebInspector.ScriptsPanel.prototype._createEditorToolbar):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
* inspector/front-end/javaScriptOutlineDialog.css: Added.
(.js-outline-dialog):
(.js-outline-dialog > input):
(.js-outline-dialog > div.progress):
(.js-outline-dialog > div.container):
(.js-outline-dialog > .container > div.item):
(.js-outline-dialog > .container > div.item.selected):
2011-12-26 Pavel Feldman <pfeldman@google.com>
Web Inspector: make SDK compilation component self-contained.
https://bugs.webkit.org/show_bug.cgi?id=75172
Reviewed by Yury Semikhatsky.
* inspector/compile-front-end.sh:
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl):
(WebInspector.ConsoleMessageImpl.prototype.get stackTrace):
(WebInspector.ConsoleMessageImpl.prototype.clone):
* inspector/front-end/ConsoleModel.js:
(WebInspector.ConsoleModel.prototype._messageRepeatCountUpdated):
(WebInspector.ConsoleMessage):
(WebInspector.ConsoleMessage.prototype.isErrorOrWarning):
(WebInspector.ConsoleMessage.prototype.updateRepeatCount):
(WebInspector.ConsoleMessage.prototype.clone):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded):
* inspector/front-end/ResourceUtils.js:
* inspector/front-end/UIUtils.js:
(WebInspector.resetToolbarColors):
(WebInspector.populateHrefContextMenu):
2011-12-26 Hajime Morrita <morrita@google.com>
Unreviewed bad merge fix.
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::didMoveToNewDocument):
2011-12-25 Hajime Morrita <morrita@chromium.org>
https://bugs.webkit.org/show_bug.cgi?id=74067
Refactoring: Unitfy willMoveToNewDocument() and didMoveToNewDocument()
Reviewed by Darin Adler.
No new tests. No behavior change.
This change combines two method Node::willMoveToNewOwnerDocument() and Node::didMoveToNewOwnerDocument()
into Node::didMoveToNewDocument(Document* oldDocument).
The intention of this change is:
- Making upcoming refactoring (Bug 59816) possible. The refactoring will turn Node::m_document into
Node::m_treeScope, and we will no longer have Node::setDocument() where we can invoke both
willMoveToNewDocument() and didMoveToNewDocument() at once.
- Killing one extra virtual method call.
- Making the concept of "move" clearer by keeping such an operation into the single method.
* dom/Node.cpp:
(WebCore::setWillMoveToNewDocumentWasCalled):
(WebCore::setDidMoveToNewDocumentWasCalled):
(WebCore::Node::setDocument):
(WebCore::Node::didMoveToNewDocument):
* dom/Node.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged):
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::didMoveToNewDocument):
* html/FormAssociatedElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::didMoveToNewDocument):
(WebCore::HTMLFormControlElementWithState::didMoveToNewDocument):
* html/HTMLFormControlElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::didMoveToNewDocument):
* html/HTMLFormElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::didMoveToNewDocument):
* html/HTMLImageElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::didMoveToNewDocument):
* html/HTMLInputElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::didMoveToNewDocument):
* html/HTMLMediaElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::didMoveToNewDocument):
* html/HTMLObjectElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didMoveToNewDocument):
* html/HTMLPlugInImageElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::didMoveToNewDocument):
* html/HTMLVideoElement.h:
* html/ImageDocument.cpp:
(WebCore::ImageDocumentElement::didMoveToNewDocument):
* html/ImageInputType.cpp:
(WebCore::ImageInputType::willMoveToNewDocument):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::elementDidMoveToNewDocument):
* loader/ImageLoader.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::didMoveToNewDocument):
* svg/SVGImageElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::didMoveToNewDocument):
* svg/SVGSVGElement.h:
2011-12-25 Kentaro Hara <haraken@chromium.org>
REGRESSION(r102987): Fix the filename prefix of the generated empty .h
and .cpp files for [Supplemental] IDLs
https://bugs.webkit.org/show_bug.cgi?id=75082
Reviewed by Darin Adler.
In bug 74481, we changed generate-bindings.pl so that it generates empty .h
and .cpp files for the [Supplemental] IDLs. However, the filename prefixes of
those .h and .cpp files are wrong. This patch fixes the prefixes as follows:
generator=JS => JS*.h, JS*.cpp
generator=V8 => V8*.h, V8*.cpp
generator=ObjC => DOM*.h, DOM*.cpp
generator=GObject => WebKitDOM*.h, WebKitDOM*.cpp
generator=CPP => WebDOM*.h, WebDOM*.cpp
No new tests. No change in behavior.
I confirmed that the names of generated .h and .cpp files are correct.
* bindings/scripts/CodeGenerator.pm:
(FileNamePrefix): Returns the prefix of file names.
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateInterface): Uses CodeGenerator::FileNamePrefix.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateInterface): Ditto.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateInterface): Ditto.
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateInterface): Ditto.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateInterface): Ditto.
* bindings/scripts/generate-bindings.pl:
(generateEmptyHeaderAndCpp): Ditto.
2011-12-25 Dan Bernstein <mitz@apple.com>
WebCore changes for: Find indicators overlap when a match spans multiple text boxes
https://bugs.webkit.org/show_bug.cgi?id=75220
Reviewed by Darin Adler.
* WebCore.exp.in: Exported new unionRect(const Vector<FloatRect>&) and existing
FloatRect::intersects().
* platform/graphics/FloatRect.cpp:
(WebCore::unionRect): Added.
* platform/graphics/FloatRect.h:
2011-12-25 Darin Adler <darin@apple.com>
Use OwnPtr for CSSFontFace::m_sources
https://bugs.webkit.org/show_bug.cgi?id=75219
Reviewed by Dan Bernstein.
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::isLoaded): Use the same size_t idiom here as in the rest
of the functions.
(WebCore::CSSFontFace::isValid): Ditto. Also removed unneeded empty special casing.
(WebCore::CSSFontFace::addSource): Changed to take a PassOwnPtr. Reordered so the
PassOwnPtr zeroing does not cause trouble.
(WebCore::CSSFontFace::getFontData): Added call to get.
(WebCore::CSSFontFace::hasSVGFontFaceSource): Use the same size_t idiom here as in
the rest of the functions.
* css/CSSFontFace.h: Use PassOwnPtr for addSource argument, and Vector<OwnPtr> for
the m_sources vector.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Use OwnPtr and PassOwnPtr for font face
sources that are passed to addSource.
* css/CSSSegmentedFontFace.cpp: Added a now-needed include.
2011-12-24 Jarred Nicholls <jarred@sencha.com>
Allow XMLHttpRequest responseType to be set at any state up to and including HEADERS_RECEIVED
https://bugs.webkit.org/show_bug.cgi?id=75190
XMLHttpRequest.responseType should be modifiable at any state up to and including the
HEADERS_RECEIVED state. Therefore, subsequent calls to open() should not reset responseType
to its default value, and calls to open() must follow the same spec mandate set forth in
setResponseType() for synchronous HTTP(S) requests made from the window context.
Reviewed by Alexey Proskuryakov.
Tests: fast/xmlhttprequest/xmlhttprequest-responsetype-before-open-sync-request.html
fast/xmlhttprequest/xmlhttprequest-responsetype-before-open.html
fast/xmlhttprequest/xmlhttprequest-responsetype-set-at-headers-received.html
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::setResponseType):
Prevent setting the value only when in LOADING and DONE states. No longer check if
m_loader is present, which is instantiated on a call to send(), because responseType
can be safely changed after a request is sent.
(WebCore::XMLHttpRequest::open):
Do not reset m_responseTypeCode to the default value, and prevent calls to open()
for synchronous HTTP(S) requests made from the window context when m_responseTypeCode
is not the default value.
2011-12-25 Sam Weinig <sam@webkit.org>
Fix tests failing as a result of r103643
https://bugs.webkit.org/show_bug.cgi?id=75209
Reviewed by Dan Bernstein.
Switch accidental switch of default scroll granularity from
ScrollByPageWheelEvent back to ScrollByPixelWheelEvent.
* platform/mac/PlatformEventFactory.mm:
(WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
2011-12-25 Darin Adler <darin@apple.com>
Change CSS canvas code that does HashMap get/set to use the more efficient add idiom
https://bugs.webkit.org/show_bug.cgi?id=75204
Reviewed by Dan Bernstein.
* dom/Document.cpp:
(WebCore::Document::getCSSCanvasContext): Change local variable name of element to
element; it's not the function result, so not good to name it result.
(WebCore::Document::getCSSCanvasElement): Use add instead of get/set so we only do
one hash table lookup.
2011-12-24 Andreas Kling <awesomekling@apple.com>
CSSElementStyleDeclarations should never move between elements.
<http://webkit.org/b/75198>
Reviewed by Anders Carlsson.
Have the CSSElementStyleDeclaration subclasses take a StyledElement* in
the constructor and replace setElement(StyledElement*) by clearElement().
No behavior change, just enforcing the current behavior at compile-time.
* css/CSSElementStyleDeclaration.h:
(WebCore::CSSElementStyleDeclaration::clearElement):
(WebCore::CSSElementStyleDeclaration::CSSElementStyleDeclaration):
* css/CSSInlineStyleDeclaration.h:
(WebCore::CSSInlineStyleDeclaration::create):
(WebCore::CSSInlineStyleDeclaration::CSSInlineStyleDeclaration):
* dom/StyledElement.cpp:
(WebCore::StyledElement::createInlineStyleDecl):
(WebCore::StyledElement::destroyInlineStyleDecl):
* svg/SVGFontFaceElement.cpp:
(WebCore::FontFaceStyleDeclaration::FontFaceStyleDeclaration):
2011-12-23 Andreas Kling <awesomekling@apple.com>
Decouple CSSMappedAttributeDeclaration from element completely.
<http://webkit.org/b/75187>
Reviewed by Darin Adler.
Let CSSMappedAttributeDeclaration inherit from CSSMutableDeclaration instead
of CSSElementStyleDeclaration. Add methods to CSSMappedAttributeDeclaration
for setting properties that also take a StyledElement* and use that mechanism
instead of temporarily associating an element with the declaration.
This reduces the size of mapped attributes by 4/8 bytes, but more importantly
opens a number of ways to simplify style declarations in future patches.
* css/CSSMutableStyleDeclaration.h:
* dom/CSSMappedAttributeDeclaration.cpp:
(WebCore::CSSMappedAttributeDeclaration::setNeedsStyleRecalc):
(WebCore::CSSMappedAttributeDeclaration::setMappedImageProperty):
(WebCore::CSSMappedAttributeDeclaration::setMappedLengthProperty):
(WebCore::CSSMappedAttributeDeclaration::setMappedProperty):
(WebCore::CSSMappedAttributeDeclaration::removeMappedProperty):
* dom/CSSMappedAttributeDeclaration.h:
(WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration):
Add/move methods to CSSMappedAttributeDeclaration for setting/removing
properties that also take a StyledElement*. That element is used for
scheduling style recalc and passing the right document to CSSParser.
* css/CSSParser.h:
* css/CSSParser.cpp:
(WebCore::parseColorValue):
(WebCore::parseSimpleLengthValue):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseMappedAttributeValue):
Added a parsedMappedAttributeValue() alternative to parseValue() that
takes a StyledElement*.
* dom/StyledElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setContentEditable):
Add (and use) a StyledElement::removeCSSProperty() complement to the
addCSS*() functions.
* dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged):
(WebCore::StyledElement::removeCSSProperty):
(WebCore::StyledElement::addCSSProperty):
(WebCore::StyledElement::addCSSImageProperty):
(WebCore::StyledElement::addCSSLength):
(WebCore::StyledElement::addCSSColor):
(WebCore::StyledElement::createMappedDecl):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::additionalAttributeStyleDecls):
(WebCore::HTMLTableElement::addSharedCellBordersDecl):
(WebCore::HTMLTableElement::addSharedCellPaddingDecl):
(WebCore::HTMLTableElement::addSharedGroupDecls):
Use the setMapped*Property() functions to plumb the element through.
* css/CSSElementStyleDeclaration.h:
Update comment about CSSElementStyleDeclaration's subclasses.
2011-12-24 Jarred Nicholls <jarred@sencha.com>
Allow XMLHttpRequest withCredentials to be set prior to a call to open()
https://bugs.webkit.org/show_bug.cgi?id=75194
XMLHttpRequest.withCredentials attribute should be modifiable prior to the OPENED state per
the W3C spec. See http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-withcredentials-attribute
Reviewed by Alexey Proskuryakov.
Test: fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open.html
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::setWithCredentials):
Prevent setting the value only after the OPENED state.
2011-12-24 Andreas Kling <awesomekling@apple.com>
Remove empty inline RenderStyle destructor.
<http://webkit.org/b/75188>
Rubber-stamped by Anders "Ordvits" Carlsson.
* rendering/style/RenderStyle.h:
2011-12-24 Andreas Kling <awesomekling@apple.com>
RenderStyle: Inline the destructor.
<http://webkit.org/b/75188>
Reviewed by Kenneth Rohde Christiansen.
The (empty) RenderStyle destructor gets a little hot sometimes, reaching up
to 0.4% when loading the full HTML5 spec. Inline it to remove the pointless
function call.
* rendering/style/RenderStyle.cpp:
* rendering/style/RenderStyle.h:
(WebCore::RenderStyleBitfields::~RenderStyle):
2011-12-23 Noel Gordon <noel.gordon@gmail.com>
JPEG decoders should only save color profile markers if color management is enabled
https://bugs.webkit.org/show_bug.cgi?id=75182
Reviewed by Adam Barth.
No new tests. Covered by existing tests.
fast/images/ycbcr-with-cmyk-color-profile.html
fast/images/gray-scale-jpeg-with-color-profile.html
fast/images/cmyk-jpeg-with-color-profile.html
fast/images/color-jpeg-with-color-profile.html
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageReader::JPEGImageReader): Store color profile (JPEG_APP0 + 2) markers
using the iccjpeg helper setup_read_icc_profile() if color management is enabled.
2011-12-23 Alice Boxhall <aboxhall@chromium.org>
Fix crash when adding paragraph in contenteditable with role=textbox.
https://bugs.webkit.org/show_bug.cgi?id=75159
Reviewed by Ryosuke Niwa.
Test: accessibility/textbox-role-on-contenteditable-crash.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::childrenChanged): Use rendererIsEditable() rather than isContentEditable()
as this method is called during render layouts, and isContentEditable() triggers a layout update, which crashes.
2011-12-23 Noel Gordon <noel.gordon@gmail.com>
[chromium] JPEG image with CMYK ICC color profile renders color-inverted and squashed
https://bugs.webkit.org/show_bug.cgi?id=74400
Reviewed by Adam Barth.
Use color profiles for GRAYSCALE, RGB, YCbCr, CMYK and YCCK jpeg images only if their
embedded color profile is from an RGB color space input device.
Test:
fast/images/ycbcr-with-cmyk-color-profile.html
- YCbCr image, with CMYK output device color profile.
Existing Tests:
fast/images/gray-scale-jpeg-with-color-profile.html
- YCbCr image, with GRAY input device color profile.
fast/images/cmyk-jpeg-with-color-profile.html
- YCCK image, with CMYK output device color profile.
fast/images/color-jpeg-with-color-profile.html
- YCbCr image, with RGB input device color profile.
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::rgbColorProfile): Return true if the profile has an RGB color space.
(WebCore::inputDeviceColorProfile): Return true if the profile is from an input device.
(WebCore::readColorProfile): Ignore the embedded color profile unless if it is from
an RGB color space input device.
(WebCore::JPEGImageReader::decode):
2011-12-23 Dan Bernstein <mitz@apple.com>
Print dlerror() when dyld functions fail unexpectedly
https://bugs.webkit.org/show_bug.cgi?id=75185
Reviewed by Sam Weinig.
* platform/mac/SoftLinking.h:
2011-12-23 Sam Weinig <sam@webkit.org>
Start extracting platform specific bits out of PlatformEvents
https://bugs.webkit.org/show_bug.cgi?id=75063
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Update exports.
* WebCore.xcodeproj/project.pbxproj:
Add factory, remove implementation files for mac PlatformWheelEvent
and PlatformMouseEvent.
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::wheelEvent):
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::currentPlatformMouseEvent):
Switch to use the factory.
* platform/PlatformEvent.h:
(WebCore::PlatformEvent::shiftKey):
(WebCore::PlatformEvent::ctrlKey):
(WebCore::PlatformEvent::altKey):
(WebCore::PlatformEvent::metaKey):
(WebCore::PlatformEvent::modifiers):
(WebCore::PlatformEvent::PlatformEvent):
Switch to storing the modifiers as bits on an unsigned
instead of as individual bools.
* platform/PlatformGestureEvent.h:
Remove unused timestamp member.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
(WebCore::PlatformKeyboardEvent::keyIdentifier):
(WebCore::PlatformKeyboardEvent::macCharCode):
(WebCore::PlatformKeyboardEvent::isSystemKey):
Give this class a more consistent interface across platforms,
and remove constructor that took an NSEvent.
* platform/PlatformMouseEvent.h:
Remove constructor that took an NSEvent (and an unused constructor that took
many arguments) as well as some free functions for point conversion.
* platform/PlatformWheelEvent.h:
Remove constructor that took an NSEvent and an unnecessary override of the timestamp()
function.
* platform/mac/KeyEventMac.mm:
Removed constructor and moved helpers to PlatformEventFactory.
* platform/mac/PlatformEventFactory.h: Added.
* platform/mac/PlatformEventFactory.mm: Added.
(WebCore::globalPoint):
(WebCore::globalPointForEvent):
(WebCore::pointForEvent):
(WebCore::mouseButtonForEvent):
(WebCore::mouseEventTypeForEvent):
(WebCore::clickCountForEvent):
(WebCore::momentumPhaseForEvent):
(WebCore::phaseForEvent):
(WebCore::gestureEventTypeForEvent):
(WebCore::textFromEvent):
(WebCore::unmodifiedTextFromEvent):
(WebCore::keyIdentifierForKeyEvent):
(WebCore::isKeypadEvent):
(WebCore::windowsKeyCodeForKeyEvent):
(WebCore::isKeyUpEvent):
(WebCore::modifiersForEvent):
(WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
(WebCore::PlatformEventFactory::createPlatformMouseEvent):
(WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
(WebCore::PlatformEventFactory::createPlatformWheelEvent):
(WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
(WebCore::PlatformEventFactory::createPlatformKeyboardEvent):
(WebCore::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
(WebCore::PlatformEventFactory::createPlatformGestureEvent):
Consolidate platform event creation logic and add factory functions.
* platform/mac/PlatformMouseEventMac.mm: Removed.
* platform/mac/WheelEventMac.mm: Removed.
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
Expose wkGetNSEventKeyChar in WebCore.
* platform/gtk/PlatformKeyboardEventGtk.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/gtk/PlatformMouseEventGtk.cpp:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/gtk/PlatformWheelEventGtk.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/qt/PlatformMouseEventQt.cpp:
(WebCore::mouseEventModifiersFromQtKeyboardModifiers):
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/qt/PlatformTouchEventQt.cpp:
(WebCore::PlatformTouchEvent::PlatformTouchEvent):
* platform/win/KeyEventWin.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/win/WheelEventWin.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
Update for new variables/names.
2011-12-22 Andreas Kling <kling@webkit.org>
CSSParser: Avoid creating dummy declaration in parseColor() slow path.
<http://webkit.org/b/75104>
Reviewed by Darin Adler.
We only needed the dummy declaration to trigger the instantiation of
a CSSValuePool. Added an ensureCSSValuePool() method and have parseColor()
call that instead.
Also renamed the fast-path parseColor() to fastParseColor() and reordered
the arguments for consistency with the slow-path parseColor().
* css/CSSParser.cpp:
(WebCore::parseColorValue):
(WebCore::CSSParser::parseColor):
(WebCore::CSSParser::ensureCSSValuePool):
(WebCore::CSSParser::fastParseColor):
(WebCore::CSSParser::parseColorFromValue):
* css/CSSParser.h:
2011-12-21 Andreas Kling <kling@webkit.org>
Automate elements' registration as document namedItem/extraNamedItem.
<http://webkit.org/b/74991>
Reviewed by Antti Koivisto.
Remove caching of the "id" and "name" attributes on applet, embed, form,
image and object elements. We were caching them to keep the document's
map of named and "extra named" (named by id) item counts in sync.
Instead, add a hook to Element::willModifyAttribute() that detects when
the attributes are being changed and handle the registration/unregistration
automatically if the element returns true for shouldRegisterAsNamedItem()
or shouldRegisterAsExtraNamedItem() respectively.
This shrinks the elements by two AtomicStrings (8 or 16 bytes) each.
IFrame elements retain the old mechanism for now, as there are some subtle
differences to how that's handled.
* dom/Node.h:
(WebCore::Node::hasName):
(WebCore::Node::setHasName):
Cache whether we have a "name" attribute or not (1 bit on Node.)
This is done in order to minimize the overhead added to Element's
insertedIntoDocument() and removeFromDocument().
* dom/StyledElement.cpp:
(WebCore::StyledElement::attributeChanged):
Update the Node's has-name flag as appropriate.
* dom/Element.cpp:
(WebCore::Element::updateNamedItemRegistration):
(WebCore::Element::updateExtraNamedItemRegistration):
Added. Called when the "name" and "id" attributes are changed.
Updates the document's named item maps accordingly.
(WebCore::Element::insertedIntoDocument):
(WebCore::Element::removedFromDocument):
Make sure updateName() is called in addition to updateId() when applicable.
* dom/Element.h:
(WebCore::Element::shouldRegisterAsNamedItem):
(WebCore::Element::shouldRegisterAsExtraNamedItem):
Added. If an element returns true for these, it will be automatically
registered with the document when the name/id attribute changes.
(WebCore::Element::updateId):
(WebCore::Element::updateName):
Register/unregister from the document's named item maps as appropriate.
(WebCore::Element::willModifyAttribute):
Add updateName() hook in addition to the existing updateId() hook.
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::setAttributes):
Make sure updateName() is called when we're cloning the attributes
from another element.
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::parseMappedAttribute):
* html/HTMLAppletElement.h:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseMappedAttribute):
(WebCore::HTMLEmbedElement::insertedIntoDocument):
* html/HTMLEmbedElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::insertedIntoDocument):
(WebCore::HTMLFormElement::removedFromDocument):
(WebCore::HTMLFormElement::parseMappedAttribute):
* html/HTMLFormElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseMappedAttribute):
(WebCore::HTMLImageElement::insertedIntoDocument):
* html/HTMLImageElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseMappedAttribute):
(WebCore::HTMLObjectElement::insertedIntoDocument):
(WebCore::HTMLObjectElement::removedFromDocument):
* html/HTMLObjectElement.h:
* html/HTMLPlugInElement.h:
Remove duplicated code that is now handled by Element.
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):
(WebCore::HTMLObjectElement::formControlName):
Use fastGetAttribute() since we no longer cache the name.
2011-12-23 Anders Carlsson <andersca@apple.com>
Add two (currently unused) new member functions to ScrollElasticityControllerClient
https://bugs.webkit.org/show_bug.cgi?id=75179
Reviewed by Dan Bernstein.
This is so we'll be able to move more code to ScrollElasticityController.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::pinnedInDirection):
(WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints):
* platform/mac/ScrollElasticityController.h:
2011-12-23 Simon Fraser <simon.fraser@apple.com>
Blur filter doesn't invalidate enough
https://bugs.webkit.org/show_bug.cgi?id=74891
Reviewed by Darin Adler.
Take the effects of filters into account for repainting; we need
to inflate the repaint rect by the outsets provided by the filter.
Test: css3/filters/filter-repaint.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::computeRectForRepaint):
2011-12-23 Simon Fraser <simon.fraser@apple.com>
Filters should apply to inline elements
https://bugs.webkit.org/show_bug.cgi?id=75152
Reviewed by Darin Adler.
Filters need to cause creation of RenderLayers for inlines, just like
opacity and masks do.
Test: css3/filters/filtered-inline.html
* rendering/RenderInline.h:
(WebCore::RenderInline::requiresLayer):
* rendering/RenderTableRow.h: Remove an obviously incorrect comment.
2011-12-23 Jarred Nicholls <jarred@sencha.com>
Synchronous XHR in window context should not support new XHR responseTypes for HTTP(S) requests
https://bugs.webkit.org/show_bug.cgi?id=72154
Per the latest W3C editor draft: http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html
This is a spec-mandated attempt to thwart and otherwise discourage the use of synchronous XHR
in the window context by deliberately not exposing newer functionality. Here we are disabling
the use of responseType in synchronous HTTP(S) XHR requests from the window context.
When a user attempts this action, an InvalidAccessError exception is thrown and a message is
printed to the console to further explain.
Renamed reportUnsafeUsage to a more generic name, and hoisted it up so it would be defined
earlier and thus referenceable by setResponseType.
Reviewed by Alexey Proskuryakov.
Test: fast/xmlhttprequest/xmlhttprequest-responsetype-sync-request.html
* xml/XMLHttpRequest.cpp:
(WebCore::logConsoleError):
reportUnsafeUsage -> logConsoleError
(WebCore::XMLHttpRequest::setResponseType):
(WebCore::XMLHttpRequest::setRequestHeader):
reportUnsafeUsage -> logConsoleError
(WebCore::XMLHttpRequest::getResponseHeader):
reportUnsafeUsage -> logConsoleError
(WebCore::XMLHttpRequest::didFail):
reportUnsafeUsage -> logConsoleError
2011-12-23 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Implement a worker for parsing out JavaScript function data
https://bugs.webkit.org/show_bug.cgi?id=75166
Reviewed by Pavel Feldman.
Test: inspector/debugger/script-extract-outline.html
* inspector/front-end/ScriptFormatter.js:
(WebInspector.ScriptFormatter.prototype.formatContent):
* inspector/front-end/ScriptFormatterWorker.js:
(onmessage):
(format):
(getChunkCount):
():
(Array.prototype.keySet):
2011-12-23 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed, rolling out r103624.
http://trac.webkit.org/changeset/103624
https://bugs.webkit.org/show_bug.cgi?id=68916
Broke Snow Leopard builders
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.pri:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDirectoryEntryCustom.cpp:
(WebCore::JSDirectoryEntry::getFile):
(WebCore::JSDirectoryEntry::getDirectory):
* bindings/js/JSDirectoryEntrySyncCustom.cpp:
(WebCore::getFlags):
* bindings/v8/custom/V8DirectoryEntryCustom.cpp:
(WebCore::V8DirectoryEntry::getDirectoryCallback):
(WebCore::V8DirectoryEntry::getFileCallback):
* bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp:
(WebCore::getFlags):
* fileapi/WebKitFlags.idl: Added.
* page/DOMWindow.idl:
* workers/WorkerContext.idl:
2011-12-23 Eric Uhrhane <ericu@chromium.org>
[fileapi] WebKitFlags should not be constructable per Directories & System spec
https://bugs.webkit.org/show_bug.cgi?id=68916
Reviewed by Eric Seidel.
Remove IDL for the object and all DOM references to it.
* fileapi/WebKitFlags.idl: Removed.
* page/DOMWindow.idl:
* workers/WorkerContext.idl:
Remove references to the JSC/V8 objects compiled from the IDL.
* bindings/js/JSDirectoryEntryCustom.cpp:
(WebCore::JSDirectoryEntry::getFile):
(WebCore::JSDirectoryEntry::getDirectory):
* bindings/js/JSDirectoryEntrySyncCustom.cpp:
(WebCore::getFlags):
* bindings/v8/custom/V8DirectoryEntryCustom.cpp:
(WebCore::V8DirectoryEntry::getDirectoryCallback):
(WebCore::V8DirectoryEntry::getFileCallback):
* bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp:
(WebCore::getFlags):
Fix up build files.
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* WebCore/CMakeLists.txt:
* WebCore/CodeGenerators.pri:
* WebCore/DerivedSources.cpp:
* WebCore/GNUmakefile.list.am:
2011-12-23 Pavel Feldman <pfeldman@google.com>
Web Inspector: Migrate to native Function.prototype.bind; fix front-end compilation with the
version of compiler that respects Function.prototype.bind.
https://bugs.webkit.org/show_bug.cgi?id=75170
Reviewed by Yury Semikhatsky.
* inspector/front-end/ApplicationCacheModel.js:
* inspector/front-end/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.colors):
* inspector/front-end/CSSStyleModel.js:
* inspector/front-end/CompilerSourceMapping.js:
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMAgent.prototype.pushNodeToFrontend):
(WebInspector.DOMAgent.prototype.pushNodeByPathToFrontend):
(WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable.onDocumentAvailable):
(WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable):
(WebInspector.DOMAgent.prototype._loadNodeAttributes):
(WebInspector.DOMAgent.prototype.querySelector):
(WebInspector.DOMAgent.prototype.querySelectorAll):
* inspector/front-end/DebuggerModel.js:
* inspector/front-end/DebuggerPresentationModel.js:
* inspector/front-end/ExtensionAPI.js:
(injectedExtensionAPI.InspectorExtensionAPI):
(injectedExtensionAPI):
* inspector/front-end/ExtensionPanel.js:
* inspector/front-end/NetworkManager.js:
(WebInspector.NetworkManager.prototype.enableResourceTracking):
(WebInspector.NetworkManager.prototype.disableResourceTracking):
* inspector/front-end/Script.js:
* inspector/front-end/Settings.js:
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype.complete):
* inspector/front-end/utilities.js:
2011-12-23 Leo Yang <leo.yang@torchmobile.com.cn>
[BlackBerry] Add the BlackBerry specific pauseLoad(bool) to ResourceHandle
https://bugs.webkit.org/show_bug.cgi?id=75162
Reviewed by George Staikos.
The porting can be built now, no new tests so far.
* platform/network/ResourceHandle.h:
2011-12-23 Karl Koscher <supersat@chromium.org>
Give embedders a chance to handle postMessage calls
https://bugs.webkit.org/show_bug.cgi?id=73883
To support cross-process postMessage calls in Chromium (bug 73337), we need to intercept
postMessage calls to proxy windows. Originally we were just going to add a native event
listener on the Chromium side, but that required more changes to WebKit and was a bit of
a hack. See bug 73359 for a discuss about moving to this approach.
Reviewed by Adam Barth.
Test: platform/chromium/fast/events/intercept-postmessage.html
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::willCheckAndDispatchPostMessage): new method to allow the
embedder to intercept postMessage calls
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessageTimerFired): add a call to
FrameLoaderClient::willCheckAndDispatchPostMessage
2011-12-23 Tom Sepez <tsepez@chromium.org>
XSLT-created HTML documents do not inherit content-security-policy from originally loaded XML.
https://bugs.webkit.org/show_bug.cgi?id=75043
Reviewed by Adam Barth.
Test: http/tests/security/contentSecurityPolicy/xsl-img-blocked.php
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::copyStateFrom):
(WebCore::ContentSecurityPolicy::didReceiveHeader):
* page/ContentSecurityPolicy.h:
* xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::createDocumentFromSource):
2011-12-23 Darin Adler <darin@apple.com>
REGRESSION (r97533): Optgroup label is not disabled
https://bugs.webkit.org/show_bug.cgi?id=74869
Reviewed by Alexey Proskuryakov.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::itemIsEnabled): Added back a line of code that was
accidentally deleted as part of the refactoring in r97533. This line of code
ensures that any items that are not option elements are disabled.
2011-12-19 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Add CSSStyleSelector instrumentation calls towards implementing a CSS selector profiler
https://bugs.webkit.org/show_bug.cgi?id=74863
Performance checks run on PerformanceTest/Parser/html5-full-render.html did not result in any noticeable
perf regression, as the instrumentation calls are inline and bail out early if there are no
Web Inspector frontends open.
Reviewed by Antti Koivisto.
No new tests, as the functionality is not bound to any user-visible outputs.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::matchRulesForList):
(WebCore::CSSStyleSelector::applyDeclaration):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willMatchRuleImpl):
(WebCore::InspectorInstrumentation::didMatchRuleImpl):
(WebCore::InspectorInstrumentation::willProcessRuleImpl):
(WebCore::InspectorInstrumentation::didProcessRuleImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willMatchRule):
(WebCore::InspectorInstrumentation::didMatchRule):
(WebCore::InspectorInstrumentation::willProcessRule):
(WebCore::InspectorInstrumentation::didProcessRule):
2011-12-23 Ivan Briano <ivan@profusion.mobi>
[EFL] Fix building with Glib support disabled
https://bugs.webkit.org/show_bug.cgi?id=70990
Reviewed by Martin Robinson.
Add forward declaration for cairo_surface_t, missing when building
the EFL port with Glib disabled.
* platform/cairo/WidgetBackingStore.h:
2011-12-23 Adam Klein <adamk@chromium.org>
Minimize callsites and duplication of before/after advice for attribute mutations
https://bugs.webkit.org/show_bug.cgi?id=75054
Reviewed by Ryosuke Niwa.
r103452 helpfully made before and after advice regarding attribute
changes symmetrical. This change finishes that work, by pulling
together all the before/after work, not just the crumbs previously
covered. This includes incrementing Document::domTreeVersion()
when an attribute is about to be changed, Inspector instrumentation,
and MutationEvent dispatch. This is in addition to the previous code,
which handled enqueueing MutationRecords for MutationObservers and
updating the Document's list of IDs.
The only change in behavior should be in InspectorInstrumentation,
which causes DOM breakpoints to occur for more cases of Attribute
mutation. This seems like more correct behavior, and a test has
been included to exercise it.
Hopefully the last Attribute-related refactor for awhile.
* dom/Attr.cpp:
(WebCore::Attr::setValue): Update to call didModifyAttribute instead
of attributeChanged.
* dom/Element.cpp:
(WebCore::Element::removeAttribute): Got rid of
removeAttributeInternal as most of that logic moved back into
NamedNodeMap::removeAttribute.
(WebCore::Element::setAttributeInternal): Reorganized to read better
now that only some cases result in calls to will/didModifyAttribute.
(WebCore::Element::willModifyAttribute): Un-inlined and added
incDOMTreeVersion and InspectorInstrumentation calls.
(WebCore::Element::didModifyAttribute): New method which encapsulates
calling attributeChanged, InspectorInstrumentation, and MutationEvents.
(WebCore::Element::didRemoveAttribute): New method which encapsulates
calling attributeChanged, InspectorInstrumentation, and MutationEvents.
Separate from didModifyAttribute because it has special handling of
the removed Attribute's value.
* dom/Element.h:
(WebCore::Element::willRemoveAttribute): New method which delegates to
willModifyAttribute as appropriate.
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::setNamedItem): Simplified.
(WebCore::NamedNodeMap::removeNamedItem): Simplified.
(WebCore::NamedNodeMap::addAttribute): Added calls to will/didModifyAttribute.
(WebCore::NamedNodeMap::removeAttribute): ditto.
(WebCore::NamedNodeMap::replaceAttribute): ditto.
* svg/properties/SVGAnimatedPropertySynchronizer.h: Reverted changes
made in r103452 now that addAttribute/removeAttribute once again
call attributeChanged appropriately.
2011-12-22 Matt Falkenhagen <falken@chromium.org>
Map 'lang' and xml:lang attributes to '-webkit-locale' CSS property for use with font fallback and text-transform
https://bugs.webkit.org/show_bug.cgi?id=67586
Original patch by Jungshik Shin <jshin@chromium.org>
Reviewed by Darin Adler.
Tests: fast/text/lang-mapped-to-webkit-locale.xhtml
fast/text/xml-lang-ignored-in-html.html
* html/HTMLElement.cpp:
(WebCore::HTMLElement::mapLanguageAttributeToLocale):
(WebCore::HTMLElement::parseMappedAttribute): Map 'lang' and 'xml:lang' to -webkit-locale.
* html/HTMLElement.h:
2011-12-22 Ryosuke Niwa <rniwa@webkit.org>
WinCE build fix after r103539.
* rendering/svg/RenderSVGResource.cpp:
(WebCore::RenderSVGResource::removeFromFilterCache):
2011-12-22 Chris Marrin <cmarrin@apple.com>
Crash and incorrect behavior when switching between hardware and software CSS filters
https://bugs.webkit.org/show_bug.cgi?id=75130
Reviewed by Simon Fraser.
Test: css3/filters/crash-hw-sw-switch.html
Backing store on layer gets fixed up (added or removed) after style change is evaluated
so the state of the m_filter variable might not match the current filter state. Added
updateOrRemoveFilterEffect() call to ensureBacking() and clearBacking() to get the
m_filter property in the right state. Also added an ASSERT() where the crash was
occuring.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::ensureBacking):
(WebCore::RenderLayer::clearBacking):
2011-12-22 Jon Lee <jonlee@apple.com>
Radio buttons cut in download movie sheet
https://bugs.webkit.org/show_bug.cgi?id=75128
<rdar://problem/9399450>
Reviewed by Dan Bernstein.
Test: compositing/overflow/theme-affects-visual-overflow.html
The clipping comes from the fact the visual overflow rect of the radio button's
RenderBlock is not expanded to accommodate for the size of the button on the Mac
platform. We use the existing RenderTheme::adjustRepaintRect() to make the
appropriate adjustment. This, consequently, makes it unnecessary to have to
recalculate it for repaint.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow): As part of the overflow computation, we
make a call to addVisualOverflowFromTheme().
(WebCore::RenderBlock::addVisualOverflowFromTheme): Ask the theme to inflate the
RenderBlock's rect if necessary, and add that to the visual overflow rect.
* rendering/RenderBlock.h: Added addVisualOverflowFromTheme().
* rendering/RenderBox.cpp:
(WebCore::RenderBox::clippedOverflowRectForRepaint): Remove the call to
adjustRepaintRect() since the rectangle r already uses the new visual overflow
rect.
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::clippedOverflowRectForRepaint): Remove the call to
adjustRepaintRect() since the rectangle r already uses the new visual overflow
rect.
2011-12-22 Chris Rogers <crogers@google.com>
Fix mac build breakage - add SincResampler files to WebCore.xcodeproj
https://bugs.webkit.org/show_bug.cgi?id=75139
Unreviewed build fix.
* WebCore.xcodeproj/project.pbxproj:
2011-12-22 Simon Fraser <simon.fraser@apple.com>
Animating some CSS filter values is wrong
https://bugs.webkit.org/show_bug.cgi?id=75122
Reviewed by Chris Marrin.
Fix some reversed filter animation behavior for brightness,
contrast and drop-shadow filters.
Test: css3/filters/filter-animation-from-none.html
* platform/graphics/filters/FilterOperation.cpp:
(WebCore::BasicComponentTransferFilterOperation::blend): Just use the global blend() function.
(WebCore::BasicComponentTransferFilterOperation::passthroughAmount): Add CONTRAST and BRIGHTNESS to the sswitch.
(WebCore::GammaFilterOperation::blend): Fix the ordering.
(WebCore::DropShadowFilterOperation::blend): Fix the ordering.
2011-12-22 Chris Rogers <crogers@google.com>
Fix mac build caused by improper include of "Locker.h"
https://bugs.webkit.org/show_bug.cgi?id=75134
Unreviewed build fix.
* webaudio/MediaElementAudioSourceNode.cpp:
2011-12-22 Anders Carlsson <andersca@apple.com>
More ScrollAnimatorMac cleanup
https://bugs.webkit.org/show_bug.cgi?id=75127
Reviewed by Andreas Kling.
Introduce a immediateScrollByWithoutContentEdgeConstraints and use it whenever we want to scroll by an
offset instead of doing the setConstrainsScrollingToContentEdge dance.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints):
(WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2011-12-22 Chris Rogers <crogers@google.com>
Implement MediaElementAudioSourceNode::setFormat() so numberOfChannels and sampleRate are accounted for
https://bugs.webkit.org/show_bug.cgi?id=75057
Reviewed by Eric Carlson.
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
Add MultiChannelResampler source files to makefiles.
* platform/audio/MultiChannelResampler.cpp: Added.
(WebCore::MultiChannelResampler::MultiChannelResampler):
(WebCore::MultiChannelResampler::process):
* platform/audio/MultiChannelResampler.h: Added.
Add MultiChannelResampler implementation which uses one SincResampler per channel.
* webaudio/MediaElementAudioSourceNode.cpp:
(WebCore::MediaElementAudioSourceNode::create):
(WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
(WebCore::MediaElementAudioSourceNode::setFormat):
(WebCore::MediaElementAudioSourceNode::process):
Implement MediaElementAudioSourceNode::setFormat() so that we can
properly setup a sample-rate converter and set the number of channels
of the MediaElementAudioSourceNode output.
* webaudio/MediaElementAudioSourceNode.h:
2011-12-22 Chris Fleizach <cfleizach@apple.com>
AX: WebKit should ignore ARIA role=presentation on focusable elements
https://bugs.webkit.org/show_bug.cgi?id=75101
Reviewed by Darin Adler.
If an element is focusable, the presentational role must be ignored, lest the user not be able
to interact with something important.
Test: accessibility/presentational-elements-with-focus.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAriaRoleAttribute):
(WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
2011-12-22 Anders Carlsson <andersca@apple.com>
Use immediateScrollBy instead of immediateScrollTo where possible
https://bugs.webkit.org/show_bug.cgi?id=75124
Reviewed by Sam Weinig.
Instead of computing the position to scroll to, just compute the delta and use scrollBy instead.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2011-12-22 Anders Carlsson <andersca@apple.com>
Remove a private ScrollAnimatorMac getter/setter and just update the member variable directly
https://bugs.webkit.org/show_bug.cgi?id=75121
Reviewed by Sam Weinig.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::setIsActive):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
2011-12-22 Anders Carlsson <andersca@apple.com>
Simplify ScrollAnimatorMac scrollByDelta functions
https://bugs.webkit.org/show_bug.cgi?id=75120
Reviewed by Sam Weinig.
Merge immediateScrollByDeltaX and immediateScrollByDeltaY to a single function and rename it
to immediateScrollBy. Also, rename immediateScrollToPoint to immediateScrollTo.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimatorMac::immediateScrollTo):
(WebCore::ScrollAnimatorMac::immediateScrollBy):
(WebCore::ScrollAnimatorMac::immediateScrollToPointForScrollAnimation):
(WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2011-12-22 Anders Carlsson <andersca@apple.com>
Make some ScrollAnimatorMac member functions private
https://bugs.webkit.org/show_bug.cgi?id=75117
Reviewed by Sam Weinig.
Make virtual member functions and functions that are only called from ScrollAnimatorMac private.
* platform/mac/ScrollAnimatorMac.h:
2011-12-22 Anders Carlsson <andersca@apple.com>
Move some member variables out of ScrollElasticityController
https://bugs.webkit.org/show_bug.cgi?id=75115
Reviewed by Adam Roben.
Move a couple of member variables that aren't related to rubberbanding out from
ScrollElasticityController and back into ScrollAnimatorMac and remove now unneeded
ScrollElasticityControllerClient member functions as well.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::handleWheelEvent):
(WebCore::ScrollAnimatorMac::beginScrollGesture):
* platform/mac/ScrollElasticityController.h:
* platform/mac/ScrollElasticityController.mm:
(WebCore::ScrollElasticityController::ScrollElasticityController):
(WebCore::ScrollElasticityController::beginScrollGesture):
2011-12-22 Balazs Kelemen <kbalazs@webkit.org>
Fix debug build with assertions disabled
https://bugs.webkit.org/show_bug.cgi?id=75075
Reviewed by Darin Adler.
Check whether assertions are disabled instead of NDEBUG
where appropriate to avoid "defined but not used" warnings.
No change in behaviour so no new tests.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::insertInLRUList):
(WebCore::MemoryCache::removeFromLiveDecodedResourcesList):
(WebCore::MemoryCache::insertInLiveDecodedResourcesList):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlockChild):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
2011-12-22 Anders Carlsson <andersca@apple.com>
Get rid of didStartAnimatedScroll and didCompleteAnimatedScroll
https://bugs.webkit.org/show_bug.cgi?id=75107
Reviewed by Adam Roben.
This is another step towards removing the display throttling in WebKit2.
* page/ChromeClient.h:
* page/FrameView.cpp:
* page/FrameView.h:
* platform/ScrollableArea.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::scroll):
(WebCore::ScrollAnimatorMac::immediateScrollToPointForScrollAnimation):
2011-12-22 Anders Carlsson <andersca@apple.com>
Remove didStartRubberBand and didCompleteRubberBand callbacks
https://bugs.webkit.org/show_bug.cgi?id=75102
Reviewed by Adam Roben.
The code to do display throttling in WebKit2 is complex and doesn't really help us except
on an old benchmark that's no longer representative of real-world behavior; let's rip it out instead.
* page/ChromeClient.h:
* page/FrameView.cpp:
* page/FrameView.h:
* platform/ScrollView.cpp:
* platform/ScrollView.h:
* platform/ScrollableArea.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
* rendering/RenderLayer.cpp:
* rendering/RenderLayer.h:
2011-12-22 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: [Regression] Network item view is not displayed.
https://bugs.webkit.org/show_bug.cgi?id=75100
Not reviewed, one line css fix.
* inspector/front-end/networkPanel.css:
(.network-item-view.visible):
2011-12-22 Andreas Kling <kling@webkit.org>
NamedNodeMap: Get rid of declCount().
<http://webkit.org/b/74948>
Reviewed by Darin Adler.
We already have the number of mapped attribute declarations in the map
stored in m_mappedAttributeCount (updated by declAdded()/declRemoved())
so compare that in mappedMapsEquivalent() to skip one loop over the map.
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::mappedMapsEquivalent):
* dom/NamedNodeMap.h:
2011-12-22 Andreas Kling <kling@webkit.org>
SnowLeopard crashes due to thread-unsafe EventListenerIterator ASSERTs
<http://webkit.org/b/74260>
Reviewed by Darin Adler.
Guard EventListenerMap::m_activeIteratorCount with a mutex.
* dom/EventListenerMap.cpp:
(WebCore::activeIteratorCountMutex):
(WebCore::EventListenerMap::assertNoActiveIterators):
(WebCore::EventListenerMap::clear):
(WebCore::EventListenerMap::add):
(WebCore::EventListenerMap::remove):
(WebCore::EventListenerMap::find):
(WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup):
(WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
(WebCore::EventListenerIterator::EventListenerIterator):
(WebCore::EventListenerIterator::~EventListenerIterator):
* dom/EventListenerMap.h:
(WebCore::EventListenerMap::assertNoActiveIterators):
2011-12-22 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: TabbedPane should support closeable tabs, hiding tabs into drop down menu.
https://bugs.webkit.org/show_bug.cgi?id=75085
Reviewed by Pavel Feldman.
Test: inspector/tabbed-pane-tabs-to-show.html
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/front-end/ScriptsNavigator.js:
(WebInspector.ScriptsNavigator):
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPane):
(WebInspector.TabbedPane.prototype.set shrinkableTabs):
(WebInspector.TabbedPane.prototype.set closeableTabs):
(WebInspector.TabbedPane.prototype.appendTab):
(WebInspector.TabbedPane.prototype.closeTab):
(WebInspector.TabbedPane.prototype.selectTab):
(WebInspector.TabbedPane.prototype.onResize):
(WebInspector.TabbedPane.prototype._updateTabElements):
(WebInspector.TabbedPane.prototype._showTabElement):
(WebInspector.TabbedPane.prototype._hideTabElement):
(WebInspector.TabbedPane.prototype._createDropDownButton):
(WebInspector.TabbedPane.prototype._updateTabsDropDown):
(WebInspector.TabbedPane.prototype._populateDropDownFromIndex):
(WebInspector.TabbedPane.prototype._tabsSelectChanged):
(WebInspector.TabbedPane.prototype._measureDropDownButton):
(WebInspector.TabbedPane.prototype._updateWidths):
(WebInspector.TabbedPane.prototype._calculateMaxWidth.var):
(WebInspector.TabbedPane.prototype._calculateMaxWidth):
(WebInspector.TabbedPane.prototype._hideCurrentTab):
(WebInspector.TabbedPaneTab):
(WebInspector.TabbedPaneTab.prototype.get id):
(WebInspector.TabbedPaneTab.prototype.get tabElement):
(WebInspector.TabbedPaneTab.prototype.get measuredWidth):
(WebInspector.TabbedPaneTab.prototype.get width):
(WebInspector.TabbedPaneTab.prototype.set width):
(WebInspector.TabbedPaneTab.prototype._createTabElement):
(WebInspector.TabbedPaneTab.prototype._measure):
(WebInspector.TabbedPaneTab.prototype._tabSelected):
(WebInspector.TabbedPaneTab.prototype._tabClosed):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.css:
* inspector/front-end/scriptsPanel.css:
(#scripts-navigator-tabbed-pane .tabbed-pane-header-contents):
* inspector/front-end/tabbedPane.css: Added.
2011-12-22 Chris Fleizach <cfleizach@apple.com>
AX: attributed strings do not include AXHeading information when a link is contained within the heading
https://bugs.webkit.org/show_bug.cgi?id=75059
Reviewed by Darin Adler.
An attributed string should contain the heading level of an ancestor node if it exists.
This change allows the ancestor to be higher up in the hierarchy than just the direct parent.
Test: platform/mac/accessibility/heading-and-link-attributed-string.html
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(AXAttributeStringSetHeadingLevel):
2011-12-22 Chris Fleizach <cfleizach@apple.com>
AX: Title attribute should not be used in AXTitle
https://bugs.webkit.org/show_bug.cgi?id=75027
Reviewed by Darin Adler.
Accessibility has been incorrectly exposing the title attribute through AXTitle. The title
attribute better corresponds with a help tag for accessibility clients.
Test: platform/mac/accessibility/title-attribute-not-used-as-axtitle.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::title):
Don't use the title attribute.
(WebCore::AccessibilityRenderObject::exposesTitleUIElement):
Change the semantics around when a checkbox or radio button combines it's title ui element. The change
makes it so that we will expose the title ui element when the control already has a label. Otherwise
the title ui element is hidden, and it's text is used as the AXTitle for the control.
(WebCore::AccessibilityRenderObject::titleUIElement):
Change this method so it always returns the title ui element, and then leave it up to exposesTitleUIElement
to determine whether it should be shown.
* accessibility/AccessibilityTableCell.h:
(WebCore::AccessibilityTableCell::exposesTitleUIElement):
There's no special logic for table cells that have title ui elements, and we don't want to use
the logic in AccessibilityRenderObject, hence the override here.
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2011-12-22 Chris Fleizach <cfleizach@apple.com>
AX: aria-describedby should not be part of AXDescription (should be a part of AXHelp)
https://bugs.webkit.org/show_bug.cgi?id=75052
Reviewed by Darin Adler.
According to the ARIA spec, aria-describedby is a more detailed description that is akin to help, rather
than a description describing the actual object.
As such, it makes more sense for this attribute to be exposed under help text.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::helpText):
(WebCore::AccessibilityRenderObject::ariaAccessibilityDescription):
2011-12-22 Mariusz Grzegorczyk <mariusz.g@samsung.com>
[EFL] Missing plugins support for efl port
https://bugs.webkit.org/show_bug.cgi?id=44505
Reviewed by Anders Carlsson.
Basic functionality of plugins for efl port.
Template version, so no new tests are needed.
* PlatformEfl.cmake:
* plugins/PluginView.h:
* plugins/efl/PluginDataEfl.cpp: Added. Copied from plugins/gtk/PluginDataGtk.cpp.
(WebCore::PluginData::initPlugins): Fill mime/description/extension maps for plugins.
(WebCore::PluginData::refresh): Refresh plugin's database.
* plugins/efl/PluginPackageEfl.cpp: Added. Copied from plugins/gtk/PluginPackageGtk.cpp.
(WebCore::PluginPackage::fetchInfo): Get info from plugin's library about name and mime supported.
(WebCore::PluginPackage::NPVersion):
(WebCore::PluginPackage::load): Load plugin.
* plugins/efl/PluginViewEfl.cpp: Added. Copied from plugins/gtk/PluginViewGtk.cpp.
(WebCore::PluginView::dispatchNPEvent):
(WebCore::PluginView::handleFocusInEvent):
(WebCore::PluginView::handleFocusOutEvent):
(WebCore::PluginView::handleKeyboardEvent):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::updatePluginWidget):
(WebCore::PluginView::setFocus):
(WebCore::PluginView::show):
(WebCore::PluginView::hide):
(WebCore::PluginView::paint):
(WebCore::PluginView::setParent):
(WebCore::PluginView::setNPWindowRect):
(WebCore::PluginView::setNPWindowIfNeeded):
(WebCore::PluginView::setParentVisible):
(WebCore::PluginView::handlePostReadFile):
(WebCore::PluginView::platformGetValueStatic):
(WebCore::PluginView::platformGetValue):
(WebCore::PluginView::invalidateRect):
(WebCore::PluginView::invalidateRegion):
(WebCore::PluginView::forceRedraw):
(WebCore::PluginView::platformStart):
(WebCore::PluginView::platformDestroy):
2011-12-22 Pavel Podivilov <podivilov@chromium.org>
Web Inspector: add "install source map" to JS source frame context menu.
https://bugs.webkit.org/show_bug.cgi?id=74181
Reviewed by Pavel Feldman.
Add "install source map" to source frame context menu when source map url is auto detected.
* English.lproj/localizedStrings.js:
* inspector/front-end/CompilerSourceMapping.js:
(WebInspector.ClosureCompilerSourceMapping.prototype.load):
(WebInspector.ClosureCompilerSourceMapping.prototype._parseSections):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype.installCompilerSourceMapping):
* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
(WebInspector.JavaScriptSourceFrame.prototype.cancelEditing):
* inspector/front-end/RawSourceCode.js:
(WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent):
(WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent):
(WebInspector.RawSourceCode.prototype._createSourceMapping):
(WebInspector.RawSourceCode.prototype._createUISourceCode):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode):
2011-12-22 Branimir Lambov <blambov@google.com>
SVG: "filter" race condition may prevent SVG elements from being re-drawn
https://bugs.webkit.org/show_bug.cgi?id=53088
Reviewed by Nikolas Zimmermann.
Added code to explicitly invalidate data cached by filters applied to
an invalidated object or one of its parents.
Test: svg/filters/filter-refresh.svg
* rendering/svg/RenderSVGResource.cpp:
(WebCore::RenderSVGResource::removeFromFilterCache):
(WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
Added code to invalidate any filters applied to any of the parents.
* rendering/svg/RenderSVGResource.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
Replaced a duplicate of RenderSVGResource::
markForLayoutAndParentResourceInvalidation with a call to the method.
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::clientLayoutChanged):
Removed filter invalidation code as this function would not be called if
the filter isn't already invalidated.
(WebCore::SVGResourcesCache::clientStyleChanged):
(WebCore::SVGResourcesCache::clientUpdatedFromElement):
Replaced filter invalidation with a markForLayoutAndParentResourceInvalidation
call as all filters in the ancestor chain need to be invalidated.
2011-12-22 Leo Yang <leo.yang@torchmobile.com.cn>
[BlackBerry] Upstream the BlackBerry change to ResourceHandle.h
https://bugs.webkit.org/show_bug.cgi?id=75061
Reviewed by George Staikos.
No functionality change to the existing code, no new tests.
* platform/network/ResourceHandle.h:
2011-12-22 Alexandru Chiculita <achicu@adobe.com>
[CSS Shaders] Follow up bug to fix issues mentioned in comment 23 from bug 73317
https://bugs.webkit.org/show_bug.cgi?id=74840
Some comments were added on bug 73317 after the patch was reviewed and committed.
This patch is fixing those issues, mostly about coding style and some missing comments.
The initial patch had no explanation about the feature in the ChangeLog, so I'm including the description
in this patch:
CSS Shaders allow a designer to use a pair of WebGL vertex and fragment shaders to alter the final
rendering of a specific element. The navigator will render the element inside a texture and map it
to a mesh. The mesh is formed by equal sized quads, that depending on the mesh style, attached or detached,
can be stitched or separated. The number of quads can be changed from CSS.
Usually the vertex shader is changing the vertices of the mesh, while the fragment shader affects only the color
that is rendered to screen (for example lighting effects).
More info about CSS Shaders can be found in the specification
https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html
Also a good tutorial is published here
http://www.adobe.com/devnet/html5/articles/css-shaders.html
Initially we are using the software filter effects pipeline. It uploads the image to the GPU, applies
the shaders, reads it back to CPU and continues the rendering. The advantage of using the software pipeline is that
it can be enabled on all the platforms that have WebGL support. The obvious disadvantage is performance: copies from CPU
memory to GPU memory and the CPU will need to wait the GPU to finish before it could continue. In following
patches the shaders will be integrated in the hardware accelerated pipeline, so that no copies and, most
important, no waits will be required.
Also, the new syntax counts total number of the lines and the columns, not just the
additional lines and columns, so the minimum accepted and the default value is now 1 by 1.
Reviewed by Nikolas Zimmermann.
Some tests were updated for the default mesh size change.
* css/CSSParser.cpp:
Only accept non-zero positive int values for mesh sizes.
(WebCore::CSSParser::parseCustomFilter):
* css/CSSStyleSelector.cpp:
Updated the default mesh size to be 1 column with 1 line.
(WebCore::CSSStyleSelector::createCustomFilterOperation):
* loader/cache/CachedShader.cpp:
(WebCore::CachedShader::shaderString):
Corrected the CachedShader to use a StringBuilder. Also there was an incorrect
cast to bool, which resulted from a copy/paste from CachedScript which still has
both same issues.
(WebCore::CachedShader::data):
* loader/cache/CachedShader.h:
* platform/graphics/filters/CustomFilterMesh.cpp:
(WebCore::MeshGenerator::MeshGenerator):
(WebCore::MeshGenerator::verticesCount):
(WebCore::MeshGenerator::generateAttachedMesh):
(WebCore::MeshGenerator::generateDetachedMesh):
(WebCore::CustomFilterMesh::CustomFilterMesh):
* platform/graphics/filters/CustomFilterMesh.h:
(WebCore::CustomFilterMesh::create):
* platform/graphics/filters/CustomFilterShader.cpp:
(WebCore::CustomFilterShader::CustomFilterShader):
Exploded the body of the constructor into smaller helper functions.
(WebCore::CustomFilterShader::compileShader):
(WebCore::CustomFilterShader::linkProgram):
(WebCore::CustomFilterShader::initializeParameterLocations):
* platform/graphics/filters/CustomFilterShader.h:
* platform/graphics/filters/FECustomFilter.cpp:
(WebCore::orthogonalProjectionMatrix):
Passing a TransformationMatrix by reference to be filled with the result matrix, instead
of returning it by value. Also changed the name of the method.
(WebCore::FECustomFilter::FECustomFilter):
(WebCore::FECustomFilter::platformApplySoftware):
Created some helper functions to make this method shorter.
(WebCore::FECustomFilter::initializeContext):
(WebCore::FECustomFilter::resizeContext):
(WebCore::FECustomFilter::bindVertexAttribute):
(WebCore::FECustomFilter::bindProgramAndBuffers):
* platform/graphics/filters/FECustomFilter.h:
2011-12-12 Pavel Podivilov <podivilov@chromium.org>
Web Inspector: fix source map url resolving.
https://bugs.webkit.org/show_bug.cgi?id=74305
Reviewed by Pavel Feldman.
Also fix the bug with repeated source urls in mapping sections.
* inspector/front-end/CompilerSourceMapping.js:
(WebInspector.ClosureCompilerSourceMapping):
(WebInspector.ClosureCompilerSourceMapping.prototype.sources):
(WebInspector.ClosureCompilerSourceMapping.prototype._parseMap):
(WebInspector.ClosureCompilerSourceMapping.prototype._resolveSourceMapURL):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype.installCompilerSourceMapping):
* inspector/front-end/utilities.js:
(String.prototype.asParsedURL):
2011-12-09 Pavel Podivilov <podivilov@chromium.org>
Web Inspector: auto detect source map url.
https://bugs.webkit.org/show_bug.cgi?id=74088
Reviewed by Pavel Feldman.
Check to see if "X-SourceMap" HTTP response header was sent with script resource.
Header value will be used as auto suggestion for source map url in UI.
* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::sourceMapURLForScript):
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/InspectorDebuggerAgent.h:
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype._parsedScriptSource):
(WebInspector.DebuggerDispatcher.prototype.scriptParsed):
* inspector/front-end/RawSourceCode.js:
(WebInspector.RawSourceCode):
* inspector/front-end/Script.js:
(WebInspector.Script):
2011-12-22 Kentaro Hara <haraken@chromium.org>
Change the build flow of AppleWebKit to use the [Supplemental] IDL
https://bugs.webkit.org/show_bug.cgi?id=74900
Reviewed by Adam Barth.
This is the final step for bug 74599. This patch changes the build flow
of DerivedSources.make as follows, and thus enable the [Supplemental] IDL.
- Previous build flow:
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl;
generate-bindings.pl reads $idl;
generate-bindings.pl generates .h and .cpp files for $idl;
}
- New build flow (See the discussions in bug 72138 for more details):
resolve-supplemental.pl depends on all IDL files;
resolve-supplemental.pl reads all IDL files;
resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
resolve-supplemental.pl outputs supplemental_dependency.tmp;
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
generate-bindings.pl reads $idl;
generate-bindings.pl reads supplemental_dependency.tmp;
generate-bindings.pl generates .h and .cpp files for $idl,
including all attributes in the IDL files that are implementing $idl;
}
Tests: Confirm that build succeeds.
http/tests/websocket/tests/*
* DerivedSources.make: Described the build flow as described above.
Added a list of IDL files. Instead, removed a list of JS*.h and JS*.cpp
which are generated by the IDL files.
2011-12-22 Eric Uhrhane <ericu@chromium.org>
[filesystem] Remove old filesystem naming restrictions
https://bugs.webkit.org/show_bug.cgi?id=62813
Reviewed by David Levin.
* fileapi/DOMFilePath.cpp:
(WebCore::DOMFilePath::isValidPath): Replace strict restrictions with
minimal safety [no files named "." or "..", no use of '\\' or '\0' in
paths, no use of '/' in file names].
2011-12-22 Greg Billock <gbillock@google.com>
[Coverity] Address use-after-free report in MemoryCache
https://bugs.webkit.org/show_bug.cgi?id=74970
Reviewed by Eric Seidel.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::revalidationSucceeded):
2011-12-22 Tom Sepez <tsepez@chromium.org>
XSLT-created HTML documents do not inherit first party for cookies from originally loaded XML.
https://bugs.webkit.org/show_bug.cgi?id=74757
Reviewed by Alexey Proskuryakov.
Tests: http/tests/security/cookies/first-party-cookie-allow-xslt.xml
http/tests/security/cookies/third-party-cookie-blocking-xslt.xml
* xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::createDocumentFromSource):
2011-12-22 Daniel Jalkut <jalkut@red-sweater.com>
WebKit editing throws exception when monochrome color dragged onto text
https://bugs.webkit.org/show_bug.cgi?id=74775
Reviewed by Ryosuke Niwa.
Handle non-RGB colorspace colors in the Mac platform drag manager. Fixes NSException thrown
when dragging monochrome colors to contentEditable regions.
Manual test added to trunk/ManualTests/drag-color-to-contenteditable.html
* platform/mac/DragDataMac.mm:
(WebCore::DragData::asColor):
2011-12-22 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: CodeGeneratorInspector.py: generate anonymous types.
https://bugs.webkit.org/show_bug.cgi?id=74890
Reviewed by Yury Semikhatsky.
Anonymous types are generated. Forward declarations are generated.
In general it now generates C++ types for anonymous object types from
JSON. It takes a name from the type declaration site, usually a
parameter name. This all is explained in comments in generated file. Also
all generated types now refer to other generated types in setter
methods -- but this is commented out in generated code for now. All
necessary forward declarations are also added. Anonymous enums are
generated, but they are in comments too, because we didn't have
solution about form the enums should have in C++ API.
Internally:
The change reorganizes type bindings — a polymorphous "code generator"
object is factored out from binding.
A helper class Writer is added to allow generating code with ajustable
indentations and to support insertion points where additional code can
be inserted retroactively.
ForwardListener class is used for preparing necessary forward
declarations.
AdHocTypeContext conception is a speculative abstract class that is
needed wherever anonymous type can emerge.
* inspector/CodeGeneratorInspector.py:
(fix_type_name.Result.output_comment):
(Writer.__init__):
(Writer.newline):
(Writer.append):
(Writer.newline_multiline):
(Writer.append_multiline):
(Writer.get_indented):
(Writer):
(Writer.insert_writer):
(TypeBindings.create_named_type_declaration.Helper.write_doc):
(TypeBindings.create_named_type_declaration.Helper):
(TypeBindings.create_named_type_declaration.Helper.add_to_forward_listener):
(TypeBindings.create_named_type_declaration):
(TypeBindings.create_ad_hoc_type_declaration.Helper.write_doc):
(TypeBindings.create_ad_hoc_type_declaration.Helper):
(TypeBindings.create_ad_hoc_type_declaration.Helper.add_to_forward_listener):
(TypeBindings.create_ad_hoc_type_declaration):
(TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder):
(TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator):
(TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.register_use):
(TypeBindings.create_type_declaration_.EnumBinding.get_code_generator):
(TypeBindings.create_type_declaration_.PlainString.get_code_generator.CodeGenerator.generate_type_builder.String):
(TypeBindings.create_type_declaration_.PlainString.get_code_generator.CodeGenerator.generate_type_builder):
(TypeBindings.create_type_declaration_.PlainString.get_code_generator.CodeGenerator):
(TypeBindings.create_type_declaration_.PlainString.get_code_generator.CodeGenerator.register_use):
(TypeBindings.create_type_declaration_.PlainString.get_code_generator):
(TypeBindings.create_type_declaration_.PlainString.get_in_c_type_text.name):
(TypeBindings.create_type_declaration_.PlainString):
(TypeBindings.create_type_declaration_):
(TypeBindings.create_type_declaration_.ClassBinding.get_code_generator):
(TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator):
(TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator.generate_type_builder):
(AdHocTypeContextImpl.__init__):
(AdHocTypeContextImpl.get_type_name_fix.NameFix):
(AdHocTypeContextImpl.get_type_name_fix.NameFix.output_comment):
(AdHocTypeContextImpl.get_type_name_fix):
(AdHocTypeContextImpl):
(AdHocTypeContextImpl.call_generate_type_builder):
(generate_forward_declaration):
(register_use):
(get_in_c_type_text):
(reduce_to_raw_type):
(PlainObjectBinding.get_code_generator):
(CodeGenerator.generate_type_builder.AdHocTypeContext.get_type_name_fix.NameFix):
(CodeGenerator.generate_type_builder.AdHocTypeContext.get_type_name_fix.NameFix.output_comment):
(CodeGenerator.generate_type_builder.AdHocTypeContext.get_type_name_fix):
(CodeGenerator.generate_type_builder.AdHocTypeContext):
(CodeGenerator.generate_type_builder.AdHocTypeContext.call_generate_type_builder):
(CodeGenerator.generate_type_builder):
(CodeGenerator):
(CodeGenerator.register_use):
(RawTypesBinding.get_code_generator):
(RawTypesBinding.get_in_c_type_text):
(RawTypesBinding):
(RawTypesBinding.reduce_to_raw_type):
(TypeData.__init__):
(TypeData.get_json_type):
(resolve_param_type):
(Generator.go):
(Generator.process_event.NoOpForwardListener):
(Generator.process_event.NoOpForwardListener.add_type_data):
(Generator.process_event.AdHocTypeContext.get_type_name_fix.NameFix):
(Generator.process_event.AdHocTypeContext.get_type_name_fix.NameFix.output_comment):
(Generator.process_event.AdHocTypeContext.get_type_name_fix):
(Generator.process_event.AdHocTypeContext):
(Generator.process_event.AdHocTypeContext.call_generate_type_builder):
(Generator.process_event):
(Generator.process_types.ForwardListener):
(Generator.process_types.ForwardListener.add_type_data):
(Generator.process_types.generate_all_domains_code.namespace_lazy_generator):
(Generator.process_types.generate_all_domains_code):
(Generator.process_types.call_type_builder):
(Generator.process_types.generate_forward_callback):
(Generator):
(Generator.process_types):
(flatten_list.fill_recursive):
(flatten_list):
2011-12-22 Hans Muller <hmuller@adobe.com>
Onloadend event is not supported in XMLHttpRequest
https://bugs.webkit.org/show_bug.cgi?id=40952
Reviewed by Julien Chaffraix.
Added support for the loadend ProgressEvent to XMLHttpRequest and XMLHttpRequestUpload.
A new method, dispatchEventAndLoadEnd(), was added to XMLHttpRequestProgressEventThrottle
and XMLHttpRequestUpload to foolproof the common case of dispatching a load, abort,
or error event followed by a loadend event.
Tests: http/tests/xmlhttprequest/onloadend-event-after-abort.html
http/tests/xmlhttprequest/onloadend-event-after-error.html
http/tests/xmlhttprequest/onloadend-event-after-load.html
http/tests/xmlhttprequest/onloadend-event-after-sync-requests.html
http/tests/xmlhttprequest/upload-onloadend-event-after-abort.html
http/tests/xmlhttprequest/upload-onloadend-event-after-load.html
http/tests/xmlhttprequest/upload-onloadend-event-after-sync-requests.html
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::callReadyStateChangeListener):
(WebCore::XMLHttpRequest::abort):
(WebCore::XMLHttpRequest::networkError):
(WebCore::XMLHttpRequest::abortError):
(WebCore::XMLHttpRequest::didSendData):
* xml/XMLHttpRequest.h:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::dispatchEventAndLoadEnd):
* xml/XMLHttpRequestProgressEventThrottle.h:
* xml/XMLHttpRequestUpload.cpp:
(WebCore::XMLHttpRequestUpload::dispatchEventAndLoadEnd):
* xml/XMLHttpRequestUpload.h:
* xml/XMLHttpRequestUpload.idl:
2011-12-22 Mark Pilgrim <pilgrim@chromium.org>
[FileSystem API] Entry.getMetadata successCallback is required
https://bugs.webkit.org/show_bug.cgi?id=69638
Reviewed by Eric Seidel.
Test: fast/filesystem/simple-required-arguments-getmetadata.html
* fileapi/Entry.idl: remove [Optional] flag from successCallback parameter
2011-12-22 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed, rolling out r103405.
http://trac.webkit.org/changeset/103405
https://bugs.webkit.org/show_bug.cgi?id=74088
it broke WorkerDevToolsSanityTest.InspectSharedWorker
* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/InspectorDebuggerAgent.h:
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype._parsedScriptSource):
(WebInspector.DebuggerDispatcher.prototype.scriptParsed):
* inspector/front-end/RawSourceCode.js:
(WebInspector.RawSourceCode):
* inspector/front-end/Script.js:
(WebInspector.Script):
(WebInspector.Script.prototype.searchInContent):
2011-12-21 Darin Adler <darin@apple.com>
Make ~CSSParserSelector use Vector<OwnPtr>
https://bugs.webkit.org/show_bug.cgi?id=73782
Reviewed by Alexey Proskuryakov.
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::~CSSParserSelector): Use Vector<OwnPtr>
so we don't have to call leakPtr or deleteAllValues.
2011-12-21 Yosifumi Inoue <yosin@chromium.org>
[Forms] Selection change by type-ahead doesn't fire 'change' event
https://bugs.webkit.org/show_bug.cgi?id=74590
Reviewed by Kent Tamura.
This patch changes when onchange event fired in select element for:
1 Fire onchange event for type ahead selection.
2 Don't fire onchange event for Enter key. We've already fired onchange event for cursor key
and type ahead selection. So, onchange for Enter key is redundant. This behavior is
compatible to IE(9.0.8112.16421) and Opera(9.80) on Windows. FF(8.01) doesn't fire onchange
by cursor key selection change and type ahead. FF requires Enter key press to fire onchange
event.
Test: fast/forms/select/menulist-type-ahead-find.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::menuListDefaultEventHandler): Don't fire onchange event for Entry key.
(WebCore::HTMLSelectElement::typeAheadFind): Add DispatchChangeEvent when
calling selectOption method.
2011-12-21 Darin Adler <darin@apple.com>
Tweak and comment some transform-related code
https://bugs.webkit.org/show_bug.cgi?id=68670
Reviewed by Daniel Bates.
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::paint): Added a FIXME about additional overhead paid here
when the scale factor is 2x.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintBoxShadow): Added a FIXME about this check possibly
being wrong, and also changed the local vairable name so the check need not stretch over
multiple lines.
2011-12-21 Kent Tamura <tkent@chromium.org>
Change the item type of Document::m_formElementsWithState from Element*
to HTMLFormControlElementWithState*.
https://bugs.webkit.org/show_bug.cgi?id=74998
Reviewed by Andreas Kling.
No new tests. Just refactoring.
* dom/Document.cpp:
(WebCore::Document::formElementsState): Use HTMLFormControlElementWithState*.
* dom/Document.h:
(WebCore::Document::registerFormElementWithState): Change the argument type.
(WebCore::Document::unregisterFormElementWithState): ditto.
(WebCore::Document::formElements): Renamed from getFormElements().
* dom/Element.h:
Removed shouldSaveAndRestoreFormControlState(), saveFormControlState(),
and restoreFormControlState() because they are not called for Element
anymore.
* html/HTMLFormControlElement.h:
- Make formControlName() and formControlType() public.
They are called from Document class.
- Make shouldSaveAndRestoreFormControlState() public, and non-virtual.
This is called from Document class, and no other classes override this.
(WebCore::HTMLFormControlElementWithState::saveFormControlState):
Moved from Element.
(WebCore::HTMLFormControlElementWithState::restoreFormControlState): ditto.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateCheckedRadioButtons):
Use HTMLFormControlElementWithState* instead of Element*.
2011-12-21 Alexandre Elias <aelias@google.com>
[chromium] Always use border texels on platforms using pageScaleDelta
https://bugs.webkit.org/show_bug.cgi?id=74226
Reviewed by James Robinson.
On platforms where the root layer can be zoomed in at draw time
(pageScaleDelta), we want to turn on border texels in order for
scaling to use GL_LINEAR instead of GL_NEAREST.
No new tests. (Flag flip.)
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::prepareToUpdate):
2011-12-21 Dale Curtis <dalecurtis@chromium.org>
[chromium] Scale audio, video tags in MediaDocument to fit in window.
https://bugs.webkit.org/show_bug.cgi?id=73948
Add CSS max-height: 100%, max-width: 100% settings to the audio and
video tags when in MediaDocuments.
Reviewed by Eric Seidel.
Test: media/video-scales-in-media-document.html
* css/mediaControlsChromium.css:
(audio:-webkit-full-page-media, video:-webkit-full-page-media):
2011-12-21 Konrad Piascik <kpiascik@rim.com>
Implement the JavaScriptCore bindings for eventListenerHandlerLocation
https://bugs.webkit.org/show_bug.cgi?id=74313
Reviewed by Eric Seidel.
Implemented the JavaScriptCore binding to allow Web Inspector to
show the function name and line number for an event listener in
the Elements panel.
Tested by opening up a page which has a registered event listener in Safari
and checking if the Elements panel script name and line number are present
and clickable.
* ForwardingHeaders/runtime/Executable.h: Added.
* ForwardingHeaders/wtf/SegmentedVector.h: Added.
* bindings/js/ScriptEventListener.cpp:
(WebCore::eventListenerHandlerLocation):
2011-12-21 Chris Guan <chris.guan@torchmobile.com.cn>
Upstream the Multipart feature in Blackberry port
https://bugs.webkit.org/show_bug.cgi?id=73533
Reviewed by Rob Buis.
I refactored Multipart code of Blackberry port. Moved Multipart into
Blackerry network layer and removed the dependence of std::string.
Initial upstream, no new test cases.
* platform/network/blackberry/DeferredData.cpp:
(WebCore::DeferredData::deferMultipartHeaderReceived):
(WebCore::DeferredData::processHeaders):
(WebCore::DeferredData::processDeferredData):
* platform/network/blackberry/DeferredData.h:
(WebCore::DeferredData::hasDeferredData):
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::notifyMultipartHeaderReceived):
(WebCore::NetworkJob::handleNotifyMultipartHeaderReceived):
(WebCore::NetworkJob::handleNotifyDataReceived):
(WebCore::NetworkJob::handleNotifyClose):
(WebCore::NetworkJob::startNewJobWithRequest):
(WebCore::NetworkJob::sendResponseIfNeeded):
(WebCore::NetworkJob::sendMultipartResponseIfNeeded):
* platform/network/blackberry/NetworkJob.h:
2011-12-21 Eric Carlson <eric.carlson@apple.com>
Fix text track cue font size and colors
https://bugs.webkit.org/show_bug.cgi?id=75051
Reviewed by Darin Adler.
No new tests, updated media/track/track-cue-rendering.html for the changes.
* css/mediaControls.css:
(video::-webkit-media-text-track-container): Match WebVTT spec.
(video::-webkit-media-text-track-display): Ditto.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateSizes): Change font size from 4% of the
video height to 5% as per the spec. Don't enforce a minimum size.
2011-12-21 Andreas Kling <kling@webkit.org>
Unreviewed, rolling out r103473.
http://trac.webkit.org/changeset/103473
https://bugs.webkit.org/show_bug.cgi?id=74991
Overestimated my superpowers a bit here.
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
(WebCore::Element::insertedIntoDocument):
(WebCore::Element::removedFromDocument):
* dom/Element.h:
(WebCore::Element::updateId):
(WebCore::Element::willModifyAttribute):
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::setAttributes):
* dom/Node.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::parseMappedAttribute):
(WebCore::HTMLAppletElement::insertedIntoDocument):
(WebCore::HTMLAppletElement::removedFromDocument):
* html/HTMLAppletElement.h:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseMappedAttribute):
(WebCore::HTMLEmbedElement::insertedIntoDocument):
(WebCore::HTMLEmbedElement::removedFromDocument):
* html/HTMLEmbedElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::insertedIntoDocument):
(WebCore::HTMLFormElement::removedFromDocument):
(WebCore::HTMLFormElement::parseMappedAttribute):
* html/HTMLFormElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseMappedAttribute):
(WebCore::HTMLImageElement::insertedIntoDocument):
(WebCore::HTMLImageElement::removedFromDocument):
* html/HTMLImageElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseMappedAttribute):
(WebCore::HTMLObjectElement::insertedIntoDocument):
(WebCore::HTMLObjectElement::removedFromDocument):
(WebCore::HTMLObjectElement::updateDocNamedItem):
(WebCore::HTMLObjectElement::formControlName):
* html/HTMLObjectElement.h:
* html/HTMLPlugInElement.h:
2011-12-21 Simon Fraser <simon.fraser@apple.com>
Clean up RenderLayer code that applies filters and transforms
https://bugs.webkit.org/show_bug.cgi?id=75032
This also fixes:
Nested filters not working as expected
https://bugs.webkit.org/show_bug.cgi?id=75029
Filter region is computed incorrectly
https://bugs.webkit.org/show_bug.cgi?id=74889
Reviewed by James Robinson.
RenderLayer::paintLayer() had this confusing behavior where,
for transforms, it would change the CTM and then re-enter
the method with a bit set. This was partially, but incorrectly
copied for filters, so things like nested filters didn't work,
and the case of a filter + transform was confused.
Clean up by making RenderLayer::paintLayer() be a fairly simple
method that handles the re-entering with bit set, for both
transforms and filters. The bulk of the code in RenderLayer::paintLayer()
is now in RenderLayer::paintLayerContents(). There is no
behavior change for transforms.
There are two fixes for filters. First, instead of just using
the layer size to compute the bounds of the filtered region,
use transparencyClipBox() which already takes descendents, box
decorations etc into account (it's what we use for opacity).
Some cleanup of the coordinate math, and separation from transforms
code was also achieved.
Second, make sure we toggle off the PaintLayerAppliedFilters bit
(which was renamed for clarity) for sublayers, so that sublayers
paint their filters correctly.
Tests: css3/filters/filter-region.html
css3/filters/nested-filters.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::updateFilterBackingStore):
* rendering/RenderLayer.h:
2011-12-21 Per-Erik Brodin <per-erik.brodin@ericsson.com>
Discard event data not followed by an empty line before eof when parsing an event-stream
https://bugs.webkit.org/show_bug.cgi?id=68833
Reviewed by Alexey Proskuryakov.
Test: http/tests/eventsource/eventsource-eof.html
* page/EventSource.cpp:
(WebCore::EventSource::didFinishLoading):
(WebCore::EventSource::parseEventStreamLine):
* page/EventSource.h:
2011-12-21 Andreas Kling <kling@webkit.org>
Automate elements' registration as document namedItem/extraNamedItem.
<http://webkit.org/b/74991>
Reviewed by Antti Koivisto.
Remove caching of the "id" and "name" attributes on applet, embed, form,
image and object elements. We were caching them to keep the document's
map of named and "extra named" (named by id) item counts in sync.
Instead, add a hook to Element::willModifyAttribute() that detects when
the attributes are being changed and handle the registration/unregistration
automatically if the element returns true for shouldRegisterAsNamedItem()
or shouldRegisterAsExtraNamedItem() respectively.
This shrinks the elements by two AtomicStrings (8 or 16 bytes) each.
IFrame elements retain the old mechanism for now, as there are some subtle
differences to how that's handled.
* dom/Node.h:
(WebCore::Node::hasName):
(WebCore::Node::setHasName):
Cache whether we have a "name" attribute or not (1 bit on Node.)
This is done in order to minimize the overhead added to Element's
insertedIntoDocument() and removeFromDocument().
* dom/Element.cpp:
(WebCore::Element::updateNamedItemRegistration):
(WebCore::Element::updateExtraNamedItemRegistration):
Added. Called when the "name" and "id" attributes are changed.
Updates the document's named item maps accordingly.
(WebCore::Element::insertedIntoDocument):
(WebCore::Element::removedFromDocument):
Make sure updateName() is called in addition to updateId() when applicable.
(WebCore::Element::attributeChanged):
Update the Node's has-name flag as appropriate.
* dom/Element.h:
(WebCore::Element::shouldRegisterAsNamedItem):
(WebCore::Element::shouldRegisterAsExtraNamedItem):
Added. If an element returns true for these, it will be automatically
registered with the document when the name/id attribute changes.
(WebCore::Element::updateId):
(WebCore::Element::updateName):
Register/unregister from the document's named item maps as appropriate.
(WebCore::Element::willModifyAttribute):
Add updateName() hook in addition to the existing updateId() hook.
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::setAttributes):
Make sure updateName() is called when we're cloning the attributes
from another element.
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::parseMappedAttribute):
* html/HTMLAppletElement.h:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseMappedAttribute):
(WebCore::HTMLEmbedElement::insertedIntoDocument):
* html/HTMLEmbedElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::insertedIntoDocument):
(WebCore::HTMLFormElement::removedFromDocument):
(WebCore::HTMLFormElement::parseMappedAttribute):
* html/HTMLFormElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseMappedAttribute):
(WebCore::HTMLImageElement::insertedIntoDocument):
* html/HTMLImageElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseMappedAttribute):
(WebCore::HTMLObjectElement::insertedIntoDocument):
(WebCore::HTMLObjectElement::removedFromDocument):
* html/HTMLObjectElement.h:
* html/HTMLPlugInElement.h:
Remove duplicated code that is now handled by Element.
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):
(WebCore::HTMLObjectElement::formControlName):
Use fastGetAttribute() since we no longer cache the name.
2011-12-21 Wyatt Carss <wcarss@chromium.org>
Reviewed by Ryosuke Niwa.
strong and b should be font-weight: bold, not bolder
https://bugs.webkit.org/show_bug.cgi?id=56400
Test: fast/html/font-weight-bold-for-b-and-strong.html
* css/html.css:
(strong, b):
2011-12-21 Florin Malita <fmalita@google.com>
Improper handling of foreignobjects nested in svg groups
https://bugs.webkit.org/show_bug.cgi?id=69762
Reviewed by Nikolas Zimmermann.
Tests: svg/foreignObject/repaint-rect-coordinates-expected.html
svg/foreignObject/repaint-rect-coordinates.html
* rendering/svg/RenderSVGForeignObject.h:
(WebCore::RenderSVGForeignObject::objectBoundingBox):
(WebCore::RenderSVGForeignObject::strokeBoundingBox):
(WebCore::RenderSVGForeignObject::repaintRectInLocalCoordinates):
Return local coordinates.
2011-12-21 Anders Carlsson <andersca@apple.com>
Make it possible to use contents layers in scrollbars
https://bugs.webkit.org/show_bug.cgi?id=75044
Reviewed by Simon Fraser.
* page/ScrollingCoordinator.h:
* page/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
(WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
Don't pass const GraphicsLayers to these member functions; we need to be able to mutate them.
* platform/ScrollView.cpp:
(positionScrollbarLayer):
If the scrollbar layer has a contents layer, just update its contents rect. Otherwise,
invalidate the scrollbar layer.
2011-12-21 Anders Carlsson <andersca@apple.com>
Always reposition the scrollbar layers when the frame view size changes
https://bugs.webkit.org/show_bug.cgi?id=75035
Reviewed by Darin Adler.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
Remove the layersChanged check and unconditionally call positionScrollbarLayers(). This only
worked by accident before because we were recreating horizontal and vertical scrollbars on every call.
2011-12-21 Michał Pakuła vel Rutka <m.pakula@samsung.com>
[EFL] Add 'Select All' option to context menus in WebKit-EFL.
https://bugs.webkit.org/show_bug.cgi?id=74920
Reviewed by Eric Seidel.
Enable 'Select All' option to context menus called on input fields in WebKit-EFL
as it is enabled in GTK and QT ports.
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected): Add 'Select All' option.
(WebCore::ContextMenuController::populate): Append 'Select All' item.
(WebCore::ContextMenuController::checkOrEnableIfNeeded): Enable 'Select All' option.
* platform/ContextMenuItem.h: Add 'Select All' option.
* platform/LocalizationStrategy.h: Add constructor for 'Select All' option.
* platform/LocalizedStrings.h: Add constructor for 'Select All' option.
2011-12-20 Adam Klein <adamk@chromium.org>
Make calls to willModifyAttribute and attributeChanged symmetrical
https://bugs.webkit.org/show_bug.cgi?id=74987
Reviewed by Ryosuke Niwa.
Previously, calls to Element::willModifyAttribute sometimes happened
in one method while calls to Element::attributeChanged happened in
another. This change makes them symmetrical for all the cases I know
about: setAttribute, removeAttribute, setNamedItem, removeNamedItem.
To accomplish this, NamedNodeMap::addAttribute, removeAttribute, and
replaceAttribute have been reduced to their pure functionality of
manipulating m_attributes, and their callers are left responsible for
properly notifying the Element of the underlying changes.
One other bit of refactoring was done: to simplify
Element::setAttribute, it now dispatches to
Element::removeAttributeInternal if the incoming value is null.
No new tests, no change in behavior.
* dom/Attribute.h:
* dom/Element.cpp:
(WebCore::Element::removeAttribute):
(WebCore::Element::removeAttributeInternal): Added, sharing code
between the two removeAttribute overloads.
(WebCore::Element::setAttributeInternal):
* dom/Element.h:
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::setNamedItem):
(WebCore::NamedNodeMap::removeNamedItem):
(WebCore::NamedNodeMap::addAttribute):
(WebCore::NamedNodeMap::removeAttribute):
(WebCore::NamedNodeMap::replaceAttribute):
* svg/properties/SVGAnimatedPropertySynchronizer.h:
Call Element::setAttribute unless the attribute is already present,
and add a comment explaining why the code looks the way it does.
2011-12-21 Adrienne Walker <enne@google.com>
Unreviewed, rolling out r103408.
http://trac.webkit.org/changeset/103408
https://bugs.webkit.org/show_bug.cgi?id=75017
WorkerDevToolsSanityTest.InspectSharedWorker is failing
(Requested by loislo_ on #webkit).
* inspector/front-end/CompilerSourceMapping.js:
(WebInspector.ClosureCompilerSourceMapping):
(WebInspector.ClosureCompilerSourceMapping.prototype.sources):
(WebInspector.ClosureCompilerSourceMapping.prototype._parseMap):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype.setCompilerSourceMapping):
* inspector/front-end/utilities.js:
(String.prototype.asParsedURL):
2011-12-21 Stephen White <senorblanco@chromium.org>
Fix CSS filters crash on zero-sized elements.
https://bugs.webkit.org/show_bug.cgi?id=75020
Reviewed by Dean Jackson.
Test: css3/filters/filter-empty-element-crash.html
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::inputContext):
Protect against null ImageBuffer.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer):
Protect against null GraphicsContext.
2011-12-21 Anders Carlsson <andersca@apple.com>
Inform the scrolling coordinator when scrollbar layers come and go
https://bugs.webkit.org/show_bug.cgi?id=75028
Reviewed by Andreas Kling and Simon Fraser.
* page/ScrollingCoordinator.h:
* page/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinator::setFrameViewHorizontalScrollbarLayer):
(WebCore::ScrollingCoordinator::setFrameViewVerticalScrollbarLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2011-12-20 Dmitry Lomov <dslomov@google.com>
[Chromium] DatabaseTrackerChromium: iterating DatabaseSet races with Database disposal on worker thread
https://bugs.webkit.org/show_bug.cgi?id=74554
Reviewed by David Levin.
Covered by existing tests in fast/workers/storage.
* storage/chromium/DatabaseTrackerChromium.cpp:
(WebCore::NotifyDatabaseObserverOnCloseTask::create):
(WebCore::NotifyDatabaseObserverOnCloseTask::performTask):
(WebCore::NotifyDatabaseObserverOnCloseTask::isCleanupTask):
(WebCore::NotifyDatabaseObserverOnCloseTask::NotifyDatabaseObserverOnCloseTask):
(WebCore::DatabaseTracker::removeOpenDatabase):
2011-12-21 Eric Carlson <eric.carlson@apple.com>
HTMLMediaElement::configureTextTrackDisplay is unnecessary
https://bugs.webkit.org/show_bug.cgi?id=74945
Reviewed by Darin Adler.
Nothing to test, just removing redundant code. Correct behavior tested by
media/track/track-cue-rendering.html and media/track/track-cue-nothing-to-render.html.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureTextTrackDisplay): Don't show and hide track, just call
updateTextTrackDisplay and it will do the right thing.
2011-12-21 Anders Carlsson <andersca@apple.com>
ScrollingCoordinator functions should take FrameView objects
https://bugs.webkit.org/show_bug.cgi?id=75023
Reviewed by Sam Weinig.
* page/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::syncFrameViewGeometry):
* page/ScrollingCoordinator.h:
* page/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinator::setFrameViewScrollLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::ensureRootLayer):
2011-12-21 Anders Carlsson <andersca@apple.com>
Get rid of ScrollableAreaClient
https://bugs.webkit.org/show_bug.cgi?id=75021
Reviewed by Sam Weinig.
The ScrollableAreaClient interface will just add an extra level of indirection between ScrollableArea and
ScrollAnimator, which is unnecessary. Eventually I'd like to rename ScrollAnimator to something that better reflects
all the different responsibilities it currently has.
* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
* page/ScrollingCoordinator.cpp:
* page/ScrollingCoordinator.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::ScrollView):
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::ScrollableArea):
* platform/ScrollableArea.h:
* platform/ScrollableAreaClient.h: Removed.
2011-12-21 Anders Carlsson <andersca@apple.com>
Don't recreate scrollbar layers whenever the frame view size changes
https://bugs.webkit.org/show_bug.cgi?id=75018
Reviewed by Darin Adler and Simon Fraser.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2011-12-20 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: [Extension API] refactor extension API build code, expose experimental APIs conditionally in chromium
https://bugs.webkit.org/show_bug.cgi?id=74941
Reviewed by Pavel Feldman.
* WebCore.gypi:
* inspector/front-end/ExtensionAPI.js:
(buildPlatformExtensionAPI.platformExtensionAPI):
(buildPlatformExtensionAPI):
(buildExtensionAPIInjectedScript):
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._addExtensions):
(WebInspector.ExtensionServer.prototype._addExtension):
(window.addExtension):
2011-12-12 Pavel Podivilov <podivilov@chromium.org>
Web Inspector: fix source map url resolving.
https://bugs.webkit.org/show_bug.cgi?id=74305
Reviewed by Pavel Feldman.
Also fix the bug with repeated source urls in mapping sections.
* inspector/front-end/CompilerSourceMapping.js:
(WebInspector.ClosureCompilerSourceMapping):
(WebInspector.ClosureCompilerSourceMapping.prototype.sources):
(WebInspector.ClosureCompilerSourceMapping.prototype._parseMap):
(WebInspector.ClosureCompilerSourceMapping.prototype._resolveSourceMapURL):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype.installCompilerSourceMapping):
* inspector/front-end/utilities.js:
(String.prototype.asParsedURL):
2011-12-21 Renata Hodovan <reni@webkit.org>
New renderer for SVGRectElement
https://bugs.webkit.org/show_bug.cgi?id=65769
Rubber-stamped by Zoltan Herczeg.
Change the return value of RenderSVGRect::renderName() from RenderSVGPath to RenderSVGRect.
This is a follow-up patch of r101517 to correct the DRT output.
* rendering/svg/RenderSVGRect.h:
(WebCore::RenderSVGRect::renderName):
2011-12-21 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: TabbedPane should use tabElement width measuring to layout tab elements when width is too small to fit them.
https://bugs.webkit.org/show_bug.cgi?id=75005
Reviewed by Pavel Feldman.
Test: inspector/tabbed-pane-max-tab-width-calculation.html
* inspector/front-end/NetworkItemView.js:
(WebInspector.NetworkItemView.prototype.wasShown):
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPane):
(WebInspector.TabbedPane.prototype.appendTab):
(WebInspector.TabbedPane.prototype._createTabElement):
(WebInspector.TabbedPane.prototype.onResize):
(WebInspector.TabbedPane.prototype._maybeMeasureAndUpdate):
(WebInspector.TabbedPane.prototype._measureTab):
(WebInspector.TabbedPane.prototype._updateWidths):
(WebInspector.TabbedPane.prototype._calculateMaxWidth):
(WebInspector.TabbedPaneTab):
* inspector/front-end/inspector.css:
(.tabbed-pane-header):
(.tabbed-pane-header-tabs):
(.tabbed-pane-header-tab):
(.tabbed-pane-header-tab.measuring):
(.tabbed-pane-header-tab.selected):
* inspector/front-end/scriptsPanel.css:
(#scripts-navigator-tabbed-pane .tabbed-pane-header-tabs):
2011-12-09 Pavel Podivilov <podivilov@chromium.org>
Web Inspector: auto detect source map url.
https://bugs.webkit.org/show_bug.cgi?id=74088
Reviewed by Pavel Feldman.
Check to see if "X-SourceMap" HTTP response header was sent with script resource.
Header value will be used as auto suggestion for source map url in UI.
* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::sourceMapURLForScript):
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/InspectorDebuggerAgent.h:
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype._parsedScriptSource):
(WebInspector.DebuggerDispatcher.prototype.scriptParsed):
* inspector/front-end/RawSourceCode.js:
(WebInspector.RawSourceCode):
* inspector/front-end/Script.js:
(WebInspector.Script):
2011-12-21 Pierre Rossi <pierre.rossi@gmail.com>
[Qt] Mobile theme refinements
https://bugs.webkit.org/show_bug.cgi?id=74727
Mostly to replace most of the rounded-rect-shaped
controls with squircle-shaped ones.
Reviewed by Kenneth Rohde Christiansen.
No new tests needed.
* platform/qt/RenderThemeQtMobile.cpp:
(WebCore::drawControlBackground):
(WebCore::painterScale):
(WebCore::borderPen):
(WebCore::StylePainterMobile::drawCheckableBackground): Toned down the gradient a bit.
(WebCore::StylePainterMobile::findCheckBox):
(WebCore::StylePainterMobile::drawRadio):
(WebCore::StylePainterMobile::findRadio):
(WebCore::StylePainterMobile::drawMultipleComboButton): increase spacing between the dots.
(WebCore::StylePainterMobile::drawSimpleComboButton): attempt to improve readability.
(WebCore::StylePainterMobile::getButtonImageSize):
(WebCore::StylePainterMobile::findComboButton):
(WebCore::StylePainterMobile::drawLineEdit):
(WebCore::StylePainterMobile::findLineEdit):
(WebCore::StylePainterMobile::drawPushButton):
(WebCore::StylePainterMobile::findPushButton):
(WebCore::StylePainterMobile::drawComboBox):
(WebCore::StylePainterMobile::drawProgress):
(WebCore::StylePainterMobile::drawSliderThumb):
(WebCore::RenderThemeQtMobile::computeSizeBasedOnStyle):
(WebCore::RenderThemeQtMobile::paintTextField):
* platform/qt/RenderThemeQtMobile.h:
2011-12-21 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: CSSStyleSheet::cssRules can return 0 and InspectorStyleSheet dosen't check
https://bugs.webkit.org/show_bug.cgi?id=74938
Prevent security checks when retrieving a just-added CSS rule from the "inspector stylesheet".
Reviewed by Pavel Feldman.
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::addRule):
2011-12-21 Renata Hodovan <reni@webkit.org>
Fulfill FIXME in HTMLLinkElement.h.
https://bugs.webkit.org/show_bug.cgi?id=74278
Rename isStyleSheetLoading() method to styleSheetIsLoading().
This new one has the correct grammar.
Reviewed by Darin Adler.
No new tests because the functionality remains the same.
* dom/Document.cpp:
(WebCore::Document::recalcStyleSelector):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setDisabledState):
(WebCore::HTMLLinkElement::styleSheetIsLoading):
(WebCore::HTMLLinkElement::sheetLoaded):
* html/HTMLLinkElement.h:
2011-12-21 Yosifumi Inoue <yosin@chromium.org>
[Forms] Add OVERRIDE to WebCore/html/*InputType.h
https://bugs.webkit.org/show_bug.cgi?id=74996
Reviewed by Kent Tamura.
No new tests. Changes are just for compilation.
* html/BaseButtonInputType.h: Add OVERRIDE.
* html/BaseCheckableInputType.h: Add OVERRIDE.
* html/BaseDateAndTimeInputType.h: Add OVERRIDE.
* html/BaseTextInputType.h: Add OVERRIDE.
* html/ButtonInputType.h: Add OVERRIDE.
* html/CheckboxInputType.h: Add OVERRIDE.
* html/ColorInputType.h: Add OVERRIDE.
* html/DateInputType.h: Add OVERRIDE.
* html/DateTimeInputType.h: Add OVERRIDE.
* html/DateTimeLocalInputType.h: Add OVERRIDE.
* html/EmailInputType.h: Add OVERRIDE.
* html/FileInputType.h: Add OVERRIDE.
* html/HiddenInputType.h: Add OVERRIDE.
* html/ImageInputType.h: Add OVERRIDE.
* html/IsIndexInputType.h: Add OVERRIDE.
* html/MonthInputType.h: Add OVERRIDE.
* html/NumberInputType.h: Add OVERRIDE.
* html/PasswordInputType.h: Add OVERRIDE.
* html/RadioInputType.h: Add OVERRIDE.
* html/RangeInputType.h: Add OVERRIDE.
* html/ResetInputType.h: Add OVERRIDE.
* html/SearchInputType.h: Add OVERRIDE.
* html/SubmitInputType.h: Add OVERRIDE.
* html/TelephoneInputType.h: Add OVERRIDE.
* html/TextFieldInputType.h: Add OVERRIDE.
* html/TextInputType.h: Add OVERRIDE.
* html/TimeInputType.h: Add OVERRIDE.
* html/URLInputType.h: Add OVERRIDE.
* html/WeekInputType.h: Add OVERRIDE.
2011-12-21 Matt Falkenhagen <falken@chromium.org>
Add all ICU languages to LocaleToScriptMappingDefault.cpp
https://bugs.webkit.org/show_bug.cgi?id=67274
Reviewed by Kent Tamura.
This better mimics the behavior of LocaleToScriptMappingICU.cpp. ICU
languages from ICU 3.6 are added. Also, script suffix in locale is
handled, so for example "fa_Latn" is mapped to Latin while "fa" is mapped to
Arabic.
No new tests, there is no visible effect until default per-script fonts
are added to non-ICU ports (alternatively, we could extend DumpRenderTree
to support overridePreference for per-script fonts as in bug 71110).
* platform/text/LocaleToScriptMappingDefault.cpp:
(WebCore::getScriptCode): add script name to script code mapping
(WebCore::localeToScriptCodeForFontSelection): add ICU languages to map
2011-12-20 Mary Wu <mary.wu@torchmobile.com.cn>
Upstream PageClientBlackBerry.h into WebCore/platform/blackberry
https://bugs.webkit.org/show_bug.cgi?id=74169
Reviewed by Daniel Bates.
Initial upstream, no new tests.
* platform/blackberry/PageClientBlackBerry.h: Added.
2011-12-20 Mary Wu <mary.wu@torchmobile.com.cn>
Upstream PlatformMouseEvent and LocalizedStrings into WebCore/platform/blackberry
https://bugs.webkit.org/show_bug.cgi?id=74383
Reviewed by Daniel Bates.
Other Main Contributors:
Rob Buis <rbuis@rim.com>
Mike Fenton <mifenton@rim.com>
Initial upstream, no new tests.
* PlatformBlackBerry.cmake: Modified to rename Localizations.cpp to LocalizedStringsBlackBerry.cpp
* platform/blackberry/LocalizedStringsBlackBerry.cpp: Added.
* platform/blackberry/PlatformMouseEventBlackBerry.cpp: Added.
2011-12-20 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: CodeGenerator should not use pointers for out params of RefPtr type.
https://bugs.webkit.org/show_bug.cgi?id=69366
Reviewed by Pavel Feldman.
Generator fixed and all usages are changed manually.
* inspector/CodeGeneratorInspector.py:
(RawTypes.BaseType):
(RawTypes.BaseType.get_output_argument_prefix):
(RawTypes.Object.get_output_argument_prefix):
(RawTypes.Array.get_output_argument_prefix):
(RawTypes):
(Generator.process_command):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
(WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::clearFrontend):
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::getInlineStylesForNode):
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
(WebCore::InspectorCSSAgent::getAllStyleSheets):
(WebCore::InspectorCSSAgent::getStyleSheet):
(WebCore::InspectorCSSAgent::setPropertyText):
(WebCore::InspectorCSSAgent::toggleProperty):
(WebCore::InspectorCSSAgent::setRuleSelector):
(WebCore::InspectorCSSAgent::addRule):
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
(WebCore::InspectorCSSAgent::stopSelectorProfiler):
(WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::getDocument):
(WebCore::InspectorDOMAgent::querySelectorAll):
(WebCore::InspectorDOMAgent::getEventListenersForNode):
(WebCore::InspectorDOMAgent::getSearchResults):
(WebCore::InspectorDOMAgent::resolveNode):
(WebCore::InspectorDOMAgent::getAttributes):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::setScriptSource):
(WebCore::InspectorDebuggerAgent::getFunctionLocation):
(WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::getDOMNodeCount):
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::getResourceTree):
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::InspectorPageAgent::searchInResources):
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::getProfileHeaders):
(WebCore::InspectorProfilerAgent::getProfile):
(WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::evaluate):
(WebCore::InspectorRuntimeAgent::callFunctionOn):
(WebCore::InspectorRuntimeAgent::getProperties):
* inspector/InspectorRuntimeAgent.h:
2011-12-20 Eric Penner <epenner@google.com>
[chromium] m_triggerIdlePaints not reset after a compositeAndReadback
https://bugs.webkit.org/show_bug.cgi?id=74974
Reviewed by James Robinson.
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::compositeAndReadback):
2011-12-20 David Levin <levin@chromium.org>
Move misplaced assert in SQLiteStatement.cpp
https://bugs.webkit.org/show_bug.cgi?id=74975
Reviewed by Dmitry Titov.
The test is coming with bug 74666.
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::step): If a database was interrupted
before the prepare method was called, then m_isPrepared will be
false, so I moved the assert to be after the check for interrupted.
2011-12-20 Eric Carlson <eric.carlson@apple.com>
WebVTT cues sometimes render when they should not
https://bugs.webkit.org/show_bug.cgi?id=74873
Not reviewed: update Chromium to pass new test added in r103371.
* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlRootElementChromium::updateTextTrackDisplay):
2011-12-20 Andreas Kling <kling@webkit.org>
HTMLOptionsCollection: Remove incorrect FIXME about having a base class.
<http://webkit.org/b/74973>
Reviewed by Alexey Proskuryakov.
HTMLOptionsCollection should indeed inherit from HTMLCollection according to
current HTML5, so remove the comment saying we should change that.
Spec: http://www.whatwg.org/specs/web-apps/current-work/#htmloptionscollection
* html/HTMLOptionsCollection.idl:
2011-12-20 Florin Malita <fmalita@google.com>
td element ignores zero width/height input element
https://bugs.webkit.org/show_bug.cgi?id=74636
Reviewed by Kent Tamura.
Test: fast/forms/input-zero-width.html
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computePreferredLogicalWidths):
Relax the attribute test to allow setting widths == 0.
2011-12-20 Adam Klein <adamk@chromium.org>
Avoid unnecessary work when removing attributes from an element
https://bugs.webkit.org/show_bug.cgi?id=74953
Reviewed by Ryosuke Niwa.
Various codepaths in Element and NamedNodeMap repeatedly search
through the list of attributes during a single operation. To avoid
this, I've added new getters to NamedNodeMap that return indices
rather than Attribute*s (they return WTF::notFound if no match is
found). These new methods are now used during removeAttribute
operations, as well as setAttribute and NamedNodeMap::setNamedItem
(along with a new replaceAttribute helper method).
The other optimization here involves the creation/destruction
of never-references Attr nodes. This is now avoided by calling
NamedNodeMap::removeAttribute directly instead of going through
NamedNodeMap::removeNamedItem.
As a cleanup after the above changes, the ExceptionCode argument is
gone from Element::removeAttribute and friends (it was never set
previously). The bulk of the files mentioned below are simply updating
callers to these methods.
No new tests, no change in behavior expected.
* dom/DatasetDOMStringMap.cpp:
(WebCore::DatasetDOMStringMap::deleteItem):
* dom/Element.cpp:
(WebCore::Element::removeAttribute):
(WebCore::Element::setBooleanAttribute):
(WebCore::Element::removeAttributeNS):
(WebCore::Element::setAttribute):
(WebCore::Element::setAttributeInternal):
* dom/Element.h:
* dom/Element.idl:
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::setNamedItem):
(WebCore::NamedNodeMap::removeNamedItem):
(WebCore::NamedNodeMap::getAttributeItemIndexSlowCase):
(WebCore::NamedNodeMap::replaceAttribute):
(WebCore::NamedNodeMap::removeAttribute):
* dom/NamedNodeMap.h:
(WebCore::NamedNodeMap::getAttributeItem):
(WebCore::NamedNodeMap::getAttributeItemIndex):
(WebCore::NamedNodeMap::removeAttribute):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock):
* editing/SplitElementCommand.cpp:
(WebCore::SplitElementCommand::executeApply):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setContentEditable):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setType):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setAttributesAsText):
(WebCore::InspectorDOMAgent::removeAttribute):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::transferUseAttributesToReplacedElement):
2011-12-20 Eric Carlson <eric.carlson@apple.com>
WebVTT cues sometimes render when they should not
https://bugs.webkit.org/show_bug.cgi?id=74873
Reviewed by Darin Adler.
Test: media/track/track-cue-nothing-to-render.html
* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::updateTextTrackDisplay): Don't return early if the current
cue is empty so the previous cue is removed.
2011-12-20 Ami Fischman <fischman@chromium.org>
Don't crash on the second time VideoLayerChromium::createCCVideoLayer() is called
https://bugs.webkit.org/show_bug.cgi?id=74963
Reviewed by James Robinson.
Manually tested by force-dropping the layer tree in CCLayerTreeHost::didBecomeInvisibleOnImplThread().
Crashed before the fix, doesn't crash after.
* platform/graphics/chromium/VideoLayerChromium.cpp:
(WebCore::VideoLayerChromium::VideoLayerChromium):
(WebCore::VideoLayerChromium::~VideoLayerChromium):
(WebCore::VideoLayerChromium::createCCLayerImpl):
* platform/graphics/chromium/VideoLayerChromium.h:
2011-12-20 Scott Graham <scottmg@chromium.org>
wouldTaintOrigin m_cleanURLs cache grows very large when data urls used
https://bugs.webkit.org/show_bug.cgi?id=74957
Reviewed by Kenneth Russell.
No new tests, but memory usage of CanvasRenderingContext::m_cleanURLs
is reduced.
* html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::wouldTaintOrigin):
2011-12-20 Greg Billock <gbillock@google.com>
Change adoptPtr(new ...) to ...::create in Page.cpp
https://bugs.webkit.org/show_bug.cgi?id=74457
Reviewed by Darin Adler.
* dom/DeviceMotionController.cpp:
(WebCore::DeviceMotionController::create):
* dom/DeviceMotionController.h:
* dom/DeviceOrientationController.cpp:
(WebCore::DeviceOrientationController::create):
* dom/DeviceOrientationController.h:
* editing/FrameSelection.cpp:
(WebCore::DragCaretController::create):
* editing/FrameSelection.h:
* history/BackForwardController.cpp:
(WebCore::BackForwardController::create):
* history/BackForwardController.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::create):
* inspector/InspectorController.h:
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::create):
* loader/ProgressTracker.h:
* notifications/NotificationController.cpp:
(WebCore::NotificationController::create):
* notifications/NotificationController.h:
* page/Chrome.cpp:
(WebCore::Chrome::create):
* page/Chrome.h:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::create):
* page/ContextMenuController.h:
* page/DragController.cpp:
(WebCore::DragController::create):
* page/DragController.h:
* page/FocusController.cpp:
(WebCore::FocusController::create):
* page/FocusController.h:
* page/GeolocationController.cpp:
(WebCore::GeolocationController::create):
* page/GeolocationController.h:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::initGroup):
(WebCore::Page::speechInput):
* page/PageGroup.cpp:
(WebCore::PageGroup::create):
* page/PageGroup.h:
* page/Settings.cpp:
(WebCore::Settings::create):
* page/Settings.h:
* page/SpeechInput.cpp:
(WebCore::SpeechInput::create):
* page/SpeechInput.h:
2011-12-20 Ryosuke Niwa <rniwa@webkit.org>
Mac build fix after r103354.
* platform/mac/ScrollAnimatorMac.mm:
(systemUptime):
2011-12-20 Anders Carlsson <andersca@apple.com>
Add ScrollableArea::contentsResized and have it call the scroll animator
https://bugs.webkit.org/show_bug.cgi?id=74966
Reviewed by Sam Weinig.
* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::setContentsSize):
(WebCore::FrameView::contentsResized):
* page/FrameView.h:
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::contentsResized):
* platform/ScrollableArea.h:
2011-12-20 Simon Fraser <simon.fraser@apple.com>
requestAnimationFrame on Mac fires at 60fps even when drawing is much slower
https://bugs.webkit.org/show_bug.cgi?id=74964
Reviewed by Chris Marrin.
On Mac requestAnimationFrame uses a CVDisplayLink, sending notifications
from the display link thread to the main thread that the display link fired.
However, there was no throttling on these notifications; if processing an event
took a long time, notifications would pile up, and then get handled after
the slow event completed.
This would cause JS animations which animate by changing style to report
60fps when their display framerate was much lower.
Fix by throttling notifications from the display link thread to the web
thread; if the previous event hasn't completed yet, don't send any new ones.
No new tests, since testing this runtime behavior is hard.
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
(WebCore::DisplayRefreshMonitor::refreshDisplayOnMainThread):
(WebCore::DisplayRefreshMonitor::notifyClients): Factored out of the
static refreshDisplayOnMainThread method so we can use 'this'.
* platform/graphics/DisplayRefreshMonitor.h:
* platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
(WebCore::DisplayRefreshMonitor::displayLinkFired):
2011-12-20 Greg Billock <gbillock@google.com>
[Coverity] Fix leak in V8HTMLDocument
https://bugs.webkit.org/show_bug.cgi?id=74943
Reviewed by Adam Barth.
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::V8HTMLDocument::openCallback):
2011-12-20 Sailesh Agrawal <sail@chromium.org>
Merge ScrollAnimatorChromiumMac.mm back to ScrollAnimatorMac
https://bugs.webkit.org/show_bug.cgi?id=61144
Reviewed by Beth Dakin.
At a high level the main changes are:
- replace #ifdefs in ScrollAnimatorMac and ScrollbarThemeMac with run time checks
- delete duplicate code in ScrollbarThemeChromiumMac. Keep the paint code since it does tickmarks and SKIA stuff.
- delete ScrollAnimatorChromiumMac since ScrollAnimatorMac does the exact same thing
- delete ScrollbarOverlayUtilitiesChromiumMac since NSScrollerImpDetails does the same thing
No new tests. Just refactoring.
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* platform/chromium/ScrollAnimatorChromiumMac.h: Removed.
* platform/chromium/ScrollAnimatorChromiumMac.mm: Removed.
* platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Removed.
* platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Removed.
* platform/chromium/ScrollbarThemeChromiumMac.h:
* platform/chromium/ScrollbarThemeChromiumMac.mm:
(WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
(WebCore::scrollbarPainterPaintTrack):
(WebCore::ScrollbarThemeChromiumMac::paint):
* platform/mac/EmptyProtocolDefinitions.h:
* platform/mac/NSScrollerImpDetails.h:
(WebCore::isScrollbarOverlayAPIAvailable):
* platform/mac/NSScrollerImpDetails.mm: Added.
(WebCore::isScrollbarOverlayAPIAvailable):
(WebCore::recommendedScrollerStyle):
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(scrollbarPainterForScrollbar):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::notifyPositionChanged):
(WebCore::ScrollAnimatorMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
(WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
(WebCore::ScrollAnimatorMac::willStartLiveResize):
(WebCore::ScrollAnimatorMac::contentsResized):
(WebCore::ScrollAnimatorMac::willEndLiveResize):
(WebCore::ScrollAnimatorMac::contentAreaDidShow):
(WebCore::ScrollAnimatorMac::contentAreaDidHide):
(WebCore::ScrollAnimatorMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorMac::didEndScrollGesture):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::cancelAnimations):
(WebCore::ScrollAnimatorMac::setIsActive):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
(WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
* platform/mac/ScrollElasticityController.h:
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
(+[WebScrollbarPrefsObserver behaviorPrefsChanged:]):
(WebCore::updateArrowPlacement):
(WebCore::ScrollbarThemeMac::registerScrollbar):
(WebCore::ScrollbarThemeMac::setIsCurrentlyDrawingIntoLayer):
(WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
(WebCore::ScrollbarThemeMac::scrollbarThickness):
(WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
(WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
(WebCore::ScrollbarThemeMac::hasButtons):
(WebCore::ScrollbarThemeMac::hasThumb):
(WebCore::ScrollbarThemeMac::minimumThumbLength):
(WebCore::ScrollbarThemeMac::scrollbarPartToHIPressedState):
(WebCore::ScrollbarThemeMac::updateEnabledState):
(WebCore::scrollbarPainterPaint):
(WebCore::ScrollbarThemeMac::paint):
2011-12-20 Tony Chang <tony@chromium.org>
sizeof(RenderStyle) is 64 instead of 56 on Windows (x86)
https://bugs.webkit.org/show_bug.cgi?id=74876
Reviewed by Ryosuke Niwa.
Move bit fields into a new class and use unsigned for all types so we
align at 4 byte bounds. Also move the initializers into the header
file (has the side benefit of not needing to duplicate the initializers
in 3 places).
Enable the compile assert on Windows.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyleBitfields::affectedByUncommonAttributeSelectors):
(WebCore::RenderStyleBitfields::setAffectedByUncommonAttributeSelectors):
(WebCore::RenderStyleBitfields::unique):
(WebCore::RenderStyleBitfields::setUnique):
(WebCore::RenderStyleBitfields::affectedByEmpty):
(WebCore::RenderStyleBitfields::emptyState):
(WebCore::RenderStyleBitfields::setEmptyState):
(WebCore::RenderStyleBitfields::childrenAffectedByFirstChildRules):
(WebCore::RenderStyleBitfields::setChildrenAffectedByFirstChildRules):
(WebCore::RenderStyleBitfields::childrenAffectedByLastChildRules):
(WebCore::RenderStyleBitfields::setChildrenAffectedByLastChildRules):
(WebCore::RenderStyleBitfields::childrenAffectedByDirectAdjacentRules):
(WebCore::RenderStyleBitfields::setChildrenAffectedByDirectAdjacentRules):
(WebCore::RenderStyleBitfields::childrenAffectedByForwardPositionalRules):
(WebCore::RenderStyleBitfields::setChildrenAffectedByForwardPositionalRules):
(WebCore::RenderStyleBitfields::childrenAffectedByBackwardPositionalRules):
(WebCore::RenderStyleBitfields::setChildrenAffectedByBackwardPositionalRules):
(WebCore::RenderStyleBitfields::firstChildState):
(WebCore::RenderStyleBitfields::setFirstChildState):
(WebCore::RenderStyleBitfields::lastChildState):
(WebCore::RenderStyleBitfields::setLastChildState):
(WebCore::RenderStyleBitfields::childIndex):
(WebCore::RenderStyleBitfields::setChildIndex):
(WebCore::RenderStyleBitfields::setHasExplicitlyInheritedProperties):
(WebCore::RenderStyleBitfields::hasExplicitlyInheritedProperties):
2011-12-20 Tony Chang <tony@chromium.org>
[chromium] enable WPO for WebCore libs in official builds
https://bugs.webkit.org/show_bug.cgi?id=74947
Reviewed by James Robinson.
Also move enable_wexit_time_destructors to the top level variables
so we don't have to add it to all targets.
* WebCore.gyp/WebCore.gyp:
2011-12-20 Anders Carlsson <andersca@apple.com>
Add ScrollableArea wrappers for a bunch of ScrollAnimator member functions
https://bugs.webkit.org/show_bug.cgi?id=74951
Reviewed by Sam Weinig.
* WebCore.exp.in:
* page/EventHandler.cpp:
(WebCore::EventHandler::mouseMoved):
(WebCore::EventHandler::updateMouseEventTargetNode):
* page/FocusController.cpp:
(WebCore::FocusController::setActive):
* page/FrameView.cpp:
(WebCore::FrameView::didMoveOnscreen):
(WebCore::FrameView::willMoveOffscreen):
(WebCore::FrameView::notifyPageThatContentAreaWillPaint):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::contentAreaWillPaint):
(WebCore::ScrollableArea::mouseEnteredContentArea):
(WebCore::ScrollableArea::mouseExitedContentArea):
(WebCore::ScrollableArea::mouseMovedInContentArea):
(WebCore::ScrollableArea::mouseEnteredScrollbar):
(WebCore::ScrollableArea::mouseExitedScrollbar):
(WebCore::ScrollableArea::contentAreaDidShow):
(WebCore::ScrollableArea::contentAreaDidHide):
* platform/ScrollableArea.h:
* platform/ScrollableAreaClient.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::mouseEntered):
(WebCore::Scrollbar::mouseExited):
(WebCore::Scrollbar::mouseUp):
2011-12-20 Jarred Nicholls <jarred@sencha.com>
Perform case insensitive matching on MIME types in XHR
https://bugs.webkit.org/show_bug.cgi?id=74800
Perform case insensitive matching on responseMIMEType() in didReceiveData().
Workaround case sensitive matching by DOMImplementation::isXMLMIMEType() in responseIsXML().
Reviewed by Darin Adler.
Tests: http/tests/xmlhttprequest/xmlhttprequest-mimetype-mixed-case.html
http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-mixed-case.html
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::didReceiveData):
(WebCore::XMLHttpRequest::responseIsXML):
2011-12-20 Adam Klein <adamk@chromium.org>
Remove no-op DOMAttr* event dispatch methods from Element
https://bugs.webkit.org/show_bug.cgi?id=74946
Reviewed by Darin Adler.
The removed methods had their bodies #if 0'd out, so this should have
no effect on anything.
* dom/Element.cpp:
* dom/Element.h:
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::addAttribute):
(WebCore::NamedNodeMap::removeAttribute):
2011-12-20 Anders Carlsson <andersca@apple.com>
ScrollableArea should have an optional ScrollableAreaClient
https://bugs.webkit.org/show_bug.cgi?id=74949
Reviewed by Sam Weinig.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameView.cpp:
(WebCore::scrollableAreaClient):
(WebCore::FrameView::FrameView):
* page/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::scrollableAreaClientForFrame):
* page/ScrollingCoordinator.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::ScrollView):
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::ScrollableArea):
* platform/ScrollableArea.h:
* platform/ScrollableAreaClient.h: Added.
(WebCore::ScrollableAreaClient::~ScrollableAreaClient):
(WebCore::ScrollableAreaClient::ScrollableAreaClient):
2011-12-19 Adam Klein <adamk@chromium.org>
Rename Element::setAttributeMap to parserSetAttributeMap and limit its use to the parser
https://bugs.webkit.org/show_bug.cgi?id=74885
Reviewed by Ryosuke Niwa.
Element::setAttributeMap is currently used by the parser in cases
where a NamedNodeMap of attributes has already been allocated and
transfers ownership to the Element. Other uses in WebCore don't have
this ownership-transfer requirement, and so are more clearly expressed
with normal setAttribute calls.
Eliminating non-parser callers allows the code to make safe
assumptions about the state of the Element it's called on: no need to
worry about, e.g., updating the id in the document's cache or
enqueueing mutation records.
No new tests, no change in behavior expected.
* dom/Element.cpp:
(WebCore::Element::parserSetAttributeMap): Renamed, added assertions
to make sure it's not called unexpectedly, update comments.
* dom/Element.h:
* html/HTMLViewSourceDocument.cpp: Use setAttribute instead of setAttributeMap.
(WebCore::HTMLViewSourceDocument::createContainingTable):
(WebCore::HTMLViewSourceDocument::addSpanWithClassName):
(WebCore::HTMLViewSourceDocument::addLine):
(WebCore::HTMLViewSourceDocument::addBase):
(WebCore::HTMLViewSourceDocument::addLink):
* html/parser/HTMLConstructionSite.cpp: Reference new name.
(WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
(WebCore::HTMLConstructionSite::insertScriptElement):
(WebCore::HTMLConstructionSite::createElement):
(WebCore::HTMLConstructionSite::createHTMLElement):
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::constructTreeFromToken): Use setAttribute instead of setAttributeMap.
Also get rid of an unnecessary String -> AtomicString conversion.
2011-12-20 Iain Merrick <husky@google.com>
Remove unused parameter from RenderLayerCompositor::rebuildCompositingLayerTree
https://bugs.webkit.org/show_bug.cgi?id=74936
Reviewed by Simon Fraser.
Pure refactoring, no change in functionality.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
* rendering/RenderLayerCompositor.h:
2011-12-20 Tony Chang <tony@chromium.org>
RenderStyle::InheritedFlags and RenderStyle::NonInheritedFlags members should be 4 byte aligned
https://bugs.webkit.org/show_bug.cgi?id=74880
Reviewed by Ryosuke Niwa.
Use unsigned for all types so we get 4 byte boundaries (unsigned char
means we try to align to 1 byte boundaries) and add setters and
getters for bool members.
Move some members around to make sure we're aligned to 4 byte boundaries.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::copyNonInheritedFrom):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::NonInheritedFlags::affectedByHover):
(WebCore::InheritedFlags::NonInheritedFlags::setAffectedByHover):
(WebCore::InheritedFlags::NonInheritedFlags::affectedByActive):
(WebCore::InheritedFlags::NonInheritedFlags::setAffectedByActive):
(WebCore::InheritedFlags::NonInheritedFlags::affectedByDrag):
(WebCore::InheritedFlags::NonInheritedFlags::setAffectedByDrag):
(WebCore::InheritedFlags::NonInheritedFlags::isLink):
(WebCore::InheritedFlags::NonInheritedFlags::setIsLink):
(WebCore::InheritedFlags::setBitDefaults):
(WebCore::InheritedFlags::affectedByHoverRules):
(WebCore::InheritedFlags::affectedByActiveRules):
(WebCore::InheritedFlags::affectedByDragRules):
(WebCore::InheritedFlags::setAffectedByHoverRules):
(WebCore::InheritedFlags::setAffectedByActiveRules):
(WebCore::InheritedFlags::setAffectedByDragRules):
(WebCore::InheritedFlags::isLink):
(WebCore::InheritedFlags::setIsLink):
2011-12-20 Julien Chaffraix <jchaffraix@webkit.org>
Regression(99212): table rows get incorrect height after changing some cells' height
https://bugs.webkit.org/show_bug.cgi?id=74303
Reviewed by Darin Adler.
Tests: fast/table/resize-table-binding-cell.html
fast/table/resize-table-cell.html
fast/table/resize-table-row.html
r99212 wrongly implemented the row's logicalHeight recalculation.
The original code would use recalcCells which would properly recalculate a
row logicalHeight by iterating over the table's cells but throwing out the
existing result.
Our approach is just to recompute our row's logicalHeight and leave the
rest of the section untouched.
* rendering/RenderTableSection.cpp:
(WebCore::updateLogicalHeightForCell):
Added this new helper function to update the RowStruct logicalHeight during
|addCell| and |rowLogicalHeightChanged|.
(WebCore::RenderTableSection::addCell):
Replaced the old code with a call to updateLogicalHeightForCell.
(WebCore::RenderTableSection::rowLogicalHeightChanged):
Added a call to updateLogicalHeightForCell for each cells.
2011-12-20 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r103322.
http://trac.webkit.org/changeset/103322
https://bugs.webkit.org/show_bug.cgi?id=74927
seven inspector's tests are crashing on qt (Requested by
loislo on #webkit).
* inspector/CodeGeneratorInspector.py:
(RawTypes.BaseType.is_event_param_check_optional):
(RawTypes.Object.is_event_param_check_optional):
(RawTypes.Array.is_event_param_check_optional):
(RawTypes):
(Generator.process_command):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
(WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::clearFrontend):
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::getInlineStylesForNode):
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
(WebCore::InspectorCSSAgent::getAllStyleSheets):
(WebCore::InspectorCSSAgent::getStyleSheet):
(WebCore::InspectorCSSAgent::setPropertyText):
(WebCore::InspectorCSSAgent::toggleProperty):
(WebCore::InspectorCSSAgent::setRuleSelector):
(WebCore::InspectorCSSAgent::addRule):
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
(WebCore::InspectorCSSAgent::stopSelectorProfiler):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::getDocument):
(WebCore::InspectorDOMAgent::querySelectorAll):
(WebCore::InspectorDOMAgent::getEventListenersForNode):
(WebCore::InspectorDOMAgent::getSearchResults):
(WebCore::InspectorDOMAgent::resolveNode):
(WebCore::InspectorDOMAgent::getAttributes):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::setScriptSource):
(WebCore::InspectorDebuggerAgent::getFunctionLocation):
(WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::getDOMNodeCount):
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::getResourceTree):
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::InspectorPageAgent::searchInResources):
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::getProfileHeaders):
(WebCore::InspectorProfilerAgent::getProfile):
(WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::evaluate):
(WebCore::InspectorRuntimeAgent::callFunctionOn):
(WebCore::InspectorRuntimeAgent::getProperties):
* inspector/InspectorRuntimeAgent.h:
2011-12-19 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: [Extensions API] allow setting extension API per extension security origin
https://bugs.webkit.org/show_bug.cgi?id=74868
Reviewed by Pavel Feldman.
This replaces InspectorExtensionAPI string within InspectorFrontendHost with a map by extension
security origin, so that we can have APIs customized by extension (in particular, this is needed
to expose experimental APIs only to certain extensions).
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::didClearWindowObjectInWorld):
(WebCore::InspectorAgent::setInjectedScriptForOrigin):
* inspector/InspectorAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::setInjectedScriptForOrigin):
* inspector/InspectorController.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::setInjectedScriptForOrigin):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._addExtensions):
(WebInspector.ExtensionServer.prototype._addExtension):
2011-12-20 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: CodeGenerator should not use pointers for out params of RefPtr type.
https://bugs.webkit.org/show_bug.cgi?id=69366
Reviewed by Pavel Feldman.
Generator fixed and all usages are changed manually.
* inspector/CodeGeneratorInspector.py:
(RawTypes.BaseType.is_event_param_check_optional):
(RawTypes.BaseType):
(RawTypes.BaseType.get_output_argument_prefix):
(RawTypes.Object.get_output_argument_prefix):
(RawTypes.Array.get_output_argument_prefix):
(RawTypes):
(Generator.process_command):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
(WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::clearFrontend):
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::getInlineStylesForNode):
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
(WebCore::InspectorCSSAgent::getAllStyleSheets):
(WebCore::InspectorCSSAgent::getStyleSheet):
(WebCore::InspectorCSSAgent::setPropertyText):
(WebCore::InspectorCSSAgent::toggleProperty):
(WebCore::InspectorCSSAgent::setRuleSelector):
(WebCore::InspectorCSSAgent::addRule):
(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
(WebCore::InspectorCSSAgent::stopSelectorProfiler):
(WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::getDocument):
(WebCore::InspectorDOMAgent::querySelectorAll):
(WebCore::InspectorDOMAgent::getEventListenersForNode):
(WebCore::InspectorDOMAgent::getSearchResults):
(WebCore::InspectorDOMAgent::resolveNode):
(WebCore::InspectorDOMAgent::getAttributes):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::setBreakpoint):
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::setScriptSource):
(WebCore::InspectorDebuggerAgent::getFunctionLocation):
(WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::getDOMNodeCount):
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::getResourceTree):
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::InspectorPageAgent::searchInResources):
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::getProfileHeaders):
(WebCore::InspectorProfilerAgent::getProfile):
(WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::evaluate):
(WebCore::InspectorRuntimeAgent::callFunctionOn):
(WebCore::InspectorRuntimeAgent::getProperties):
* inspector/InspectorRuntimeAgent.h:
2011-12-20 Julien Chaffraix <jchaffraix@webkit.org>
Crash in RenderTable::outerBorderAfter
http://webkit.org/b/74026
<rdar://problem/10552313>
Reviewed by Eric Seidel.
Test: fast/table/computeLogicalWidth-table-needsSectionRecalc.html
RenderBlock can call computeLogicalWidth() before calling layout(). The code in
RenderTable::computeLogicalWidth would make the assumption that layout() was called
as layout() is responsible for recomputing our sections.
To prevent the issue, let's just recompute the section if it's needed as this situation
shouldn't be an error. Also adding more knowledge of table in RenderBlock seems bad.
* rendering/RenderTable.cpp:
(WebCore::RenderTable::computeLogicalWidth):
Make sure we recalculate our section if it's needed.
2011-12-20 Kentaro Hara <haraken@chromium.org>
[Refactoring] Replace imp with impl in CodeGeneratorJS.pm
https://bugs.webkit.org/show_bug.cgi?id=74901
Reviewed by Adam Barth.
As pointed out in bug 74837, the generated code by CodeGeneratorJS.pm includes
both 'imp' and 'impl'. This patch unifies them into 'impl'.
I confirmed that "perl -lne 'print if /imp[^a-z]/' CodeGeneratorJS.pm" outputs nothing.
No new tests. No change in behavior.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributeEventListenerCall):
(GenerateEventListenerCall):
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateImplementationFunctionCall):
(NativeToJSValue):
* bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests results.
(WebCore::jsFloat64ArrayPrototypeFunctionFoo):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::jsTestEventConstructorAttr1):
(WebCore::jsTestEventConstructorAttr2):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::jsTestInterfaceStr1):
(WebCore::jsTestInterfaceStr2):
(WebCore::jsTestInterfaceStr3):
(WebCore::setJSTestInterfaceStr2):
(WebCore::setJSTestInterfaceStr3):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjReadOnlyIntAttr):
(WebCore::jsTestObjReadOnlyStringAttr):
(WebCore::jsTestObjReadOnlyTestObjAttr):
(WebCore::jsTestObjShortAttr):
(WebCore::jsTestObjUnsignedShortAttr):
(WebCore::jsTestObjIntAttr):
(WebCore::jsTestObjLongLongAttr):
(WebCore::jsTestObjUnsignedLongLongAttr):
(WebCore::jsTestObjStringAttr):
(WebCore::jsTestObjTestObjAttr):
(WebCore::jsTestObjXMLObjAttr):
(WebCore::jsTestObjCreate):
(WebCore::jsTestObjReflectedStringAttr):
(WebCore::jsTestObjReflectedIntegralAttr):
(WebCore::jsTestObjReflectedUnsignedIntegralAttr):
(WebCore::jsTestObjReflectedBooleanAttr):
(WebCore::jsTestObjReflectedURLAttr):
(WebCore::jsTestObjReflectedNonEmptyURLAttr):
(WebCore::jsTestObjReflectedCustomIntegralAttr):
(WebCore::jsTestObjReflectedCustomBooleanAttr):
(WebCore::jsTestObjReflectedCustomURLAttr):
(WebCore::jsTestObjReflectedCustomNonEmptyURLAttr):
(WebCore::jsTestObjAttrWithGetterException):
(WebCore::jsTestObjAttrWithSetterException):
(WebCore::jsTestObjStringAttrWithGetterException):
(WebCore::jsTestObjStringAttrWithSetterException):
(WebCore::jsTestObjScriptStringAttr):
(WebCore::jsTestObjConditionalAttr1):
(WebCore::jsTestObjConditionalAttr2):
(WebCore::jsTestObjConditionalAttr3):
(WebCore::jsTestObjCachedAttribute1):
(WebCore::jsTestObjCachedAttribute2):
(WebCore::jsTestObjDescription):
(WebCore::jsTestObjId):
(WebCore::jsTestObjHash):
(WebCore::setJSTestObjShortAttr):
(WebCore::setJSTestObjUnsignedShortAttr):
(WebCore::setJSTestObjIntAttr):
(WebCore::setJSTestObjLongLongAttr):
(WebCore::setJSTestObjUnsignedLongLongAttr):
(WebCore::setJSTestObjStringAttr):
(WebCore::setJSTestObjTestObjAttr):
(WebCore::setJSTestObjXMLObjAttr):
(WebCore::setJSTestObjCreate):
(WebCore::setJSTestObjReflectedStringAttr):
(WebCore::setJSTestObjReflectedIntegralAttr):
(WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
(WebCore::setJSTestObjReflectedBooleanAttr):
(WebCore::setJSTestObjReflectedURLAttr):
(WebCore::setJSTestObjReflectedNonEmptyURLAttr):
(WebCore::setJSTestObjReflectedCustomIntegralAttr):
(WebCore::setJSTestObjReflectedCustomBooleanAttr):
(WebCore::setJSTestObjReflectedCustomURLAttr):
(WebCore::setJSTestObjReflectedCustomNonEmptyURLAttr):
(WebCore::setJSTestObjAttrWithGetterException):
(WebCore::setJSTestObjAttrWithSetterException):
(WebCore::setJSTestObjStringAttrWithGetterException):
(WebCore::setJSTestObjStringAttrWithSetterException):
(WebCore::setJSTestObjConditionalAttr1):
(WebCore::setJSTestObjConditionalAttr2):
(WebCore::setJSTestObjConditionalAttr3):
(WebCore::setJSTestObjId):
(WebCore::jsTestObjPrototypeFunctionVoidMethod):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionIntMethod):
(WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethod):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionSerializedValue):
(WebCore::jsTestObjPrototypeFunctionIdbKey):
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
(WebCore::jsTestObjPrototypeFunctionMethodWithException):
(WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
(WebCore::jsTestObjPrototypeFunctionAddEventListener):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
(WebCore::jsTestObjPrototypeFunctionWithDynamicFrame):
(WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg):
(WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture):
(WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::jsTestSerializedScriptValueInterfaceValue):
2011-12-20 Alok Priyadarshi <alokp@chromium.org>
[chromium] compositing/shadows tests fail with accelerated painting
https://bugs.webkit.org/show_bug.cgi?id=74871
Reviewed by James Robinson.
Switched over to new API for creating accelerated canvas GrContext::createPlatformTexture.
It correctly binds the stencil buffer to the FBO.
Test: compositing/shadows/shadow-drawing.html (existing)
* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
(WebCore::createAcceleratedCanvas):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
* platform/graphics/chromium/ManagedTexture.cpp:
(WebCore::ManagedTexture::allocate):
(WebCore::ManagedTexture::bindTexture):
(WebCore::ManagedTexture::framebufferTexture2D):
* platform/graphics/chromium/ManagedTexture.h:
2011-12-20 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r103291.
http://trac.webkit.org/changeset/103291
https://bugs.webkit.org/show_bug.cgi?id=74915
Looks like it broke fast/events/touch and
fast/events/touch/gesture/gesture-scroll.html
http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Mac10.5/builds/7010
(Requested by loislo on #webkit).
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* platform/chromium/ScrollAnimatorChromiumMac.h: Copied from Source/WebCore/platform/mac/ScrollAnimatorMac.h.
(WebCore::ScrollAnimatorChromiumMac::setIsDrawingIntoLayer):
(WebCore::ScrollAnimatorChromiumMac::isDrawingIntoLayer):
(WebCore::ScrollAnimatorChromiumMac::haveScrolledSincePageLoad):
(WebCore::ScrollAnimatorChromiumMac::setNeedsScrollerStyleUpdate):
(WebCore::ScrollAnimatorChromiumMac::needsScrollerStyleUpdate):
* platform/chromium/ScrollAnimatorChromiumMac.mm: Added.
(-[NSProcessInfo systemUptime]):
(abs):
(-[ScrollAnimationHelperDelegate initWithScrollAnimator:WebCore::]):
(-[ScrollAnimationHelperDelegate scrollAnimatorDestroyed]):
(-[ScrollAnimationHelperDelegate bounds]):
(-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]):
(-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]):
(-[ScrollAnimationHelperDelegate convertSizeToBase:]):
(-[ScrollAnimationHelperDelegate convertSizeFromBase:]):
(-[ScrollAnimationHelperDelegate convertSizeToBacking:]):
(-[ScrollAnimationHelperDelegate convertSizeFromBacking:]):
(-[ScrollAnimationHelperDelegate superview]):
(-[ScrollAnimationHelperDelegate documentView]):
(-[ScrollAnimationHelperDelegate window]):
(-[ScrollAnimationHelperDelegate _recursiveRecomputeToolTips]):
(-[ScrollbarPainterControllerDelegate initWithScrollAnimator:WebCore::]):
(-[ScrollbarPainterControllerDelegate scrollAnimatorDestroyed]):
(-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
(-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
(-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]):
(-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
(-[ScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
(-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
(-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]):
(-[ScrollbarPartAnimation setCurrentProgress:]):
(-[ScrollbarPartAnimation scrollAnimatorDestroyed]):
(-[ScrollbarPainterDelegate initWithScrollAnimator:WebCore::]):
(-[ScrollbarPainterDelegate cancelAnimations]):
(-[ScrollbarPainterDelegate convertRectToBacking:]):
(-[ScrollbarPainterDelegate convertRectFromBacking:]):
(-[ScrollbarPainterDelegate layer]):
(-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
(-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
(-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]):
(-[ScrollbarPainterDelegate scrollAnimatorDestroyed]):
(WebCore::ScrollAnimator::create):
(WebCore::chromiumScrollbarTheme):
(WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac):
(WebCore::ScrollAnimatorChromiumMac::~ScrollAnimatorChromiumMac):
(WebCore::ScrollAnimatorChromiumMac::scroll):
(WebCore::ScrollAnimatorChromiumMac::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimatorChromiumMac::adjustScrollXPositionIfNecessary):
(WebCore::ScrollAnimatorChromiumMac::adjustScrollYPositionIfNecessary):
(WebCore::ScrollAnimatorChromiumMac::adjustScrollPositionIfNecessary):
(WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
(WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX):
(WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY):
(WebCore::ScrollAnimatorChromiumMac::immediateScrollToPointForScrollAnimation):
(WebCore::ScrollAnimatorChromiumMac::notifyPositionChanged):
(WebCore::ScrollAnimatorChromiumMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorChromiumMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorChromiumMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorChromiumMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorChromiumMac::willStartLiveResize):
(WebCore::ScrollAnimatorChromiumMac::contentsResized):
(WebCore::ScrollAnimatorChromiumMac::willEndLiveResize):
(WebCore::ScrollAnimatorChromiumMac::contentAreaDidShow):
(WebCore::ScrollAnimatorChromiumMac::contentAreaDidHide):
(WebCore::ScrollAnimatorChromiumMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorChromiumMac::didEndScrollGesture):
(WebCore::ScrollAnimatorChromiumMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorChromiumMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorChromiumMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorChromiumMac::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorChromiumMac::cancelAnimations):
(WebCore::elasticDeltaForTimeDelta):
(WebCore::elasticDeltaForReboundDelta):
(WebCore::reboundDeltaForElasticDelta):
(WebCore::scrollWheelMultiplier):
(WebCore::isScrollingLeftAndShouldNotRubberBand):
(WebCore::isScrollingRightAndShouldNotRubberBand):
(WebCore::ScrollAnimatorChromiumMac::handleWheelEvent):
(WebCore::ScrollAnimatorChromiumMac::handleGestureEvent):
(WebCore::ScrollAnimatorChromiumMac::pinnedInDirection):
(WebCore::ScrollAnimatorChromiumMac::allowsVerticalStretching):
(WebCore::ScrollAnimatorChromiumMac::allowsHorizontalStretching):
(WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent):
(WebCore::ScrollAnimatorChromiumMac::beginScrollGesture):
(WebCore::ScrollAnimatorChromiumMac::endScrollGesture):
(WebCore::ScrollAnimatorChromiumMac::snapRubberBand):
(WebCore::roundTowardZero):
(WebCore::roundToDevicePixelTowardZero):
(WebCore::ScrollAnimatorChromiumMac::snapRubberBandTimerFired):
(WebCore::ScrollAnimatorChromiumMac::setIsActive):
(WebCore::ScrollAnimatorChromiumMac::updateScrollerStyle):
(WebCore::ScrollAnimatorChromiumMac::startScrollbarPaintTimer):
(WebCore::ScrollAnimatorChromiumMac::scrollbarPaintTimerIsActive):
(WebCore::ScrollAnimatorChromiumMac::stopScrollbarPaintTimer):
(WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired):
(WebCore::ScrollAnimatorChromiumMac::setVisibleScrollerThumbRect):
* platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Added.
* platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Added.
(lookUpNSScrollerImpClass):
(lookUpNSScrollerImpPairClass):
(scrollbarControlSizeToNSControlSize):
(preferredScrollerStyle):
(wkScrollbarPainterUsesOverlayScrollers):
(wkScrollbarPainterIsHorizontal):
(wkScrollbarPainterKnobAlpha):
(wkScrollbarPainterSetOverlayState):
(wkScrollbarPainterPaint):
(wkScrollbarPainterPaintTrack):
(wkScrollbarPainterPaintKnob):
(wkScrollbarMinimumThumbLength):
(wkScrollbarPainterSetDelegate):
(wkScrollbarPainterSetEnabled):
(wkScrollbarPainterTrackAlpha):
(wkMakeScrollbarPainter):
(wkScrollbarThickness):
(wkScrollbarMinimumTotalLengthNeededForThumb):
(wkVerticalScrollbarPainterForController):
(wkHorizontalScrollbarPainterForController):
(wkScrollbarPainterControllerStyle):
(wkMakeScrollbarReplacementPainter):
(wkSetPainterForPainterController):
(wkSetScrollbarPainterControllerStyle):
(wkScrollbarPainterKnobRect):
(wkSetScrollbarPainterKnobAlpha):
(wkSetScrollbarPainterTrackAlpha):
(wkSetScrollbarPainterKnobStyle):
(wkMakeScrollbarPainterController):
(wkContentAreaScrolled):
(wkContentAreaWillPaint):
(wkMouseEnteredContentArea):
(wkMouseExitedContentArea):
(wkMouseMovedInContentArea):
(wkWillStartLiveResize):
(wkContentAreaResized):
(wkWillEndLiveResize):
(wkContentAreaDidShow):
(wkContentAreaDidHide):
(wkDidBeginScrollGesture):
(wkDidEndScrollGesture):
(wkScrollbarPainterForceFlashScrollers):
(isScrollbarOverlayAPIAvailable):
* platform/chromium/ScrollbarThemeChromiumMac.h:
(WebCore::ScrollbarThemeChromiumMac::supportsControlTints):
(WebCore::ScrollbarThemeChromiumMac::maxOverlapBetweenPages):
* platform/chromium/ScrollbarThemeChromiumMac.mm:
(WebCore::scrollbarMap):
(+[ScrollbarPrefsObserver appearancePrefsChanged:]):
(+[ScrollbarPrefsObserver behaviorPrefsChanged:]):
(+[ScrollbarPrefsObserver registerAsObserver]):
(WebCore::updateArrowPlacement):
(WebCore::ScrollbarThemeChromiumMac::registerScrollbar):
(WebCore::ScrollbarThemeChromiumMac::unregisterScrollbar):
(WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar):
(WebCore::ScrollbarThemeChromiumMac::painterForScrollbar):
(WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
(WebCore::ScrollbarThemeChromiumMac::preferencesChanged):
(WebCore::ScrollbarThemeChromiumMac::scrollbarThickness):
(WebCore::ScrollbarThemeChromiumMac::usesOverlayScrollbars):
(WebCore::toScrollbarPainterKnobStyle):
(WebCore::ScrollbarThemeChromiumMac::updateScrollbarOverlayStyle):
(WebCore::ScrollbarThemeChromiumMac::initialAutoscrollTimerDelay):
(WebCore::ScrollbarThemeChromiumMac::autoscrollTimerDelay):
(WebCore::ScrollbarThemeChromiumMac::buttonsPlacement):
(WebCore::ScrollbarThemeChromiumMac::hasButtons):
(WebCore::ScrollbarThemeChromiumMac::hasThumb):
(WebCore::buttonRepaintRect):
(WebCore::ScrollbarThemeChromiumMac::backButtonRect):
(WebCore::ScrollbarThemeChromiumMac::forwardButtonRect):
(WebCore::ScrollbarThemeChromiumMac::trackRect):
(WebCore::ScrollbarThemeChromiumMac::minimumThumbLength):
(WebCore::ScrollbarThemeChromiumMac::shouldCenterOnThumb):
(WebCore::ScrollbarThemeChromiumMac::shouldDragDocumentInsteadOfThumb):
(WebCore::scrollbarPartToHIPressedState):
(WebCore::ScrollbarThemeChromiumMac::updateEnabledState):
(WebCore::ScrollbarThemeChromiumMac::paint):
* platform/mac/EmptyProtocolDefinitions.h:
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/NSScrollerImpDetails.mm: Removed.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate layer]):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::notifyPositionChanged):
(WebCore::ScrollAnimatorMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
(WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
(WebCore::ScrollAnimatorMac::willStartLiveResize):
(WebCore::ScrollAnimatorMac::contentsResized):
(WebCore::ScrollAnimatorMac::willEndLiveResize):
(WebCore::ScrollAnimatorMac::contentAreaDidShow):
(WebCore::ScrollAnimatorMac::contentAreaDidHide):
(WebCore::ScrollAnimatorMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorMac::didEndScrollGesture):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::cancelAnimations):
(WebCore::ScrollAnimatorMac::setIsActive):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
(WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
* platform/mac/ScrollElasticityController.h:
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
(+[WebScrollbarPrefsObserver behaviorPrefsChanged:]):
(WebCore::ScrollbarTheme::nativeTheme):
(WebCore::updateArrowPlacement):
(WebCore::ScrollbarThemeMac::registerScrollbar):
(WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
(WebCore::ScrollbarThemeMac::scrollbarThickness):
(WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
(WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
(WebCore::ScrollbarThemeMac::hasButtons):
(WebCore::ScrollbarThemeMac::hasThumb):
(WebCore::ScrollbarThemeMac::minimumThumbLength):
(WebCore::scrollbarPartToHIPressedState):
(WebCore::ScrollbarThemeMac::updateEnabledState):
(WebCore::ScrollbarThemeMac::paint):
2011-12-19 Adam Klein <adamk@chromium.org>
Make all calls to NamedNodeMap::setAttributes go through Element
https://bugs.webkit.org/show_bug.cgi?id=74895
Reviewed by Ryosuke Niwa.
There are two reasons for this change. One is an optimization: some
callers were previously always creating a NamedNodeMap even if the
source didn't have any attributes.
The other reason is forward-looking: setAttributes' behavior is subtly
wrong in the presence of MutationObservers. This doesn't matter
for most callers since the element on which setAttributesFromElement
is called is newly-created. In the editing case, however, it could
make a difference in behavior, which I hope to fix in a future change
without sacrificing the performance of cloneNode() on an Element
(which is what NamedNodeMap::setAttributes is designed for).
No new tests, no change in behavior.
* dom/Element.cpp:
(WebCore::Element::cloneElementWithoutChildren): Call setAttributesFromElement.
* dom/Element.h:
(WebCore::Element::setAttributesFromElement): Create new inline helper method
which conditionally forwards to NamedNodeMap::setAttribute.
* dom/NamedNodeMap.h: Make setAttributes private (Element is already a friend).
* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::swapInNodePreservingAttributesAndChildren): Call setAttributesFromElement.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setNodeName): Call setAttributesFromElement.
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Call setAttributesFromElement.
(WebCore::SVGUseElement::transferUseAttributesToReplacedElement): Call setAttributesFromElement
and make use of ASSERT_NO_EXCEPTION to make code easier to read.
2011-12-19 Leo Yang <leo.yang@torchmobile.com.cn>
[BlackBerry] Upstream the BlackBerry change to ResourceRequestBase.cpp
https://bugs.webkit.org/show_bug.cgi?id=74910
Reviewed by Daniel Bates.
No functionality change to the existing code, no new tests.
* platform/network/ResourceRequestBase.cpp: The BlackBerry porting has its own
initializeMaximumHTTPConnectionCountPerHost(). Exclude the default implementation.
2011-12-19 Leo Yang <leo.yang@torchmobile.com.cn>
[BlackBerry] Upstream the BlackBerry change to NetworkStateNotifier.h
https://bugs.webkit.org/show_bug.cgi?id=74904
Reviewed by Daniel Bates.
No functionality change to existing code, no new tests.
* platform/network/NetworkStateNotifier.h:
2011-12-19 Yael Aharon <yael.aharon@nokia.com>
Update dropzone implementation per spec update
https://bugs.webkit.org/show_bug.cgi?id=74834
Reviewed by Tony Chang.
Update support for dropzone attribute to use file: and string: instead of f: and s:.
http://www.whatwg.org/specs/web-apps/current-work/#the-dropzone-attribute
No new tests. Existing tests cover this and were updated.
* dom/Clipboard.cpp:
(WebCore::Clipboard::hasDropZoneType):
2011-12-19 Sam Weinig <sam@webkit.org>
Add support for scrollLineDown: and scrollLineUp: NSResponder selectors
https://bugs.webkit.org/show_bug.cgi?id=74907
Reviewed by Dan Bernstein.
Added API test: WebKit2.ScrollByLineCommands
* editing/EditorCommand.cpp:
(WebCore::executeScrollLineUp):
(WebCore::executeScrollLineDown):
(WebCore::createCommandMap):
Add implementations for scrollLineUp/Down. Do not expose
these to execCommand
2011-12-19 Huang Dongsung <luxtella@company100.net>
[QT] WebGL can not make the frame buffer with the stencil buffer.
https://bugs.webkit.org/show_bug.cgi?id=74783
When initializing a framebuffer in OpenGL ES 2, we need to initialize the depth
and stencil buffers separately, as opposed to the combined depth-stencil buffer
we initialize for desktop GL.
This makes fast/canvas/webgl/context-attributes-depth-stencil-combination.html
work in OpenGL ES 2.
Reviewed by Noam Rosenthal.
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::reshape):
2011-12-19 Ami Fischman <fischman@chromium.org>
Teach VideoLayerChromium how to render native texture (to support HW video decode).
https://bugs.webkit.org/show_bug.cgi?id=73043
Reviewed by James Robinson.
Fix the life-cycle of video frames handled by VideoLayerChromium/CCVideoLayerImpl.
VideoFrameProvider::{get,put}CurrentFrame provide lease semantics. Previously
VideoLayerChromium would acquire the lease for the duration of copying the frame,
even if that was only a texture ID, and immediately return the lease, while
CCVideoLayerImpl::draw() would come along later and use the (no-longer locked)
texture optimistically. This change makes it so that CCVideoLayerImpl holds
the frame's lease for the duration of draw(), guaranteeing the frame is valid to read.
Existing test coverage (compositing/video/, LayoutTests). HW render of
HW-decoded textures is not yet tested explicitly.
* platform/graphics/chromium/VideoLayerChromium.cpp:
(WebCore::VideoLayerChromium::VideoLayerChromium):
(WebCore::VideoLayerChromium::~VideoLayerChromium):
(WebCore::VideoLayerChromium::createCCLayerImpl):
(WebCore::VideoLayerChromium::releaseProvider):
* platform/graphics/chromium/VideoLayerChromium.h:
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
(WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
(WebCore::CCVideoLayerImpl::setProvider):
(WebCore::convertVFCFormatToGC3DFormat):
(WebCore::CCVideoLayerImpl::draw):
(WebCore::CCVideoLayerImpl::copyFrameToTextures):
(WebCore::CCVideoLayerImpl::copyPlaneToTexture):
(WebCore::computeVisibleSize):
(WebCore::CCVideoLayerImpl::reserveTextures):
(WebCore::CCVideoLayerImpl::drawYUV):
(WebCore::CCVideoLayerImpl::drawCommon):
(WebCore::CCVideoLayerImpl::drawRGBA):
(WebCore::CCVideoLayerImpl::drawNativeTexture):
* platform/graphics/chromium/cc/CCVideoLayerImpl.h:
2011-12-19 Sam Weinig <sam@webkit.org>
More PlatformEvent cleanup
https://bugs.webkit.org/show_bug.cgi?id=74831
Reviewed by Dan Bernstein.
* platform/PlatformMouseEvent.h:
(WebCore::PlatformMouseEvent::position):
Rename pos -> position(). Remove x() and y() accessors.
(WebCore::PlatformMouseEvent::globalPosition):
Added. Replaces globalX() and globalY() accessors.
(WebCore::PlatformMouseEvent::movementDelta):
Added. Replaces movementX() and movementY() accessors.
* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::position):
Renamed pos -> position().
(WebCore::PlatformWheelEvent::globalPosition):
Renamed globalPos -> globalPosition().
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
* dom/WheelEvent.cpp:
(WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator):
* page/DragController.cpp:
(WebCore::DragController::startDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEventSingleClick):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::eventMayStartDrag):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::selectCursor):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::dispatchDragEvent):
(WebCore::EventHandler::prepareMouseEvent):
(WebCore::EventHandler::dispatchMouseEvent):
(WebCore::EventHandler::handleWheelEvent):
(WebCore::EventHandler::sendContextMenuEvent):
(WebCore::EventHandler::handleDrag):
(WebCore::EventHandler::handleTouchEvent):
* page/chromium/EventHandlerChromium.cpp:
(WebCore::EventHandler::passMousePressEventToSubframe):
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::mouseMoved):
(WebCore::Scrollbar::mouseDown):
* platform/ScrollbarThemeComposite.cpp:
(WebCore::ScrollbarThemeComposite::hitTest):
* platform/chromium/PopupContainer.cpp:
(WebCore::constructRelativeMouseEvent):
(WebCore::constructRelativeWheelEvent):
* platform/chromium/PopupListBox.cpp:
(WebCore::PopupListBox::handleMouseDownEvent):
(WebCore::PopupListBox::handleMouseMoveEvent):
(WebCore::PopupListBox::handleMouseReleaseEvent):
(WebCore::PopupListBox::handleWheelEvent):
* platform/chromium/ScrollbarThemeChromiumWin.cpp:
(WebCore::ScrollbarThemeChromiumWin::shouldSnapBackToDragOrigin):
* platform/qt/ScrollbarQt.cpp:
(WebCore::Scrollbar::contextMenu):
* platform/qt/ScrollbarThemeQt.cpp:
(WebCore::ScrollbarThemeQt::hitTest):
* platform/win/ScrollbarThemeWin.cpp:
(WebCore::ScrollbarThemeWin::shouldSnapBackToDragOrigin):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::resize):
Update to use new names, access style.
2011-12-19 Adam Klein <adamk@chromium.org>
Remove unused ExceptionCode& argument from Element::setAttribute(QualifiedName)
https://bugs.webkit.org/show_bug.cgi?id=74740
Reviewed by Ryosuke Niwa.
Updated lots of callers to remove third argument. The list of changes
below only lists things other than updating callers.
* dom/Document.cpp:
(WebCore::Document::importNode):
* dom/Element.cpp:
(WebCore::Element::setAttribute):
(WebCore::Element::setAttributeNS):
(WebCore::Element::setIntegralAttribute):
(WebCore::Element::setUnsignedIntegralAttribute):
* dom/Element.h: Removed third arg from method, removed old two-arg
overload which now has an identical signature.
* editing/mac/EditorMac.mm: Updated caller and used
ASSERT_NO_EXCEPTION for nearby code.
(WebCore::styleForSelectionStart):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setContentEditable):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setAttributesAsText):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
* svg/SVGElement.idl: Removed 'setter raises(DOMException)'
* svg/SVGGlyphRefElement.idl: ditto.
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::setType):
(WebCore::SVGStyleElement::setMedia):
(WebCore::SVGStyleElement::setTitle):
* xml/parser/XMLTreeBuilder.cpp:
(WebCore::XMLTreeBuilder::processAttributes):
2011-12-19 Kentaro Hara <haraken@chromium.org>
Unreviewed. Rebaselined run-bindings-tests results.
* bindings/scripts/test/JS/JSFloat64Array.h:
(WebCore::JSFloat64Array::create):
(WebCore::JSFloat64ArrayPrototype::create):
(WebCore::JSFloat64ArrayConstructor::create):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::create):
(WebCore::JSTestEventConstructorPrototype::create):
(WebCore::JSTestEventConstructorConstructor::create):
* bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::JSTestInterface::create):
(WebCore::JSTestInterfacePrototype::create):
(WebCore::JSTestInterfaceConstructor::create):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::create):
(WebCore::JSTestMediaQueryListListenerPrototype::create):
(WebCore::JSTestMediaQueryListListenerConstructor::create):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::JSTestNamedConstructor::create):
(WebCore::JSTestNamedConstructorPrototype::create):
(WebCore::JSTestNamedConstructorConstructor::create):
(WebCore::JSTestNamedConstructorNamedConstructor::create):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::create):
(WebCore::JSTestObjPrototype::create):
(WebCore::JSTestObjConstructor::create):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::create):
(WebCore::JSTestSerializedScriptValueInterfacePrototype::create):
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
2011-12-19 James Robinson <jamesr@chromium.org>
[chromium] CCLayerDelegate and WebLayerClient do not need notifySyncRequired
https://bugs.webkit.org/show_bug.cgi?id=74376
Reviewed by Kenneth Russell.
CCLayerDelegate::notifySyncRequired is an odd bit of interface that we originally cargo-culted from the
CoreAnimation compositor implementation. It is a mechanism by which a LayerChromium instance may request a new
frame via its CCLayerDelegate, which in WebCore is always a GraphicsLayerClient. In practice, all
implementations eventually ended up routing to CCLayerTreeHost::setNeedsCommit which then made the proper
scheduling decision.
This patch routes all changes that would have gone through CCLayerDelegate::notifySyncRequired directly to
CCLayerTreeHost::setNeedsCommit, which greatly simplifies the scheduling logic.
There is a large amount of unit test coverage for this change, largely in LayerChromiumTest
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
* platform/graphics/chromium/GraphicsLayerChromium.h:
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setNeedsCommit):
(WebCore::LayerChromium::insertChild):
* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::~CCLayerTreeHost):
(WebCore::CCLayerTreeHost::setRootLayer):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
* platform/graphics/chromium/cc/CCScopedThreadProxy.h:
(WebCore::CCScopedThreadProxy::runTaskIfNotShutdown):
2011-12-19 Sailesh Agrawal <sail@chromium.org>
Merge ScrollAnimatorChromiumMac.mm back to ScrollAnimatorMac
https://bugs.webkit.org/show_bug.cgi?id=61144
Reviewed by Beth Dakin.
At a high level the main changes are:
- replace #ifdefs in ScrollAnimatorMac and ScrollbarThemeMac with run time checks
- delete duplicate code in ScrollbarThemeChromiumMac. Keep the paint code since it does tickmarks and SKIA stuff.
- delete ScrollAnimatorChromiumMac since ScrollAnimatorMac does the exact same thing
- delete ScrollbarOverlayUtilitiesChromiumMac since NSScrollerImpDetails does the same thing
No new tests. Just refactoring.
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* platform/chromium/ScrollAnimatorChromiumMac.h: Removed.
* platform/chromium/ScrollAnimatorChromiumMac.mm: Removed.
* platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Removed.
* platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Removed.
* platform/chromium/ScrollbarThemeChromiumMac.h:
* platform/chromium/ScrollbarThemeChromiumMac.mm:
(WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac):
(WebCore::scrollbarPainterPaintTrack):
(WebCore::ScrollbarThemeChromiumMac::paint):
* platform/mac/EmptyProtocolDefinitions.h:
* platform/mac/NSScrollerImpDetails.h:
(WebCore::isScrollbarOverlayAPIAvailable):
* platform/mac/NSScrollerImpDetails.mm: Added.
(WebCore::isScrollbarOverlayAPIAvailable):
(WebCore::recommendedScrollerStyle):
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(scrollbarPainterForScrollbar):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::notifyPositionChanged):
(WebCore::ScrollAnimatorMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
(WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
(WebCore::ScrollAnimatorMac::willStartLiveResize):
(WebCore::ScrollAnimatorMac::contentsResized):
(WebCore::ScrollAnimatorMac::willEndLiveResize):
(WebCore::ScrollAnimatorMac::contentAreaDidShow):
(WebCore::ScrollAnimatorMac::contentAreaDidHide):
(WebCore::ScrollAnimatorMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorMac::didEndScrollGesture):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::cancelAnimations):
(WebCore::ScrollAnimatorMac::setIsActive):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
(WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
* platform/mac/ScrollElasticityController.h:
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
(+[WebScrollbarPrefsObserver behaviorPrefsChanged:]):
(WebCore::updateArrowPlacement):
(WebCore::ScrollbarThemeMac::registerScrollbar):
(WebCore::ScrollbarThemeMac::setIsCurrentlyDrawingIntoLayer):
(WebCore::ScrollbarThemeMac::ScrollbarThemeMac):
(WebCore::ScrollbarThemeMac::scrollbarThickness):
(WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
(WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
(WebCore::ScrollbarThemeMac::hasButtons):
(WebCore::ScrollbarThemeMac::hasThumb):
(WebCore::ScrollbarThemeMac::minimumThumbLength):
(WebCore::ScrollbarThemeMac::scrollbarPartToHIPressedState):
(WebCore::ScrollbarThemeMac::updateEnabledState):
(WebCore::scrollbarPainterPaint):
(WebCore::ScrollbarThemeMac::paint):
2011-12-19 James Robinson <jamesr@chromium.org>
[chromium] Set the CCLayerTreeHost pointer on LayerChromium instances eagerly
https://bugs.webkit.org/show_bug.cgi?id=74477
Reviewed by Kenneth Russell.
This enforces that the m_layerTreeHost pointer on LayerChromium instances is always up to date, instead of
lazily setting it in the paintContents loop. There are two invariants:
1.) If a LayerChromium is the root layer of a CCLayerTreeHost, or is reachable via the children, mask, or
replica pointers from the root layer of a CCLayerTreeHost, then that LayerChromium's m_layerTreeHost pointer
refers to that CCLayerTreeHost
2.) If a LayerChromium is not a root layer or reachable from a root layer of any CCLayerTreeHost, its
CCLayerTreeHost pointer is nil.
Covered by several new layout tests in LayerChromiumTest
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setLayerTreeHost):
(WebCore::LayerChromium::setParent):
(WebCore::LayerChromium::setMaskLayer):
(WebCore::LayerChromium::setReplicaLayer):
* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::createTile):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::setRootLayer):
(WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
(WebCore::CCLayerTreeHost::paintLayerContents):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
2011-12-19 Joshua Bell <jsbell@chromium.org>
IndexedDB multiple calls to transaction.objectStore(name) should return the same instance
https://bugs.webkit.org/show_bug.cgi?id=60208
Reviewed by Tony Chang.
Ditto for calls to IDBObjectStore.index(). Calling these methods after the
enclosing transaction has finished now consistently throws an error, which
allows us to break reference cycles.
Test: storage/indexeddb/mozilla/object-identity.html
* storage/IDBDatabase.cpp:
(WebCore::IDBDatabase::createObjectStore):
* storage/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::transactionFinished):
* storage/IDBObjectStore.h:
* storage/IDBTransaction.cpp:
(WebCore::IDBTransaction::objectStore):
(WebCore::IDBTransaction::objectStoreCreated):
(WebCore::IDBTransaction::dispatchEvent):
* storage/IDBTransaction.h:
2011-12-19 Anders Carlsson <andersca@apple.com>
Send gesture events through the event dispatcher and scrolling coordinator
https://bugs.webkit.org/show_bug.cgi?id=74879
Reviewed by Andreas Kling.
* WebCore.exp.in:
Export ScrollingCoordinator::handleGestureEvent.
* page/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::handleGestureEvent):
* page/ScrollingCoordinator.h:
Add handleGestureEvent stub.
2011-12-19 Kentaro Hara <haraken@chromium.org>
Move WebAudio and WebSocket getters from JSDOMWindowCustom.cpp
to JSDOMWindow{WebAudio,WebSocket}Custom.cpp
https://bugs.webkit.org/show_bug.cgi?id=74841
Reviewed by Adam Barth.
This is the second step for bug 74599. We are planning to enable the [Supplemental]
IDL and modularize WebAudio and WebSocket on AppleWebKit. This patch moves
webkitAudioContext() and webSocket() from JSDOMWindowCustom.cpp to JSDOMWindowWebAudioCustom.cpp
and JSDOMWindowWebSocketCustom.cpp, for modularization.
Tests: Confirm that build succeeds.
http/tests/websocket/tests/*
* GNUmakefile.list.am: Added JSDOMWindowWebAudioCustom.cpp and JSDOMWindowWebSocketCustom.cpp.
* Target.pri: Ditto.
* UseJSC.cmake: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSBindingsAllInOne.cpp: Ditto.
* bindings/js/JSDOMWindowCustom.cpp: For now we do not remove settingsForWindow(),
webkitAudioContext() and webSocket(), since other build systems are still using them.
We will remove them after all build systems implement the [Supplemental] IDL.
* bindings/js/JSDOMWindowWebAudioCustom.cpp: Added.
(WebCore::settingsForWindowWebAudio):
(WebCore::JSDOMWindow::webkitAudioContext):
* bindings/js/JSDOMWindowWebSocketCustom.cpp: Added.
(WebCore::settingsForWindowWebSocket):
(WebCore::JSDOMWindow::webSocket):
* bindings/scripts/CodeGeneratorJS.pm: Until we implement the [Supplemental] IDL
on all build systems, we need to temporarily allow two kinds of webkitAudioContext()
and webSocket().
(GenerateHeader):
2011-12-16 Zhenyao Mo <zmo@google.com>
Postpone deleteRenderbuffer/deleteTexture until all framebuffer attachment points are removed.
https://bugs.webkit.org/show_bug.cgi?id=74741
Reviewed by Kenneth Russell.
Use WebGLObject's attachment count mechanism to track if a renderbuffer/texture
is still attached to framebuffers, and if its deletion should be delated or not.
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::setAttachmentForBoundFramebuffer):
(WebCore::WebGLFramebuffer::getAttachment):
(WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
(WebCore::WebGLFramebuffer::deleteObjectImpl):
(WebCore::WebGLFramebuffer::isBound):
* html/canvas/WebGLFramebuffer.h:
2011-12-19 Iain Merrick <husky@google.com>
[chromium] Accelerated canvas broken in threaded compositing mode
https://bugs.webkit.org/show_bug.cgi?id=72738
We were flushing the Skia canvas in updateCompositorResources, which
is illegal as it runs on the wrong thread. Moved to paintContentsIfDirty
instead. For correct rendering on the compositor thread, we make a copy
of the canvas texture in updateCompositorResources.
Removed m_textureId and pushPropertiesTo from CanvasLayerChromium, as
it's no longer common between Canvas2DLayerChromium and
WebGLLayerChromium. WebGL changes do not change functionality.
Reviewed by James Robinson.
* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::create):
(WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
(WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
(WebCore::Canvas2DLayerChromium::setTextureId):
(WebCore::Canvas2DLayerChromium::contentChanged):
(WebCore::Canvas2DLayerChromium::drawsContent):
(WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
(WebCore::Canvas2DLayerChromium::setLayerTreeHost):
(WebCore::Canvas2DLayerChromium::setTextureManager):
(WebCore::Canvas2DLayerChromium::updateCompositorResources):
(WebCore::Canvas2DLayerChromium::pushPropertiesTo):
(WebCore::Canvas2DLayerChromium::unreserveContentsTexture):
(WebCore::Canvas2DLayerChromium::cleanupResources):
* platform/graphics/chromium/Canvas2DLayerChromium.h:
* platform/graphics/chromium/CanvasLayerChromium.cpp:
(WebCore::CanvasLayerChromium::CanvasLayerChromium):
* platform/graphics/chromium/CanvasLayerChromium.h:
* platform/graphics/chromium/WebGLLayerChromium.cpp:
(WebCore::WebGLLayerChromium::WebGLLayerChromium):
(WebCore::WebGLLayerChromium::pushPropertiesTo):
* platform/graphics/chromium/WebGLLayerChromium.h:
(WebCore::WebGLLayerChromium::textureId):
(WebCore::WebGLLayerChromium::setTextureId):
* platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
(WebCore::CCCanvasLayerImpl::textureId):
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::createAcceleratedCanvas):
2011-12-19 Mike Reed <reed@google.com>
[skia] cache typeface in FontPlatformData
https://bugs.webkit.org/show_bug.cgi?id=74415
Reviewed by Stephen White.
No new tests. optimization only, existing tests in play
* platform/graphics/chromium/FontChromiumWin.cpp:
(WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
(WebCore::Font::drawGlyphs):
* platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
(WebCore::CreateTypefaceFromHFont):
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::operator=):
(WebCore::FontPlatformData::~FontPlatformData):
* platform/graphics/chromium/FontPlatformDataChromiumWin.h:
(WebCore::FontPlatformData::typeface):
(WebCore::FontPlatformData::lfQuality):
(WebCore::FontPlatformData::hash):
* platform/graphics/skia/SkiaFontWin.cpp:
(WebCore::setupPaintForFont):
(WebCore::paintSkiaText):
* platform/graphics/skia/SkiaFontWin.h:
2011-12-04 Robert Hogan <robert@webkit.org>
CSS 2.1 failure: border-conflict-element-*
https://bugs.webkit.org/show_bug.cgi?id=71244
Reviewed by Darin Adler.
From http://www.w3.org/TR/CSS21/tables.html#border-conflict-resolution :
"When two adjacent cells have the same border-width and the same border-style in a
'border-collapse: collapse' table, then the color of the border from the leftmost cell wins
(if the table's 'direction' is 'ltr'; right, if it is 'rtl') and the color of the border
from the topmost cell wins."
RenderTable manages collapsed borders by first creating a list of unique border values sorted in ascending
priority. A unique border value is determined by style, width and color and cell-type precedence. For each
entry in this list RenderTableSection paints each cell in its section starting at the top-left. If a cell
is using the border RenderTable is currently iterating for, the cell will paint that border.
The problems with this approach are:
1. Painting cells from the top-left to the bottom-right means that borders further to the right and to the bottom
of the table will paint over those further to the left and the top, breaking the precedence due to cell position.
2. It creates more unique borders in the list than necessary. Borders that differ only on color do not need to be painted in
a separate iteration. Precedence in such cases is determined by cell position.
So in order to respect cell position when painting collapsed borders:
1. RenderTableCell now treats borders with the same style, width and precedence as equal. This results in a performance
improvement on tables where collapsed borders differ only in color, since RenderTable is no longer painting every cell in the table
for each unique collapsed border color. It also allows color to be a function of cell position rather than border type.
2. RenderTableSection now paints collapsed borders separately from cells and from the bottom-right to the top-left instead of top-left
to bottom-right. If a collapsed border has precedence due to style, width or cell-group-type it will still be respected but precedence
due to color is enforced by painting cells nearer to the top and left *after* cells nearer to the bottom and right.
The order in which collapsed borders paint over each other in the same cell has not changed. Unlike Firefox,
WebKit does not attempt render them as diagonals or attempt to give borders on the edge of the table precedence
so that grooved and ridged styles have a smooth edge all round the table.
This fixes the following failing tests from the border-conflict-element-* set
in the CSS 2.1 test suite:
border-conflict-element-001d.htm
border-conflict-element-0037.htm
border-conflict-element-0038.htm
One test in the suite is known to be wrong, so a corrected version has been landed outside the
css2.1 folder:
border-conflict-element-002.htm
This change entails rebaselining quite a few tests, see the LayoutTests ChangeLog for a full
explanation of the rebaselines.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paint):
(WebCore::addBorderStyle):
(WebCore::compareBorderValuesForQSort):
(WebCore::RenderTableCell::paintCollapsedBorders):
* rendering/RenderTableCell.h:
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paintCell):
(WebCore::RenderTableSection::paintObject):
* rendering/style/CollapsedBorderValue.h:
(WebCore::CollapsedBorderValue::isSameIgnoringColor):
2011-12-19 Jer Noble <jer.noble@apple.com>
MediaController: cannot scrub while playing.
https://bugs.webkit.org/show_bug.cgi?id=74870
rdar://problem/10602037
Reviewed by Eric Carlson.
Updated media/media-controller-playback.html test.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setController): Change order of operations; set the controllers media
element before passing controller to the controls.
* html/MediaController.cpp:
(MediaController::updatePlaybackState): Stop the playback clock when WAITING or ENDED.
(MediaController::beginScrubbing): Stop the playback clock.
(MediaController::endScrubbing): Restart (if necessary) the playback clock.
(MediaController::canPlay): Return true if paused.
* platform/mac/PlatformClockCA.cpp:
(PlatformClockCA::setCurrentTime): Stop the CAClock before changing the current time.
2011-12-19 Adam Barth <abarth@webkit.org>
We don't pass all of the html5lib unsafe-text.dat tests
https://bugs.webkit.org/show_bug.cgi?id=74825
Reviewed by Eric Seidel.
This patch is actually three (tiny) related patches. Together these
changes cause use to pass the plain-text-unsafe.dat tests from html5lib.
Tests: html5lib/runner.html
* html/parser/HTMLTokenizer.cpp:
(WebCore::::shouldSkipNullCharacters):
- We're not supposed to skip null characters in the PLAINTEXTState.
This might cause compatibility problems with text/plain documents
that contains NUL characters because we use the PLAINTEXTState
to parse them. If we run into any trouble, it's easy to fix in
TextDocumentParser.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::constructTreeFromToken):
- Fix typo.
(WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
- We're supposed to replace NUL characters if the next character
token if we're in foreign content. The previous check didn't
quite get this case correctly.
(WebCore::HTMLTreeBuilder::processTokenInForeignContent):
- Now that we replace NUL characters with the replacement
character, we need to be more careful about the fact that
replacement characters don't flip m_framesetOk to false. Note:
This new check matches the check for non-foreign content.
2011-12-19 Adam Barth <abarth@webkit.org>
WebKit should support HTML entities that expand to more than one character
https://bugs.webkit.org/show_bug.cgi?id=74826
Reviewed by Darin Adler.
Tests: html5lib/runner.html
* html/parser/HTMLEntityNames.in:
- Add missing HTML entities from HTML5 spec. I'll sort this file
in a followup patch. (It's not quite sorted perfectly and
sorting in this patch would introduce noise into the patch.)
* html/parser/HTMLEntityParser.cpp:
(WebCore::decodeNamedEntity):
- convertToUTF16 always returns true, so make it return void instead.
- Teach the entity parse that some entities expand to two characters.
* html/parser/HTMLEntityParser.h:
- Add a warning that decodeNamedEntity is really a broken API.
- This patch doesn't actually change any behavior of this API, but
it does illustrate that the two callers of this API (the two XML
parsers) really need to move a more sensible API.
* html/parser/HTMLEntitySearch.cpp:
(WebCore::HTMLEntitySearch::HTMLEntitySearch):
(WebCore::HTMLEntitySearch::advance):
* html/parser/HTMLEntitySearch.h:
(WebCore::HTMLEntitySearch::fail):
- Remove the concept of currentValue. This isn't really used for
anything and conflicts with the idea that entities can expand
to more than one character.
* html/parser/HTMLEntityTable.h:
- Add storage for two UChar32 values per entity.
* html/parser/create-html-entity-table:
(convert_value_to_int):
- Teach this script to handle entities that expand to multiple
Unicode characters.
* xml/parser/CharacterReferenceParserInlineMethods.h:
(WebCore::consumeCharacterReference):
- Update this function now that convertToUTF16 returns void.
* xml/parser/XMLCharacterReferenceParser.cpp:
- The XML version of convertToUTF16 also needs to return void to
match the HTML signature. (It used to return true all the time
as well.)
* xml/parser/XMLTreeBuilder.cpp:
(WebCore::XMLTreeBuilder::processHTMLEntity):
- Update this caller use leftValue instead of value. My sense is
that this code is moderately broken today because it's using HTML
entities in parsing XML. I've added a FIXME. This code is
disabled in all builds, so I don't feel a big need to fix this
issue in this patch. We should either finish this project or
delete this complexity from the project.
2011-12-19 Andreas Kling <kling@webkit.org>
Avoid instantiating ScrollAnimators when possible.
<http://webkit.org/b/74830>
Reviewed by Beth Dakin.
Have RenderLayer::scrollToOffset() check if we're scrolling to the already
current offset. In that case, don't call down to scrollToOffsetWithoutAnimation(),
avoiding the instantiation of a ScrollAnimator.
This reduces memory consumption by 400 kB (on 32-bit) when viewing the full HTML5
spec on <http://whatwg.org/c>, since we were creating a ScrollAnimator for every
single RenderLayer.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollToOffset):
2011-12-19 Chris Guan <chris.guan@torchmobile.com.cn>
[BlackBerry] remove one file related to multipart from the BlackBerry build system
https://bugs.webkit.org/show_bug.cgi?id=74839
Reviewed by Daniel Bates.
After refactored multipart, the code of MultipartResponseDelegate have been moved
out of WebCore, we do not need to upstream MultipartResponseDelegate any more.
So remove it from PlatformBlackBerry.cmake to update build system.
* PlatformBlackBerry.cmake:
2011-12-15 Geoffrey Garen <ggaren@apple.com>
Placement new does an unnecessary NULL check
https://bugs.webkit.org/show_bug.cgi?id=74676
Reviewed by Sam Weinig.
* bindings/js/JSImageConstructor.h:
(WebCore::JSImageConstructor::create):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateConstructorDeclaration):
* bridge/c/CRuntimeObject.h:
(JSC::Bindings::CRuntimeObject::create):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CRuntimeMethod::create):
* bridge/jni/jsc/JavaInstanceJSC.cpp:
(JavaRuntimeMethod::create):
* bridge/jni/jsc/JavaRuntimeObject.h:
(JSC::Bindings::JavaRuntimeObject::create):
* bridge/objc/ObjCRuntimeObject.h:
(JSC::Bindings::ObjCRuntimeObject::create):
* bridge/objc/objc_instance.mm:
(ObjCRuntimeMethod::create):
* bridge/objc/objc_runtime.h:
(JSC::Bindings::ObjcFallbackObjectImp::create):
* bridge/runtime_array.h:
(JSC::RuntimeArray::create):
* bridge/runtime_method.h:
(JSC::RuntimeMethod::create):
* bridge/runtime_object.h:
(JSC::Bindings::RuntimeObject::create):
* dom/Document.h:
(WebCore::FormElementKeyHashTraits::constructDeletedValue): Use NotNull
placement new, as in JavaScriptCore.
* platform/PODArena.h:
(WebCore::PODArena::allocateObject): No need to check for NULL explicitly,
since that's the built-in behavior of placement new.
* platform/graphics/FontCache.cpp:
(WebCore::FontDataCacheKeyTraits::constructDeletedValue):
* platform/graphics/IntRectHash.h:
* platform/graphics/IntSizeHash.h: More NotNull.
* rendering/RenderObject.h: Declaring that we throw is the C++ way to say
that operator new will not return NULL.
2011-12-19 Eric Carlson <eric.carlson@apple.com>
Render text tracks
https://bugs.webkit.org/show_bug.cgi?id=62886
Reviewed by Sam Weinig.
Test: media/track/track-cue-rendering.html
* css/mediaControls.css:
(video::-webkit-media-text-track-container):
(video::-webkit-media-text-track-display):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_haveVisibleTextTrack.
(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Trigger an update of the text
track display.
(WebCore::HTMLMediaElement::textTrackModeChanged): call configureTextTrackDisplay() so
the text track display is hidden or shown when necessary.
(WebCore::HTMLMediaElement::userIsInterestedInThisTrack): Minor cleanup.
(WebCore::HTMLMediaElement::createMediaControls): configureMediaControls() always called
reset after creating the controls, do it here instead.
(WebCore::HTMLMediaElement::configureMediaControls): Simplify and cleanup.
(WebCore::HTMLMediaElement::configureTextTrackDisplay): Show and hide text track display.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::currentlyVisibleCues):
* html/shadow/MediaControlElements.cpp:
(WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement): New.
(WebCore::RenderTextTrackContainerElement::layout): New. Call the display element so it can
update the position and font size.
(WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): New.
(WebCore::MediaControlTextTrackContainerElement::create): Ditto.
(WebCore::MediaControlTextTrackContainerElement::createRenderer): Ditto.
(WebCore::MediaControlTextTrackContainerElement::shadowPseudoId): Ditto.
(WebCore::MediaControlTextTrackContainerElement::updateSizes): Keep the cue display element
positioned above the bottom of the video box, and size the font according to the video height.
(WebCore::MediaControlTextTrackDisplayElement::MediaControlTextTrackDisplayElement): New.
(WebCore::MediaControlTextTrackDisplayElement::create): Ditto.
(WebCore::MediaControlTextTrackDisplayElement::shadowPseudoId): Ditto.
* html/shadow/MediaControlElements.h:
(WebCore::MediaControlTextTrackContainerElement::displayType):
(WebCore::MediaControlTextTrackDisplayElement::displayType):
* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::MediaControlRootElement): New.
(WebCore::MediaControlRootElement::setMediaController): Ditto.
(WebCore::MediaControlRootElement::createTextTrackDisplay): Ditto.
(WebCore::MediaControlRootElement::showTextTrackDisplay): Ditto.
(WebCore::MediaControlRootElement::hideTextTrackDisplay): Ditto.
(WebCore::MediaControlRootElement::updateTextTrackDisplay): Ditto.
* html/shadow/MediaControlRootElement.h:
* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): New.
(WebCore::MediaControlRootElement::createTextTrackDisplay): Ditto.
(WebCore::MediaControlRootElement::showTextTrackDisplay): Ditto.
(WebCore::MediaControlRootElement::hideTextTrackDisplay): Ditto.
(WebCore::MediaControlRootElement::updateTextTrackDisplay): Ditto.
* html/shadow/MediaControlRootElementChromium.h:
* html/shadow/MediaControls.h:
2011-12-19 Eric Carlson <eric.carlson@apple.com>
Enable <track> for Mac build
https://bugs.webkit.org/show_bug.cgi?id=74838
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
* bindings/generic/RuntimeEnabledFeatures.cpp:
2011-12-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
Make the Editor::setIgnoreCompositionSelectionChange public as it is needed by Qt
Reviewed by Simon Hausmann.
* editing/Editor.h:
2011-12-19 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Implement CSS selector profiler backend
https://bugs.webkit.org/show_bug.cgi?id=74603
Reviewed by Pavel Feldman.
No new tests, as the changed code does not result in visible effects yet.
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(WebCore::RuleMatchingStats::RuleMatchingStats):
(WebCore::SelectorProfile::SelectorProfile):
(WebCore::SelectorProfile::~SelectorProfile):
(WebCore::SelectorProfile::totalMatchingTimeMs):
(WebCore::SelectorProfile::startSelector):
(WebCore::SelectorProfile::commitSelector):
(WebCore::SelectorProfile::commitSelectorTime):
(WebCore::SelectorProfile::toInspectorObject):
(WebCore::InspectorCSSAgent::clearFrontend):
(WebCore::InspectorCSSAgent::restore):
(WebCore::InspectorCSSAgent::startSelectorProfiler):
(WebCore::InspectorCSSAgent::stopSelectorProfiler):
(WebCore::InspectorCSSAgent::willMatchRule):
(WebCore::InspectorCSSAgent::didMatchRule):
(WebCore::InspectorCSSAgent::willProcessRule):
(WebCore::InspectorCSSAgent::didProcessRule):
* inspector/InspectorCSSAgent.h:
2011-12-19 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Status bar button glyph for the "Record" buttons broken
https://bugs.webkit.org/show_bug.cgi?id=74861
Reviewed by Pavel Feldman.
* inspector/front-end/inspector.css:
(.record-cpu-profile-status-bar-item .glyph, .record-profile-status-bar-item .glyph):
(.record-cpu-profile-status-bar-item.toggled-on .glyph, .record-profile-status-bar-item.toggled-on .glyph):
2011-12-19 Pavel Feldman <pavel.feldman@gmail.com>
Web Inspector: only the first @rule is highlighted in CSS
https://bugs.webkit.org/show_bug.cgi?id=74568
Reviewed by Timothy Hatcher.
* inspector/front-end/SourceCSSTokenizer.js:
(WebInspector.SourceCSSTokenizer.prototype.nextToken):
* inspector/front-end/SourceCSSTokenizer.re2js:
2011-12-19 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Feature Request: Able to remove all breakpoints.
https://bugs.webkit.org/show_bug.cgi?id=63055
Reviewed by Pavel Feldman.
* English.lproj/localizedStrings.js:
* inspector/front-end/BreakpointManager.js:
(WebInspector.BreakpointManager.prototype.removeAllBreakpoints):
* inspector/front-end/BreakpointsSidebarPane.js:
(WebInspector.JavaScriptBreakpointsSidebarPane):
(WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu):
(WebInspector.JavaScriptBreakpointsSidebarPane.prototype._contextMenu):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype.removeAllBreakpoints):
2011-12-19 Benjamin Poulain <benjamin@webkit.org>
Build fix for ScrollingCoordinatorMac.mm when building on a case sensitive system
Unreviewed build fix for r103180. StdlibExtras.h->StdLibExtras.h to compile on case sensitive system.
* page/mac/ScrollingCoordinatorMac.mm:
2011-12-19 Kentaro Hara <haraken@chromium.org>
Remove unnecessary [JSCCustomGetter] IDLs from DOMWindow.idl
https://bugs.webkit.org/show_bug.cgi?id=74829
Reviewed by Adam Barth.
Now JSC has implemented the [Constructor] IDL and it generates
getDOMConstructor() automatically. This patch removes hand-written
unnecessary getDOMConstructor()s from JSDOMWindowCustom.cpp.
No new tests. No change in behavior.
* bindings/js/JSDOMWindowCustom.cpp:
* page/DOMWindow.idl:
2011-12-19 Adam Barth <abarth@webkit.org>
The HTML parser doesn't enforce the "Noah's Ark condition" from the HTML5 spec
https://bugs.webkit.org/show_bug.cgi?id=74828
Reviewed by Darin Adler.
This patch implement the "Noah's Ark condition" from the HTML5
specification. This condition limits the number of identitical
elements that can be in the list of active formatting elements. I'm not
entirely sure that enforcing this condition is worth the complexity,
but given that we've come this far in support of the HTML5 parsing
algorithm, we might as well finish it.
After this patch, we pass all but one of the html5lib parsing tests!
Tests: html5lib/runner.html
* html/parser/HTMLFormattingElementList.cpp:
(WebCore::attributeCount):
(WebCore::HTMLFormattingElementList::append):
(WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
(WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
* html/parser/HTMLFormattingElementList.h:
2011-12-19 Benjamin Poulain <bpoulain@apple.com>
Add support for 8 bits strings to Document::isValidName()
https://bugs.webkit.org/show_bug.cgi?id=74784
Reviewed by Darin Adler.
Avoid the conversion to 16bits when we are in the ASCII fast path,
otherwise fallback to the Unicode testing in 16bits.
* dom/Document.cpp:
(WebCore::isValidNameASCII):
(WebCore::Document::isValidName):
2011-12-18 Kentaro Hara <haraken@chromium.org>
REGRESSION(r101445): [JSC] Generated code for custom getters and setters
with the [Supplemental] IDL is wrong
https://bugs.webkit.org/show_bug.cgi?id=74837
Reviewed by Darin Adler.
In bug 73162, we implemented the [Supplemental] IDL, but the generated code
for custom getters and setters was wrong in JSC. This patch fixes CodeGeneratorJS.pm
so that the result of WebCore/bindings/scripts/test/TestInterface.idl becomes as follows:
Wrong:
JSValue jsTestInterfaceStr3(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSTestInterface* castedThis = static_cast<JSTestInterface*>(asObject(slotBase));
return JSTestSupplemental::str3(castedThis, exec);
}
Correct:
JSValue jsTestInterfaceStr3(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSTestInterface* castedThis = static_cast<JSTestInterface*>(asObject(slotBase));
TestInterface* imp = static_cast<TestInterface*>(castedThis->impl());
return castedThis->str3(imp, exec);
}
Tests: bindings/scripts/test/JS/TestInterface.idl
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestInterface.cpp: Updated run-bindings-tests result.
(WebCore::jsTestInterfaceStr3):
(WebCore::setJSTestInterfaceStr3):
* bindings/scripts/test/JS/JSTestInterface.h: Ditto.
2011-12-18 Adam Barth <abarth@webkit.org>
Fix typo in comment.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
2011-12-18 Keishi Hattori <keishi@webkit.org>
Implement <input type=color> UI WebKit chromium part
https://bugs.webkit.org/show_bug.cgi?id=65897
Reviewed by Darin Fisher.
* GNUmakefile.list.am: Removed ColorChooser.cpp and added ColorChooserClient.h
* WebCore.gypi: Added ColorChooser.h and ColorChooserClient.h
* WebCore.xcodeproj/project.pbxproj: Removed ColorChooser.cpp and added ColorChooserClient.h
2011-12-18 David Barton <dbarton@mathscribe.com>
<msup>, <munder>, <mover>, and <munderover> baseline positions are wrong
https://bugs.webkit.org/show_bug.cgi?id=72821
Reviewed by Darin Adler.
Tested by rebaselining 8 existing tests. (Pardon the pun.)
* rendering/mathml/RenderMathMLSubSup.cpp:
(WebCore::RenderMathMLSubSup::baselinePosition):
Just using the base's (these puns are not my fault) baseline did not leave room for the exponent.
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::baselinePosition):
Added a guard condition, and removed some bad lines apparently mistakenly copied from RenderMathMLSubSup.cpp.
2011-12-18 Luke Macpherson <macpherson@chromium.org>
Implement CSS line-height property in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=74561
Reviewed by Andreas Kling.
No new tests / refactoring only.
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isNumber):
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyLineHeight::applyValue):
(WebCore::ApplyPropertyLineHeight::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
2011-12-18 Luke Macpherson <macpherson@chromium.org>
Implement CSS outline shorthand property in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=74467
Reviewed by Andreas Kling.
No new tests / refactoring only.
RenderStyle::resetOutline was removed in favor of explicity expanding to the
initial values of the shorthand expansion. This improves consistency because
the initial values to use are more clearly (and singularly) defined.
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* rendering/style/RenderStyle.h:
2011-12-18 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r103205.
http://trac.webkit.org/changeset/103205
https://bugs.webkit.org/show_bug.cgi?id=74833
There are valid characters above 0x80 when the string is
8bits (Requested by benjaminp on #webkit).
* dom/Document.cpp:
(WebCore::isValidNameASCII):
(WebCore::Document::isValidName):
2011-12-18 Luke Macpherson <macpherson@chromium.org>
Separate box alignment and box pack values into separate enums.
https://bugs.webkit.org/show_bug.cgi?id=74580
Reviewed by Andreas Kling.
No new tests / refactoring only.
Separating these types cleans up the code by removing several assertions that
values are in the correct ranges, as this is ensured by the type system.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EBoxPack):
(WebCore::CSSPrimitiveValue::operator EBoxAlignment):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderFullScreen.cpp:
(createFullScreenStyle):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::boxPack):
(WebCore::InheritedFlags::setBoxAlign):
(WebCore::InheritedFlags::setBoxPack):
(WebCore::InheritedFlags::initialBoxPack):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleDeprecatedFlexibleBoxData.h:
2011-12-18 Luke Macpherson <macpherson@chromium.org>
Implement CSS font-size property in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=74368
Reviewed by Andreas Kling.
No new tests / refactoring only.
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyFontSize::largerFontSize):
(WebCore::ApplyPropertyFontSize::smallerFontSize):
(WebCore::ApplyPropertyFontSize::applyInheritValue):
(WebCore::ApplyPropertyFontSize::applyInitialValue):
(WebCore::ApplyPropertyFontSize::applyValue):
(WebCore::ApplyPropertyFontSize::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSStyleSelector.h:
(WebCore::CSSStyleSelector::hasParentNode):
2011-12-18 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r103199.
http://trac.webkit.org/changeset/103199
https://bugs.webkit.org/show_bug.cgi?id=74832
Caused a bot crashiness extravaganza! (Requested by kling on
#webkit).
* platform/KURL.cpp:
(WebCore::isLetterMatchIgnoringCase):
(WebCore::protocolIs):
2011-12-18 Dan Bernstein <mitz@apple.com>
Positioned Floats: Assertion hit in fast/block/positioning/positioned-float-layout-after-image-load.html
https://bugs.webkit.org/show_bug.cgi?id=67759
Reviewed by Darin Adler.
Test: fast/block/positioning/positioned-float-layout-after-image-load.html
Positioned floats are both floating and positioned. Made the following functions treat them as
positioned rather than as floats by reordering code.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::skipTrailingWhitespace):
(WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
(WebCore::RenderBlock::LineBreaker::nextLineBreak):
2011-12-18 Benjamin Poulain <bpoulain@apple.com>
Add support for 8 bits strings to Document::isValidName()
https://bugs.webkit.org/show_bug.cgi?id=74784
Reviewed by Andreas Kling.
The valid name has a fast path for ASCII, and a slow path
taking Unicode characters into account.
For 8-bit strings, we don't need to take the non-ASCII path
as it could never succeed if the ASCII path didn't.
* dom/Document.cpp:
(WebCore::isValidNameASCII):
(WebCore::Document::isValidName):
2011-12-18 Huang Dongsung <luxtella@company100.net>
[Qt] Remove redundant m_glWidget->makeCurrent() calls in GraphicsContext3DQt.
https://bugs.webkit.org/show_bug.cgi?id=73814
It causes a performance hit.
Moved the redundant function calls to makeContextCurrent().
Reviewed by Noam Rosenthal.
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
(WebCore::GraphicsContext3DPrivate::paint):
(WebCore::GraphicsContext3DPrivate::makeCurrentIfNeeded):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
(WebCore::GraphicsContext3D::reshape):
(WebCore::GraphicsContext3D::activeTexture):
(WebCore::GraphicsContext3D::attachShader):
(WebCore::GraphicsContext3D::getAttachedShaders):
(WebCore::GraphicsContext3D::bindAttribLocation):
(WebCore::GraphicsContext3D::bindBuffer):
(WebCore::GraphicsContext3D::bindFramebuffer):
(WebCore::GraphicsContext3D::bindRenderbuffer):
(WebCore::GraphicsContext3D::bindTexture):
(WebCore::GraphicsContext3D::blendColor):
(WebCore::GraphicsContext3D::blendEquation):
(WebCore::GraphicsContext3D::blendEquationSeparate):
(WebCore::GraphicsContext3D::blendFunc):
(WebCore::GraphicsContext3D::blendFuncSeparate):
(WebCore::GraphicsContext3D::bufferData):
(WebCore::GraphicsContext3D::bufferSubData):
(WebCore::GraphicsContext3D::checkFramebufferStatus):
(WebCore::GraphicsContext3D::clearColor):
(WebCore::GraphicsContext3D::clear):
(WebCore::GraphicsContext3D::clearDepth):
(WebCore::GraphicsContext3D::clearStencil):
(WebCore::GraphicsContext3D::colorMask):
(WebCore::GraphicsContext3D::compileShader):
(WebCore::GraphicsContext3D::compressedTexImage2D):
(WebCore::GraphicsContext3D::compressedTexSubImage2D):
(WebCore::GraphicsContext3D::copyTexImage2D):
(WebCore::GraphicsContext3D::copyTexSubImage2D):
(WebCore::GraphicsContext3D::cullFace):
(WebCore::GraphicsContext3D::depthFunc):
(WebCore::GraphicsContext3D::depthMask):
(WebCore::GraphicsContext3D::depthRange):
(WebCore::GraphicsContext3D::detachShader):
(WebCore::GraphicsContext3D::disable):
(WebCore::GraphicsContext3D::disableVertexAttribArray):
(WebCore::GraphicsContext3D::drawArrays):
(WebCore::GraphicsContext3D::drawElements):
(WebCore::GraphicsContext3D::enable):
(WebCore::GraphicsContext3D::enableVertexAttribArray):
(WebCore::GraphicsContext3D::finish):
(WebCore::GraphicsContext3D::flush):
(WebCore::GraphicsContext3D::framebufferRenderbuffer):
(WebCore::GraphicsContext3D::framebufferTexture2D):
(WebCore::GraphicsContext3D::frontFace):
(WebCore::GraphicsContext3D::generateMipmap):
(WebCore::GraphicsContext3D::getActiveAttrib):
(WebCore::GraphicsContext3D::getActiveUniform):
(WebCore::GraphicsContext3D::getAttribLocation):
(WebCore::GraphicsContext3D::getError):
(WebCore::GraphicsContext3D::getString):
(WebCore::GraphicsContext3D::hint):
(WebCore::GraphicsContext3D::isBuffer):
(WebCore::GraphicsContext3D::isEnabled):
(WebCore::GraphicsContext3D::isFramebuffer):
(WebCore::GraphicsContext3D::isProgram):
(WebCore::GraphicsContext3D::isRenderbuffer):
(WebCore::GraphicsContext3D::isShader):
(WebCore::GraphicsContext3D::isTexture):
(WebCore::GraphicsContext3D::lineWidth):
(WebCore::GraphicsContext3D::linkProgram):
(WebCore::GraphicsContext3D::pixelStorei):
(WebCore::GraphicsContext3D::polygonOffset):
(WebCore::GraphicsContext3D::readPixels):
(WebCore::GraphicsContext3D::releaseShaderCompiler):
(WebCore::GraphicsContext3D::renderbufferStorage):
(WebCore::GraphicsContext3D::sampleCoverage):
(WebCore::GraphicsContext3D::scissor):
(WebCore::GraphicsContext3D::shaderSource):
(WebCore::GraphicsContext3D::stencilFunc):
(WebCore::GraphicsContext3D::stencilFuncSeparate):
(WebCore::GraphicsContext3D::stencilMask):
(WebCore::GraphicsContext3D::stencilMaskSeparate):
(WebCore::GraphicsContext3D::stencilOp):
(WebCore::GraphicsContext3D::stencilOpSeparate):
(WebCore::GraphicsContext3D::texParameterf):
(WebCore::GraphicsContext3D::texParameteri):
(WebCore::GraphicsContext3D::uniform1f):
(WebCore::GraphicsContext3D::uniform1fv):
(WebCore::GraphicsContext3D::uniform2f):
(WebCore::GraphicsContext3D::uniform2fv):
(WebCore::GraphicsContext3D::uniform3f):
(WebCore::GraphicsContext3D::uniform3fv):
(WebCore::GraphicsContext3D::uniform4f):
(WebCore::GraphicsContext3D::uniform4fv):
(WebCore::GraphicsContext3D::uniform1i):
(WebCore::GraphicsContext3D::uniform1iv):
(WebCore::GraphicsContext3D::uniform2i):
(WebCore::GraphicsContext3D::uniform2iv):
(WebCore::GraphicsContext3D::uniform3i):
(WebCore::GraphicsContext3D::uniform3iv):
(WebCore::GraphicsContext3D::uniform4i):
(WebCore::GraphicsContext3D::uniform4iv):
(WebCore::GraphicsContext3D::uniformMatrix2fv):
(WebCore::GraphicsContext3D::uniformMatrix3fv):
(WebCore::GraphicsContext3D::uniformMatrix4fv):
(WebCore::GraphicsContext3D::useProgram):
(WebCore::GraphicsContext3D::validateProgram):
(WebCore::GraphicsContext3D::vertexAttrib1f):
(WebCore::GraphicsContext3D::vertexAttrib1fv):
(WebCore::GraphicsContext3D::vertexAttrib2f):
(WebCore::GraphicsContext3D::vertexAttrib2fv):
(WebCore::GraphicsContext3D::vertexAttrib3f):
(WebCore::GraphicsContext3D::vertexAttrib3fv):
(WebCore::GraphicsContext3D::vertexAttrib4f):
(WebCore::GraphicsContext3D::vertexAttrib4fv):
(WebCore::GraphicsContext3D::vertexAttribPointer):
(WebCore::GraphicsContext3D::viewport):
(WebCore::GraphicsContext3D::getBooleanv):
(WebCore::GraphicsContext3D::getBufferParameteriv):
(WebCore::GraphicsContext3D::getFloatv):
(WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
(WebCore::GraphicsContext3D::getIntegerv):
(WebCore::GraphicsContext3D::getProgramiv):
(WebCore::GraphicsContext3D::getProgramInfoLog):
(WebCore::GraphicsContext3D::getRenderbufferParameteriv):
(WebCore::GraphicsContext3D::getShaderiv):
(WebCore::GraphicsContext3D::getShaderInfoLog):
(WebCore::GraphicsContext3D::getShaderSource):
(WebCore::GraphicsContext3D::getTexParameterfv):
(WebCore::GraphicsContext3D::getTexParameteriv):
(WebCore::GraphicsContext3D::getUniformfv):
(WebCore::GraphicsContext3D::getUniformiv):
(WebCore::GraphicsContext3D::getUniformLocation):
(WebCore::GraphicsContext3D::getVertexAttribfv):
(WebCore::GraphicsContext3D::getVertexAttribiv):
(WebCore::GraphicsContext3D::getVertexAttribOffset):
(WebCore::GraphicsContext3D::texImage2D):
(WebCore::GraphicsContext3D::texSubImage2D):
(WebCore::GraphicsContext3D::createBuffer):
(WebCore::GraphicsContext3D::createFramebuffer):
(WebCore::GraphicsContext3D::createProgram):
(WebCore::GraphicsContext3D::createRenderbuffer):
(WebCore::GraphicsContext3D::createShader):
(WebCore::GraphicsContext3D::createTexture):
(WebCore::GraphicsContext3D::deleteBuffer):
(WebCore::GraphicsContext3D::deleteFramebuffer):
(WebCore::GraphicsContext3D::deleteProgram):
(WebCore::GraphicsContext3D::deleteRenderbuffer):
(WebCore::GraphicsContext3D::deleteShader):
(WebCore::GraphicsContext3D::deleteTexture):
2011-12-18 Andreas Kling <kling@webkit.org>
Removing unrelated printf() that slipped into my last commit.
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
2011-12-18 Andreas Kling <kling@webkit.org>
KURL::protocolIs() should handle 8-bit strings.
<http://webkit.org/b/74827>
Reviewed by Antti Koivisto.
* platform/KURL.cpp:
(WebCore::isLetterMatchIgnoringCase):
Turned this into a template method so it can be used for both UChar and LChar.
(WebCore::charactersAreProtocol):
(WebCore::protocolIs):
Handle 8/16 bit strings separately to avoid conversion.
2011-12-18 Alice Boxhall <aboxhall@chromium.org>
Make AccessibilityObject::lineForPosition return the correct value for cases where the position is not within the current object.
https://bugs.webkit.org/show_bug.cgi?id=71348
Reviewed by Chris Fleizach.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::lineForPosition):
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2011-12-18 Sam Weinig <sam@webkit.org>
Make EventHandler::handleWheelEvent take const PlatformWheelEvent&
https://bugs.webkit.org/show_bug.cgi?id=74824
Reviewed by Anders Carlsson.
* WebCore.exp.in:
* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent):
* page/EventHandler.h:
* page/blackberry/EventHandlerBlackBerry.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
* page/chromium/EventHandlerChromium.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
* page/efl/EventHandlerEfl.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passWheelEventToWidget):
* page/qt/EventHandlerQt.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
* page/win/EventHandlerWin.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
* page/wx/EventHandlerWx.cpp:
(WebCore::EventHandler::passWheelEventToWidget):
* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::copyTurningVerticalTicksIntoHorizontalTicks):
2011-12-18 James Kozianski <koz@chromium.org>
[chromium] Add worldId parameter to allowScriptExtension()
https://bugs.webkit.org/show_bug.cgi?id=74214
Chromium uses the worldId to determine what extension is running in a
v8 context and knowing that at the time allowScriptExtension() is
called allows us to conditionally inject extension APIs.
Reviewed by Darin Fisher.
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::initContextIfNeeded):
(WebCore::V8DOMWindowShell::createNewContext):
* bindings/v8/V8DOMWindowShell.h:
* bindings/v8/V8IsolatedContext.cpp:
(WebCore::V8IsolatedContext::V8IsolatedContext):
* loader/EmptyClients.h:
(WebCore::EmptyFrameLoaderClient::allowScriptExtension):
* loader/FrameLoaderClient.h:
2011-12-18 Adam Barth <abarth@webkit.org>
Adoption agency iteration limits in HTML parser don't match HTML5 spec
https://bugs.webkit.org/show_bug.cgi?id=74822
Reviewed by Eric Seidel.
Previously, we were using the iteration limits from the old tree
builder. Now we use the iteration limits from the HTML5 specification.
Tests: html5lib/runner.html
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
2011-12-18 Antti Koivisto <antti@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=73954
REGRESSION (r97745): Transitions don't work on links
Reviewed by Andreas Kling.
Test: transitions/visited-link-color.html
Since visited link colors are now part of the RenderStyle, they need to be transitioned
along with the corresponding regular colors.
* page/animation/AnimationBase.cpp:
(WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
(WebCore::PropertyWrapperVisitedAffectedColor::equals):
(WebCore::PropertyWrapperVisitedAffectedColor::blend):
(WebCore::AnimationBase::ensurePropertyMap):
Add new wrapper class that applies both regular and visited color.
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::visitedLinkColor):
(WebCore::InheritedFlags::visitedLinkBackgroundColor):
(WebCore::InheritedFlags::visitedLinkBorderLeftColor):
(WebCore::InheritedFlags::visitedLinkBorderRightColor):
(WebCore::InheritedFlags::visitedLinkBorderBottomColor):
(WebCore::InheritedFlags::visitedLinkBorderTopColor):
(WebCore::InheritedFlags::visitedLinkOutlineColor):
(WebCore::InheritedFlags::visitedLinkColumnRuleColor):
(WebCore::InheritedFlags::visitedLinkTextEmphasisColor):
(WebCore::InheritedFlags::visitedLinkTextFillColor):
(WebCore::InheritedFlags::visitedLinkTextStrokeColor):
Add accessors.
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
Opportunistic fix. Don't know how to test.
2011-12-18 Anders Carlsson <andersca@apple.com>
Set the main frame view scroll position asynchronously
https://bugs.webkit.org/show_bug.cgi?id=74823
Reviewed by Sam Weinig.
* page/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::ScrollingCoordinator):
Initialize m_didDispatchDidUpdateMainFrameScrollPosition to false.
(WebCore::ScrollingCoordinator::didUpdateMainFrameScrollPosition):
Get the scroll position, reset m_didDispatchDidUpdateMainFrameScrollPosition to false and
then call FrameView::setScrollOffset to update the scroll position.
* page/ScrollingCoordinator.h:
* page/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinator::scrollByOnScrollingThread):
Update the scroll position and dispatch ScrollingCoordinator::didUpdateMainFrameScrollPosition on
the main thread if needed.
2011-12-18 Andreas Kling <kling@webkit.org>
JSC/HTMLCollection: Optimize canGetItemsForName().
<http://webkit.org/b/74806>
Reviewed by Sam Weinig.
Add HTMLCollection::hasNamedItem(name) and use that in the JSC bindings'
canGetItemsForName() instead of fetching the list of named items just to
check if it's empty or not.
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::JSHTMLAllCollection::canGetItemsForName):
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::JSHTMLCollection::canGetItemsForName):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::hasNamedItem):
* html/HTMLCollection.h:
2011-12-18 Sam Weinig <sam@webkit.org>
Spruce up PlatformWheelEvent a bit
https://bugs.webkit.org/show_bug.cgi?id=74821
Reviewed by Dan Bernstein.
* dom/WheelEvent.cpp:
(WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator):
* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::directionInvertedFromDevice):
Remove x/y getters in favor of direct access to the IntPoints, and rename
webkitDirectionInvertedFromDevice() to directionInvertedFromDevice() since
it is not an exposed API.
2011-12-18 Anders Carlsson <andersca@apple.com>
Scroll the main frame on the scrolling thread
https://bugs.webkit.org/show_bug.cgi?id=74820
Reviewed by Andreas Kling.
* page/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::handleWheelEvent):
Compute a scroll offset from the wheel event and tell the scrolling thread to scroll by the given offset.
* page/ScrollingCoordinator.h:
* page/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinator::scrollByOnScrollingThread):
Clamp the updated position to the minimum and maximum scrollable position.
(WebCore::ScrollingCoordinator::updateMainFrameScrollLayerPositionOnScrollingThread):
Actually reposition the layer.
2011-12-18 Andreas Kling <kling@webkit.org>
HTMLAllCollection: Get rid of stateful namedItem traversal.
<http://webkit.org/b/74803>
Reviewed by Sam Weinig.
Add a namedItemWithIndex() function to HTMLAllCollection to cover the
document.all(name, index) use-case. This moves the collection traversal
into WebCore and allows us to remove some complexity.
This incidentally fixes a bug where the CollectionCache would point to
the last node returned by document.all(name, index) without the correct
associated node index (because info()->current was getting set without
updating info()->position.) Added a layout test for that.
Test: fast/dom/htmlallcollection-call-with-index-caching-bug.html
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::callHTMLAllCollection):
* bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
(WebCore::V8HTMLAllCollection::callAsFunctionCallback):
Replace collection traversal by calls to namedItemWithIndex().
* html/HTMLCollection.h:
Promoted updateNameCache() to protected (for HTMLAllCollection.)
Demoted checkForNameMatch() to private.
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::namedItemWithIndex):
Added for document.all(name, index). Uses the name/id cache.
* html/HTMLAllCollection.cpp:
* html/HTMLAllCollection.h:
(WebCore::HTMLAllCollection::HTMLAllCollection):
Removed m_idsDone, HTMLAllCollection is now stateless.
2011-12-18 Anders Carlsson <andersca@apple.com>
The scrolling coordinator should know about the main frame scroll layer
https://bugs.webkit.org/show_bug.cgi?id=74817
Reviewed by Andreas Kling.
* page/ScrollingCoordinator.h:
* page/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingThread::threadCallback):
Move the * to where it belongs.
(WebCore::ScrollingCoordinator::setFrameScrollLayer):
Keep track of the underlying CALayer of the frame scroll layer.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::ensureRootLayer):
Call ScrollingCoordinator::setFrameScrollLayer.
2011-12-18 Andreas Kling <kling@webkit.org>
Interacting with GMail message lists is sluggish.
<http://webkit.org/b/74813>
Reviewed by Dan Bernstein.
Add an argument to collapsed*Border() to control whether the border
color is computed or not. This allows us to avoid expensive work when
we're only interested in the metrics.
RenderStyle::visitedDependentColor() was very hot (4.5%) when hit-testing
on GMail and this removes its usage altogether.
This should be an improvement for table rendering as well, since it was
all happening below RenderBox::overflowClipRect().
* rendering/RenderTableCell.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::collapsedLeftBorder):
(WebCore::RenderTableCell::collapsedRightBorder):
(WebCore::RenderTableCell::collapsedTopBorder):
(WebCore::RenderTableCell::collapsedBottomBorder):
Add and propagate an IncludeBorderColorOrNot argument that decides
whether we compute the CollapsedBorderValue's color.
(WebCore::RenderTableCell::collapsedStartBorder):
(WebCore::RenderTableCell::collapsedEndBorder):
Renamed start & end to startColorProperty & endColorProperty
for clarity. Also same modifications as the above functions.
(WebCore::RenderTableCell::collapsedBeforeBorder):
(WebCore::RenderTableCell::collapsedAfterBorder):
Renamed before & after to beforeColorProperty & afterColorProperty
for clarity. Also same modifications as the above functions.
(WebCore::RenderTableCell::borderHalfStart):
(WebCore::RenderTableCell::borderHalfEnd):
(WebCore::RenderTableCell::borderHalfBefore):
(WebCore::RenderTableCell::borderHalfAfter):
Pass DoNotIncludeBorderColor to collapsed*Border() since we only care
about the metrics here.
2011-12-18 Anders Carlsson <andersca@apple.com>
The scrolling coordinator should keep track of the main frame geometry
https://bugs.webkit.org/show_bug.cgi?id=74816
Reviewed by Andreas Kling.
* page/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::syncFrameGeometry):
Update the frame geometry accordingly when it changes.
* page/ScrollingCoordinator.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
Call ScrollingCoordinator::syncFrameGeometry.
(WebCore::RenderLayerCompositor::scrollingCoordinator):
Add new getter.
2011-12-17 Sam Weinig <sam@webkit.org>
Move timestamp down from PlatformEvent subclasses to the base class
https://bugs.webkit.org/show_bug.cgi?id=74805
Reviewed by Anders Carlsson.
* platform/PlatformEvent.h:
(WebCore::PlatformEvent::type):
(WebCore::PlatformEvent::timestamp):
(WebCore::PlatformEvent::PlatformEvent):
* platform/PlatformGestureEvent.h:
(WebCore::PlatformGestureEvent::PlatformGestureEvent):
* platform/PlatformMouseEvent.h:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
(WebCore::PlatformMouseEvent::clickCount):
* platform/PlatformTouchEvent.h:
(WebCore::PlatformTouchEvent::PlatformTouchEvent):
* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/efl/PlatformKeyboardEventEfl.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/efl/PlatformMouseEventEfl.cpp:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/efl/PlatformTouchEventEfl.cpp:
(WebCore::PlatformTouchEvent::PlatformTouchEvent):
* platform/efl/PlatformWheelEventEfl.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/gtk/PlatformKeyboardEventGtk.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/gtk/PlatformWheelEventGtk.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/mac/KeyEventMac.mm:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/mac/PlatformMouseEventMac.mm:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/mac/WheelEventMac.mm:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/qt/WheelEventQt.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/win/KeyEventWin.cpp:
(WebCore::singleCharacterString):
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/win/PlatformMouseEventWin.cpp:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/win/WheelEventWin.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/wx/KeyboardEventWx.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/wx/MouseEventWx.cpp:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/wx/MouseWheelEventWx.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
2011-12-18 Anders Carlsson <andersca@apple.com>
Add a scrolling thread to the scrolling coordinator
https://bugs.webkit.org/show_bug.cgi?id=74814
Reviewed by Andreas Kling.
* WebCore.exp.in:
Export ScrollingCoordinator::handleWheelEvent.
* WebCore.xcodeproj/project.pbxproj:
Add ScrollingCoordinatorMac.mm
* page/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::handleWheelEvent):
Add a stub function.
* page/ScrollingCoordinator.h:
* page/mac/ScrollingCoordinatorMac.mm: Added.
Add a ScrollingThread object which creates a thread and attaches a run loop source
to it, allowing for functions to be dispatched and run on said thread.
(WebCore::ScrollingCoordinator::isScrollingThread):
Call ScrollingThread::isCurrentThread.
(WebCore::ScrollingCoordinator::dispatchOnScrollingThread):
Call ScrollingThread::dispatch.
2011-12-18 Anders Carlsson <andersca@apple.com>
EventDispatcher should keep track of all scrolling coordinators
https://bugs.webkit.org/show_bug.cgi?id=74810
Reviewed by Andreas Kling.
Export symbols needed by WebKit2.
* WebCore.exp.in:
2011-12-18 Raul Hudea <rhudea@adobe.com>
Add transform function completion to web-inspector
Web Inspector: Auto-complete transform functions for -webkit-transform
https://bugs.webkit.org/show_bug.cgi?id=74730
Reviewed by Pavel Feldman.
No new test. Trivial change.
* inspector/front-end/CSSKeywordCompletions.js:
2011-12-18 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: chromium profiler: change default root type for retaining paths from GC Roots to DOMWindow.
https://bugs.webkit.org/show_bug.cgi?id=74697
Reviewed by Pavel Feldman.
* inspector/front-end/DetailedHeapshotView.js:
(WebInspector.DetailedHeapshotView.prototype.get isTracingToWindowObjects):
2011-12-18 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: Switch to type-safe JSON ConsoleMessage.cpp, InspectorDOMAgent.cpp, InspectorDebuggerAgent.cpp, ScriptCallFrame.cpp
https://bugs.webkit.org/show_bug.cgi?id=74549
Reviewed by Pavel Feldman.
Work with InspectorObject is replaced with type-safe generated API
usage.
Inspector.json and Inspector-0.1.json are also changed to better
reflect data types that are actually being transmitted.
* inspector/ConsoleMessage.cpp:
(WebCore::ConsoleMessage::addToFrontend):
* inspector/Inspector-0.1.json:
* inspector/Inspector.json:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForNode):
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::resolveBreakpoint):
* inspector/ScriptCallFrame.cpp:
(WebCore::ScriptCallFrame::buildInspectorObject):
2011-12-18 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: CodeGeneratorInspector.py: use generated types in method parameters
https://bugs.webkit.org/show_bug.cgi?id=74661
Reviewed by Pavel Feldman.
Type binding object is added to raw_type object.
* inspector/CodeGeneratorInspector.py:
(TypeBindings.create_for_named_type_declaration.EnumBinding.generate_type_builder):
(TypeBindings.create_for_named_type_declaration.EnumBinding.get_in_c_type_text):
(TypeBindings.create_for_named_type_declaration.EnumBinding):
(TypeBindings.create_for_named_type_declaration.EnumBinding.reduce_to_raw_type):
(TypeBindings.create_for_named_type_declaration.PlainString.generate_type_builder):
(TypeBindings.create_for_named_type_declaration.PlainString.reduce_to_raw_type):
(TypeBindings.create_for_named_type_declaration.PlainString):
(TypeBindings.create_for_named_type_declaration.PlainString.get_in_c_type_text):
(TypeBindings):
(TypeBindings.create_for_named_type_declaration.ClassBinding):
(get_in_c_type_text):
(reduce_to_raw_type):
(PlainObjectBinding.generate_type_builder):
(PlainObjectBinding.get_in_c_type_text):
(PlainObjectBinding):
(PlainObjectBinding.reduce_to_raw_type):
(RawTypesBinding.generate_type_builder):
(RawTypesBinding.get_in_c_type_text):
(RawTypesBinding):
(RawTypesBinding.reduce_to_raw_type):
(resolve_param_type.RawTypeBinding.reduce_to_raw_type):
(resolve_param_type.RawTypeBinding):
(resolve_param_type.RawTypeBinding.get_in_c_type_text):
(resolve_param_type):
(Generator.process_event):
2011-12-18 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r103169.
http://trac.webkit.org/changeset/103169
https://bugs.webkit.org/show_bug.cgi?id=74809
it broke compilation on many platforms (Requested by loislo_
on #webkit).
* WebCore.gypi:
* platform/ColorChooser.cpp: Renamed from Source/WebKit/chromium/src/ColorChooserProxy.h.
(WebCore::ColorChooserClient::~ColorChooserClient):
(WebCore::ColorChooserClient::newColorChooser):
(WebCore::ColorChooserClient::discardChooser):
(WebCore::ColorChooser::ColorChooser):
(WebCore::ColorChooser::create):
(WebCore::ColorChooser::~ColorChooser):
(WebCore::ColorChooser::didChooseColor):
(WebCore::ColorChooser::didCleanup):
2011-12-18 Alexandru Chiculita <achicu@adobe.com>
[CSS Shaders] Add FECustomFilter that renders custom filters
https://bugs.webkit.org/show_bug.cgi?id=73317
Using a GraphicsContext3D to render the shaders in GPU, read the
result back and use it in the software filters pipeline.
Reviewed by Chris Marrin.
Test: css3/filters/effect-custom.html
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* loader/cache/CachedShader.cpp:
(WebCore::CachedShader::CachedShader):
(WebCore::CachedShader::shaderString):
(WebCore::CachedShader::data):
* loader/cache/CachedShader.h:
* platform/graphics/filters/CustomFilterMesh.cpp: Added.
(WebCore::MeshGenerator::MeshGenerator):
(WebCore::MeshGenerator::vertices):
(WebCore::MeshGenerator::indices):
(WebCore::MeshGenerator::points):
(WebCore::MeshGenerator::pointsCount):
(WebCore::MeshGenerator::tiles):
(WebCore::MeshGenerator::tilesCount):
(WebCore::MeshGenerator::indicesCount):
(WebCore::MeshGenerator::floatsPerVertex):
(WebCore::MeshGenerator::vertexCount):
(WebCore::MeshGenerator::addTile):
(WebCore::MeshGenerator::addAttachedMeshIndex):
(WebCore::MeshGenerator::generateAttachedMesh):
(WebCore::MeshGenerator::addDetachedMeshVertexAndIndex):
(WebCore::MeshGenerator::generateDetachedMesh):
(WebCore::MeshGenerator::addPositionAttribute):
(WebCore::MeshGenerator::addTexCoordAttribute):
(WebCore::MeshGenerator::addMeshCoordAttribute):
(WebCore::MeshGenerator::addTriangleCoordAttribute):
(WebCore::MeshGenerator::addAttachedMeshVertexAttributes):
(WebCore::MeshGenerator::addDetachedMeshVertexAttributes):
(WebCore::MeshGenerator::dumpBuffers):
(WebCore::CustomFilterMesh::CustomFilterMesh):
(WebCore::CustomFilterMesh::~CustomFilterMesh):
* platform/graphics/filters/CustomFilterMesh.h: Added.
(WebCore::CustomFilterMesh::create):
(WebCore::CustomFilterMesh::verticesBufferObject):
(WebCore::CustomFilterMesh::bytesPerVertex):
(WebCore::CustomFilterMesh::elementsBufferObject):
(WebCore::CustomFilterMesh::indicesCount):
(WebCore::CustomFilterMesh::meshBox):
(WebCore::CustomFilterMesh::meshType):
* platform/graphics/filters/CustomFilterShader.cpp: Added.
(WebCore::CustomFilterShader::defaultVertexShaderString):
(WebCore::CustomFilterShader::defaultFragmentShaderString):
(WebCore::CustomFilterShader::CustomFilterShader):
(WebCore::CustomFilterShader::~CustomFilterShader):
* platform/graphics/filters/CustomFilterShader.h: Added.
* platform/graphics/filters/FECustomFilter.cpp: Added.
(WebCore::orthoMatrix):
(WebCore::FECustomFilter::FECustomFilter):
(WebCore::FECustomFilter::create):
(WebCore::FECustomFilter::platformApplySoftware):
(WebCore::FECustomFilter::dump):
(WebCore::FECustomFilter::externalRepresentation):
* platform/graphics/filters/FECustomFilter.h: Added.
* platform/graphics/gpu/Texture.cpp:
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::TransformationMatrix::toColumnMajorFloatArray):
* platform/graphics/transforms/TransformationMatrix.h:
* rendering/FilterEffectObserver.h: Copied from Source/WebCore/loader/cache/CachedShader.cpp.
(WebCore::FilterEffectObserver::~FilterEffectObserver):
* rendering/FilterEffectRenderer.cpp:
(WebCore::isWebGLEnabled):
(WebCore::FilterEffectRenderer::FilterEffectRenderer):
(WebCore::FilterEffectRenderer::build):
(WebCore::FilterEffectRenderer::notifyFinished):
* rendering/FilterEffectRenderer.h:
(WebCore::FilterEffectRenderer::create):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateOrRemoveFilterEffect):
(WebCore::RenderLayer::filterNeedsRepaint):
* rendering/RenderLayer.h:
* rendering/style/StyleCachedShader.h:
(WebCore::StyleCachedShader::cachedShader):
* rendering/style/StyleShader.h:
(WebCore::StyleShader::cachedShader):
2011-12-18 Keishi Hattori <keishi@webkit.org>
Implement <input type=color> UI WebKit chromium part
https://bugs.webkit.org/show_bug.cgi?id=65897
Reviewed by Darin Fisher.
* WebCore.gypi: Added ColorChooser.h and ColorChooserClient.h
2011-12-17 Keishi Hattori <keishi@webkit.org>
Refactor input type color WebCore part
https://bugs.webkit.org/show_bug.cgi?id=74591
Reviewed by Kent Tamura.
Changing ColorChooser to address issues raised in Bug 65897.
Chrome::createColorChooser will return a WebCore::ColorChooser instance
so the WebCore side (ColorInputType) and call the WebKit side. We pass the ColorChooserClient as an argument
to Chrome::createColorChooser so the WebKit side can call callbacks, didEndChooser and didChooseColor.
* html/ColorInputType.cpp:
(WebCore::ColorInputType::~ColorInputType):
(WebCore::ColorInputType::setValue):
(WebCore::ColorInputType::handleDOMActivateEvent): Calls createColorChooser to open the color chooser.
(WebCore::ColorInputType::detach):
(WebCore::ColorInputType::didEndChooser): Release the ColorChooser object.
(WebCore::ColorInputType::endColorChooser):
(WebCore::ColorInputType::updateColorSwatch): Added argument so it will compile again.
* html/ColorInputType.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::selectColorInColorChooser):
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::createColorChooser):
* loader/FrameLoader.cpp:
* page/Chrome.cpp:
(WebCore::Chrome::createColorChooser): Opens the color chooser. Returns a ColorChooser PassOwnPtr.
* page/Chrome.h:
* page/ChromeClient.h:
* platform/ColorChooser.h:
(WebCore::ColorChooser::~ColorChooser):
(WebCore::ColorChooser::setSelectedColor):
(WebCore::ColorChooser::endChooser):
* platform/ColorChooserClient.h: Added.
2011-12-17 Sam Weinig <sam@webkit.org>
Make PlatformTouchEvent inherit from PlatformEvent
https://bugs.webkit.org/show_bug.cgi?id=74777
Reviewed by Andreas Kling.
* platform/PlatformEvent.h:
Add TouchEvent types.
* platform/PlatformTouchEvent.h:
(WebCore::PlatformTouchEvent::PlatformTouchEvent):
Make inherit from PlatformEvent.
* platform/blackberry/PlatformTouchEventBlackBerry.cpp:
(WebCore::touchEventType):
(WebCore::PlatformTouchEvent::PlatformTouchEvent):
* platform/efl/PlatformTouchEventEfl.cpp:
(WebCore::PlatformTouchEvent::PlatformTouchEvent):
* platform/qt/PlatformTouchEventQt.cpp:
(WebCore::PlatformTouchEvent::PlatformTouchEvent):
Make necessary changes to work with new base class.
2011-12-17 Andreas Kling <kling@webkit.org>
Cache and reuse the HTMLAllCollection returned by document.all.
<http://webkit.org/b/74768>
Reviewed by Antti Koivisto.
Let Document cache the document.all collection, just like we do for
the other collections (.links, .images, etc.)
This is primarily a memory optimization, as repeated calls to
document.all will no longer cause collection objects to stack up.
Tests: fast/dom/document-collection-idempotence.html
fast/dom/gc-9.html
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::all):
Cache the HTMLAllCollection and reuse it across calls instead of
creating a new one each time.
* html/HTMLAllCollection.h:
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::create):
(WebCore::HTMLAllCollection::HTMLAllCollection):
Make the HTMLAllCollection constructor take a Document* to enforce
the fact that it's the only way it should ever be created.
* html/HTMLAllCollection.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
Custom reachability code for JSC, same as HTMLCollection.
2011-12-17 Andreas Kling <kling@webkit.org>
HTMLCollection: Simplify itemAfter().
<http://webkit.org/b/74795>
Reviewed by Antti Koivisto.
Whether to do deep traversal of children depends on m_type which
doesn't change after construction, so move that decision there
by caching it in a "m_includeChildren" bit.
Also factored out the big switch statement in itemAfter() into
an isAcceptableElement() function.
Last and least, use fastHasAttribute() to check for itempropAttr
since it's not SVG animatable.
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::shouldIncludeChildren):
(WebCore::HTMLCollection::isAcceptableElement):
(WebCore::HTMLCollection::itemAfter):
* html/HTMLCollection.h:
2011-12-17 Andreas Kling <kling@webkit.org>
TagNodeList: Optimize nodeMatches() for the common case.
<http://webkit.org/b/74796>
Reviewed by Antti Koivisto.
Reject based on tag name mismatch before comparing the namespaces,
as this case is vastly more common.
nodeMatches() is very hot on the DOM Query (Dojo) test on Dromaeo.
This change takes it from 8.3% to 7.7% on my MBP.
* dom/TagNodeList.cpp:
(WebCore::TagNodeList::nodeMatches):
2011-12-17 Andreas Kling <kling@webkit.org>
NameNodeList: Use fastGetAttribute() in nodeMatches().
<http://webkit.org/b/74797>
Reviewed by Darin Adler.
It's safe and slightly more efficient to use fastGetAttribute()
for HTMLNames::nameAttr here.
* dom/NameNodeList.cpp:
(WebCore::NameNodeList::nodeMatches):
2011-12-17 Andreas Kling <kling@webkit.org>
CSSPrimitiveValue: Inline getIdent().
<http://webkit.org/b/74793>
Reviewed by Antti Koivisto.
Inline the trivial getIdent(), the same as its getFoo() siblings.
* css/CSSPrimitiveValue.cpp:
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::getIdent):
2011-12-17 Andreas Kling <kling@webkit.org>
CSSStyleSelector: Clean up matchRules().
<http://webkit.org/b/74794>
Reviewed by Antti Koivisto.
- Early return from the isCollectingRulesOnly() path to reduce nesting.
- Move the creation of m_ruleList out of the loop that builds the list.
- Removed some comments from the Captain Obvious department.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::matchRules):
2011-12-17 Andreas Kling <kling@webkit.org>
RuleSet: Remove style sheet null-check in addRulesFromSheet().
<http://webkit.org/b/74792>
Reviewed by Antti Koivisto.
Replace the "sheet" null-check in addRulesFromSheet() by an assertion.
The only call-site where it could be null was when adding rules from
an @import'ed sheet, so add a check there instead.
* css/CSSStyleSelector.cpp:
(WebCore::RuleSet::addRulesFromSheet):
2011-12-17 Andreas Kling <kling@webkit.org>
CSSStyleSelector: Clean up getColorFromPrimitiveValue().
<http://webkit.org/b/74789>
Reviewed by Antti Koivisto.
Rename getColorFromPrimitiveValue() to colorFromPrimitiveValue() and rework
it to be a bit more readable.
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::addStops):
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyColor::applyValue):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
(WebCore::CSSStyleSelector::colorFromPrimitiveValue):
(WebCore::CSSStyleSelector::createFilterOperations):
* css/CSSStyleSelector.h:
* css/SVGCSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applySVGProperty):
2011-12-17 Kenichi Ishibashi <bashi@chromium.org>
Text dispappear when SVG font has no latin character
https://bugs.webkit.org/show_bug.cgi?id=71765
Reviewed by Nikolas Zimmermann.
Initialize SVG font metrics even if the font doesn't contain latin characters.
Test: svg/custom/svg-fonts-no-latin-glyph.html
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::initializeFontData): Initializes metrics even if the zeroGlyphPage doesn't exist.
2011-12-17 David Barton <dbarton@mathscribe.com>
Radical sign drawn incorrectly due to refactoring typo
https://bugs.webkit.org/show_bug.cgi?id=74780
Reviewed by Dan Bernstein.
LayoutTests/mathml/presentation/roots.xhtml shows the bug, but apparently its .png
checksum is ok so run-webkit-tests can't detect the problem.
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::paint):
In revision 88250, one paintOffset should have been adjustedPaintOffset.
2011-12-17 Adrienne Walker <enne@google.com>
[chromium] Reverting r103011, r103135 due to Aura test failures
Unreviewed gardening.
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::~ContentLayerChromium):
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::notifySyncRequired):
* platform/graphics/chromium/GraphicsLayerChromium.h:
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerChromium::paintContentsIfDirty):
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setLayerTreeHost):
(WebCore::LayerChromium::setNeedsCommit):
(WebCore::LayerChromium::setParent):
(WebCore::LayerChromium::setMaskLayer):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::setReplicaLayer):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::setLayerTreeHost):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::~CCLayerTreeHost):
(WebCore::CCLayerTreeHost::didRecreateGraphicsContext):
(WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
(WebCore::CCLayerTreeHost::paintLayerContents):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCLayerTreeHost::setRootLayer):
2011-12-16 Chris Marrin <cmarrin@apple.com>
Hardware acceleration of W3C Filter Effects
https://bugs.webkit.org/show_bug.cgi?id=68479
Reviewed by Simon Fraser.
Tests: css3/filters/effect-blur-hw.html
css3/filters/effect-combined-hw.html
css3/filters/effect-drop-shadow-hw.html
css3/filters/effect-grayscale-hw.html
css3/filters/effect-hue-rotate-hw.html
css3/filters/effect-invert-hw.html
css3/filters/effect-opacity-hw.html
css3/filters/effect-saturate-hw.html
css3/filters/effect-sepia-hw.html
Implement hardware acceleration of filters. If a filter is
on a RenderLayer and that layer has a GraphicsLayer, a test
is done to see if the desired filter can be rendered in hardware.
If so, skip rendering it when painting, and add the filters to the
CALayer. Currently Mac only, using CoreImage. Animation is done in
software, with the filters being recreated every frame. There are
some fidelity issues with the software renderer, but those will
be dealt with as bugs to be fixed.
* platform/graphics/GraphicsLayer.h: Pass down FilterOperations
(WebCore::GraphicsLayer::filter):
(WebCore::GraphicsLayer::setFilter):
* platform/graphics/ca/GraphicsLayerCA.cpp: Deferred passdown of FilterOperations to PlatformCALayer
(WebCore::GraphicsLayerCA::setFilter):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateFilter):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm: Mac implementation using CI
(PlatformCALayer::setFilter):
(PlatformCALayer::filterCanBeComposited): Static function to tell GraphicsLayer if this Filter object can be rendered
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::operator=):
* platform/graphics/filters/FilterOperations.h:
(WebCore::FilterOperations::FilterOperations):
* rendering/RenderLayer.cpp: Pass filter object to GraphicsLayer
(WebCore::RenderLayer::rendersFilter):
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::updateOrRemoveFilterEffect):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateLayerFilter):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
* rendering/RenderLayerBacking.h:
(WebCore::RenderLayerBacking::canCompositeFilter):
2011-12-17 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK build fix after r103131.
* GNUmakefile.list.am: Fix typo... s/.cop/.cpp
2011-12-16 Benjamin Poulain <bpoulain@apple.com>
FEComposite does not build when you disable filters on ARMv7
https://bugs.webkit.org/show_bug.cgi?id=74772
Reviewed by David Kilzer.
Add the missing ENABLE(FILTERS).
* platform/graphics/filters/arm/FECompositeArithmeticNEON.cpp:
* platform/graphics/filters/arm/FECompositeArithmeticNEON.h:
2011-12-16 Ryosuke Niwa <rniwa@webkit.org>
Mac build fix after r103104.
* WebCore.xcodeproj/project.pbxproj:
2011-12-16 Adam Klein <adamk@chromium.org>
Consolidate before-advice regarding attribute modification into a single method
https://bugs.webkit.org/show_bug.cgi?id=74752
Reviewed by Ryosuke Niwa.
Adds a willModifyAttribute method to Element, meant to be called
before an attribute on that Element is added/removed/changed.
Replace most calls to Element::updateId and all calls to
Element::enqueueAttributesMutationRecordIfRequested with calls to
willModifyAttribute. Moreover, enqueueAttributesMutation... can now
be private since its only caller is willModifyAttribute.
The only remaining direct calls to updateId are in cases the entire
NamedNodeMap is being replaced. These are implementation details of
WebCore that shouldn't be exposed via MutationObservers.
No new tests, no expected change in behavior.
* dom/Attr.cpp:
(WebCore::Attr::setValue):
(WebCore::Attr::childrenChanged): Besides the above change, use a
StringBuilder to build up value, and only do String -> AtomicString
conversion once.
* dom/Element.cpp:
(WebCore::Element::setAttributeInternal):
* dom/Element.h:
(WebCore::Element::willModifyAttribute):
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::setNamedItem):
(WebCore::NamedNodeMap::removeNamedItem):
2011-12-16 James Robinson <jamesr@chromium.org>
[chromium] CCLayerDelegate and WebLayerClient do not need notifySyncRequired
https://bugs.webkit.org/show_bug.cgi?id=74376
Reviewed by Kenneth Russell.
CCLayerDelegate::notifySyncRequired is an odd bit of interface that we originally cargo-culted from the
CoreAnimation compositor implementation. It is a mechanism by which a LayerChromium instance may request a new
frame via its CCLayerDelegate, which in WebCore is always a GraphicsLayerClient. In practice, all
implementations eventually ended up routing to CCLayerTreeHost::setNeedsCommit which then made the proper
scheduling decision.
This patch routes all changes that would have gone through CCLayerDelegate::notifySyncRequired directly to
CCLayerTreeHost::setNeedsCommit, which greatly simplifies the scheduling logic.
There is a large amount of unit test coverage for this change, largely in LayerChromiumTest
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
* platform/graphics/chromium/GraphicsLayerChromium.h:
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setNeedsCommit):
(WebCore::LayerChromium::insertChild):
* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::~CCLayerTreeHost):
(WebCore::CCLayerTreeHost::setRootLayer):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
* platform/graphics/chromium/cc/CCScopedThreadProxy.h:
(WebCore::CCScopedThreadProxy::runTaskIfNotShutdown):
2011-12-16 Adam Klein <adamk@chromium.org>
Fix typo in MarkupTokenBase: rename takeAtributes to takeAttributes
https://bugs.webkit.org/show_bug.cgi?id=74766
Reviewed by Darin Adler.
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
(WebCore::HTMLConstructionSite::insertScriptElement):
(WebCore::HTMLConstructionSite::createElement):
(WebCore::HTMLConstructionSite::createHTMLElement):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::attributesForIsindexInput):
* xml/parser/MarkupTokenBase.h:
(WebCore::AtomicMarkupTokenBase::takeAttributes):
2011-12-16 Adam Barth <abarth@webkit.org>
<option><span><option> doesn't parse correctly
https://bugs.webkit.org/show_bug.cgi?id=74760
Reviewed by Eric Seidel.
The <option> start tag shouldn't be quite as aggressive in closing open
<option> tags. I'm not sure whether this was a change in the spec or a
mistranscription, but this patch causes us to match the spec. I've
checked the other optionTag checks, and they all seem to be correct.
* html/parser/HTMLTreeBuilder.cpp:
2011-12-16 Rafael Weinstein <rafaelw@chromium.org>
[MutationObservers] Remove platform-dependent code in Document.cpp resulting from Mutation Event histogram collection
https://bugs.webkit.org/show_bug.cgi?id=73026
Reviewed by Ryosuke Niwa.
This patch adds platform/HistogramSupport which has an empty implementation for all ports
except Chromium.
No tests need. This patch is just a refactor.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::histogramMutationEventUsage):
(WebCore::Document::~Document):
* platform/HistogramSupport.h: Added.
(WebCore::HistogramSupport::histogramEnumeration):
* platform/chromium/HistogramSupportChromium.cpp: Added.
(WebCore::HistogramSupport::histogramEnumeration):
2011-12-16 Brady Eidson <beidson@apple.com>
<rdar://problem/10576732> and https://bugs.webkit.org/show_bug.cgi?id=74533
REGRESSION(r102619): Reproducible crash closing window with video + poster image inside an object element
Reviewed by Darin Adler.
Test: media/crash-closing-page-with-media-as-plugin-fallback.html
At some point documentWillBecomeInactive() was overloaded to not only notify elements they were going in to the page
cache but also do some other work that was necessary during Document teardown.
This crash occurs because we're notifying elements they're going in to the page cache at document teardown, so this
patch breaks that work back out in to a separate function.
* dom/Document.cpp:
(WebCore::Document::detach): Remove obsolete comment.
(WebCore::Document::documentWillBecomeInactive): Handle only accelerated compositing cleanup.
(WebCore::Document::documentWillSuspendForPageCache): Call documentWillBecomeInactive before notifying elements of suspension.
(WebCore::Document::documentDidResumeFromPageCache):
(WebCore::Document::registerForPageCacheSuspensionCallbacks):
(WebCore::Document::unregisterForPageCacheSuspensionCallbacks):
* dom/Document.h:
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore): Call the renamed documentDidResumeFromPageCache.
(WebCore::CachedFrame::CachedFrame): Call documentWillSuspendForPageCache instead of documentDidBecomeInactive.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad): Call the renamed documentDidResumeFromPageCache.
* dom/Element.h:
(WebCore::Element::documentWillSuspendForPageCache): Renamed from documentWillBecomeInactive()
(WebCore::Element::documentDidResumeFromPageCache): Renamed from documentDidBecomeActive()
Change to the renamed registration and callbacks functions in the handful of classes that use them:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::~HTMLFormElement):
(WebCore::HTMLFormElement::parseMappedAttribute):
(WebCore::HTMLFormElement::documentDidResumeFromPageCache):
(WebCore::HTMLFormElement::willMoveToNewOwnerDocument):
(WebCore::HTMLFormElement::didMoveToNewOwnerDocument):
* html/HTMLFormElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::~HTMLInputElement):
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::parseMappedAttribute):
(WebCore::HTMLInputElement::needsSuspensionCallback):
(WebCore::HTMLInputElement::registerForSuspensionCallbackIfNeeded):
(WebCore::HTMLInputElement::unregisterForSuspensionCallbackIfNeeded):
(WebCore::HTMLInputElement::documentDidResumeFromPageCache):
(WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
(WebCore::HTMLInputElement::didMoveToNewOwnerDocument):
* html/HTMLInputElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::~HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::createRenderer):
(WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument):
(WebCore::HTMLPlugInImageElement::didMoveToNewOwnerDocument):
(WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
(WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
* html/HTMLPlugInImageElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::SVGSVGElement):
(WebCore::SVGSVGElement::~SVGSVGElement):
(WebCore::SVGSVGElement::willMoveToNewOwnerDocument):
(WebCore::SVGSVGElement::didMoveToNewOwnerDocument):
(WebCore::SVGSVGElement::documentWillSuspendForPageCache):
(WebCore::SVGSVGElement::documentDidResumeFromPageCache):
* svg/SVGSVGElement.h:
2011-12-16 Eric Penner <epenner@google.com>
[chromium] Need to prepaint tiles in TiledLayerChromium
https://bugs.webkit.org/show_bug.cgi?id=72686
Reviewed by James Robinson.
Tests: TiledLayerChromiumTest (idlePaintOutOfMemory, pushIdlePaintTiles)
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::idlePaintContentsIfDirty): added idle paint function
* platform/graphics/chromium/ContentLayerChromium.h: ditto
* platform/graphics/chromium/LayerChromium.h: ditto
(WebCore::LayerChromium::idlePaintContentsIfDirty): ditto
* platform/graphics/chromium/TextureManager.cpp:
(WebCore::TextureManager::protectTexture): removed assert for protecting a texture twice
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::TiledLayerChromium):
(WebCore::TiledLayerChromium::cleanupResources):
(WebCore::TiledLayerChromium::updateCompositorResources): refactoring to use tile indices
(WebCore::TiledLayerChromium::prepareToUpdateTiles): refactored common code and made idle/visible versions
(WebCore::TiledLayerChromium::prepareToUpdate): ditto
(WebCore::TiledLayerChromium::prepareToUpdateIdle): ditto
(WebCore::TiledLayerChromium::needsIdlePaint):
(WebCore::TiledLayerChromium::idlePaintRect):
* platform/graphics/chromium/TiledLayerChromium.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::CCLayerTreeHost):
(WebCore::CCLayerTreeHost::compositeAndReadback): set flag to avoid idle paint durring composite and readback
(WebCore::CCLayerTreeHost::updateLayers): added idle flag parameter
(WebCore::CCLayerTreeHost::paintContentsIfDirty): ditto
(WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface): ditto
(WebCore::CCLayerTreeHost::paintLayerContents): chooses idle or visible paint
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
2011-12-16 Dean Jackson <dino@apple.com>
Miscellaneous Filter updates to align with spec
https://bugs.webkit.org/show_bug.cgi?id=74736
Reviewed by Simon Fraser.
Combine a bunch of small updates to filters where
we were not compliant with the specification.
- blur() only takes one value, not two
- blur() does not accept percentages. This allowed us
to stop passing the borderBoxSize around while building
the filter chain or calculating visual overflow.
- gamma() and sharpen() removed
- brightness() and contrast() added
Tests: css3/filters/effect-brightness.html
css3/filters/effect-contrast.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::valueForFilter): Create new
variations on component transfer functions for brightness() and
contrast() effects. Also remove sharpen() and gamma().
* css/CSSParser.cpp:
(WebCore::filterInfoForName):
(WebCore::CSSParser::parseBuiltinFilterArguments): Ditto, and blur
only takes one argument.
* css/CSSStyleSelector.cpp:
(WebCore::filterOperationForType):
(WebCore::CSSStyleSelector::createFilterOperations): Ditto, and
use ->isPercentage() to test rather than getting the type.
* css/WebKitCSSFilterValue.cpp:
(WebCore::WebKitCSSFilterValue::customCssText):
* css/WebKitCSSFilterValue.h:
* css/WebKitCSSFilterValue.idl: Remove sharpen and gamma, add
brightness and contrast.
* platform/graphics/filters/FilterOperation.cpp:
(WebCore::BlurFilterOperation::blend): Blurs only need to blend
between one standard deviation parameter.
* platform/graphics/filters/FilterOperation.h: Remove sharpen and
gamma, add brightness and contrast.
(WebCore::BlurFilterOperation::create):
(WebCore::BlurFilterOperation::stdDeviation):
(WebCore::BlurFilterOperation::operator==):
(WebCore::BlurFilterOperation::BlurFilterOperation): Blur only takes
one standard deviation / radius parameter.
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::outsetSizeForBlur):
(WebCore::FilterOperations::getOutsets): No need for borderBox now.
* platform/graphics/filters/FilterOperations.h:
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build): Build new effect types.
* rendering/FilterEffectRenderer.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::addVisualEffectOverflow): No need to pass
borderBox size when calculating overflow on filter.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateOrRemoveFilterEffect):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::getFilterOutsets): Ditto.
2011-12-16 Andreas Kling <kling@webkit.org>
Unreviewed debug build fix after r103115.
* dom/Document.cpp:
(WebCore::Document::cachedCollection):
2011-12-16 Mark Hahnenberg <mhahnenberg@apple.com>
Windows test fix
No new tests.
Unreviewed test fix. All Windows tests were crashing when objects who were pointing to
static data members across DLL boundaries were getting garbage in their pointers.
* WebCore.exp.in:
* bindings/js/JSDOMWrapper.cpp:
* bindings/js/JSDOMWrapper.h:
2011-12-16 Ryosuke Niwa <rniwa@webkit.org>
Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step
https://bugs.webkit.org/show_bug.cgi?id=74748
Reviewed by Eric Seidel.
Renamed registerCommandForUndo and registerCommandForRedo to
registerUndoStep and registerRedoStep respectively.
* editing/Editor.cpp:
(WebCore::Editor::appliedEditing):
(WebCore::Editor::unappliedEditing):
(WebCore::Editor::reappliedEditing):
* loader/EmptyClients.h:
(WebCore::EmptyEditorClient::registerUndoStep):
(WebCore::EmptyEditorClient::registerRedoStep):
* page/EditorClient.h:
2011-12-16 Tim Horton <timothy_horton@apple.com>
Canvas should respect backing store scale ratio when used as drawImage() source
https://bugs.webkit.org/show_bug.cgi?id=74758
<rdar://problem/10350194>
Reviewed by Simon Fraser.
Interpret the source rectangle passed into drawImage() when using a Canvas source in the source Canvas coordinate space,
instead of in the backing store coordinate space, without changing the behavior of drawImage(canvas, x, y).
No new tests.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::convertDeviceToLogical):
* html/HTMLCanvasElement.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawImage):
2011-12-16 Anders Carlsson <andersca@apple.com>
Subpixel antialiasing not working in tiled mode
https://bugs.webkit.org/show_bug.cgi?id=74759
Reviewed by Simon Fraser.
Call setContentsOpaque(true) on the main frame render view layer so subpixel aa will be used
when drawing text into that layer.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2011-12-16 Ryosuke Niwa <rniwa@webkit.org>
invalidateNodeListsCacheAfterAttributeChanged has too many callers
https://bugs.webkit.org/show_bug.cgi?id=74692
Reviewed by Sam Weinig.
Call invalidateNodeListsCacheAfterAttributeChanged in Element::updateAfterAttributeChanged instead of
parsedMappedAttribute of various elements. Also make invalidateNodeListsCacheAfterAttributeChanged take
the qualified name of the changed attribute so that we can exit early when the changed attribute isn't
one of attributes we care.
In addition, added a missing call to invalidateNodeListsCacheAfterAttributeChanged in Attr::setValue.
Test: fast/dom/Attr/invalidate-nodelist-after-attr-setvalue.html
* dom/Attr.cpp:
(WebCore::Attr::childrenChanged):
* dom/Element.cpp:
(WebCore::Element::updateAfterAttributeChanged):
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::addAttribute):
(WebCore::NamedNodeMap::removeAttribute):
* dom/Node.cpp:
(WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
* dom/Node.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::classAttributeChanged):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseMappedAttribute):
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::parseMappedAttribute):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseMappedAttribute):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseMappedAttribute):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::parseMappedAttribute):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::parseMappedAttribute):
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::parseMappedAttribute):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseMappedAttribute):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::parseMappedAttribute):
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::parseMappedAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseMappedAttribute):
* html/HTMLParamElement.cpp:
(WebCore::HTMLParamElement::parseMappedAttribute):
2011-12-16 Andreas Kling <kling@webkit.org>
Cache and reuse HTMLCollections exposed by Document.
<http://webkit.org/b/71956>
Reviewed by Antti Koivisto.
Let Document cache the various HTMLCollection objects it exposes.
This is a behavior change in two ways:
1) The lifetime of returned collections is now tied to the lifetime
of the Document. This matches the behavior of Firefox and Opera.
2) The cached collections returned by document are now exactly equal
to those returned by subsequent calls to the same getters.
This reduces memory consumption by ~800 kB (on 64-bit) when loading
the full HTML5 spec. document.links was called 34001 times, yielding
34001 separate HTMLCollections, and now we only need 1.
The document.all collection retains the old behavior, as caching it
will be a bit more complicated.
To avoid a reference cycle between Document and HTMLCollection,
collections that are cached on Document do not retained their base
node pointer (controlled by a m_baseIsRetained flag.)
Tests: fast/dom/document-collection-idempotence.html
fast/dom/gc-9.html
* dom/Document.cpp:
(WebCore::Document::detach):
(WebCore::Document::cachedCollection):
(WebCore::Document::images):
(WebCore::Document::applets):
(WebCore::Document::embeds):
(WebCore::Document::plugins):
(WebCore::Document::objects):
(WebCore::Document::scripts):
(WebCore::Document::links):
(WebCore::Document::forms):
(WebCore::Document::anchors):
* dom/Document.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::createForCachingOnDocument):
(WebCore::HTMLCollection::~HTMLCollection):
(WebCore::HTMLCollection::itemAfter):
* html/HTMLCollection.h:
(WebCore::HTMLCollection::base):
2011-12-16 Anders Carlsson <andersca@apple.com>
Add a pretty dumb tile cache to WebTileCacheLayer
https://bugs.webkit.org/show_bug.cgi?id=74753
Reviewed by Simon Fraser.
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::requiresTiledLayer):
If a layer is a tile cache layer, we never want to swap it out for a tiled layer.
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
Assert that we don't have a tile cache layer.
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::PlatformCALayer):
If we have a tile cache layer, add its tile container to the list of custom sublayers.
* platform/graphics/ca/mac/TileCache.h: Added.
(WebCore::TileCache::tileContainerLayer):
Return the tile container layer.
* platform/graphics/ca/mac/TileCache.mm: Added.
(WebCore::TileCache::tileCacheLayerBoundsChanged):
Resize the tile grid if necessary.
(WebCore::TileCache::setNeedsDisplayInRect):
Invalidate the necessary tiles.
(WebCore::TileCache::drawLayer):
Set up the transform and draw the layer.
(WebCore::TileCache::getTileRangeForRect):
Given a rect, return the range of tiles that it covers.
(WebCore::TileCache::numTilesForGridSize):
Given a size, return how many tiles are needed to completely cover it.
(WebCore::TileCache::resizeTileGrid):
Create new tile layers if needed, or reuse already existing ones.
(WebCore::TileCache::tileLayerAtPosition):
Given a position in the grid, return the tile layer.
(WebCore::TileCache::createTileLayer):
Create a WebTileLayer and set it up.
* platform/graphics/ca/mac/WebTileCacheLayer.h:
* platform/graphics/ca/mac/WebTileCacheLayer.mm:
(-[WebTileCacheLayer setBounds:]):
(-[WebTileCacheLayer setNeedsDisplayInRect:]):
(-[WebTileCacheLayer tileContainerLayer]):
Call down to the tile cache object.
* platform/graphics/ca/mac/WebTileLayer.h: Added.
* platform/graphics/ca/mac/WebTileLayer.mm: Added.
(-[WebTileLayer drawInContext:]):
Ask the tile cache to draw the given layer.
(-[WebTileLayer setTileCache:WebCore::]):
2011-12-16 Sam Weinig <sam@webkit.org>
Give PlatformEvents a base class
https://bugs.webkit.org/show_bug.cgi?id=74685
Reviewed by Anders Carlsson.
Add a base class for PlatformMouseEvent, PlatformKeyboardEvent, PlatformWheelEvent
and PlatformGestureEvent and move Type enumeration and modifiers down to it.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
Add new files.
* platform/PlatformEvent.cpp: Added.
* platform/PlatformEvent.h: Added.
(WebCore::PlatformEvent::type):
(WebCore::PlatformEvent::shiftKey):
(WebCore::PlatformEvent::ctrlKey):
(WebCore::PlatformEvent::altKey):
(WebCore::PlatformEvent::metaKey):
(WebCore::PlatformEvent::modifiers):
(WebCore::PlatformEvent::PlatformEvent):
Add new class.
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
* dom/KeyboardEvent.cpp:
(WebCore::eventTypeForKeyboardEventType):
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
* page/DragController.cpp:
(WebCore::createMouseEvent):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::fakeMouseMoveEventTimerFired):
(WebCore::EventHandler::handleAccessKey):
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::handleDrag):
* page/blackberry/EventHandlerBlackBerry.cpp:
(WebCore::EventHandler::accessKeyModifiers):
* page/chromium/EventHandlerChromium.cpp:
(WebCore::EventHandler::accessKeyModifiers):
* page/efl/EventHandlerEfl.cpp:
(WebCore::EventHandler::accessKeyModifiers):
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::accessKeyModifiers):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::accessKeyModifiers):
* page/qt/EventHandlerQt.cpp:
(WebCore::EventHandler::accessKeyModifiers):
* page/win/EventHandlerWin.cpp:
(WebCore::EventHandler::accessKeyModifiers):
* page/wx/EventHandlerWx.cpp:
(WebCore::EventHandler::accessKeyModifiers):
* platform/PlatformGestureEvent.h:
(WebCore::PlatformGestureEvent::PlatformGestureEvent):
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
(WebCore::PlatformKeyboardEvent::isKeypad):
* platform/PlatformMouseEvent.h:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
(WebCore::PlatformMouseEvent::button):
* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::zoom):
(WebCore::ScrollAnimatorNone::handleGestureEvent):
* platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
(WebCore::toWebCorePlatformKeyboardEventType):
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
(WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
* platform/chromium/GestureRecognizerChromium.cpp:
(WebCore::GestureRecognizerChromium::appendTapDownGestureEvent):
(WebCore::GestureRecognizerChromium::appendClickGestureEvent):
(WebCore::GestureRecognizerChromium::appendDoubleClickGestureEvent):
(WebCore::GestureRecognizerChromium::appendScrollGestureBegin):
(WebCore::GestureRecognizerChromium::appendScrollGestureEnd):
(WebCore::GestureRecognizerChromium::appendScrollGestureUpdate):
* platform/chromium/PlatformKeyboardEventChromium.cpp:
(WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
* platform/chromium/PopupContainer.cpp:
(WebCore::PopupContainer::handleGestureEvent):
* platform/chromium/PopupListBox.cpp:
(WebCore::isCharacterTypeEvent):
(WebCore::PopupListBox::handleKeyEvent):
* platform/chromium/ScrollAnimatorChromiumMac.mm:
(WebCore::ScrollAnimatorChromiumMac::handleGestureEvent):
* platform/efl/PlatformKeyboardEventEfl.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
(WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
* platform/efl/PlatformMouseEventEfl.cpp:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/efl/PlatformWheelEventEfl.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/gtk/PlatformKeyboardEventGtk.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
(WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
* platform/gtk/PlatformMouseEventGtk.cpp:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/gtk/PlatformWheelEventGtk.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/ios/KeyEventIOS.mm:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
(WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
* platform/mac/KeyEventMac.mm:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/mac/PlatformMouseEventMac.mm:
(WebCore::mouseEventForNSEvent):
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::handleGestureEvent):
* platform/mac/WheelEventMac.mm:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
(WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
* platform/qt/PlatformMouseEventQt.cpp:
(WebCore::mouseEventTypeAndMouseButtonFromQEvent):
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/qt/WheelEventQt.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/win/KeyEventWin.cpp:
(WebCore::isKeypadEvent):
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/win/PlatformMouseEventWin.cpp:
(WebCore::messageToEventType):
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/win/WheelEventWin.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* platform/wx/KeyboardEventWx.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
(WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
* platform/wx/MouseEventWx.cpp:
(WebCore::typeFromMouseEvent):
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/wx/MouseWheelEventWx.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent):
* plugins/mac/PluginViewMac.mm:
(WebCore::PluginView::handleKeyboardEvent):
* testing/Internals.cpp:
(WebCore::Internals::setZoomAnimatorTransform):
Switch to using new names/class modifier as necessary.
2011-12-16 Adam Barth <abarth@webkit.org>
<!doctype html><div><body><frameset> doesn't parse correctly
https://bugs.webkit.org/show_bug.cgi?id=74745
Reviewed by Eric Seidel.
We were missing one place the spec tells us to set this bool.
Tests: html5lib/runner.html
* html/parser/HTMLTreeBuilder.cpp:
2011-12-16 Jarred Nicholls <jarred@sencha.com>
Support HTML documents in XHR.responseXML
https://bugs.webkit.org/show_bug.cgi?id=74626
Latest W3C XHR spec details for the responseXML attribute:
http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-responsexml-attribute
http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#document-response-entity-body
XHR.responseXML was not compliant per the latest editor's draft of the XHR spec.
The following compliance issue have been corrected:
- A responseType of "text" should disallow access to responseXML by throwing an InvalidState exception.
- When the error flag is toggled, responseXML should return "null" immediately and not attempt to create a new Document.
- responseXML should return a valid HTML document when the MIME type is "text/html", but only when the caller has
explicitly set responseType to "document".
Reviewed by Alexey Proskuryakov.
Tests: fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-quirks.html
fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-strict.html
fast/xmlhttprequest/xmlhttprequest-responseXML-html-no-responsetype.html
fast/xmlhttprequest/xmlhttprequest-responseXML-invalid-xml.html
fast/xmlhttprequest/xmlhttprequest-responseXML-xml-document-responsetype.html
fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype.html
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseXML):
(WebCore::XMLHttpRequest::clearResponseBuffers):
* xml/XMLHttpRequest.h: Rename m_responseXML to m_responseDocument
(WebCore::XMLHttpRequest::optionalResponseXML):
2011-12-16 Ryosuke Niwa <rniwa@webkit.org>
Only EditCommandComposition should implement unapply and reapply
https://bugs.webkit.org/show_bug.cgi?id=74490
Reviewed by Eric Seidel.
Introduce new abstract class UndoStep to replace EditCommand for EditorClient, and make EditCommand
private to WebCore.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::create): Takes EditAction instead of boolean for CreateLinkCommand.
(WebCore::EditCommandComposition::EditCommandComposition): Ditto.
(WebCore::EditCommandComposition::unapply): Moved from EditCommand; we don't have to call isTopLevelCommand
anymore because EditCommandComposition is always top-level. In fact, the only thing unapply/reapply do
in addition to what doUnapply/doReapply do for sub-level commands is disabling and enabling delete button
and defining an event queue scope. However, these can be done at top-level command anyway, so we now only call
doApply for sub-level commands.
(WebCore::EditCommandComposition::reapply): Ditto.
(WebCore::EditCommandComposition::setStartingSelection): Added.
(WebCore::EditCommandComposition::setEndingSelection): Added.
(WebCore::applyCommand): Moved from EditCommand.
(WebCore::CompositeEditCommand::apply): Moved from EditCommand; doesn't call isTopLevelCommand for the same reason.
(WebCore::CompositeEditCommand::ensureComposition):
(WebCore::CompositeEditCommand::applyCommandToComposite): Call doApply instead of apply for the same reason.
* editing/CompositeEditCommand.h:
(WebCore::EditCommandComposition::wasCreateLinkCommand):
(WebCore::EditCommandComposition::startingSelection): Added.
(WebCore::EditCommandComposition::endingSelection): Added.
* editing/EditCommand.cpp:
(WebCore::EditCommand::setStartingSelection):
(WebCore::EditCommand::setEndingSelection):
(WebCore::SimpleEditCommand::doReapply): Moved from EditCommand.
* editing/EditCommand.h:
* editing/UndoStep.h: Added.
(WebCore::UndoStep::~UndoStep):
* loader/EmptyClients.h:
(WebCore::EmptyEditorClient::shouldInsertNode):
(WebCore::EmptyEditorClient::didSetSelectionTypesForPasteboard):
(WebCore::EmptyEditorClient::registerCommandForUndo): Takes UndoStep instead of EditCommand.
(WebCore::EmptyEditorClient::registerCommandForRedo): Ditto.
* page/EditorClient.h:
2011-12-16 Simon Fraser <simon.fraser@apple.com>
Allow a PlatformCALayer to own its own sublayers
https://bugs.webkit.org/show_bug.cgi?id=74744
Reviewed by Anders Carlsson.
GraphicsLayerCA rebuilds the sublayer list of CALayers, which would
blow away any custom layers that a PlatformCALayer wants to maintain
as children.
Make it possible for a PlatformLayerCA to indicate that it wants
a specific list of sublayers to be maintained as the first layers
in the child list.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateSublayerList):
* platform/graphics/ca/PlatformCALayer.h:
(WebCore::PlatformCALayer::customSublayers):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::PlatformCALayer):
2011-12-16 Adam Barth <abarth@webkit.org>
<!DOCTYPE html><pre>&#x0a;&#x0a;A</pre> doesn't parse correctly
https://bugs.webkit.org/show_bug.cgi?id=74658
Reviewed by Darin Adler.
Previously, we handled skipping newlines after <pre> in the tokenizer,
which isn't how the spec handles them. Instead, the spec skips them in
the tree builder. This isn't usually observable, except in the case of
an HTML entity. In that case, the tokenzier sees '&' (because the
entity hasn't been decoded yet), but the tree builder sees '\n' (the
decoded entity). This patch fixes the bug by more closely aligning our
implementation with the spec.
Test: html5lib/runner.html
* html/parser/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::reset):
(WebCore::HTMLTokenizer::nextToken):
* html/parser/HTMLTokenizer.h:
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipAtMostOneLeadingNewline):
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processCharacterBuffer):
* html/parser/HTMLTreeBuilder.h:
* xml/parser/MarkupTokenizerBase.h:
2011-12-16 Joshua Bell <jsbell@chromium.org>
IndexedDB: Implement IDBObjectStore.count() and IDBIndex.count()
https://bugs.webkit.org/show_bug.cgi?id=73686
Reviewed by Tony Chang.
These new methods open an internal cursor and iterate through the
results, returning the number of items found. Note that only
passing an IDBKeyRange is supported, not an IDBKey. Supporting
that will require some IDL/binding monkeying; several other
methods also need the same Key-or-KeyRange behavior.
Tests: storage/indexeddb/index-count.html
storage/indexeddb/objectstore-count.html
* bindings/v8/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::numberValue):
* bindings/v8/SerializedScriptValue.h:
* storage/IDBIndex.cpp:
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::count):
* storage/IDBIndex.h:
(WebCore::IDBIndex::count):
* storage/IDBIndex.idl:
* storage/IDBIndexBackendImpl.cpp:
(WebCore::IDBIndexBackendImpl::countInternal):
(WebCore::IDBIndexBackendImpl::count):
* storage/IDBIndexBackendImpl.h:
* storage/IDBIndexBackendInterface.h:
* storage/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::count):
* storage/IDBObjectStore.h:
(WebCore::IDBObjectStore::count):
* storage/IDBObjectStore.idl:
* storage/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::count):
(WebCore::IDBObjectStoreBackendImpl::countInternal):
* storage/IDBObjectStoreBackendImpl.h:
* storage/IDBObjectStoreBackendInterface.h:
2011-12-16 Yael Aharon <yael.aharon@nokia.com>
Audio file in video element has a size of 0x0 .
https://bugs.webkit.org/show_bug.cgi?id=74738
Reviewed by Kenneth Rohde Christiansen.
When the source of a video element has audio only, the intrinsic size of the video should
not be 0x0. Instead, it should be the same as as no media was loaded.
No new tests. An existing test is covering this case and was modified to reflect this change.
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::calculateIntrinsicSize):
2011-12-16 Alexis Menard <alexis.menard@openbossa.org>
getComputedStyle for border-width is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=74635
Reviewed by Tony Chang.
Implement getComputedStyle for border-width.
Test: fast/css/getComputedStyle/getComputedStyle-border-width.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2011-12-16 Branimir Lambov <blambov@google.com>
[chromium] svg/clip-path/clip-in-mask.svg fails on Windows and Linux
https://bugs.webkit.org/show_bug.cgi?id=53378
Reviewed by Tony Chang.
Fixes a problem in Skia's clipping layer code's handling of coordinate
transformations that was causing all complex clipping (including text
and/or masks) to fail.
The method beginLayerClippedToImage was taking rectangle coordinates
in one local coordinate space, but it was applying them in a different
one because of the delay between the time it is called and the actual
application occurs in applyClipFromImage. The fix translates the
coordinates passed to beginLayerClippedToImage to absolute ones, so
that they are not affected by any change in the transform matrix, and
makes sure that applyClipFromImage clears the matrix before drawing
the clip layer to correctly apply the absolute coordinates.
* platform/graphics/skia/PlatformContextSkia.cpp:
(WebCore::PlatformContextSkia::beginLayerClippedToImage):
(WebCore::PlatformContextSkia::applyClipFromImage):
* platform/graphics/skia/PlatformContextSkia.h:
2011-12-16 Mark Hahnenberg <mhahnenberg@apple.com>
De-virtualize destructors
https://bugs.webkit.org/show_bug.cgi?id=74331
Reviewed by Geoffrey Garen.
No new tests.
Doing everything here that was done to the JSCell hierarchy in JavaScriptCore.
See the ChangeLog for this commit for a more in-depth description.
* WebCore.exp.in: Add/remove symbols.
* bindings/js/JSCanvasRenderingContext2DCustom.cpp: Remove first arg from isJSArray call.
(WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
* bindings/js/JSDOMBinding.cpp: Add trival destructor assert for DOMConstructorObject
and DOMConstructorWithDocument.
* bindings/js/JSDOMGlobalObject.cpp: Add static destroy. Add implementation for
scriptExecutionContext that dispatches to different functions in subclasses
depending on our current ClassInfo. We do this so that we can get rid of the
virtual-ness of scriptExecutionContext, because any virtual functions will throw
off the layout of the object and we'll crash at runtime.
(WebCore::JSDOMGlobalObject::destroy):
(WebCore::JSDOMGlobalObject::scriptExecutionContext):
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSDOMWindowBase.cpp: Add static destroy.
(WebCore::JSDOMWindowBase::destroy):
* bindings/js/JSDOMWindowBase.h: De-virtualize scriptExecutionContext.
* bindings/js/JSDOMWindowShell.cpp: Add static destroy.
(WebCore::JSDOMWindowShell::destroy):
* bindings/js/JSDOMWindowShell.h:
* bindings/js/JSDOMWrapper.cpp: Add trivial destructor assert.
* bindings/js/JSDOMWrapper.h: Add a ClassInfo to JSDOMWrapper since it now overrides
a MethodTable function. Remove vtableAnchor virtual function.
* bindings/js/JSImageConstructor.cpp: Add trivial destructor assert.
* bindings/js/JSNodeCustom.cpp: Change implementation of pushEventHandlerScope so that
it dispatches to the correct function depending on the
identity of the class as specified by the ClassInfo.
See JSDOMGlobalObject::scriptExecutionContext for explanation.
(WebCore::JSNode::pushEventHandlerScope):
* bindings/js/JSWebSocketCustom.cpp: Remove first arg to isJSArray call.
(WebCore::JSWebSocketConstructor::constructJSWebSocket):
* bindings/js/JSWorkerContextBase.cpp: Add static destroy.
(WebCore::JSWorkerContextBase::destroy):
* bindings/js/JSWorkerContextBase.h:
* bindings/js/ScriptValue.cpp: Remove first arg to isJSArray call.
(WebCore::jsToInspectorValue):
* bindings/js/SerializedScriptValue.cpp: Ditto.
(WebCore::CloneSerializer::isArray):
(WebCore::CloneSerializer::getSparseIndex):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader): Remove virtual-ness of any custom pushEventHandlerScope (see
JSNodeCustom::pushEventHandlerScope for explanation). Remove virtual toBoolean
for anybody who masquerades as undefined, since our JSObject implementation handles
this based on the TypeInfo in the Structure. Add trivial destructor assert for any
class other than DOMWindow or WorkerContexts.
(GenerateImplementation): Change ClassInfo definitions to use Base::s_info, since
typing the parent class more than once is duplication of information and increases
the likelihood of mistakes. Pass ClassInfo to TypeArrayDescriptors instead of vptr.
(GenerateConstructorDefinition): Add trivial destructor assert for all generated constructors.
* bridge/c/CRuntimeObject.cpp: Remove empty virtual destructor.
* bridge/c/CRuntimeObject.h:
* bridge/jni/jsc/JavaRuntimeObject.cpp: Ditto.
* bridge/jni/jsc/JavaRuntimeObject.h:
* bridge/objc/ObjCRuntimeObject.h: Ditto.
* bridge/objc/ObjCRuntimeObject.mm:
* bridge/objc/objc_runtime.h: Add static destroy for ObjcFallbackObjectImp. De-virtualize
toBoolean in the short term. Need longer term fix.
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcFallbackObjectImp::destroy):
* bridge/qt/qt_runtime.cpp: Add static destroy to QtRuntimeMethod.
(JSC::Bindings::QtRuntimeMethod::destroy):
* bridge/qt/qt_runtime.h: De-virtualize ~QtRuntimeMethod.
* bridge/runtime_array.cpp: De-virtualize destructor. Add static destroy.
(JSC::RuntimeArray::destroy):
* bridge/runtime_array.h:
* bridge/runtime_method.cpp: Remove vtableAnchor. Add static destroy.
(JSC::RuntimeMethod::destroy):
* bridge/runtime_method.h:
* bridge/runtime_object.cpp: Add static destroy.
(JSC::Bindings::RuntimeObject::destroy):
* bridge/runtime_object.h:
2011-12-15 Alexey Proskuryakov <ap@apple.com>
Poor XPath performance when evaluating an expression that returns a lot of nodes
https://bugs.webkit.org/show_bug.cgi?id=74665
<rdar://problem/10517146>
Reviewed by Darin Adler.
No change in funcitonality. Well covered by existing tests (ran them with zero cutoff to
execute the new code path).
Our sorting function is optimized for small node sets in large documents, and this is the
opposite of it. Added another one that traverses the whole document, adding nodes from the
node set to sorted list. That doesn't grow with the number of nodes nearly as fast.
Cutoff amount chosen for the document referenced in bug - this is roughly where the algorithms
have the same performance on it.
* xml/XPathNodeSet.cpp:
(WebCore::XPath::NodeSet::sort):
(WebCore::XPath::findRootNode):
(WebCore::XPath::NodeSet::traversalSort):
* xml/XPathNodeSet.h:
2011-12-15 Antti Koivisto <antti@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=74677
Count ResourceLoadScheduler suspends/resumes
Reviewed by Andreas Kling.
Using boolean is not robust when there are multiple clients calling suspendPendingRequests/resumePendingRequests.
Increment and decrement suspend count instead of just setting/unsetting a boolean.
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
(WebCore::ResourceLoadScheduler::servePendingRequests):
(WebCore::ResourceLoadScheduler::suspendPendingRequests):
(WebCore::ResourceLoadScheduler::resumePendingRequests):
* loader/ResourceLoadScheduler.h:
(WebCore::ResourceLoadScheduler::isSuspendingPendingRequests):
2011-12-16 Adam Klein <adamk@chromium.org>
Improve performance of ChildListMutationScope when no MutationObservers are present
https://bugs.webkit.org/show_bug.cgi?id=74671
Reviewed by Ojan Vafai.
Inline ChildListMutationScope's methods (including constructor and
destructor), and provide a fast-fail case when no mutation observers
are present.
The code reorganization necessary for the above also removed the
anonymous namespace in ChildListMutationScope.cpp, making both helper
classes private inner classes of ChildListMutationScope.
No new tests, refactoring only.
* dom/ChildListMutationScope.cpp:
(WebCore::ChildListMutationScope::MutationAccumulator::MutationAccumulator):
(WebCore::ChildListMutationScope::MutationAccumulator::~MutationAccumulator):
(WebCore::ChildListMutationScope::MutationAccumulator::isAddedNodeInOrder):
(WebCore::ChildListMutationScope::MutationAccumulator::childAdded):
(WebCore::ChildListMutationScope::MutationAccumulator::isRemovedNodeInOrder):
(WebCore::ChildListMutationScope::MutationAccumulator::willRemoveChild):
(WebCore::ChildListMutationScope::MutationAccumulator::enqueueMutationRecord):
(WebCore::ChildListMutationScope::MutationAccumulator::clear):
(WebCore::ChildListMutationScope::MutationAccumulator::isEmpty):
(WebCore::ChildListMutationScope::MutationAccumulationRouter::MutationAccumulationRouter):
(WebCore::ChildListMutationScope::MutationAccumulationRouter::~MutationAccumulationRouter):
(WebCore::ChildListMutationScope::MutationAccumulationRouter::initialize):
(WebCore::ChildListMutationScope::MutationAccumulationRouter::instance):
(WebCore::ChildListMutationScope::MutationAccumulationRouter::childAdded):
(WebCore::ChildListMutationScope::MutationAccumulationRouter::willRemoveChild):
(WebCore::ChildListMutationScope::MutationAccumulationRouter::incrementScopingLevel):
(WebCore::ChildListMutationScope::MutationAccumulationRouter::decrementScopingLevel):
* dom/ChildListMutationScope.h:
(WebCore::ChildListMutationScope::ChildListMutationScope):
(WebCore::ChildListMutationScope::~ChildListMutationScope):
(WebCore::ChildListMutationScope::childAdded):
(WebCore::ChildListMutationScope::willRemoveChild):
2011-12-16 Dean Jackson <dino@apple.com>
Filters need to affect visual overflow
https://bugs.webkit.org/show_bug.cgi?id=71930
Reviewed by Simon Fraser.
Make sure filters are included in visual overflow.
Add a new method to calculate the expansion of overflow
region given a list of FilterOperations. This is a slight
duplication of code from the rendering path, but is needed
because overflow is calculated before the FilterEffect
chain is built.
Also, filters were always rendered into their
input rectangle which was wrong for any effect
that produced a different sized result - drop-shadow
and blur. This required two changes. First, FilterEffect
needed a flag to decide whether or not to clip
output to primitive regions (as required by SVG but not
what we want here). Second, the rendering operation
draws into the rectangle the filter claims is its painting
rectangle.
Test: css3/filters/regions-expanding.html
* platform/graphics/filters/FEDropShadow.cpp:
(WebCore::FEDropShadow::determineAbsolutePaintRect): Only
clipToBounds if necessary.
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::calculateUnscaledKernelSize): CSS filters
ask for the kernel size before the Filter object is created, so
add a new method to return an unscaled kernel.
(WebCore::FEGaussianBlur::calculateKernelSize):
(WebCore::FEGaussianBlur::determineAbsolutePaintRect): Only
clipToBounds if necessary.
* platform/graphics/filters/FEGaussianBlur.h:
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::determineAbsolutePaintRect): Only
clipToBounds if necessary.
* platform/graphics/filters/FEOffset.cpp:
(WebCore::FEOffset::determineAbsolutePaintRect): Only
clipToBounds if necessary.
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::FilterEffect): Initialize clipToBounds
as false so SVG remains unchanged.
(WebCore::FilterEffect::determineAbsolutePaintRect): Only
clipToBounds if necessary.
* platform/graphics/filters/FilterEffect.h:
(WebCore::FilterEffect::clipsToBounds):
(WebCore::FilterEffect::setClipsToBounds):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build): Make sure we set our
filters here to NOT clip to bounds.
* rendering/FilterEffectRenderer.h:
(WebCore::FilterEffectRenderer::outputRect): Asks the filter
operation for the size of the result image.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::addVisualEffectOverflow): Change the name
from addBoxShadowAndBorderOverflow().
* rendering/RenderBox.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::layout):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::hasBoxDecorations): Change name from
hasBorderOutlineOrShadow().
(WebCore::hasBoxDecorationsOrBackground):
(WebCore::hasBoxDecorationsOrBackgroundImage):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::layout):
* rendering/style/FilterOperations.cpp:
(WebCore::outsetSizeForBlur): Return an IntSize that is the amount
of offset.
(WebCore::FilterOperations::hasOutsets):
(WebCore::FilterOperations::getOutsets):
* rendering/style/FilterOperations.h:
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::getFilterOutsets):
(WebCore::InheritedFlags::hasFilterOutsets):
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::determineAbsolutePaintRect): Only
clipToBounds if necessary.
2011-12-16 Alexis Menard <alexis.menard@openbossa.org>, Jakub Wieczorek <jwieczorek@webkit.org>
Add support for <ol reversed>.
https://bugs.webkit.org/show_bug.cgi?id=36724
The reversed attribute makes an ordered list appear with marker values
decreasing from n, where n is the number of items.
See: http://www.whatwg.org/specs/web-apps/current-work/#attr-ol-reversed
Reviewed by Darin Adler.
Tests: fast/lists/ol-reversed-dynamic-simple.html
fast/lists/ol-reversed-dynamic.html
fast/lists/ol-reversed-nested-items.html
fast/lists/ol-reversed-nested-list.html
fast/lists/ol-reversed-simple.html
* html/HTMLAttributeNames.in:
* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::HTMLOListElement):
(WebCore::HTMLOListElement::parseMappedAttribute):
(WebCore::HTMLOListElement::updateItemValues):
(WebCore::HTMLOListElement::recalculateItemCount):
* html/HTMLOListElement.h:
(WebCore::HTMLOListElement::start):
(WebCore::HTMLOListElement::isReversed):
(WebCore::HTMLOListElement::itemCountChanged):
(WebCore::HTMLOListElement::itemCount):
* html/HTMLOListElement.idl:
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::nextListItem):
(WebCore::previousListItem):
(WebCore::RenderListItem::calcValue):
(WebCore::RenderListItem::explicitValueChanged):
(WebCore::previousOrNextItem):
(WebCore::RenderListItem::updateListMarkerNumbers):
* rendering/RenderListItem.h:
2011-12-16 Mikhail Naganov <mnaganov@chromium.org>
Scroll non-visible edit controls and caret into the center of the view when starting typing.
https://bugs.webkit.org/show_bug.cgi?id=65027
Reviewed by Ryosuke Niwa.
Tests: editing/input/caret-at-the-edge-of-contenteditable.html
editing/input/caret-at-the-edge-of-input.html
editing/input/reveal-caret-of-multiline-contenteditable.html
editing/input/reveal-caret-of-multiline-input.html
editing/input/reveal-contenteditable-on-input-vertically.html
editing/input/reveal-contenteditable-on-paste-vertically.html
editing/input/reveal-edit-on-input-vertically.html
editing/input/reveal-edit-on-paste-vertically.html
* editing/Editor.cpp:
(WebCore::Editor::insertTextWithoutSendingTextEvent):
(WebCore::Editor::revealSelectionAfterEditingOperation):
2011-12-16 Ryosuke Niwa <rniwa@webkit.org>
Touch RenderStyle in an attempt to fix linking errors on Chromium Windows bots.
* rendering/style/RenderStyle.h:
2011-12-14 Nat Duca <nduca@chromium.org>
[chromium] DelayBasedTimeSource should not change its timebase on late ticks
https://bugs.webkit.org/show_bug.cgi?id=74573
The original DelayBasedTimeSource was designed to shift its timebase
to the tick time when a tick came back "late." The rationale was that it is
better to just "start fresh" after a stutter. After profiling this,
this time-rebasing just destabilizes frame rate anytime the thread gets
loaded. This patch keeps the timebase stationary, leading to vastly
smoother framerates when the message loop is under load.
Reviewed by James Robinson.
* platform/graphics/chromium/cc/CCDelayBasedTimeSource.cpp:
(WebCore::CCDelayBasedTimeSource::updateState):
2011-12-16 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r103062.
http://trac.webkit.org/changeset/103062
https://bugs.webkit.org/show_bug.cgi?id=74715
It broke many tests (Requested by Ossy on #webkit).
* html/HTMLAttributeNames.in:
* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::HTMLOListElement):
(WebCore::HTMLOListElement::parseMappedAttribute):
* html/HTMLOListElement.h:
(WebCore::HTMLOListElement::start):
* html/HTMLOListElement.idl:
* rendering/RenderListItem.cpp:
(WebCore::previousListItem):
(WebCore::RenderListItem::calcValue):
(WebCore::RenderListItem::explicitValueChanged):
(WebCore::RenderListItem::updateListMarkerNumbers):
* rendering/RenderListItem.h:
2011-12-16 Alexis Menard <alexis.menard@openbossa.org>, Jakub Wieczorek <jwieczorek@webkit.org>
Add support for <ol reversed>.
https://bugs.webkit.org/show_bug.cgi?id=36724
The reversed attribute makes an ordered list appear with marker values
decreasing from n, where n is the number of items.
See: http://www.whatwg.org/specs/web-apps/current-work/#attr-ol-reversed
Reviewed by Darin Adler.
Tests: fast/lists/ol-reversed-dynamic-simple.html
fast/lists/ol-reversed-dynamic.html
fast/lists/ol-reversed-nested-items.html
fast/lists/ol-reversed-nested-list.html
fast/lists/ol-reversed-simple.html
* html/HTMLAttributeNames.in:
* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::HTMLOListElement):
(WebCore::HTMLOListElement::parseMappedAttribute):
(WebCore::HTMLOListElement::updateItemValues):
(WebCore::HTMLOListElement::recalculateItemCount):
* html/HTMLOListElement.h:
(WebCore::HTMLOListElement::start):
(WebCore::HTMLOListElement::isReversed):
(WebCore::HTMLOListElement::itemCountChanged):
(WebCore::HTMLOListElement::itemCount):
* html/HTMLOListElement.idl:
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::nextListItem):
(WebCore::previousListItem):
(WebCore::RenderListItem::calcValue):
(WebCore::RenderListItem::explicitValueChanged):
(WebCore::previousOrNextItem):
(WebCore::RenderListItem::updateListMarkerNumbers):
* rendering/RenderListItem.h:
2011-12-15 Stephen White <senorblanco@chromium.org>
Enable CSS_FILTERS in Chromium.
https://bugs.webkit.org/show_bug.cgi?id=74334
Reviewed by Chris Marrin.
Covered by css3/filters (when enabled).
* platform/graphics/filters/FilterOperation.h:
(WebCore::PassthroughFilterOperation::PassthroughFilterOperation):
Since wingdi.h #define's PASSTHROUGH, #undef it after the includes.
2011-12-16 Patrick Gansterer <paroga@webkit.org>
Unreviewed WinCE build fix after r102979.
Make everHadLayout() public accessible as it was before the change.
* rendering/RenderObject.h:
(WebCore::RenderObject::everHadLayout):
2011-12-15 Hans Wennborg <hans@chromium.org>
IndexedDB: Don't prefetch values from key cursors
https://bugs.webkit.org/show_bug.cgi?id=74604
Reviewed by Tony Chang.
Since index key cursors don't have values, prefetching should not try
to retrieve them. Doing so trips an ASSERT in debug builds.
This will be tested Chromium-side.
* storage/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::prefetchContinueInternal):
2011-12-16 Yosifumi Inoue <yosin@chromium.org>
[Forms] The "maxlength" attribute on "textarea" tag miscounts hard newlines
https://bugs.webkit.org/show_bug.cgi?id=74686
Reviewed by Kent Tamura.
This patch counts LF in textarea value as two for LF to CRLF conversion on submission.
No new tests. Existing tests cover all changes.
* html/HTMLTextAreaElement.cpp:
(WebCore::computeLengthForSubmission): Count LF as 2 for CR LF conversion on submission.
(WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent): Use computeLengthForSubmission instead of numGraphemeClusters.
(WebCore::HTMLTextAreaElement::tooLong): Use computeLengthForSubmission instead of numGraphemeClusters.
2011-12-16 Hajime Morrita <morrita@chromium.org>
Unreviewed, rolling out r103045.
http://trac.webkit.org/changeset/103045
https://bugs.webkit.org/show_bug.cgi?id=74590
Breaks select-script-onchange.html on Chromium Windows
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::typeAheadFind):
2011-12-16 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header file.
2011-12-16 Yosifumi Inoue <yosin@chromium.org>
[Forms] Selection change by type-ahead doesn't fire 'change' event
https://bugs.webkit.org/show_bug.cgi?id=74590
Reviewed by Kent Tamura.
Fire onchange even for type ahead selection.
Test: fast/forms/select/menulist-type-ahead-find.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::typeAheadFind): Add DispatchChangeEvent when
calling selectOption method.
2011-12-16 Andreas Kling <kling@webkit.org>
Don't call Document::body() twice in the same function.
<http://webkit.org/b/74683>
Reviewed by Dan Bernstein.
Document::body() is O(n), so we should avoid calling it multiple
times unnecessarily.
* dom/Document.cpp:
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
2011-12-16 Daniel Sievers <sievers@chromium.org>
[Chromium] Add trace events for decoding and drawing images.
https://bugs.webkit.org/show_bug.cgi?id=74547
Reviewed by James Robinson.
* platform/graphics/skia/ImageSkia.cpp:
(WebCore::drawResampledBitmap):
(WebCore::paintSkBitmap):
(WebCore::Image::drawPattern):
* platform/graphics/skia/NativeImageSkia.cpp:
(WebCore::NativeImageSkia::resizedBitmap):
* platform/image-decoders/bmp/BMPImageDecoder.cpp:
(WebCore::BMPImageDecoder::decode):
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::decode):
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::decode):
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageDecoder::decode):
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::decode):
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::decode):
2011-12-15 Martin Robinson <mrobinson@igalia.com>
Fix 'make dist' in preparation for the GTK+ release.
* GNUmakefile.list.am: Add missing header.
2011-12-15 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
Don't create empty files on error.
https://bugs.webkit.org/show_bug.cgi?id=74373
Reviewed by Ryosuke Niwa.
* css/makeprop.pl:
* css/makevalues.pl:
* make-hash-tools.pl:
2011-12-15 Yongjun Zhang <yongjun_zhang@apple.com>
PODIntervalTree takes 1.7MB memory on www.nytimes.com.
https://bugs.webkit.org/show_bug.cgi?id=73712
Reviewed by Kenneth Russell.
For a RenderBlock which has floating objects inside, we will create a PODIntervalTree and a PODArena with
at least one 16KB chunk. A page could have a large number of such RenderBlocks and they could take huge
amount of memory. To fix that, we can create a shared PODArena in the root RenderView. Instead of having
their own PODArena, each RenderBlock with floating objects could share this PODArena to reduce memory consumption.
The shared PODArena could grow unboundedly if we keep removing and adding floating objects. We can fix that
by reusing the freed memory in each chunk. However, a PODArena could allocate objects of different sizes and
it would be complex to keep track of the size for each allocation in PODArena. To address that, this patch
added class PODFreeListArena<T> which only allocates objects of type T (hence the same size). We can then use a
free list to track freed nodes inside the chunk and reuse the free nodes in future allocations.
Manually tested on nytimes.com and the heap consumption of PODIntervalTree reduced from 1.7MB to 16KB. Performance
doesn't regress on test PerformanceTests/Layout/floats.html.
* WebCore.xcodeproj/project.pbxproj: add new header file PODFreeListArena.h.
* platform/PODArena.h:
(WebCore::PODArena::~PODArena): change dtor to virtual.
(WebCore::PODArena::Chunk::~Chunk): ditto.
* platform/PODFreeListArena.h: Added.
(WebCore::PODFreeListArena::create):
(WebCore::PODFreeListArena::allocateObject): allocate an object.
(WebCore::PODFreeListArena::freeObject): free an object, find the right chunk and update its free list.
(WebCore::PODFreeListArena::allocate): allocate memory from the free list or current chunk.
(WebCore::PODFreeListArena::FreeListChunk::FreeListChunk): add m_freeList to track freed cells.
(WebCore::PODFreeListArena::FreeListChunk::allocate): reuse a free cell if there is one.
(WebCore::PODFreeListArena::FreeListChunk::free): make the memory taken by this object is free, and link it to m_freeList.
(WebCore::PODFreeListArena::FreeListChunk::contains): check if a pointer is inside this chunk.
(WebCore::PODFreeListArena::FreeListChunk::hasFreeList): check if this chunk has free cells.
* platform/PODRedBlackTree.h:
(WebCore::PODRedBlackTree::PODRedBlackTree): take PODFreeListArena instead of PODArena, since nodes of a particular PODRedBlackTree
is always of the same size.
(WebCore::PODRedBlackTree::clear): mark all nodes before clearing the tree.
(WebCore::PODRedBlackTree::initIfNeeded): add initIfNeeded to take an external PODFreeListArena.
(WebCore::PODRedBlackTree::add):
(WebCore::PODRedBlackTree::deleteNode): mark the node free in arena after it is removed from the tree.
(WebCore::PODRedBlackTree::markFree): mark all node free in the tree.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::addOverhangingFloats):
(WebCore::RenderBlock::addIntrudingFloats):
(WebCore::RenderBlock::FloatingObjects::computePlacedFloatsTree): passing the shared PODFreeListArena to m_placedFloatsTree.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatingObjects::FloatingObjects):
* rendering/RenderView.cpp:
(WebCore::RenderView::intervalArena): create the shared PODFreeListArena lazily.
* rendering/RenderView.h:
2011-12-15 Tony Chang <tony@chromium.org>
Unreviewed, rollout r102825 because it didn't improve performance.
https://bugs.webkit.org/show_bug.cgi?id=74622
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::styleForElement):
(WebCore::CSSStyleSelector::pseudoStyleForElement):
2011-12-15 Ryosuke Niwa <rniwa@webkit.org>
sizeof(RenderObject) is 32 instead of 24 on Windows
https://bugs.webkit.org/show_bug.cgi?id=74646
Reviewed by Darin Adler.
Make all bitfields in RenderObject to unsigned and wrap them around by RenderObjectBitfields.
Also add a compilation time assertion to make sure we won't grow RenderObject's size unintentionally.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::layoutBlockChild):
(WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
(WebCore::RenderBlock::layoutColumns):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatWithRect::FloatWithRect):
* rendering/RenderObject.cpp:
(WebCore::SameSizeAsRenderObject::~SameSizeAsRenderObject):
(WebCore::RenderObject::RenderObject):
(WebCore::RenderObject::markContainingBlocksForLayout):
(WebCore::RenderObject::setPreferredLogicalWidthsDirty):
(WebCore::RenderObject::invalidateContainerPreferredLogicalWidths):
(WebCore::RenderObject::styleWillChange):
(WebCore::RenderObject::styleDidChange):
(WebCore::RenderObject::willBeDestroyed):
(WebCore::RenderObject::updateDragState):
* rendering/RenderObject.h:
(WebCore::RenderObject::hasCounterNodeMap):
(WebCore::RenderObject::setHasCounterNodeMap):
(WebCore::RenderObject::childrenInline):
(WebCore::RenderObject::setChildrenInline):
(WebCore::RenderObject::hasColumns):
(WebCore::RenderObject::setHasColumns):
(WebCore::RenderObject::inRenderFlowThread):
(WebCore::RenderObject::setInRenderFlowThread):
(WebCore::RenderObject::isAnonymous):
(WebCore::RenderObject::setIsAnonymous):
(WebCore::RenderObject::isAnonymousBlock):
(WebCore::RenderObject::isFloating):
(WebCore::RenderObject::isPositioned):
(WebCore::RenderObject::isRelPositioned):
(WebCore::RenderObject::isText):
(WebCore::RenderObject::isBox):
(WebCore::RenderObject::isInline):
(WebCore::RenderObject::isDragging):
(WebCore::RenderObject::isReplaced):
(WebCore::RenderObject::isHorizontalWritingMode):
(WebCore::RenderObject::hasLayer):
(WebCore::RenderObject::hasBoxDecorations):
(WebCore::RenderObject::needsLayout):
(WebCore::RenderObject::selfNeedsLayout):
(WebCore::RenderObject::needsPositionedMovementLayout):
(WebCore::RenderObject::needsPositionedMovementLayoutOnly):
(WebCore::RenderObject::posChildNeedsLayout):
(WebCore::RenderObject::needsSimplifiedNormalFlowLayout):
(WebCore::RenderObject::normalChildNeedsLayout):
(WebCore::RenderObject::preferredLogicalWidthsDirty):
(WebCore::RenderObject::hasOverflowClip):
(WebCore::RenderObject::hasTransform):
(WebCore::RenderObject::node):
(WebCore::RenderObject::setPositioned):
(WebCore::RenderObject::setRelPositioned):
(WebCore::RenderObject::setFloating):
(WebCore::RenderObject::setInline):
(WebCore::RenderObject::setHasBoxDecorations):
(WebCore::RenderObject::setIsText):
(WebCore::RenderObject::setIsBox):
(WebCore::RenderObject::setReplaced):
(WebCore::RenderObject::setHorizontalWritingMode):
(WebCore::RenderObject::setHasOverflowClip):
(WebCore::RenderObject::setHasLayer):
(WebCore::RenderObject::setHasTransform):
(WebCore::RenderObject::setHasReflection):
(WebCore::RenderObject::hasReflection):
(WebCore::RenderObject::setHasMarkupTruncation):
(WebCore::RenderObject::hasMarkupTruncation):
(WebCore::RenderObject::selectionState):
(WebCore::RenderObject::setSelectionState):
(WebCore::RenderObject::hasSelectedChildren):
(WebCore::RenderObject::isMarginBeforeQuirk):
(WebCore::RenderObject::isMarginAfterQuirk):
(WebCore::RenderObject::setMarginBeforeQuirk):
(WebCore::RenderObject::setMarginAfterQuirk):
(WebCore::RenderObject::everHadLayout):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
(WebCore::RenderObject::RenderObjectBitfields::selectionState):
(WebCore::RenderObject::RenderObjectBitfields::setSelectionState):
(WebCore::RenderObject::setNeedsPositionedMovementLayout):
(WebCore::RenderObject::setNormalChildNeedsLayout):
(WebCore::RenderObject::setPosChildNeedsLayout):
(WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
(WebCore::RenderObject::setPaintBackground):
(WebCore::RenderObject::setIsDragging):
(WebCore::RenderObject::setEverHadLayout):
(WebCore::RenderObject::setNeedsLayout):
(WebCore::RenderObject::setChildNeedsLayout):
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::removeChildNode):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::layout):
2011-12-15 Wei Charles <charles.wei@torchmobile.com.cn>
[BlackBerry] Upstream BlackBerry porting of pluginView
https://bugs.webkit.org/show_bug.cgi?id=73397
Reviewed by Daniel Bates.
No new tests for now.
* plugins/blackberry/PluginViewBlackBerry.cpp: Added.
2011-12-15 Joshua Bell <jsbell@chromium.org>
IndexedDB: Can't pass DOMStringList to IDBDatabase.transaction()
https://bugs.webkit.org/show_bug.cgi?id=74452
Reviewed by Adam Barth.
V8 code generator generated checks for DOMStringList arguments, then
deferred to a function that only handled array inputs. This previously
worked for IndexedDB because it would fall into a now-removed default
handler.
Modified storage/indexeddb/transaction-basics.html to test this.
* bindings/v8/V8Binding.cpp:
(WebCore::v8ValueToWebCoreDOMStringList):
2011-12-15 Adam Klein <adamk@chromium.org>
Make Element::setAttributeInternal inline in an attempt to avoid function call overhead
https://bugs.webkit.org/show_bug.cgi?id=74638
Reviewed by Andreas Kling.
In r102695, I factored common code in setAttribute into
Element::setAttributeInternal. This may have caused a perf regression
due to the extra function call, which inlining should eliminate.
Running Dromaeo locally suggests that this will improve performance
by ~9% on the "dom-attr element.property = value" test (which assigns
a value to an element's id).
* dom/Element.cpp:
(WebCore::Element::setAttributeInternal):
2011-12-15 Mary Wu <mary.wu@torchmobile.com.cn>
Upstream FileSystemBlackBerry.cpp into WebCore/platform/blackberry
https://bugs.webkit.org/show_bug.cgi?id=74491
Reviewed by Rob Buis.
We are using POSIX porting of FileSystem, so here only implement other
necessary functions.
Initial upstream, no new tests.
* platform/blackberry/FileSystemBlackBerry.cpp: Added.
(WebCore::homeDirectoryPath):
(WebCore::fileSystemRepresentation):
(WebCore::unloadModule):
(WebCore::openTemporaryFile):
2011-12-15 Adrienne Walker <enne@google.com>
[chromium] Clean up unnecessary leaf functions in GraphicsLayerChromium
https://bugs.webkit.org/show_bug.cgi?id=74140
Reviewed by James Robinson.
Tested by existing compositor layout tests.
This is a follow-on cleanup to r102196, which made some of these
functions less useful than they had been in the past.
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setContentsOpaque):
(WebCore::GraphicsLayerChromium::setBackfaceVisibility):
(WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
* platform/graphics/chromium/GraphicsLayerChromium.h:
2011-12-15 Kenneth Russell <kbr@google.com>
Unreviewed, rolling out r103000.
http://trac.webkit.org/changeset/103000
https://bugs.webkit.org/show_bug.cgi?id=74658
Does not handle text/plain documents correctly.
* html/parser/HTMLTokenizer.cpp:
* html/parser/HTMLTokenizer.h:
* html/parser/HTMLTreeBuilder.cpp:
* html/parser/HTMLTreeBuilder.h:
* xml/parser/MarkupTokenizerBase.h:
2011-12-15 James Robinson <jamesr@chromium.org>
[chromium] Set the CCLayerTreeHost pointer on LayerChromium instances eagerly
https://bugs.webkit.org/show_bug.cgi?id=74477
Reviewed by Kenneth Russell.
This enforces that the m_layerTreeHost pointer on LayerChromium instances is always up to date, instead of
lazily setting it in the paintContents loop. There are two invariants:
1.) If a LayerChromium is the root layer of a CCLayerTreeHost, or is reachable via the children, mask, or
replica pointers from the root layer of a CCLayerTreeHost, then that LayerChromium's m_layerTreeHost pointer
refers to that CCLayerTreeHost
2.) If a LayerChromium is not a root layer or reachable from a root layer of any CCLayerTreeHost, its
CCLayerTreeHost pointer is nil.
Covered by several new layout tests in LayerChromiumTest
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setLayerTreeHost):
(WebCore::LayerChromium::setParent):
(WebCore::LayerChromium::setMaskLayer):
(WebCore::LayerChromium::setReplicaLayer):
* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::createTile):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::setRootLayer):
(WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
(WebCore::CCLayerTreeHost::paintLayerContents):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
2011-12-15 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r102652 and r102717.
http://trac.webkit.org/changeset/102652
http://trac.webkit.org/changeset/102717
https://bugs.webkit.org/show_bug.cgi?id=74674
Broke too many webs. (Requested by kling on #webkit).
* WebCore.exp.in:
2011-12-15 Anders Carlsson <andersca@apple.com>
Lazily create the scrolling coordinator and add a setting for enabling it
https://bugs.webkit.org/show_bug.cgi?id=74667
Reviewed by Darin Adler.
* WebCore.xcodeproj/project.pbxproj:
Make ScrollingCoordinator.h a private header so it can be used in WebKit.
* page/Page.cpp:
(WebCore::Page::Page):
Don't create the scrolling coordinator.
(WebCore::Page::~Page):
Check for a null scrolling coordinator.
(WebCore::Page::scrollingCoordinator):
Create the scrolling coordinator lazily.
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setScrollingCoordinatorEnabled):
(WebCore::Settings::scrollingCoordinatorEnabled):
Add a setting for enabling the scrolling coordinator.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
Use a tile cache layer for the main frame when the scrolling coordinator is neabled.
2011-12-15 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed. Fix build break when data-transfer-items is enabled.
* platform/efl/ClipboardEfl.cpp:
(WebCore::ClipboardEfl::items):
* platform/efl/ClipboardEfl.h:
2011-12-15 Adam Barth <abarth@webkit.org>
<ruby><div><p><rp> parses incorrectly
https://bugs.webkit.org/show_bug.cgi?id=74668
Reviewed by Darin Adler.
This patch updates our implementation to match a change to the HTML5
specification regarding how <ruby> elements parse. Previously, <rp>
and similar tags used to pop the stack up to the <ruby> element. Now
the popping does not occur.
Tests: html5lib/runner.html
* html/parser/HTMLTreeBuilder.cpp:
2011-12-15 Daniel Sievers <sievers@chromium.org>
[Chromium] Avoid strdup() for extra argument when tracing is disabled.
https://bugs.webkit.org/show_bug.cgi?id=74637
Reviewed by James Robinson.
* platform/chromium/TraceEvent.h:
(WebCore::internal::ScopeTracer::ScopeTracer):
2011-12-15 Rafael Weinstein <rafaelw@chromium.org>
[MutationObservers] Add a document-level flag that can trivially be checked to avoid doing unnessary work if mutation observers absent
https://bugs.webkit.org/show_bug.cgi?id=74641
Reviewed by Ojan Vafai.
This patch adds a byte of flags to Document, of which three bits are used to signal if any
node owned by the document has a Mutation Observer of the given type. This is used to
reduce the cost of discovering there are none to a single (inlined) method call and bit-check.
Also, a similar byte of flags which was used to optimize a particular case when mutation observers
are present has been removed, with the reasoning that we should first focus on minimizing impact on
the null-case before optimizing particular in-use cases.
Also, MutationObserverInterestGroup is broken out into its own file (which probably should have happened
earlier, but now avoids a circular header dependency).
No tests needed. This patch is just a refactor.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSMutableStyleDeclaration.cpp:
* dom/CharacterData.cpp:
* dom/ChildListMutationScope.cpp:
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore::Document::hasMutationObserversOfType):
(WebCore::Document::hasMutationObservers):
(WebCore::Document::addMutationObserverTypes):
* dom/Element.cpp:
* dom/MutationObserverInterestGroup.cpp: Added.
(WebCore::MutationObserverInterestGroup::createIfNeeded):
(WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup):
(WebCore::MutationObserverInterestGroup::isOldValueRequested):
(WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
* dom/MutationObserverInterestGroup.h: Copied from Source/WebCore/dom/WebKitMutationObserver.h.
(WebCore::MutationObserverInterestGroup::createForChildListMutation):
(WebCore::MutationObserverInterestGroup::createForCharacterDataMutation):
(WebCore::MutationObserverInterestGroup::createForAttributesMutation):
(WebCore::MutationObserverInterestGroup::hasOldValue):
* dom/Node.cpp:
(WebCore::Node::didMoveToNewOwnerDocument):
(WebCore::Node::getRegisteredMutationObserversOfType):
(WebCore::Node::notifyMutationObserversNodeWillDetach):
* dom/Node.h:
* dom/WebKitMutationObserver.cpp:
(WebCore::WebKitMutationObserver::observe):
* dom/WebKitMutationObserver.h:
2011-12-15 Adam Barth <abarth@webkit.org>
<!DOCTYPE html><pre>&#x0a;&#x0a;A</pre> doesn't parse correctly
https://bugs.webkit.org/show_bug.cgi?id=74658
Reviewed by Darin Adler.
Previously, we handled skipping newlines after <pre> in the tokenizer,
which isn't how the spec handles them. Instead, the spec skips them in
the tree builder. This isn't usually observable, except in the case of
an HTML entity. In that case, the tokenzier sees '&' (because the
entity hasn't been decoded yet), but the tree builder sees '\n' (the
decoded entity). This patch fixes the bug by more closely aligning our
implementation with the spec.
Test: html5lib/runner.html
* html/parser/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::reset):
(WebCore::HTMLTokenizer::nextToken):
* html/parser/HTMLTokenizer.h:
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipAtMostOneLeadingNewline):
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processCharacterBuffer):
* html/parser/HTMLTreeBuilder.h:
* xml/parser/MarkupTokenizerBase.h:
2011-12-15 Kenneth Russell <kbr@google.com>
Unreviewed, rolling out r102989.
http://trac.webkit.org/changeset/102989
https://bugs.webkit.org/show_bug.cgi?id=74580
Caused SHOULD NOT BE REACHED assertions in debug builds.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EBoxAlignment):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderFullScreen.cpp:
(createFullScreenStyle):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::boxPack):
(WebCore::InheritedFlags::setBoxAlign):
(WebCore::InheritedFlags::setBoxPack):
(WebCore::InheritedFlags::initialBoxPack):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleDeprecatedFlexibleBoxData.h:
2011-12-15 Ryosuke Niwa <rniwa@webkit.org>
Touch make_name.pl in an attempt to make Qt bots happy.
* dom/make_names.pl:
(printNamesHeaderFile):
2011-12-15 Kentaro Hara <haraken@chromium.org>
Unreviewed. Rebaselined run-bindings-tests results.
* bindings/scripts/test/JS/JSFloat64Array.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
2011-12-15 Luke Macpherson <macpherson@chromium.org>
Separate box alignment and box pack values into separate enums.
https://bugs.webkit.org/show_bug.cgi?id=74580
Reviewed by Darin Adler.
No new tests / refactoring only.
Separating these types cleans up the code by removing several assertions that
values are in the correct ranges, as this is ensured by the type system.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EBoxPack):
(WebCore::CSSPrimitiveValue::operator EBoxAlignment):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderFullScreen.cpp:
(createFullScreenStyle):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::boxPack):
(WebCore::InheritedFlags::setBoxAlign):
(WebCore::InheritedFlags::setBoxPack):
(WebCore::InheritedFlags::initialBoxPack):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleDeprecatedFlexibleBoxData.h:
2011-12-15 Kentaro Hara <haraken@chromium.org>
REGRESSION(r102663): generate-bindings.pl runs every time
https://bugs.webkit.org/show_bug.cgi?id=74481
Reviewed by Adam Barth.
See the comment #1 of bug 74481 for the cause of this bug.
This patch fixes generate-bindings.pl so that it generates .h and .cpp files
even for IDL files that do not need .h and .cpp files. This is just to prevent
build scripts from trying to generate .h and .cpp files at every build.
No new tests. No change in behavior.
* bindings/scripts/generate-bindings.pl:
(generateEmptyHeaderAndCpp): Generates .h and .cpp files for IDL files
that do not need .h and .cpp files.
* bindings/scripts/test/CPP/CPPTestSupplemental.cpp: Added.
* bindings/scripts/test/CPP/CPPTestSupplemental.h: Added.
* bindings/scripts/test/GObject/GObjectTestSupplemental.cpp: Added.
* bindings/scripts/test/GObject/GObjectTestSupplemental.h: Added.
* bindings/scripts/test/JS/JSTestSupplemental.cpp: Added.
* bindings/scripts/test/JS/JSTestSupplemental.h: Added.
* bindings/scripts/test/ObjC/ObjCTestSupplemental.cpp: Added.
* bindings/scripts/test/ObjC/ObjCTestSupplemental.h: Added.
* bindings/scripts/test/V8/V8TestSupplemental.cpp: Added.
* bindings/scripts/test/V8/V8TestSupplemental.h: Added.
2011-12-15 Jarred Nicholls <jarred@sencha.com>
Unreviewed build fix. Mac build broken when CSS Filters enabled.
Needed to move Filter headers out as private headers in WebCore.framework.
* WebCore.xcodeproj/project.pbxproj:
2011-12-15 Eric Seidel <eric@webkit.org>
WebCore has two (disconnected) ways to keep track of updated widgets, should be unified
https://bugs.webkit.org/show_bug.cgi?id=74367
Reviewed by Adam Barth.
It seems the FrameView updateWidgets set is needed for now,
so just making FrameView::addWidgetToUpdate mark the DOM node
as needing a widget update and later when it goes to call
updateWidget() checking first if it needs an update.
No new tests, just adding an assert.
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::updateWidget):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateWidget):
* html/HTMLPlugInImageElement.h:
(WebCore::HTMLPlugInImageElement::needsWidgetUpdate):
(WebCore::HTMLPlugInImageElement::setNeedsWidgetUpdate):
* page/FrameView.cpp:
(WebCore::FrameView::addWidgetToUpdate):
(WebCore::FrameView::updateWidget):
2011-12-15 Alexandru Chiculita <achicu@adobe.com>
Windows project file is broken. It has a missing </File> enclosing tag
https://bugs.webkit.org/show_bug.cgi?id=74632
Reviewed by Anders Carlsson.
No new tests, just fixing the project file.
* WebCore.vcproj/WebCore.vcproj:
2011-12-15 Adam Barth <abarth@webkit.org>
<table><tr><td><svg><desc><td> parses incorrectly
https://bugs.webkit.org/show_bug.cgi?id=68106
Reviewed by Eric Seidel.
This patch updates our implementation of the HTML5 parser to account
for recent changes in the spec. The main change in this patch is to
remove the "in foreign content" state from the tree builder. Rather
than maintaining this as a separate state, the parser now introspects
on the stack of open elements to determine whether the parser is in
foriegn content. In the process, I've deleted some now-unused
machinery in the tree builder.
Tested by the html5lib LayoutTests. These tests show the progression
in our spec compliance.
* html/parser/HTMLElementStack.cpp:
* html/parser/HTMLElementStack.h:
* html/parser/HTMLTreeBuilder.cpp:
* html/parser/HTMLTreeBuilder.h:
* mathml/mathattrs.in:
2011-12-15 Ryosuke Niwa <rniwa@webkit.org>
m_hasCounterNodeMap and m_everHadLayout should be private to RenderObject
https://bugs.webkit.org/show_bug.cgi?id=74645
Reviewed by Eric Seidel.
Made them private and added getters and setters as needed.
* rendering/RenderCounter.cpp:
(WebCore::makeCounterNode):
(WebCore::RenderCounter::destroyCounterNodes):
(WebCore::updateCounters):
(WebCore::RenderCounter::rendererStyleChanged):
(showCounterRendererTree):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout):
* rendering/RenderObject.h:
(WebCore::RenderObject::hasCounterNodeMap):
(WebCore::RenderObject::setHasCounterNodeMap):
(WebCore::RenderObject::everHadLayout):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::layout):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::layout):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::layout):
* rendering/svg/RenderSVGResourceMarker.cpp:
(WebCore::RenderSVGResourceMarker::layout):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::layout):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::layout):
2011-12-15 Vsevolod Vlasov <vsevik@chromium.org>
Not able to navigate the Resource tab options properly with arrow keys after adding the sticky-notes.
https://bugs.webkit.org/show_bug.cgi?id=72013
Reviewed by Pavel Feldman.
* inspector/front-end/DatabaseQueryView.js:
(WebInspector.DatabaseQueryView):
(WebInspector.DatabaseQueryView.prototype._messagesClicked):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.DatabaseTreeElement.prototype.onexpand):
2011-12-15 Anders Carlsson <andersca@apple.com>
Add ScrollingCoordinator class and ENABLE_THREADED_SCROLLING define
https://bugs.webkit.org/show_bug.cgi?id=74639
Reviewed by Andreas Kling.
Add a ScrollingCoordinator class and make it a member of Page. Tear it down
when the page goes away.
* WebCore.xcodeproj/project.pbxproj:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::~Page):
* page/Page.h:
(WebCore::Page::scrollingCoordinator):
* page/ScrollingCoordinator.cpp: Added.
(WebCore::ScrollingCoordinator::create):
(WebCore::ScrollingCoordinator::ScrollingCoordinator):
(WebCore::ScrollingCoordinator::~ScrollingCoordinator):
(WebCore::ScrollingCoordinator::pageDestroyed):
* page/ScrollingCoordinator.h: Added.
2011-12-15 Kenneth Russell <kbr@google.com>
Rename WEBKIT_lose_context to WEBKIT_WEBGL_lose_context
https://bugs.webkit.org/show_bug.cgi?id=71870
Reviewed by James Robinson.
Re-landing after original commit was rolled out.
Rename largely done with do-webcore-rename with a couple of
necessary manual fixups. Ran WebGL layout tests.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::toV8Object):
* html/canvas/WebGLExtension.h:
* html/canvas/WebGLLoseContext.cpp: Copied from Source/WebCore/html/canvas/WebKitLoseContext.cpp.
(WebCore::WebGLLoseContext::WebGLLoseContext):
(WebCore::WebGLLoseContext::~WebGLLoseContext):
(WebCore::WebGLLoseContext::getName):
(WebCore::WebGLLoseContext::create):
(WebCore::WebGLLoseContext::loseContext):
(WebCore::WebGLLoseContext::restoreContext):
* html/canvas/WebGLLoseContext.h: Copied from Source/WebCore/html/canvas/WebKitLoseContext.h.
* html/canvas/WebGLLoseContext.idl: Copied from Source/WebCore/html/canvas/WebKitLoseContext.idl.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
(WebCore::WebGLRenderingContext::maybeRestoreContext):
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebKitLoseContext.cpp: Removed.
* html/canvas/WebKitLoseContext.h: Removed.
* html/canvas/WebKitLoseContext.idl: Removed.
2011-12-15 Brady Eidson <beidson@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=74631
HTMLMediaElement should not register for document activation callbacks as it doesn't use them
Reviewed by Eric Carlson.
No new tests. (No behavior change, pruning useless code)
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::willMoveToNewOwnerDocument):
(WebCore::HTMLMediaElement::didMoveToNewOwnerDocument):
2011-12-15 Eric Carlson <eric.carlson@apple.com>
Text tracks should be treated differently according to their kind
https://bugs.webkit.org/show_bug.cgi?id=72547
Reviewed by Sam Weinig.
Tests: media/track/track-default-attribute.html
media/track/track-mode-not-changed-by-new-track.html
media/track/track-mode-triggers-loading.html
* html/HTMLAudioElement.cpp:
(WebCore::HTMLAudioElement::HTMLAudioElement): Add "createdByParser" parameter.
(WebCore::HTMLAudioElement::create): Ditto.
(WebCore::HTMLAudioElement::createForJSConstructor): Deal with constructor change.
* html/HTMLAudioElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Add "createdByParser" parameter. Initialize m_parsingInProgress.
(WebCore::HTMLMediaElement::finishParsingChildren): Clear m_parsingInProgress. Schedule track
loading if necessary.
(WebCore::HTMLMediaElement::loadTimerFired): Call configureTextTracks not call scheduleLoad,
it just schedules the load timer again.
(WebCore::HTMLMediaElement::prepareForLoad): Add all non-disabled track elements to a vector
so we can prevent the media element's readyState from reaching HAVE_METADATA until the
tracks are ready.
(WebCore::HTMLMediaElement::textTracksAreReady): New. Return false unless all tracks that were
not disabled when loading started have loaded or failed.
(WebCore::HTMLMediaElement::textTrackReadyStateChanged): Call setReadyState when a track is
stops loading.
(WebCore::HTMLMediaElement::textTrackModeChanged): Trigger <track> loading when the mode
changes to hidden or showing for the first time.
(WebCore::HTMLMediaElement::setReadyState): Do not advance to HAVE_METADATA or higher while
track elements are loading.
(WebCore::HTMLMediaElement::addTrack): Removed.
(WebCore::HTMLMediaElement::showingTrackWithSameKind): New.
(WebCore::HTMLMediaElement::trackWasAdded):
(WebCore::HTMLMediaElement::trackWillBeRemoved): Flag a track as unconfigured so it will be
reconfigured if it is added to another element.
(WebCore::HTMLMediaElement::userIsInterestedInThisLanguage): New.
(WebCore::HTMLMediaElement::userIsInterestedInThisTrack): New. Consider user preferences.
(WebCore::HTMLMediaElement::configureTextTrack): New. Configure a track as per the user's preferences.
(WebCore::HTMLMediaElement::configureTextTracks): New. Configure all track elements.
* html/HTMLMediaElement.h:
* html/HTMLMediaElement.h:
* html/HTMLTagNames.in: Add constructorNeedsCreatedByParser to audio and video.
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::HTMLTrackElement): Initialize m_hasBeenConfigured.
* html/HTMLTrackElement.h:
(WebCore::HTMLTrackElement::hasBeenConfigured):
(WebCore::HTMLTrackElement::setHasBeenConfigured):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::HTMLVideoElement): Add "createdByParser" parameter.
(WebCore::HTMLVideoElement::create): Ditto.
* html/HTMLVideoElement.h:
* html/TextTrack.cpp:
(WebCore::TextTrack::TextTrack): Initialize m_mode to DISABLED, not HIDDEN. Initialize m_showingByDefault.
(WebCore::TextTrack::setMode): Clear the "showing by default" flag when a track's mode is
explicitly set to SHOWING.
(WebCore::TextTrack::mode): Return SHOWING whenever the "showing by default" flag is set.
* html/TextTrack.h:
(WebCore::TextTrack::showingByDefault):
(WebCore::TextTrack::setShowingByDefault):
* html/TextTrackCue.cpp:
(WebCore::TextTrackCue::isActive): Return false if a cue has no track, or if its track is disabled.
(WebCore::TextTrackCue::setIsActive): Don't enable a cue if it has no track, or if its track
is disabled.
2011-12-15 Brady Eidson <beidson@apple.com>
Unreviewed, rolling out r102829.
http://trac.webkit.org/changeset/102829
https://bugs.webkit.org/show_bug.cgi?id=74533
Caused https://bugs.webkit.org/show_bug.cgi?id=74555
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument):
(WebCore::HTMLPlugInImageElement::didMoveToNewOwnerDocument):
(WebCore::HTMLPlugInImageElement::documentWillBecomeInactive):
(WebCore::HTMLPlugInImageElement::documentDidBecomeActive):
* html/HTMLPlugInImageElement.h:
2011-12-15 James Simonsen <simonjam@chromium.org>
[Navigation Timing] Use monotonicallyIncreasingTime() instead of currentTime()
https://bugs.webkit.org/show_bug.cgi?id=58354
Reviewed by Pavel Feldman.
No new tests. Relies on existing webtiming-* tests.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp: Use monotonic times.
(WebCore::Document::setReadyState):
(WebCore::Document::finishedParsing):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didFinishLoadingImpl): Convert monotonicFinishTime to wall time if needed.
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForTiming): Convert monotonic requestTime to wall time.
(WebCore::buildObjectForResourceResponse): Plumbing for above.
(WebCore::buildObjectForCachedResource): Ditto.
(WebCore::InspectorResourceAgent::willSendRequest): Ditto.
(WebCore::InspectorResourceAgent::didReceiveResponse): Ditto.
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): Ditto.
* loader/DocumentLoadTiming.cpp: Added.
(WebCore::DocumentLoadTiming::DocumentLoadTiming):
(WebCore::DocumentLoadTiming::setNavigationStart): Determine reference time and root reference time.
(WebCore::DocumentLoadTiming::addRedirect): Moved logic from MainResourceLoader.
(WebCore::DocumentLoadTiming::convertMonotonicTimeToDocumentTime): Helper to compute wall time from monotonic time.
* loader/DocumentLoadTiming.h: Turned into class. Made times monotonic.
(WebCore::DocumentLoadTiming::setUnloadEventStart):
(WebCore::DocumentLoadTiming::setUnloadEventEnd):
(WebCore::DocumentLoadTiming::setRedirectStart):
(WebCore::DocumentLoadTiming::setRedirectEnd):
(WebCore::DocumentLoadTiming::setFetchStart):
(WebCore::DocumentLoadTiming::setResponseEnd):
(WebCore::DocumentLoadTiming::setLoadEventStart):
(WebCore::DocumentLoadTiming::setLoadEventEnd):
(WebCore::DocumentLoadTiming::setHasSameOriginAsPreviousDocument):
(WebCore::DocumentLoadTiming::navigationStart):
(WebCore::DocumentLoadTiming::unloadEventStart):
(WebCore::DocumentLoadTiming::unloadEventEnd):
(WebCore::DocumentLoadTiming::redirectStart):
(WebCore::DocumentLoadTiming::redirectEnd):
(WebCore::DocumentLoadTiming::redirectCount):
(WebCore::DocumentLoadTiming::fetchStart):
(WebCore::DocumentLoadTiming::responseEnd):
(WebCore::DocumentLoadTiming::loadEventStart):
(WebCore::DocumentLoadTiming::loadEventEnd):
(WebCore::DocumentLoadTiming::hasCrossOriginRedirect):
(WebCore::DocumentLoadTiming::hasSameOriginAsPreviousDocument):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
(WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::continueAfterNavigationPolicy):
(WebCore::MainResourceLoader::willSendRequest): Moved logic to DocumentLoadTiming.
(WebCore::MainResourceLoader::didReceiveData): Use monotonic time.
(WebCore::MainResourceLoader::didFinishLoading): Ditto.
(WebCore::MainResourceLoader::load):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchLoadEvent):
* page/DOMWindow.h: Removed dispatchTimedEvent. It doesn't really help in the new model.
* page/PerformanceNavigation.cpp:
(WebCore::PerformanceNavigation::redirectCount):
* page/PerformanceTiming.cpp: Removed skew correction code. This should never happen now.
(WebCore::PerformanceTiming::navigationStart):
(WebCore::PerformanceTiming::unloadEventStart):
(WebCore::PerformanceTiming::unloadEventEnd):
(WebCore::PerformanceTiming::redirectStart):
(WebCore::PerformanceTiming::redirectEnd):
(WebCore::PerformanceTiming::fetchStart):
(WebCore::PerformanceTiming::responseEnd):
(WebCore::PerformanceTiming::domLoading):
(WebCore::PerformanceTiming::domInteractive):
(WebCore::PerformanceTiming::domContentLoadedEventStart):
(WebCore::PerformanceTiming::domContentLoadedEventEnd):
(WebCore::PerformanceTiming::domComplete):
(WebCore::PerformanceTiming::loadEventStart):
(WebCore::PerformanceTiming::loadEventEnd):
(WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): Used for ResourceLoadTiming.
(WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds): Used for DocumentTiming and DocumentLoadTiming.
* page/PerformanceTiming.h:
* platform/network/ResourceLoadTiming.cpp:
(WebCore::ResourceLoadTiming::convertResourceLoadTimeToDocumentTime):
* platform/network/ResourceLoadTiming.h: Added helper function to convert to wall times. Added instructions for use.
2011-12-15 Martin Robinson <mrobinson@igalia.com>
plugin crash
[GTK] Plugins sometimes crash WebKitGTK+ with Gdk-CRITICAL **: gdk_window_get_toplevel: assertion `GDK_IS_WINDOW (window)' failed
https://bugs.webkit.org/show_bug.cgi?id=73719
Reviewed by Philippe Normand.
No new tests. It's difficult to test or reproduce this exact situation
as it only occurs when running plugins under nspluginwrapper.
* plugins/gtk/PluginViewGtk.cpp:
(WebCore::PluginView::platformGetValue): Properly handle when the plugin tries to
get the window value when the GtkSocket is no longer realized.
2011-12-15 Martin Kosiba <mkosiba@google.com>
Fix find on web pages with -webkit-user-select: none for Chromium
https://bugs.webkit.org/show_bug.cgi?id=72281
Reviewed by Ryosuke Niwa.
Adding findStringAndScrollToVisible to Editor. This new method returns
the new match as a range rather than modify the active selection.
Test: editing/text-iterator/findString-selection-disabled.html
* editing/Editor.cpp:
(WebCore::Editor::findStringAndScrollToVisible):
* editing/Editor.h:
2011-12-14 Anders Carlsson <andersca@apple.com>
Add WTF::Function to wtf/Forward.h
https://bugs.webkit.org/show_bug.cgi?id=74576
Reviewed by Adam Roben.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
Add a JSC:: qualifier to the Function flags to avoid ambiguities.
2011-12-15 Julien Chaffraix <jchaffraix@webkit.org>
Hardware-backed renderLayer could avoid repainting during a positioned movement layout
https://bugs.webkit.org/show_bug.cgi?id=74370
Reviewed by Simon Fraser.
Tests: compositing/absolute-position-changed-in-composited-layer.html
compositing/absolute-position-changed-with-composited-parent-layer.html
compositing/fixed-position-changed-in-composited-layer.html
compositing/fixed-position-changed-within-composited-parent-layer.html
To be able to properly skip repainting after a positioned movement layout only, we
needed to add more state to the current |setNeedsFullRepaint| method. As part of that
we refactored the callers and internal fields to better match the new meaning.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::styleDidChange):
Explicitely gave the RepaintStatus to setRepaintStatus.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::removeOnlyThisLayer):
Updated those function after the renamings.
(WebCore::RenderLayer::updateLayerPositions):
Ditto. Also added a sholdRepaintAfterLayout check.
(WebCore::RenderLayer::shouldRepaintAfterLayout):
Heart of the optimization, if we just did a positioned movement layout of composited RenderLayer,
then don't repaint. All the other cases should still trigger a repaint.
* rendering/RenderLayer.h:
(WebCore::RenderLayer::setRepaintStatus):
Renamed setNeedsFullRepaint to setRepaintStatus. Also added a new enum RepaintStatus.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setLayerNeedsFullRepaint):
Updated after the renamings.
(WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
New method that pass a new value to the RenderLayer.
* rendering/RenderObject.h:
(WebCore::RenderObject::setNeedsPositionedMovementLayout):
Switched the call to the dedicated method.
2011-12-15 Antti Koivisto <antti@apple.com>
Don't invoke CSSStyleSelector::pushParent before Text::recalcTextStyle
https://bugs.webkit.org/show_bug.cgi?id=74575
Reviewed by Darin Adler.
Text::recalcTextStyle never enters the style selector so pushing the state is not necessary
* dom/Element.cpp:
(WebCore::Element::recalcStyle):
2011-12-15 Chris Marrin <cmarrin@apple.com>
Fixed error in Target.pri.
Unreviewed.
* Target.pri:
2011-12-15 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: #hex colors are not highlighted in CSS files
https://bugs.webkit.org/show_bug.cgi?id=74570
Reviewed by Pavel Feldman.
Drive by: highlight color keywords as colors, not as keywords.
* inspector/front-end/CSSKeywordCompletions.js:
(WebInspector.CSSKeywordCompletions.colors):
* inspector/front-end/SourceCSSTokenizer.js:
(WebInspector.SourceCSSTokenizer):
(WebInspector.SourceCSSTokenizer.prototype.nextToken):
* inspector/front-end/SourceCSSTokenizer.re2js:
2011-12-14 Chris Marrin <cmarrin@apple.com>
Hardware acceleration of W3C Filter Effects
https://bugs.webkit.org/show_bug.cgi?id=68479
Reviewed by Simon Fraser.
Move FilterOperation(s) to platform/graphics/filters so it can be used to pass filter information
down to GraphicsLayer for hardware acceleration. This leaves the CustomFilterOperation subclass in
rendering/style since it has dependencies outside platform. Some part of that class will
eventually need to be down in platform.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/filters/FilterOperation.cpp: Renamed from Source/WebCore/rendering/style/FilterOperation.cpp.
(WebCore::BasicColorMatrixFilterOperation::blend):
(WebCore::BasicColorMatrixFilterOperation::passthroughAmount):
(WebCore::BasicComponentTransferFilterOperation::blend):
(WebCore::BasicComponentTransferFilterOperation::passthroughAmount):
(WebCore::GammaFilterOperation::blend):
(WebCore::BlurFilterOperation::blend):
(WebCore::DropShadowFilterOperation::blend):
* platform/graphics/filters/FilterOperation.h: Renamed from Source/WebCore/rendering/style/FilterOperation.h.
(WebCore::FilterOperation::~FilterOperation):
(WebCore::FilterOperation::operator!=):
(WebCore::FilterOperation::blend):
(WebCore::FilterOperation::getOperationType):
(WebCore::FilterOperation::isSameType):
(WebCore::FilterOperation::FilterOperation):
(WebCore::PassthroughFilterOperation::create):
(WebCore::PassthroughFilterOperation::operator==):
(WebCore::PassthroughFilterOperation::PassthroughFilterOperation):
(WebCore::ReferenceFilterOperation::create):
(WebCore::ReferenceFilterOperation::reference):
(WebCore::ReferenceFilterOperation::operator==):
(WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
(WebCore::BasicColorMatrixFilterOperation::create):
(WebCore::BasicColorMatrixFilterOperation::amount):
(WebCore::BasicColorMatrixFilterOperation::operator==):
(WebCore::BasicColorMatrixFilterOperation::BasicColorMatrixFilterOperation):
(WebCore::BasicComponentTransferFilterOperation::create):
(WebCore::BasicComponentTransferFilterOperation::amount):
(WebCore::BasicComponentTransferFilterOperation::operator==):
(WebCore::BasicComponentTransferFilterOperation::BasicComponentTransferFilterOperation):
(WebCore::GammaFilterOperation::create):
(WebCore::GammaFilterOperation::amplitude):
(WebCore::GammaFilterOperation::exponent):
(WebCore::GammaFilterOperation::offset):
(WebCore::GammaFilterOperation::operator==):
(WebCore::GammaFilterOperation::GammaFilterOperation):
(WebCore::BlurFilterOperation::create):
(WebCore::BlurFilterOperation::stdDeviationX):
(WebCore::BlurFilterOperation::stdDeviationY):
(WebCore::BlurFilterOperation::operator==):
(WebCore::BlurFilterOperation::BlurFilterOperation):
(WebCore::SharpenFilterOperation::create):
(WebCore::SharpenFilterOperation::amount):
(WebCore::SharpenFilterOperation::radius):
(WebCore::SharpenFilterOperation::threshold):
(WebCore::SharpenFilterOperation::operator==):
(WebCore::SharpenFilterOperation::SharpenFilterOperation):
(WebCore::DropShadowFilterOperation::create):
(WebCore::DropShadowFilterOperation::x):
(WebCore::DropShadowFilterOperation::y):
(WebCore::DropShadowFilterOperation::stdDeviation):
(WebCore::DropShadowFilterOperation::color):
(WebCore::DropShadowFilterOperation::operator==):
(WebCore::DropShadowFilterOperation::DropShadowFilterOperation):
* platform/graphics/filters/FilterOperations.cpp: Renamed from Source/WebCore/rendering/style/FilterOperations.cpp.
(WebCore::FilterOperations::FilterOperations):
(WebCore::FilterOperations::operator==):
(WebCore::FilterOperations::operationsMatch):
* platform/graphics/filters/FilterOperations.h: Renamed from Source/WebCore/rendering/style/FilterOperations.h.
(WebCore::FilterOperations::operator!=):
(WebCore::FilterOperations::clear):
(WebCore::FilterOperations::operations):
(WebCore::FilterOperations::size):
(WebCore::FilterOperations::at):
2011-12-15 Igor Oliveira <igor.oliveira@openbossa.org>
[Qt] Support requestAnimationFrame API
https://bugs.webkit.org/show_bug.cgi?id=74528
Add necessary files to Target.pri when enabling requestAnimationFrame option.
Reviewed by Kenneth Rohde Christiansen.
* Target.pri:
2011-12-15 Otto Cheung <ocheung@rim.com>
Removing BlackBerryCookieCache from the build system
https://bugs.webkit.org/show_bug.cgi?id=74318
Reviewed by Rob Buis.
Removing any references to BlackBerryCookieCache in files that are upstreamed.
We are removing the BlackBerryCookieCache because the CookieManager cookie structure has been
refactored to have a similar structure to the cache. Since the read speeds in both structures
are similar, we no longer need the cache to speed up read performance.
No new tests, this patch by itself will not work. This patch is only removing
the references to BlackBerryCookieCache in files that are upstreamed.
* PlatformBlackBerry.cmake:
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyHeaderReceived):
2011-12-15 Kenneth Rohde Christiansen <kenneth@webkit.org>
[Qt] Mobile theme improvements
Rubberstamped by Simon Hausmann.
- Invert the gradient on the checkboxes
- Make the buttons on the multi select combobox work on floats
- Mini cleanups
* platform/qt/RenderThemeQtMobile.cpp:
(WebCore::StylePainterMobile::drawCheckableBackground):
(WebCore::StylePainterMobile::drawMultipleComboButton):
(WebCore::StylePainterMobile::getButtonImageSize):
(WebCore::StylePainterMobile::drawComboBox):
2011-12-15 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: CodeGeneratorInspector.py convert script conditions to precompiler #ifs
https://bugs.webkit.org/show_bug.cgi?id=74534
Reviewed by Pavel Feldman.
Generator is rewritten to add #if's to output.
* inspector/CodeGeneratorInspector.py:
(DomainNameFixes.get_fixed_data.Res.get_guard.Guard.generate_open):
(DomainNameFixes.get_fixed_data.Res.get_guard.Guard):
(DomainNameFixes.get_fixed_data.Res.get_guard.Guard.generate_close):
(DomainNameFixes.get_fixed_data.Res):
(DomainNameFixes.get_fixed_data.Res.get_guard):
(Generator.go):
(Generator.process_event):
(Generator.process_command):
(Generator.process_types):
2011-12-15 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt][WK2] Setting Download as action for navigation request crashes WebProcess
https://bugs.webkit.org/show_bug.cgi?id=74526
Reviewed by Simon Hausmann.
Adding checks for networkcontext and networkAccessManager
and return true in case they don't exist, following the same
logic as if the CookieJar doesn't exist.
* platform/qt/ThirdPartyCookiesQt.cpp:
(WebCore::thirdPartyCookiePolicyPermits):
2011-12-14 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Get rid of layering violation in PluginViewQt
PluginViewQt has a layering violation in relying on QWebPagePrivate for
the check if running under DRT. We remove this and add a specific flag
in the PluginView for this check, enabled from DRTSupport. This isn't
pretty, but an improvement over what's currently there.
Reviewed by Simon Hausmann.
* plugins/PluginView.h:
* plugins/qt/PluginViewQt.cpp:
(WebCore::PluginView::updatePluginWidget):
(WebCore::setXKeyEventSpecificFields):
2011-12-14 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Console should show network messages origins.
https://bugs.webkit.org/show_bug.cgi?id=74521
Reviewed by Pavel Feldman.
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype._formatMessage):
2011-12-15 Rakesh KN <rakesh.kn@motorola.com>
"user-select none" causes selection to incorrectly escape from clicked container
https://bugs.webkit.org/show_bug.cgi?id=57289
Reviewed by Ryosuke Niwa.
Not selecting the nearest word from the target node if target node has -webkit-user-select:none
Test: fast/events/mouse-double-triple-click-should-not-select-next-node-for-user-select-none.html
* page/EventHandler.cpp:
(WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
If target node has webkit-user-select:none style then do not update the selection.
2011-12-13 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: Generated HAR is missing pages.startedDateTime
https://bugs.webkit.org/show_bug.cgi?id=74188
Reviewed by Pavel Feldman.
* inspector/front-end/HAREntry.js:
(WebInspector.HARLog.prototype._buildPages):
* inspector/front-end/NetworkLog.js:
(WebInspector.NetworkLog):
(WebInspector.NetworkLog.prototype.get mainResourceStartTime):
(WebInspector.NetworkLog.prototype._mainFrameNavigated):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._updateSummaryBar):
2011-12-15 Kenichi Ishibashi <bashi@chromium.org>
Supports Unicode variation selector
https://bugs.webkit.org/show_bug.cgi?id=50999
Reviewed by Nikolas Zimmermann.
Adds SimpleFontData::updateGlyphWithVariationSelector() which substitutes the
glyph in question based on the selector. WidthIterator::advance() calls it
when an unicode variation selector follows the character.
Test: fast/text/unicode-variation-selector.html
* platform/graphics/SimpleFontData.h: Added updateGlyphWithVariationSelector().
* platform/graphics/SurrogatePairAwareTextIterator.cpp:
(WebCore::isUnicodeBMPVariationSelector): Added.
(WebCore::isUnicodeSupplementaryVariationSelector): Added.
(WebCore::SurrogatePairAwareTextIterator::hasTrailingVariationSelector): Added.
* platform/graphics/SurrogatePairAwareTextIterator.h:
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advance): Changed to detect variation selectors.
* platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
(WebCore::SimpleFontData::updateGlyphWithVariationSelector): Added.
* platform/graphics/chromium/SimpleFontDataLinux.cpp:
(WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::decomposeToUTF16): Ditto.
(WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
* platform/graphics/pango/SimpleFontDataPango.cpp:
(WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
* platform/graphics/qt/SimpleFontDataQt.cpp:
(WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
* platform/graphics/wince/SimpleFontDataWinCE.cpp:
(WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
* platform/graphics/wx/SimpleFontDataWx.cpp:
(WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
2011-12-15 Alexander Pavlov <apavlov@chromium.org>
[v8] Expose the "filter" property in V8CSSStyleDeclaration
https://bugs.webkit.org/show_bug.cgi?id=73426
Reviewed by Adam Barth.
Test: fast/css/style-enumerate-properties.html
The "filter" CSS property used to be masked to be compliant with JSC, but JSC has supported
this property for quite a while.
* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
(WebCore::hasCSSPropertyNamePrefix): clean up WTF prefixes
(WebCore::cssPropertyInfo): remove the "wasFilter" flag
(WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): remove the "filter" check
(WebCore::V8CSSStyleDeclaration::namedPropertyGetter): return the "filter" value as v8String
2011-12-15 Hajime Morrita <morrita@chromium.org>
Unreviewed build fix attempt for Chromium Mac.
* page/PerformanceTiming.h:
2011-12-15 Alexander Pavlov <apavlov@chromium.org>
Unreviewed, build fix after r102906 (poor merge).
* inspector/front-end/ProfileView.js:
(WebInspector.CPUProfileType.prototype.buttonClicked):
2011-12-15 Vsevolod Vlasov <vsevik@chromium.org>
Unreviewed revert of r102696 ([Navigation Timing] Use monotonicallyIncreasingTime() instead of currentTime()).
Breaks inspector's network panel timeline on chromium.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::setReadyState):
(WebCore::Document::finishedParsing):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didFinishLoadingImpl):
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForTiming):
(WebCore::buildObjectForResourceResponse):
(WebCore::buildObjectForCachedResource):
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::didReceiveResponse):
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
* loader/DocumentLoadTiming.cpp: Removed.
* loader/DocumentLoadTiming.h:
(WebCore::DocumentLoadTiming::DocumentLoadTiming):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
(WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::continueAfterNavigationPolicy):
(WebCore::MainResourceLoader::willSendRequest):
(WebCore::MainResourceLoader::didReceiveData):
(WebCore::MainResourceLoader::didFinishLoading):
(WebCore::MainResourceLoader::load):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchLoadEvent):
(WebCore::DOMWindow::dispatchTimedEvent):
* page/DOMWindow.h:
* page/PerformanceNavigation.cpp:
(WebCore::PerformanceNavigation::redirectCount):
* page/PerformanceTiming.cpp:
(WebCore::getPossiblySkewedTimeInKnownRange):
(WebCore::PerformanceTiming::navigationStart):
(WebCore::PerformanceTiming::unloadEventStart):
(WebCore::PerformanceTiming::unloadEventEnd):
(WebCore::PerformanceTiming::redirectStart):
(WebCore::PerformanceTiming::redirectEnd):
(WebCore::PerformanceTiming::fetchStart):
(WebCore::PerformanceTiming::responseEnd):
(WebCore::PerformanceTiming::domLoading):
(WebCore::PerformanceTiming::domInteractive):
(WebCore::PerformanceTiming::domContentLoadedEventStart):
(WebCore::PerformanceTiming::domContentLoadedEventEnd):
(WebCore::PerformanceTiming::domComplete):
(WebCore::PerformanceTiming::loadEventStart):
(WebCore::PerformanceTiming::loadEventEnd):
(WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute):
* page/PerformanceTiming.h:
* platform/network/ResourceLoadTiming.cpp: Removed.
* platform/network/ResourceLoadTiming.h:
2011-12-15 Alexander Pavlov <apavlov@chromium.org>
Unreviewed, fix Closure compiler warnings after r102905.
* inspector/front-end/CSSStyleModel.js: Add JSDoc annotations
2011-12-14 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: make ProfilesPanel scale as the number of ProfileTypes grows
https://bugs.webkit.org/show_bug.cgi?id=74391
Reviewed by Pavel Feldman.
Whenever a profile is started, this change disables all profile recording buttons, except the one
that correponds to the running profile. Once the profiling is finished, all buttons get enabled back again.
* English.lproj/localizedStrings.js:
* inspector/front-end/ProfileView.js:
(WebInspector.CPUProfileView.profileCallback):
(WebInspector.CPUProfileType.prototype.get buttonTooltip):
(WebInspector.CPUProfileType.prototype.get buttonStyle):
(WebInspector.CPUProfileType.prototype.buttonClicked):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype.get statusBarItems.clickHandler):
(WebInspector.ProfilesPanel.prototype.get statusBarItems):
(WebInspector.ProfilesPanel.prototype._addProfileHeader):
(WebInspector.ProfilesPanel.prototype.updateProfileTypeButtons):
(WebInspector.ProfilesPanel.prototype._updateInterface):
(WebInspector.ProfilesPanel.prototype.setRecordingProfile):
(WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
(WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
(WebInspector.ProfilerDispatcher.prototype.setRecordingProfile):
* inspector/front-end/inspector.css:
(.record-cpu-profile-status-bar-item .glyph):
(.record-cpu-profile-status-bar-item.toggled-on .glyph):
2011-12-15 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: [Styles] Update selected DOM element styles whenever applicable media queries change
https://bugs.webkit.org/show_bug.cgi?id=74292
The change introduces and handles in the frontend a new event type for the CSS domain,
"mediaQueryResultChanged", which gets fired every time a viewport-dependent media feature
changes its value. This allows users to see live changes of the (media-dependent) matched
rules for inspected elements.
Reviewed by Pavel Feldman.
* inspector/CodeGeneratorInspector.py:
(DomainNameFixes):
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::InspectorCSSAgent):
(WebCore::InspectorCSSAgent::setFrontend):
(WebCore::InspectorCSSAgent::clearFrontend):
(WebCore::InspectorCSSAgent::restore):
(WebCore::InspectorCSSAgent::enable):
(WebCore::InspectorCSSAgent::disable):
(WebCore::InspectorCSSAgent::mediaQueryResultChanged):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::mediaQueryResultChangedImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::mediaQueryResultChanged):
* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSStyleModel):
(WebInspector.CSSStyleModel.prototype.mediaQueryResultChanged):
(WebInspector.CSSDispatcher):
(WebInspector.CSSDispatcher.prototype.mediaQueryResultChanged):
* inspector/front-end/MetricsSidebarPane.js:
(WebInspector.MetricsSidebarPane):
(WebInspector.MetricsSidebarPane.prototype._styleSheetOrMediaQueryResultChanged):
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane):
(WebInspector.StylesSidebarPane.prototype._styleSheetOrMediaQueryResultChanged):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
2011-12-14 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: [Regression] Network manager fails to show resource type and MIME type in incorrect MIME type console message.
https://bugs.webkit.org/show_bug.cgi?id=74516
Reviewed by Pavel Feldman.
Test: http/tests/inspector/network/script-as-text-loading.html
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype._formatMessage):
* inspector/front-end/NetworkManager.js:
(WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
2011-11-03 Kent Tamura <tkent@chromium.org>
A spin button changes the value incorrectly if it is clicked after touch events.
https://bugs.webkit.org/show_bug.cgi?id=71181
Reviewed by Ryosuke Niwa.
SpinButtonElement assumed setHovered(true) was always called before a
mousemove event in the element. It is not true for touch events.
We should not reset m_upDownState to Indetermiante in setHovered(true),
and should reset it when the mouse pointer moves out.
This change fixes the flakiness of fast/forms/input-step-as-double.html.
Test: fast/events/touch/touch-before-pressing-spin-button.html
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SpinButtonElement::defaultEventHandler):
Add an assertion that m_upDownState should not be Indetermiante.
Reset m_upDownState to Indeterminate when the mouse pointer moves out
from the element.
(WebCore::SpinButtonElement::setHovered):
Reset m_upDownState to Indeterminate when the element becomes unhovered.
2011-12-14 Lucas Forschler <lforschler@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=74543
Add CSS*.cpp to a new CSSAllInOne.cpp file with two exceptions:
CSSProperty.cpp
CSSPrimitiveValue.cpp
Adding these two broke things with a templates problem that was not easily fixable.
Reviewed by Steve Falkenburg.
* WebCore.vcproj/WebCore.vcproj:
* css/CSSAllInOne.cpp: Added.
2011-12-14 Tim Horton <timothy_horton@apple.com>
Generated images should respect the accelerated state of the context they're going to be drawn into
https://bugs.webkit.org/show_bug.cgi?id=74577
<rdar://problem/10584392>
Reviewed by Simon Fraser.
The tiled code path for GeneratorGeneratedImage and CrossfadeGeneratedImage blindly creates
an unaccelerated ImageBuffer. Instead, take into account the accelerated state of the destination context.
No new tests, as this is a simple performance improvement.
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::drawPattern):
2011-12-14 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: cleanup unused variable introduced at r102803
* inspector/front-end/NetworkManager.js:
(WebInspector.NetworkManager.prototype.enableResourceTracking):
(WebInspector.NetworkManager.prototype.disableResourceTracking):
2011-12-14 Wei James <james.wei@intel.com>
fast path to accelerate processing in AudioBus::processWithGainFromMonoStereo
https://bugs.webkit.org/show_bug.cgi?id=74054
Reviewed by Kenneth Russell.
Avoid de-zippering when the gain has converged on the targetGain.
It can get about 75% performance gain at most when all frames don't need
de-zippering.
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::processWithGainFromMonoStereo):
2011-12-14 Adam Klein <adamk@chromium.org>
Optimize MutationObserverInterestGroup construction
https://bugs.webkit.org/show_bug.cgi?id=74563
Reviewed by Ojan Vafai.
Inline MutationObserverInterestGroup's creation methods and fix an
accidental pass-by-value in an attempt to further reduce the CPU
footprint of MutationObservers.
No new tests, refactor only.
* dom/WebKitMutationObserver.cpp:
(WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup): Pass observers HashMap by reference.
* dom/WebKitMutationObserver.h:
(WebCore::MutationObserverInterestGroup::createForChildListMutation): Inline.
(WebCore::MutationObserverInterestGroup::createForCharacterDataMutation): Inline.
(WebCore::MutationObserverInterestGroup::createForAttributesMutation): Inline.
(WebCore::MutationObserverInterestGroup::hasOldValue): Remove spurious inline keyword.
2011-12-14 Dominic Mazzoni <dmazzoni@google.com>
Seeing crash in DRT after loading-iframe-sends-notification.html land
https://bugs.webkit.org/show_bug.cgi?id=72624
When an iframe finishes loading, send an accessibility notification
on the renderer, rather than on a parent node. The only reason it was
being posted on a parent before was because there was no way to detect
that in a test. This is simpler and now covered by the test.
Reviewed by Chris Fleizach.
Updates existing test:
accessibility/loading-iframe-sends-notification.html
* dom/Document.cpp:
(WebCore::Document::implicitClose):
2011-12-14 Nat Duca <nduca@chromium.org>
[chromium] Add inhibitDraw to CCScheduler and drop root impl to prevent background flash on tab restore
https://bugs.webkit.org/show_bug.cgi?id=74351
Reviewed by James Robinson.
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::setNeedsCommit):
(WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
* platform/graphics/chromium/cc/CCScheduler.cpp:
(WebCore::CCScheduler::getNextAction):
(WebCore::CCScheduler::processScheduledActions):
* platform/graphics/chromium/cc/CCScheduler.h:
* platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
(WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine):
(WebCore::CCSchedulerStateMachine::nextAction):
* platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
(WebCore::CCSchedulerStateMachine::setInhibitDraw):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::setVisibleOnImplThread):
(WebCore::CCThreadProxy::inhibitDraw):
* platform/graphics/chromium/cc/CCThreadProxy.h:
2011-12-14 Ken Buchanan <kenrb@chromium.org>
Crash due to incorrect parsing of isolates
https://bugs.webkit.org/show_bug.cgi?id=74311
When <bdi> content is wrapped, all hell breaks loose
https://bugs.webkit.org/show_bug.cgi?id=74396
Reviewed by Eric Seidel.
When an isolate was encountered during run layout, the entire isolate
would be parsed, even if the run started in the middle of the isolate.
This would sometimes cause parts of the isolate to be added multiple
times as runs. This patch marks the starting position within the
isolate so nothing is parsed twice.
This patch changes appendRun() so that when a run is added that is
inside an isolate, it saves the start position of the run rather than
the root. This allows constructBidiRuns() to resume parsing the
isolate from the correct position.
The change to RenderBox partially reverts a previous change I had
done. It makes sense to screen for the condition, as was previously
the case.
This patch does not add the test case from 74396 because a separate
bug is preventing it from rendering correctly.
* rendering/InlineIterator.h:
(WebCore::addPlaceholderRunForIsolatedInline)
(WebCore::IsolateTracker::addFakeRunIfNecessary)
(WebCore::InlineBidiResolver::appendRun)
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockLineLayout::constructBidiRuns)
* rendering/RenderBox.cpp:
(WebCore::RenderBox::positionLineBox)
2011-12-14 Jing Zhao <jingzhao@chromium.org>
Opening two popup menus by dispatchEvent() makes problems.
https://bugs.webkit.org/show_bug.cgi?id=73304
Reviewed by Kent Tamura.
By using element.dispatchEvent(), a user written script can open two
popup menus, which causes various problems in different platforms.
Add a hasOpenedPopup() method in ChromeClient and a wrapper in Chrome.
In RenderMenuList::showPopup(), check if there is an opened popup menu
before opening a new popup menu.
Test: fast/forms/select-popup-crash.html
* loader/EmptyClients.h: Overrides hasOpenedPopup().
(WebCore::EmptyChromeClient::hasOpenedPopup): Returns false as a default case.
* page/Chrome.cpp:
(WebCore::Chrome::hasOpenedPopup): Calls ChromeClient::hasOpenedPopup().
* page/Chrome.h: Declares hasOpenedPopup().
* page/ChromeClient.h: Declares hasOpenedPopup() as a pure virtual function.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::showPopup): Calls Chrome::hasOpenedPopup() before opening a new popup menu.
2011-12-14 Tony Chang <tony@chromium.org>
Clean up style in CSSStyleSelector.cpp
https://bugs.webkit.org/show_bug.cgi?id=74548
Reviewed by Ojan Vafai.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::styleForElement):
(WebCore::CSSStyleSelector::pseudoStyleForElement):
2011-12-14 Kenneth Russell <kbr@google.com>
Unreviewed, rolling out r102794.
http://trac.webkit.org/changeset/102794
https://bugs.webkit.org/show_bug.cgi?id=74220
Reapplying patch since it is not the cause of the problems
described in bug 74220.
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::reportUnsafeAccessTo):
* bindings/v8/V8Proxy.h:
* bindings/v8/custom/V8CustomXPathNSResolver.cpp:
(WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
2011-12-14 Sam Weinig <weinig@apple.com>
Remove whitespace from InheritedPropertySheets attributes in
vsprops files to appease the Visual Studio project migrator.
Reviewed by Adam Roben.
* WebCore.vcproj/QTMovieWinDebug.vsprops:
* WebCore.vcproj/QTMovieWinDebugAll.vsprops:
* WebCore.vcproj/QTMovieWinDebugCairoCFLite.vsprops:
* WebCore.vcproj/QTMovieWinProduction.vsprops:
* WebCore.vcproj/QTMovieWinRelease.vsprops:
* WebCore.vcproj/QTMovieWinReleaseCairoCFLite.vsprops:
* WebCore.vcproj/WebCoreDebug.vsprops:
* WebCore.vcproj/WebCoreDebugAll.vsprops:
* WebCore.vcproj/WebCoreDebugCairoCFLite.vsprops:
* WebCore.vcproj/WebCoreProduction.vsprops:
* WebCore.vcproj/WebCoreRelease.vsprops:
* WebCore.vcproj/WebCoreReleaseCairoCFLite.vsprops:
2011-12-14 Enrica Casucci <enrica@apple.com>
One more attempt to fix the release build (hopefully the last)
Unreviewed.
* editing/ReplaceSelectionCommand.cpp: Added NodeRenderStyle.h
2011-12-14 Kenneth Russell <kbr@google.com>
Unreviewed, rolling out r102816.
http://trac.webkit.org/changeset/102816
https://bugs.webkit.org/show_bug.cgi?id=74415
Implicated in font-related crashes on Chromium canaries.
* platform/graphics/chromium/FontChromiumWin.cpp:
(WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
(WebCore::Font::drawGlyphs):
* platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::operator=):
(WebCore::FontPlatformData::~FontPlatformData):
* platform/graphics/chromium/FontPlatformDataChromiumWin.h:
(WebCore::FontPlatformData::size):
(WebCore::FontPlatformData::hash):
* platform/graphics/skia/SkiaFontWin.cpp:
(WebCore::setupPaintForFont):
(WebCore::paintSkiaText):
* platform/graphics/skia/SkiaFontWin.h:
2011-12-14 Simon Fraser <simon.fraser@apple.com>
Filter amounts should accept percentages
https://bugs.webkit.org/show_bug.cgi?id=74531
Reviewed by Chris Marrin.
Support percentage arguments for some filter functions, using the FPercent flag
to validUnit(). Fix CSSStyleSelector::createFilterOperations() to do the divide by 100
for percentages.
Replaced isValidFilterArgument(), which just tested arguments one by one for validity, with
parseBuiltinFilterArguments() which tests and creates the CSSValues at the same time, which
is a little more efficient. It also allows filter-specific behavior to be more localized in this
method.
Covered by existing tests.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseBuiltinFilterArguments):
(WebCore::CSSParser::parseFilter):
* css/CSSParser.h:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::createFilterOperations):
2011-12-14 Enrica Casucci <enrica@apple.com>
Build fix.
Unreviewed.
* editing/ReplaceSelectionCommand.cpp: Added include RenderStyle.h
2011-12-14 Hajime Morrita <morrita@chromium.org>
JS_INLINE and WTF_INLINE should be visible from WebCore
https://bugs.webkit.org/show_bug.cgi?id=73191
Reviewed by Kevin Ollivier.
- Moved export related definitions from config.h
to ExportMacros.h, JSExportMacros.h and PlatformExportMacros.h
- Added forwarding headers which are referred from config.h
No new tests. Only build related changes.
* ForwardingHeaders/runtime/JSExportMacros.h: Added.
* ForwardingHeaders/wtf/ExportMacros.h: Added.
* WebCore.xcodeproj/project.pbxproj:
* config.h:
* platform/PlatformExportMacros.h: Copied from Source/JavaScriptCore/wtf/ExportMacros.h.
2011-12-14 Enrica Casucci <enrica@apple.com>
Need a way to produce leaner markup when pasting a fragment containing verbose markup
https://bugs.webkit.org/show_bug.cgi?id=74514
<rdar://problem/10208653>
Reviewed by Ryosuke Niwa.
This patch is another step in the direction of reducing the verbosity of the markup
produced with editing operations.
After the copied fragment is inserted in the document, it is analyzed to remove all
the elements that don't contribute to the style. The decision is made comparing the
render styles. As part of the cleanup, unstyled divs with single child element are
removed. The logic to determine the blocks that can be removed is the same used in
DeleteSelectionCommand and has been moved in CompositeEditCommand.
Test: editing/pasteboard/paste-and-sanitize.html
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::isRemovableBlock): Implements logic to determine
if a block can be removed.
* editing/CompositeEditCommand.h: Added isRemovableBlock declaration.
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::removeRedundantBlocks): Implemented using
isRemovableBlock from CompositeEditCommand.
* editing/Editor.cpp:
(WebCore::Editor::replaceSelectionWithFragment): Added SanitizeFragment option.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand): Added initialization
of m_sanitizeFragment member.
(WebCore::ReplaceSelectionCommand::removeRedundantMarkup): New method implementing
the cleanup logic.
(WebCore::ReplaceSelectionCommand::doApply): Added call to removeRedundantMarkup
after the fragment is inserted in the document.
* editing/ReplaceSelectionCommand.h: Added new value to the enum CommandOption,
a new member variable and the new method declaration.
2011-12-14 Adrienne Walker <enne@google.com>
[chromium] Refactor tile drawing to be more data-driven
https://bugs.webkit.org/show_bug.cgi?id=73059
Reviewed by James Robinson.
Partially tested by compositor layout tests. Debug borders and
checkerboarding tested manually.
This is the first part of a move towards rendering quads on screen
from a bag of data rather than in virtual CCLayerImpl::draw functions.
CCDrawQuad-derived classes store material-specific pieces of data to
use when rendering. CCLayerImpl classes now create these CCDrawQuad
objects rather than issuing direct GL commands. Where this data is
shared between quads that come from the same layer, that data is
stored in a CCSharedQuadState object rather than duplicated.
CCRenderPass is the class that holds the list of quads and the target
surface that they draw into. Drawing a frame consists of drawing a
series of render passes onto their respective surfaces.
CCLayerTreeHostImpl constructs these render passes from the output of
calculateDrawTransformsAndVisibility by asking each layer to insert
quads into a list and hands them off to LayerRendererChromium for
rendering.
* WebCore.gypi:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::clearSurfaceForDebug):
(WebCore::LayerRendererChromium::beginDrawingFrame):
(WebCore::LayerRendererChromium::drawRenderPass):
(WebCore::LayerRendererChromium::drawQuad):
(WebCore::LayerRendererChromium::drawDebugBorderQuad):
(WebCore::LayerRendererChromium::drawRenderSurfaceQuad):
(WebCore::LayerRendererChromium::drawSolidColorQuad):
(WebCore::tileUniformLocation):
(WebCore::findTileProgramUniforms):
(WebCore::LayerRendererChromium::drawTileQuad):
(WebCore::LayerRendererChromium::drawCustomLayerQuad):
(WebCore::LayerRendererChromium::finishDrawingFrame):
(WebCore::LayerRendererChromium::useRenderSurface):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/ShaderChromium.h:
(WebCore::FragmentTexAlphaBinding::edgeLocation):
(WebCore::FragmentTexAlphaBinding::fragmentTexTransformLocation):
(WebCore::FragmentTexOpaqueBinding::edgeLocation):
(WebCore::FragmentTexOpaqueBinding::fragmentTexTransformLocation):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::pushPropertiesTo):
* platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp: Added.
(WebCore::CCCustomLayerDrawQuad::create):
(WebCore::CCCustomLayerDrawQuad::CCCustomLayerDrawQuad):
* platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h: Added.
(WebCore::CCCustomLayerDrawQuad::layer):
* platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp: Added.
(WebCore::CCDebugBorderDrawQuad::create):
(WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad):
* platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h: Added.
(WebCore::CCDebugBorderDrawQuad::color):
(WebCore::CCDebugBorderDrawQuad::width):
* platform/graphics/chromium/cc/CCDrawQuad.cpp: Added.
(WebCore::CCDrawQuad::CCDrawQuad):
(WebCore::CCDrawQuad::toDebugBorderDrawQuad):
(WebCore::CCDrawQuad::toRenderSurfaceDrawQuad):
(WebCore::CCDrawQuad::toSolidColorDrawQuad):
(WebCore::CCDrawQuad::toTileDrawQuad):
(WebCore::CCDrawQuad::toCustomLayerDrawQuad):
* platform/graphics/chromium/cc/CCDrawQuad.h: Added.
(WebCore::CCDrawQuad::quadRect):
(WebCore::CCDrawQuad::quadTransform):
(WebCore::CCDrawQuad::layerTransform):
(WebCore::CCDrawQuad::layerRect):
(WebCore::CCDrawQuad::clipRect):
(WebCore::CCDrawQuad::opacity):
(WebCore::CCDrawQuad::drawsOpaque):
(WebCore::CCDrawQuad::needsBlending):
(WebCore::CCDrawQuad::isLayerAxisAlignedIntRect):
(WebCore::CCDrawQuad::material):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::createSharedQuadState):
(WebCore::CCLayerImpl::appendQuads):
(WebCore::CCLayerImpl::appendDebugBorderQuad):
(WebCore::CCLayerImpl::quadTransform):
* platform/graphics/chromium/cc/CCLayerImpl.h:
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces):
(WebCore::computeScreenSpaceTransformForSurface):
(WebCore::damageInSurfaceSpace):
(WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
(WebCore::CCLayerTreeHostImpl::drawLayers):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
* platform/graphics/chromium/cc/CCRenderPass.cpp: Added.
(WebCore::CCRenderPass::create):
(WebCore::CCRenderPass::CCRenderPass):
(WebCore::CCRenderPass::appendQuadsForLayer):
(WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
* platform/graphics/chromium/cc/CCRenderPass.h: Added.
(WebCore::CCRenderPass::quadList):
(WebCore::CCRenderPass::targetSurface):
(WebCore::CCRenderPass::setSurfaceDamageRect):
(WebCore::CCRenderPass::surfaceDamageRect):
* platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp: Added.
(WebCore::CCRenderSurfaceDrawQuad::create):
(WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad):
* platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h: Added.
(WebCore::CCRenderSurfaceDrawQuad::layer):
(WebCore::CCRenderSurfaceDrawQuad::surfaceDamageRect):
* platform/graphics/chromium/cc/CCSharedQuadState.cpp: Added.
(WebCore::CCSharedQuadState::create):
(WebCore::CCSharedQuadState::CCSharedQuadState):
(WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect):
* platform/graphics/chromium/cc/CCSharedQuadState.h: Added.
(WebCore::CCSharedQuadState::quadTransform):
(WebCore::CCSharedQuadState::layerTransform):
(WebCore::CCSharedQuadState::layerRect):
(WebCore::CCSharedQuadState::clipRect):
(WebCore::CCSharedQuadState::opacity):
(WebCore::CCSharedQuadState::isOpaque):
* platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp: Added.
(WebCore::CCSolidColorDrawQuad::create):
(WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
* platform/graphics/chromium/cc/CCSolidColorDrawQuad.h: Added.
(WebCore::CCSolidColorDrawQuad::color):
* platform/graphics/chromium/cc/CCTileDrawQuad.cpp: Added.
(WebCore::CCTileDrawQuad::create):
(WebCore::CCTileDrawQuad::CCTileDrawQuad):
* platform/graphics/chromium/cc/CCTileDrawQuad.h: Added.
(WebCore::CCTileDrawQuad::textureId):
(WebCore::CCTileDrawQuad::textureOffset):
(WebCore::CCTileDrawQuad::textureSize):
(WebCore::CCTileDrawQuad::textureFilter):
(WebCore::CCTileDrawQuad::swizzleContents):
(WebCore::CCTileDrawQuad::leftEdgeAA):
(WebCore::CCTileDrawQuad::topEdgeAA):
(WebCore::CCTileDrawQuad::rightEdgeAA):
(WebCore::CCTileDrawQuad::bottomEdgeAA):
(WebCore::CCTileDrawQuad::isAntialiased):
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::CCTiledLayerImpl::CCTiledLayerImpl):
(WebCore::CCTiledLayerImpl::quadTransform):
(WebCore::CCTiledLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCTiledLayerImpl.h:
(WebCore::CCTiledLayerImpl::setContentsSwizzled):
(WebCore::CCTiledLayerImpl::contentsSwizzled):
2011-12-14 Ojan Vafai <ojan@chromium.org>
Implement flexDirection and flexWrap and make flexFlow a proper shorthand.
https://bugs.webkit.org/show_bug.cgi?id=74542
Reviewed by Tony Chang.
In a followup patch, I'll cleanup all the *Flow methods in RenderFlexibleBox.
Existing tests cover all the rendering behaviors, so only need to test
the css property parsing.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::getPropertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EFlexDirection):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyLonghand.cpp:
(WebCore::initShorthandMap):
* css/CSSPropertyNames.in:
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::sizesToIntrinsicLogicalWidth):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::isColumnFlow):
(WebCore::RenderFlexibleBox::isLeftToRightFlow):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::alignChildren):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::flexDirection):
(WebCore::InheritedFlags::isColumnFlexDirection):
(WebCore::InheritedFlags::setFlexDirection):
(WebCore::InheritedFlags::initialFlexDirection):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleFlexibleBoxData.cpp:
(WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
(WebCore::StyleFlexibleBoxData::operator==):
* rendering/style/StyleFlexibleBoxData.h:
2011-12-13 Jon Lee <jonlee@apple.com>
Enable notifications on Mac.
Reviewed by Sam Weinig.
* Configurations/FeatureDefines.xcconfig:
2011-12-14 Ryosuke Niwa <rniwa@webkit.org>
COMPILE_ASSERT in CSSStyleSelector.cpp doesn't compile on Windows
https://bugs.webkit.org/show_bug.cgi?id=74327
Reviewed by Darin Adler.
Always use unsigned instead of bool and unsigned in the bitfields of RuleData to shrink
its size under MSVC.
Unlike gcc and clang, MSVC pads each consecutive member variables of the same type
in bitfields. e.g. if you have:
sturct AB {
unsigned m_1 : 31;
bool m_2 : 1;
}
then MSVC pads m_1 and allocates sizeof(unsigned) * 2 for AB whereas gcc and clang
only allocate sizeof(unsigned) * 1 for AB.
* css/CSSStyleSelector.cpp:
(WebCore::RuleData::RuleData):
2011-12-14 Ryosuke Niwa <rniwa@webkit.org>
NodeChildList shouldn't be in NodeListNodeData
https://bugs.webkit.org/show_bug.cgi?id=73969
Reviewed by Sam Weinig.
Move NodeChildList out of NodeListNodeData to separate it from the other node lists in order to
resolve the bug 73853. Unlike other DynamicNodeList, we don't need to invalidate NodeChildList
on ancestors when children change. Moving ChildNodeList out of NodeListNodeData makes this difference
apparent and makes DynamicNodeList::Caches in NodeListNodeData always held by a DynamicSubtreeNodeList,
eliminating the need for hasOwnCaches() checks in various places.
Also renamed the existing DynamicNodeList to DynamicSubtreeNodeList and re-introduced DynamicNodeList
from which DynamicSubtreeNodeList and ChildNodeList both inherit to share the code for itemWithName.
In addition, renamed registerDynamicNodeList and unregisterDynamicNodeList, which updates a counter for
TreeScope::hasNodeListCaches, to registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList
respectively. They are no longer called by ChildNodeList in order to avoid walking up the DOM tree
inside invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged.
Test: fast/dom/childnode-item-after-itemname.html
* bindings/js/JSNodeListCustom.cpp:
(WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::ChildNodeList):
(WebCore::ChildNodeList::length):
(WebCore::ChildNodeList::item):
(WebCore::ChildNodeList::nodeMatches):
* dom/ChildNodeList.h:
* dom/ClassNodeList.cpp:
(WebCore::ClassNodeList::ClassNodeList):
(WebCore::ClassNodeList::~ClassNodeList):
* dom/ClassNodeList.h:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::childrenChanged):
* dom/DynamicNodeList.cpp:
(WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
(WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
(WebCore::DynamicSubtreeNodeList::length):
(WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
(WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
(WebCore::DynamicSubtreeNodeList::item):
(WebCore::DynamicNodeList::itemWithName):
(WebCore::DynamicSubtreeNodeList::isDynamicNodeList):
(WebCore::DynamicSubtreeNodeList::invalidateCache):
(WebCore::DynamicSubtreeNodeList::Caches::Caches):
(WebCore::DynamicSubtreeNodeList::Caches::create):
(WebCore::DynamicSubtreeNodeList::Caches::reset):
* dom/DynamicNodeList.h:
(WebCore::DynamicNodeList::DynamicNodeList):
(WebCore::DynamicNodeList::~DynamicNodeList):
(WebCore::DynamicNodeList::node):
(WebCore::DynamicSubtreeNodeList::rootNode):
* dom/NameNodeList.cpp:
(WebCore::NameNodeList::NameNodeList):
(WebCore::NameNodeList::~NameNodeList):
* dom/NameNodeList.h:
* dom/Node.cpp:
(WebCore::Node::childNodes):
(WebCore::Node::registerDynamicSubtreeNodeList):
(WebCore::Node::unregisterDynamicSubtreeNodeList):
(WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
(WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged):
(WebCore::Node::removeCachedClassNodeList):
(WebCore::Node::removeCachedNameNodeList):
(WebCore::Node::removeCachedTagNodeList):
(WebCore::Node::removeCachedLabelsNodeList):
(WebCore::NodeListsNodeData::invalidateCaches):
(WebCore::NodeListsNodeData::isEmpty):
(WebCore::NodeRareData::clearChildNodeListCache):
* dom/Node.h:
* dom/NodeRareData.h:
(WebCore::NodeRareData::nodeLists):
(WebCore::NodeRareData::ensureChildNodeListCache):
* dom/TagNodeList.cpp:
(WebCore::TagNodeList::TagNodeList):
(WebCore::TagNodeList::~TagNodeList):
* dom/TagNodeList.h:
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::LabelsNodeList):
* html/LabelsNodeList.h:
2011-12-14 Ryosuke Niwa <rniwa@webkit.org>
Push more member functions from EditCommand to CompositeEditCommand
https://bugs.webkit.org/show_bug.cgi?id=74249
Reviewed by Enrica Casucci.
Moved startingRootEditableElement and endingRootEditableElement from EditCommand to EditCommandComposition,
and isTypingCommand, preservesTypingStyle, shouldRetainAutocorrectionIndicator,
setShouldRetainAutocorrectionIndicator, and shouldStopCaretBlinking from EditCommand to CompositeEditCommand.
Also removed EditCommand::updateLayout().
* editing/ApplyBlockElementCommand.cpp:
(WebCore::ApplyBlockElementCommand::doApply):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyBlockStyle):
(WebCore::ApplyStyleCommand::applyInlineStyle):
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::EditCommandComposition):
(WebCore::EditCommandComposition::setStartingSelection):
(WebCore::EditCommandComposition::setEndingSelection):
(WebCore::CompositeEditCommand::preservesTypingStyle):
(WebCore::CompositeEditCommand::isTypingCommand):
(WebCore::CompositeEditCommand::shouldRetainAutocorrectionIndicator):
(WebCore::CompositeEditCommand::setShouldRetainAutocorrectionIndicator):
(WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
(WebCore::CompositeEditCommand::moveParagraphs):
* editing/CompositeEditCommand.h:
(WebCore::EditCommandComposition::startingRootEditableElement):
(WebCore::EditCommandComposition::endingRootEditableElement):
(WebCore::CompositeEditCommand::shouldStopCaretBlinking):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::removeNode):
(WebCore::DeleteSelectionCommand::fixupWhitespace):
* editing/EditCommand.cpp:
(WebCore::EditCommand::apply):
(WebCore::EditCommand::unapply):
(WebCore::EditCommand::reapply):
(WebCore::EditCommand::setStartingSelection):
(WebCore::EditCommand::setEndingSelection):
(WebCore::EditCommand::setParent):
* editing/EditCommand.h:
(WebCore::EditCommand::isEditCommandComposition):
* editing/Editor.cpp:
(WebCore::dispatchEditableContentChangedEvents):
(WebCore::Editor::appliedEditing):
(WebCore::Editor::unappliedEditing):
(WebCore::Editor::reappliedEditing):
* editing/Editor.h:
(WebCore::Editor::lastEditCommand):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::updateAppearance):
* editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::outdentParagraph):
* editing/InsertLineBreakCommand.cpp:
(WebCore::InsertLineBreakCommand::doApply):
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
* editing/TypingCommand.h:
(WebCore::TypingCommand::shouldRetainAutocorrectionIndicator):
2011-12-14 Tony Chang <tony@chromium.org>
Fix compile on gcc on Mac.
css/CSSStyleSelector.cpp:1254:166: error: unused parameter 'regionForStyling' [-Werror,-Wunused-parameter,3]
css/CSSStyleSelector.cpp:1425:134: error: unused parameter 'regionForStyling' [-Werror,-Wunused-parameter,3]
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::styleForElement):
(WebCore::CSSStyleSelector::pseudoStyleForElement):
2011-12-14 Brady Eidson <beidson@apple.com>
<rdar://problem/10576732> and https://bugs.webkit.org/show_bug.cgi?id=74533
REGRESSION(r102619): Reproducible crash closing window with video + poster image inside an object element
Reviewed by Darin Adler.
Test: media/crash-closing-page-with-media-as-plugin-fallback.html
Switch HTMLPlugInImageElement from using document activation callbacks to using the ActiveDOMObject
mechanism which will prevent the unnecessary (and crashy) work at Document teardown:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::canSuspend):
(WebCore::HTMLPlugInImageElement::suspend):
(WebCore::HTMLPlugInImageElement::resume):
* html/HTMLPlugInImageElement.h:
2011-12-14 Adrienne Walker <enne@google.com>
[chromium] Compositor needs to set texture filtering on canvas layers
https://bugs.webkit.org/show_bug.cgi?id=74530
Reviewed by James Robinson.
* platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
(WebCore::CCCanvasLayerImpl::draw):
2011-12-14 Tony Chang <tony@chromium.org>
Remove added calls to CSSStyleSelector to gain back another 2% in page cyclers
https://bugs.webkit.org/show_bug.cgi?id=74537
Reviewed by Ojan Vafai.
In r102234, calls to initForRegionStyling() were added in CSSStyleSelector.
There's still a 2% perf regression in chromium page cyclers, so try removing
these calls.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::styleForElement):
(WebCore::CSSStyleSelector::pseudoStyleForElement):
2011-12-14 Jonathan Backer <backer@chromium.org>
[chromium] Plumb through flag for enabling partial swap
https://bugs.webkit.org/show_bug.cgi?id=74513
Reviewed by James Robinson.
* page/Settings.h:
(WebCore::Settings::setPartialSwapEnabled):
(WebCore::Settings::partialSwapEnabled):
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
2011-12-14 Mike Reed <reed@google.com>
[skia] cache typeface in FontPlatformData
https://bugs.webkit.org/show_bug.cgi?id=74415
Reviewed by Stephen White.
No new tests. Existing tests apply, this is just an optimization
to avoid looking up the typeface on each drawText call.
* platform/graphics/chromium/FontChromiumWin.cpp:
(WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
(WebCore::Font::drawGlyphs):
* platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
(WebCore::createTypefaceFromHFont):
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::operator=):
(WebCore::FontPlatformData::~FontPlatformData):
* platform/graphics/chromium/FontPlatformDataChromiumWin.h:
(WebCore::FontPlatformData::typeface):
(WebCore::FontPlatformData::lfQuality):
(WebCore::FontPlatformData::hash):
(WebCore::FontPlatformData::operator==):
* platform/graphics/skia/SkiaFontWin.cpp:
(WebCore::setupPaintForFont):
(WebCore::paintSkiaText):
* platform/graphics/skia/SkiaFontWin.h:
2011-12-14 Simon Fraser <simon.fraser@apple.com>
Make -webkit-filter animatable
https://bugs.webkit.org/show_bug.cgi?id=68476
Reviewed by Chris Marrin.
Add -webkit-filter to the list of CSS properties that are animatable. Animate
it like we do transforms, by looking for matching lists of filter functions.
Each kind of filter operation has a blend() method that handles blending
for that filter.
Test: css3/filters/filter-animation.html
* GNUmakefile.list.am: Add FilterOperation.cpp to the build.
* Target.pri: Ditto
* WebCore.gypi: Ditto
* WebCore.vcproj/WebCore.vcproj: Ditto
* WebCore.xcodeproj/project.pbxproj: Ditto
* page/animation/AnimationBase.cpp:
(WebCore::blendFunc): New blendFunc() for FilterOperations, which does per-filter blending.
(WebCore::AnimationBase::ensurePropertyMap): Make PropertyWrapper for filters.
(WebCore::AnimationBase::AnimationBase): Adjust initialization order.
* page/animation/AnimationBase.h: Adjusted the member variable order to minimize padding.
(WebCore::AnimationBase::filterFunctionListsMatch): Accessor for the flag.
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::reset):
(WebCore::ImplicitAnimation::validateTransformFunctionList): Adjust comment. The "is valid" terminology is confusing.
(WebCore::ImplicitAnimation::checkForMatchingFilterFunctionLists): New method to check for matching lists
of filter functions.
* page/animation/ImplicitAnimation.h:
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::KeyframeAnimation):
(WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists): New method to check for matching lists
of filter functions.
* page/animation/KeyframeAnimation.h:
* rendering/style/FilterOperation.cpp: Added.
(WebCore::BasicColorMatrixFilterOperation::blend):
(WebCore::BasicColorMatrixFilterOperation::passthroughAmount):
(WebCore::BasicComponentTransferFilterOperation::blend):
(WebCore::BasicComponentTransferFilterOperation::passthroughAmount): Different filters have
different values for m_amount for the "passthrough" behavior. This method returns the appropriate value.
(WebCore::GammaFilterOperation::blend):
(WebCore::BlurFilterOperation::blend):
(WebCore::DropShadowFilterOperation::blend):
* rendering/style/FilterOperation.h:
(WebCore::FilterOperation::blend):
(WebCore::PassthroughFilterOperation::create): New "no-op" filter.
(WebCore::PassthroughFilterOperation::operator==):
(WebCore::PassthroughFilterOperation::PassthroughFilterOperation):
* rendering/style/FilterOperations.cpp:
(WebCore::FilterOperations::operationsMatch):
* rendering/style/FilterOperations.h:
2011-12-14 Adam Klein <adamk@chromium.org>
Broaden support for mutation observation of attributes
https://bugs.webkit.org/show_bug.cgi?id=74448
Reviewed by Ryosuke Niwa.
The previously-landed MutationObserver support for attributes was incomplete:
it didn't support mutations related to Attr nodes (methods on Attrs,
setAttributeNode/removeAttributeNode on Element, or methods on NamedNodeMap).
This patch adds full support of mutation observation for all these cases,
and adds test cases for all these situations.
* dom/Attr.cpp:
(WebCore::Attr::setValue): Enqueue a mutation record when Attr.value is set from JS.
(WebCore::Attr::childrenChanged): Enqueue a mutation record when an Attr's value
changes to due additions/removals of Text children.
* dom/Element.cpp:
(WebCore::Element::enqueueAttributesMutationRecordIfRequested): Previously a static,
expose as part of Element's interface to allow it to be re-used by NamedNodeMap and Attr.
(WebCore::Element::removeAttribute): Remove enqueue call now handled by NamedNodeMap.
(WebCore::Element::setAttributeInternal): Fixup call of enqueueAttributesMutationRecordIfRequested.
* dom/Element.h:
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::setNamedItem): Enqueue a mutation record when an attribute
is changed via Element.attributes.setNamedItem from JS.
(WebCore::NamedNodeMap::removeNamedItem): Enqueue a mutation record when an
attribute is removed, either via Element.attributes.removeNamedItem or Element.removeAttribute.
2011-12-14 Raymond Toy <rtoy@google.com>
* platform/audio/Distance.h (WebCore):
Incorrect calculation for DistanceEffect linearGain
https://bugs.webkit.org/show_bug.cgi?id=72871
Reviewed by Kenneth Russell.
Tests still need to be written for all distance models. This
does not add a new API and just corrects an implementation error.
* platform/audio/Distance.cpp:
(WebCore::DistanceEffect::linearGain): Implement correct
linearGain function. (Fix proposed by davidgaleano@hotmail.com.)
* platform/audio/Distance.h: Add link to Open AL specification.
2011-12-14 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: consider disabling network tracking while running the CPU profile.
https://bugs.webkit.org/show_bug.cgi?id=74221
The WebCore instrumentation on the backend affects the performance of inspected page.
As the result the CPU profiler's stats data are far away from the reality.
Solution: the profiler code will temporary disable the resource tracking on backend.
Side effect: the resource tree gets out of sinc because it uses Network Agent's notifications for updating the resource tree.
Solution: NetworkManager will report about the changes of the resource tracking state and ResourcePanel will re-fetch the resources tree.
Reviewed by Pavel Feldman.
* inspector/front-end/NetworkManager.js:
(WebInspector.NetworkManager.prototype.enableResourceTracking.networkAgentEnabled):
(WebInspector.NetworkManager.prototype.enableResourceTracking):
(WebInspector.NetworkManager.prototype.disableResourceTracking.networkAgentDisabled):
(WebInspector.NetworkManager.prototype.disableResourceTracking):
(WebInspector.NetworkManager.prototype.inflightResourceForURL):
* inspector/front-end/ProfileView.js:
(WebInspector.CPUProfileType.prototype.buttonClicked):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel):
(WebInspector.ResourceTreeModel.prototype._onResourceTrackingEnabled):
2011-12-14 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix PlatformScreen::screenAvailableRect when there's no view widget
https://bugs.webkit.org/show_bug.cgi?id=74520
Reviewed by Martin Robinson.
Use the default screen to get the available screen area instead of
just returning an empty rectangle. This is useful for WebKit2,
since there's no view widget in the web process.
* platform/gtk/PlatformScreenGtk.cpp:
(WebCore::screenAvailableRect):
2011-12-14 Eric Carlson <eric.carlson@apple.com>
Media url with fragment may not load
https://bugs.webkit.org/show_bug.cgi?id=74443
Reviewed by Darin Adler.
Test: media/media-extension-with-fragment.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource): Pass the KURL to MediaPlayer, let it extract a
String when it needs it.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::load): Take a KURL, not a String. Look for the file extension in the
last path component so we don't examine fragments and/or queries.
* platform/graphics/MediaPlayer.h:
2011-12-14 Jacky Jiang <zhajiang@rim.com>
[BlackBerry] Remove some duplicate entries in Source/WebCore/PlatformBlackBerry.cmake
https://bugs.webkit.org/show_bug.cgi?id=74484
Reviewed by Daniel Bates.
Trivial fix, so no new tests.
* PlatformBlackBerry.cmake:
2011-12-14 Anders Carlsson <andersca@apple.com>
Add back the callOnMainThread overload that takes a WTF::Function
https://bugs.webkit.org/show_bug.cgi?id=74512
Reviewed by Darin Adler.
Explicitly qualify the Function enum flag, since MSVC2005 is too stupid to disambiguate
the Function class template and the enum flag.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertyDescriptor):
* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::getOwnPropertySlotDelegate):
(WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::getOwnPropertySlotDelegate):
(WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
2011-12-14 Kenneth Russell <kbr@google.com>
Unreviewed, rolling out r102688.
http://trac.webkit.org/changeset/102688
https://bugs.webkit.org/show_bug.cgi?id=74220
Under the hypothesis that it might be the cause of
browser_tests and ui_tests crashes on Chromium canaries --
will reland if not.
* bindings/v8/V8Proxy.cpp:
(WebCore::addMessageToConsole):
(WebCore::logInfo):
(WebCore::V8Proxy::reportUnsafeAccessTo):
* bindings/v8/V8Proxy.h:
* bindings/v8/custom/V8CustomXPathNSResolver.cpp:
(WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
2011-12-14 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: DatabaseTableView should escape table name.
https://bugs.webkit.org/show_bug.cgi?id=74503
Reviewed by Pavel Feldman.
Test: inspector/database-table-name-excaping.html
* inspector/front-end/DatabaseTableView.js:
(WebInspector.DatabaseTableView.prototype._escapeTableName):
(WebInspector.DatabaseTableView.prototype.update):
2011-12-14 Philippe Normand <pnormand@igalia.com>
[GStreamer] padTemplate leak in webkitwebaudiosrc
https://bugs.webkit.org/show_bug.cgi?id=74495
Reviewed by Martin Robinson.
Use a GstPadTemplate smart pointer in webkit_web_audio_src_init to
avoid a memory leak after the ghost pad creation.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webkit_web_audio_src_init):
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef):
(WTF::GstPadTemplate):
* platform/graphics/gstreamer/GRefPtrGStreamer.h:
2011-12-14 Julien Chaffraix <jchaffraix@webkit.org>
Crash in RenderBox::paintBoxDecorations when documentElement has no renderer
https://bugs.webkit.org/show_bug.cgi?id=64284
Reviewed by Ryosuke Niwa.
Test: fast/dynamic/crash-paint-no-documentElement-renderer.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBackground): Check the documentElement's
renderer before using it which matches what RenderView does.
2011-12-14 Tom Sepez <tsepez@chromium.org>
DocumentLoader should ref its mainResourceLoader.
https://bugs.webkit.org/show_bug.cgi?id=74424
Reviewed by Adam Barth.
Tests: platform/chromium/http/tests/security/mixedContent/insecure-iframe-in-main-frame-allowed.html
platform/chromium/http/tests/security/mixedContent/insecure-iframe-in-main-frame-blocked.html
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::loadNow):
2011-12-14 Stephen White <senorblanco@chromium.org>
CSS Filters should support GPU acceleration
https://bugs.webkit.org/show_bug.cgi?id=74441
Reviewed by Darin Adler.
Will be covered by existing CSS filters tests, when run in GPU mode.
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::prepare):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateOrRemoveFilterEffect):
2011-12-14 Brian Salomon <bsalomon@google.com>
[CHROMIUM/SKIA] Handle put[Un/Pre]multipliedImageData conversions in Skia rather than ImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=73953
Reviewed by Stephen White.
Tested by existing canvas2d layout tests.
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::putImageData):
(WebCore::ImageBuffer::putUnmultipliedImageData):
(WebCore::ImageBuffer::putPremultipliedImageData):
2011-12-14 Mary Wu <mary.wu@torchmobile.com.cn>
Remove SharedBufferBlackBerry.cpp from WebCore/platform/blackberry
https://bugs.webkit.org/show_bug.cgi?id=74488
Reviewed by Rob Buis.
Remove dead code, no new tests.
* platform/blackberry/SharedBufferBlackBerry.cpp: Removed.
2011-12-14 Kentaro Hara <haraken@chromium.org>
Use [Supplemental] IDL in WebSocket
https://bugs.webkit.org/show_bug.cgi?id=74160
Reviewed by Adam Barth.
By using the [Supplemental] IDL, this patch moves declarations of WebSocket
attributes from DOMWindow.idl to websocket/DOMWindowWebSocket.idl,
which helps make WebSocket a self-contained module.
No new tests, no change in behavior.
Confirm that http/tests/websocket/* pass.
* WebCore.gypi: Added DOMWindowWebSocket.idl.
* page/DOMWindow.idl: Added the [Supplemented] IDL to WebSocket-related attributes. This [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL (See bug 73394 for more details).
* websockets/DOMWindowWebSocket.idl: Added. Used the [Supplemental=DOMWindow] IDL. The attributes in this IDL file are treated as if they are described in DOMWindow.idl.
2011-12-14 Pierre Rossi <pierre.rossi@gmail.com>
Unreviewed fix. Broke qt minimal release compilation.
* platform/qt/RenderThemeQtMobile.cpp:
2011-12-14 Allan Sandfeld Jensen <allan.jensen@nokia.com>
Add different salt to different types of selectors. So the CSS fast
path can tell the different between tags and class attributes with
otherwise identical values.
https://bugs.webkit.org/show_bug.cgi?id=74284
Reviewed by Antti Koivisto.
* css/SelectorChecker.cpp:
(WebCore::collectElementIdentifierHashes):
(WebCore::collectDescendantSelectorIdentifierHashes):
* css/SelectorChecker.h:
2011-12-14 Pierre Rossi <pierre.rossi@gmail.com>
[Qt] Mobile theme could use a little refresh
https://bugs.webkit.org/show_bug.cgi?id=74293
The look and feel of the "mobile theme" we're
using in QtWebKit dates back to the maemo 5 days.
This is an attempt at making it look less out of
place, and also support progress and range.
Reviewed by Kenneth Rohde Christiansen.
No new tests, this is still not the default theme
for tests.
* DerivedSources.pri:
* css/mobileThemeQt.css: Added.
(input[type="submit"], select):
(input[type="submit"]:disabled, input[type="submit"]:disabled:active, select:disabled, input[type="text"]:disabled):
(input[type="submit"]:active):
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::extraDefaultStyleSheet):
(WebCore::StylePainter::StylePainter):
(WebCore::StylePainter::init):
(WebCore::StylePainter::~StylePainter):
* platform/qt/RenderThemeQt.h:
* platform/qt/RenderThemeQtMobile.cpp:
(WebCore::drawRectangularControlBackground):
(WebCore::shrinkRectToSquare):
(WebCore::StylePainterMobile::StylePainterMobile):
(WebCore::StylePainterMobile::~StylePainterMobile):
(WebCore::StylePainterMobile::drawCheckableBackground):
(WebCore::StylePainterMobile::sizeForPainterScale):
(WebCore::StylePainterMobile::drawChecker):
(WebCore::StylePainterMobile::findCheckBox):
(WebCore::StylePainterMobile::drawRadio):
(WebCore::StylePainterMobile::findRadio):
(WebCore::StylePainterMobile::drawMultipleComboButton):
(WebCore::StylePainterMobile::drawSimpleComboButton):
(WebCore::StylePainterMobile::getButtonImageSize):
(WebCore::StylePainterMobile::findComboButton):
(WebCore::StylePainterMobile::drawLineEdit):
(WebCore::StylePainterMobile::drawCheckBox):
(WebCore::StylePainterMobile::drawRadioButton):
(WebCore::StylePainterMobile::drawPushButton):
(WebCore::StylePainterMobile::drawComboBox):
(WebCore::StylePainterMobile::drawProgress):
(WebCore::StylePainterMobile::drawSliderThumb):
(WebCore::RenderThemeQtMobile::paintButton):
(WebCore::RenderThemeQtMobile::paintTextField):
(WebCore::RenderThemeQtMobile::setPopupPadding):
(WebCore::RenderThemeQtMobile::paintMenuList):
(WebCore::RenderThemeQtMobile::paintMenuListButton):
(WebCore::RenderThemeQtMobile::animationDurationForProgressBar):
(WebCore::RenderThemeQtMobile::paintProgressBar):
(WebCore::RenderThemeQtMobile::paintSliderTrack):
(WebCore::RenderThemeQtMobile::paintSliderThumb):
(WebCore::RenderThemeQtMobile::adjustSliderThumbSize):
* platform/qt/RenderThemeQtMobile.h:
2011-12-14 Rakesh KN <rakesh.kn@motorola.com>
[Non-Mac] Change event should be fired when changing option by using keyboard.
https://bugs.webkit.org/show_bug.cgi?id=74384
Reviewed by Kent Tamura.
Fire onchange event when option is changed using up/down/right/left/pageup/pagedown/home/end keys.
Test: fast/forms/select/menulist-onchange-fired-with-key-up-down.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::menuListDefaultEventHandler):
Setting the DispatchChangeEvent selection option flag when the option is selected using
up/down/right/left/pageup/pagedown/home/end keys.
2011-12-13 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: TreeOutline's is broken when li elements have padding-left different from 14px.
https://bugs.webkit.org/show_bug.cgi?id=74445
Reviewed by Pavel Feldman.
* inspector/front-end/treeoutline.js:
(TreeElement.prototype.isEventWithinDisclosureTriangle):
2011-12-13 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: [Regression] Scripts panel debug sidebar toolbar should not be scrolled out of the screen.
https://bugs.webkit.org/show_bug.cgi?id=74447
Reviewed by Pavel Feldman.
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.wasShown):
* inspector/front-end/scriptsPanel.css:
(#scripts-debug-toolbar):
(#scripts-debug-sidebar-contents):
2011-12-14 Alexander Færøy <alexander.faeroy@nokia.com>
[Qt] DeviceOrientationClientMockQt should be removed in favor of DeviceOrientationClientMock
https://bugs.webkit.org/show_bug.cgi?id=74417
Reviewed by Simon Hausmann.
Based on original patch by Kenneth Christiansen.
Already covered by current tests.
* dom/DeviceOrientationController.h:
(WebCore::DeviceOrientationController::client):
2011-12-14 Jacky Jiang <zhajiang@rim.com>
[BlackBerry] Switch to libjpeg for decoding
https://bugs.webkit.org/show_bug.cgi?id=74475
Reviewed by Daniel Bates.
Switch to cross platform JPEG image decoder for decoding as this keeps
us inline with other ports and less to maintain.
* PlatformBlackBerry.cmake:
2011-12-03 Philippe Normand <pnormand@igalia.com>
[GTK] Bad text rendering since r101343
https://bugs.webkit.org/show_bug.cgi?id=73744
Reviewed by Martin Robinson.
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::setCairoFontOptionsFromFontConfigPattern): Keep Cairo
hint metrics unchanged for better visual font rendering results.
2011-12-13 Hajime Morrita <morrita@chromium.org>
Unreviewed attempt for fixing windows build.
- Included <wtf/MathExtras.h> which defined portable version of lround().
- Add some static_cast<> to suppress warnings.
* platform/animation/AnimationUtilities.h:
(WebCore::blend):
2011-12-13 Wei Charles <charles.wei@torchmobile.com.cn>
[BlackBerry] Add the new plugin files into the build system.
https://bugs.webkit.org/show_bug.cgi?id=74483
Reviewed by Daniel Bates.
No new tests, just add new files to the build system.
* PlatformBlackBerry.cmake:
2011-12-13 Yosifumi Inoue <yosin@chromium.org>
[Forms] Default selection of select(menulist) should not be disabled
https://bugs.webkit.org/show_bug.cgi?id=74270
Reviewed by Kent Tamura.
This patch changes default selection of select(menulist) element to
1. Selected option element. If there are multiple options which have
selected state, we pick the largest index option up. (same as current)
2. Non-disabled option element (new behavior)
3. The first option if all options are disabled. (new behavior)
Tests: fast/forms/select/menulist-disabled-option-expected.html
fast/forms/select/menulist-disabled-option.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::recalcListItems): Implement new logic for selection.
2011-12-13 Simon Fraser <simon.fraser@apple.com>
Share blend progress code
https://bugs.webkit.org/show_bug.cgi?id=74464
Reviewed by Dean Jackson.
Lots of places in the code had copies of the animation interpolation
logic "from + (to - from) * progress", in various forms.
Coalesce all these into calls to a few new inline functions in a new
AnimationUtilities.h header. Color and Length get their own blend fuctions
in their respective headers.
Covered by existing tests.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSGradientValue.cpp:
* page/animation/AnimationBase.cpp:
(WebCore::blendFunc):
* platform/Length.h:
(WebCore::Length::blend):
* platform/animation/AnimationUtilities.h: Added.
(WebCore::blend):
* platform/graphics/Color.h:
(WebCore::blend):
* platform/graphics/transforms/PerspectiveTransformOperation.cpp:
(WebCore::PerspectiveTransformOperation::blend):
* platform/graphics/transforms/RotateTransformOperation.cpp:
(WebCore::RotateTransformOperation::blend):
* platform/graphics/transforms/ScaleTransformOperation.cpp:
(WebCore::ScaleTransformOperation::blend):
* platform/graphics/transforms/SkewTransformOperation.cpp:
(WebCore::SkewTransformOperation::blend):
* platform/graphics/transforms/TranslateTransformOperation.cpp:
(WebCore::TranslateTransformOperation::blend):
* svg/SVGLength.h:
(WebCore::SVGLength::blend):
* svg/SVGPathBlender.cpp:
(WebCore::blendFloatPoint):
(WebCore::SVGPathBlender::blendAnimatedDimensonalFloat):
(WebCore::SVGPathBlender::blendArcToSegment):
2011-12-13 Mary Wu <mary.wu@torchmobile.com.cn>
Upstream 3 files into WebCore/platform/blackberry
ClipboardBlackBerry.cpp/h, PasteboardBlackBerry.cpp
https://bugs.webkit.org/show_bug.cgi?id=74381
Reviewed by Rob Buis.
Main contributor:
Mike Fenton <mifenton@rim.com>
Initial upstream, no new tests.
* platform/blackberry/ClipboardBlackBerry.cpp: Added.
* platform/blackberry/ClipboardBlackBerry.h: Added.
* platform/blackberry/PasteboardBlackBerry.cpp: Added.
2011-12-13 James Robinson <jamesr@chromium.org>
Unreviewed, rolling out r102726.
http://trac.webkit.org/changeset/102726
https://bugs.webkit.org/show_bug.cgi?id=74154
Does not compile on clang
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::UpdatableTile::UpdatableTile):
(WebCore::TiledLayerChromium::createTile):
* platform/graphics/chromium/cc/CCLayerTilingData.cpp:
(WebCore::CCLayerTilingData::addTile):
(WebCore::CCLayerTilingData::takeTile):
(WebCore::CCLayerTilingData::tileAt):
* platform/graphics/chromium/cc/CCLayerTilingData.h:
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::DrawableTile::DrawableTile):
(WebCore::CCTiledLayerImpl::createTile):
2011-12-13 Hajime Morrita <morrita@chromium.org>
Unreviewed, rolling out r102732.
http://trac.webkit.org/changeset/102732
The last fix makes no sense...
* platform/graphics/chromium/cc/CCLayerTilingData.h:
2011-12-13 Hajime Morrita <morrita@chromium.org>
HTML details summary not working with form controls
https://bugs.webkit.org/show_bug.cgi?id=74398
Reviewed by Kent Tamura.
Allowed HTMLSummaryElement to skip the toggle logic if the event
target is a form control.
Test: fast/html/details-click-controls.html
* html/HTMLSummaryElement.cpp:
(WebCore::isClickableControl):
(WebCore::HTMLSummaryElement::defaultEventHandler):
2011-12-13 James Wei <james.wei@intel.com>
Optimize to not use pow() in the inner loop in AudioParamTimeline
https://bugs.webkit.org/show_bug.cgi?id=73530
Reviewed by Kenneth Russell.
No new tests.
* webaudio/AudioParamTimeline.cpp:
(WebCore:AudioParamTimeline:valuesForTimeRangeImpl):
2011-12-13 Hajime Morrita <morrita@chromium.org>
Unreviewed Chromium-Mac build fix trial.
* platform/graphics/chromium/cc/CCLayerTilingData.h:
2011-12-13 David Reveman <reveman@chromium.org>
[Chromium] Initialize Settings::m_perTileDrawingEnabled properly.
https://bugs.webkit.org/show_bug.cgi?id=74476
Reviewed by James Robinson.
Add m_perTileDrawingEnabled(false) to WebCore::Settings initialize list.
No new tests.
* page/Settings.cpp:
(WebCore::Settings::Settings):
2011-12-13 Anders Carlsson <andersca@apple.com>
Add a very bare-bones implementation of bind and Function to WTF
https://bugs.webkit.org/show_bug.cgi?id=74462
Reviewed by Sam Weinig.
Add a forwarding header for Functional.h.
* ForwardingHeaders/wtf/Functional.h: Added.
2011-12-13 Adrienne Walker <enne@google.com>
[chromium] Use HashMap<..., OwnPtr<Tile>> for compositor tilemap
https://bugs.webkit.org/show_bug.cgi?id=74154
Reviewed by James Robinson.
After r102410 landed, it's now possible to properly use an OwnPtr to
store tiles rather than hackily use a RefPtr.
Covered by the compositing/ layout tests.
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::UpdatableTile::create):
(WebCore::UpdatableTile::UpdatableTile):
(WebCore::TiledLayerChromium::createTile):
* platform/graphics/chromium/cc/CCLayerTilingData.cpp:
(WebCore::CCLayerTilingData::addTile):
(WebCore::CCLayerTilingData::takeTile):
(WebCore::CCLayerTilingData::tileAt):
* platform/graphics/chromium/cc/CCLayerTilingData.h:
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::DrawableTile::create):
(WebCore::DrawableTile::DrawableTile):
(WebCore::CCTiledLayerImpl::createTile):
2011-12-13 Dmitry Lomov <dslomov@google.com>
https://bugs.webkit.org/show_bug.cgi?id=73691
[JSC] Implement correct order of window.postMessage arguments.
This change supports a new signature of windowPostMessage:
postMessage(message, targetOrigin[, transferrables])
as well as the legacy webkit-proprietary:
postMessage(message, [transferrables,] targetOrigin)
The latter is only supported for cases when targetOrigin is a String.
Reviewed by David Levin.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::handlePostMessage):
* page/DOMWindow.idl:
2011-12-13 Rafael Weinstein <rafaelw@chromium.org>
[MutationObservers] Avoid allocations if no observers are present
https://bugs.webkit.org/show_bug.cgi?id=74423
Reviewed by Ojan Vafai.
This patch adds Node::mayHaveMutationObserversOfType which can be used to check
if there are any observers at all which could receive a give type of mutation.
MutationObserverInterestGroup uses this to possibly exit early (returning
null) if no observers are present.
No tests needed. This patch is just a refactor.
* css/CSSMutableStyleDeclaration.cpp:
* dom/CharacterData.cpp:
(WebCore::CharacterData::dispatchModifiedEvent):
* dom/ChildListMutationScope.cpp:
(WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::incrementScopingLevel):
* dom/Element.cpp:
(WebCore::enqueueAttributesMutationRecord):
* dom/Node.cpp:
(WebCore::Node::mayHaveMutationObserversOfType):
* dom/Node.h:
* dom/WebKitMutationObserver.cpp:
(WebCore::MutationObserverInterestGroup::createIfNeeded):
(WebCore::MutationObserverInterestGroup::createForChildListMutation):
(WebCore::MutationObserverInterestGroup::createForCharacterDataMutation):
(WebCore::MutationObserverInterestGroup::createForAttributesMutation):
(WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup):
(WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
* dom/WebKitMutationObserver.h:
2011-12-13 Robin Dunn <robin@alldunn.com>
Don't make the bitmap transparent when using theme drawing
calls that don't support transparent bitmaps.
https://bugs.webkit.org/show_bug.cgi?id=74319
Reviewed by Kevin Ollivier.
* platform/wx/LocalDC.h:
(WebCore::LocalDC::LocalDC):
* platform/wx/RenderThemeWx.cpp:
(WebCore::RenderThemeWx::paintButton):
2011-12-13 Tony Chang <tony@chromium.org>
Inline all of initForRegionStyling except for the rarely used part for non-null regions.
https://bugs.webkit.org/show_bug.cgi?id=74435
Reviewed by Andreas Kling.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::initForRegionStyling): Inline setting of m_regionForStyling
(WebCore::CSSStyleSelector::initRegionRules): Move code that only
applies to CSSRegions into non-inlined code.
* css/CSSStyleSelector.h:
2011-12-13 James Simonsen <simonjam@chromium.org>
Unreviewed, Chromium Mac build fix.
* page/PerformanceTiming.h:
2011-12-13 Adam Klein <adamk@chromium.org>
Update variable names in NamedNodeMap methods to match WebKit style
https://bugs.webkit.org/show_bug.cgi?id=74437
Reviewed by Ojan Vafai.
While reading these methods in preparation for a refactor, I found
them hard to understand due to short or confusing variable names.
I think the new names are much clearer, and match WebKit style.
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::setNamedItem):
(WebCore::NamedNodeMap::removeNamedItem):
2011-12-13 Xingnan Wang <xingnan.wang@intel.com>
Implement a function of vector multiply with SSE2 optimization in VectorMath.cpp.
https://bugs.webkit.org/show_bug.cgi?id=74048
Reviewed by Benjamin Poulain.
The vmul is a function for an element-by-element multiply of two float vectors and we
get about 3.4x performance improvement with SSE2 optimization compared with the common
multiply.
Use vmul in AudioBus::copyWithSampleAccurateGainValuesFrom().
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::copyWithSampleAccurateGainValuesFrom):
* platform/audio/VectorMath.cpp:
(WebCore::VectorMath::vmul):
* platform/audio/VectorMath.h:
2011-12-13 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: [Regression] ResourceHeadersView sections should be expanded by default.
https://bugs.webkit.org/show_bug.cgi?id=74434
Reviewed by Pavel Feldman.
* inspector/front-end/treeoutline.js:
2011-12-13 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Network item view does not correctly decode "+" in request parameters.
https://bugs.webkit.org/show_bug.cgi?id=74422
Reviewed by Pavel Feldman.
Test: http/tests/inspector/network/request-parameters-decoding.html
* inspector/front-end/ResourceHeadersView.js:
(WebInspector.ResourceHeadersView.prototype._formatParameter):
(WebInspector.ResourceHeadersView.prototype._refreshParms):
2011-12-13 Alok Priyadarshi <alokp@chromium.org>
[chromium] compositing/masks layout tests fail with accelerated drawing
https://bugs.webkit.org/show_bug.cgi?id=72760
Reviewed by Stephen White.
Accelerated drawing path used to render bottom-up upright textures, which was opposite of what the software path rendered.
The textures produced by the accelerated path was flipped along Y in the shader to make it upside down as expected by the compositor.
This strategy does not work in case of masks which do not go through a shader and hence do not get flipped,
which results in a case where texture in the render surface is top-down, while that in the mask is bottom-up.
This patch makes accelerated drawing path render textures in the same orientation as the software path.
LayerTextureUpdater::Orientation was added to support the difference in texture orientation between software and accelerated paths.
Now that both paths produce textures in the same orientation, there is no need for it.
No new tests needed. Covered by existing compositing tests.
* platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
* platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h:
* platform/graphics/chromium/ImageLayerChromium.cpp:
* platform/graphics/chromium/LayerTextureUpdater.h:
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::TiledLayerChromium):
(WebCore::TiledLayerChromium::setLayerTreeHost):
(WebCore::TiledLayerChromium::pushPropertiesTo):
* platform/graphics/chromium/TiledLayerChromium.h:
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::CCTiledLayerImpl::drawTiles):
* platform/graphics/chromium/cc/CCTiledLayerImpl.h:
(WebCore::CCTiledLayerImpl::setSkipsDraw):
2011-12-09 Zhenyao Mo <zmo@google.com>
Implement GLES2 CheckFramebufferStatus() behavior
https://bugs.webkit.org/show_bug.cgi?id=74228
Reviewed by Kenneth Russell.
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::getColorBufferWidth): Add ColorBuffer to the function name - this is more accurate.
(WebCore::WebGLFramebuffer::getColorBufferHeight): Ditto.
(WebCore::WebGLFramebuffer::checkStatus): Implement full semantics of GLES2 glCheckFramebufferStatus().
(WebCore::WebGLFramebuffer::onAccess): Call checkStatus().
* html/canvas/WebGLFramebuffer.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::checkFramebufferStatus): Call checkStatus().
(WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): No longer check framebuffer status.
(WebCore::WebGLRenderingContext::getBoundFramebufferWidth): Call getColorBufferWidth.
(WebCore::WebGLRenderingContext::getBoundFramebufferHeight): Call getColorBufferHeight.
2011-12-13 James Simonsen <simonjam@chromium.org>
[Navigation Timing] Use monotonicallyIncreasingTime() instead of currentTime()
https://bugs.webkit.org/show_bug.cgi?id=58354
Reviewed by Pavel Feldman.
No new tests. Relies on existing webtiming-* tests.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp: Use monotonic times.
(WebCore::Document::setReadyState):
(WebCore::Document::finishedParsing):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didFinishLoadingImpl): Convert monotonicFinishTime to wall time if needed.
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForTiming): Convert monotonic requestTime to wall time.
(WebCore::buildObjectForResourceResponse): Plumbing for above.
(WebCore::buildObjectForCachedResource): Ditto.
(WebCore::InspectorResourceAgent::willSendRequest): Ditto.
(WebCore::InspectorResourceAgent::didReceiveResponse): Ditto.
(WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): Ditto.
* loader/DocumentLoadTiming.cpp: Added.
(WebCore::DocumentLoadTiming::DocumentLoadTiming):
(WebCore::DocumentLoadTiming::setNavigationStart): Determine reference time and root reference time.
(WebCore::DocumentLoadTiming::addRedirect): Moved logic from MainResourceLoader.
(WebCore::DocumentLoadTiming::convertMonotonicTimeToDocumentTime): Helper to compute wall time from monotonic time.
* loader/DocumentLoadTiming.h: Turned into class. Made times monotonic.
(WebCore::DocumentLoadTiming::setUnloadEventStart):
(WebCore::DocumentLoadTiming::setUnloadEventEnd):
(WebCore::DocumentLoadTiming::setRedirectStart):
(WebCore::DocumentLoadTiming::setRedirectEnd):
(WebCore::DocumentLoadTiming::setFetchStart):
(WebCore::DocumentLoadTiming::setResponseEnd):
(WebCore::DocumentLoadTiming::setLoadEventStart):
(WebCore::DocumentLoadTiming::setLoadEventEnd):
(WebCore::DocumentLoadTiming::setHasSameOriginAsPreviousDocument):
(WebCore::DocumentLoadTiming::navigationStart):
(WebCore::DocumentLoadTiming::unloadEventStart):
(WebCore::DocumentLoadTiming::unloadEventEnd):
(WebCore::DocumentLoadTiming::redirectStart):
(WebCore::DocumentLoadTiming::redirectEnd):
(WebCore::DocumentLoadTiming::redirectCount):
(WebCore::DocumentLoadTiming::fetchStart):
(WebCore::DocumentLoadTiming::responseEnd):
(WebCore::DocumentLoadTiming::loadEventStart):
(WebCore::DocumentLoadTiming::loadEventEnd):
(WebCore::DocumentLoadTiming::hasCrossOriginRedirect):
(WebCore::DocumentLoadTiming::hasSameOriginAsPreviousDocument):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
(WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::continueAfterNavigationPolicy):
(WebCore::MainResourceLoader::willSendRequest): Moved logic to DocumentLoadTiming.
(WebCore::MainResourceLoader::didReceiveData): Use monotonic time.
(WebCore::MainResourceLoader::didFinishLoading): Ditto.
(WebCore::MainResourceLoader::load):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchLoadEvent):
* page/DOMWindow.h: Removed dispatchTimedEvent. It doesn't really help in the new model.
* page/PerformanceNavigation.cpp:
(WebCore::PerformanceNavigation::redirectCount):
* page/PerformanceTiming.cpp: Removed skew correction code. This should never happen now.
(WebCore::PerformanceTiming::navigationStart):
(WebCore::PerformanceTiming::unloadEventStart):
(WebCore::PerformanceTiming::unloadEventEnd):
(WebCore::PerformanceTiming::redirectStart):
(WebCore::PerformanceTiming::redirectEnd):
(WebCore::PerformanceTiming::fetchStart):
(WebCore::PerformanceTiming::responseEnd):
(WebCore::PerformanceTiming::domLoading):
(WebCore::PerformanceTiming::domInteractive):
(WebCore::PerformanceTiming::domContentLoadedEventStart):
(WebCore::PerformanceTiming::domContentLoadedEventEnd):
(WebCore::PerformanceTiming::domComplete):
(WebCore::PerformanceTiming::loadEventStart):
(WebCore::PerformanceTiming::loadEventEnd):
(WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): Used for ResourceLoadTiming.
(WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds): Used for DocumentTiming and DocumentLoadTiming.
* page/PerformanceTiming.h:
* platform/network/ResourceLoadTiming.cpp:
(WebCore::ResourceLoadTiming::convertResourceLoadTimeToDocumentTime):
* platform/network/ResourceLoadTiming.h: Added helper function to convert to wall times. Added instructions for use.
2011-12-13 Adam Klein <adamk@chromium.org>
Reduce code duplication in Element::setAttribute methods
https://bugs.webkit.org/show_bug.cgi?id=74425
Reviewed by Ryosuke Niwa.
Two overloads of Element::setAttribute share almost all their code,
including tricky logic around updating the appropriate Attribute and
Attr objects and notifying the Inspector and MutationObservers.
This patch puts the common logic in a new setAttributeInternal method
which is called by the other two.
No new tests, refactoring only.
* dom/Element.cpp:
(WebCore::Element::setAttribute):
(WebCore::Element::setAttributeInternal):
* dom/Element.h:
2011-12-13 Brady Eidson <beidson@apple.com>
<http://webkit.org/b/74420> Disable deprecation warnings around more code where we
cannot easily switch away from the deprecated APIs.
Reviewed by Mark Rowe.
* bindings/objc/DOMInternal.mm:
* bridge/objc/objc_instance.mm:
2011-12-12 Robert Hogan <robert@webkit.org>
CSS 2.1 failure: eof-002.htm fails
https://bugs.webkit.org/show_bug.cgi?id=74309
Reviewed by Dean Jackson.
Test: css2.1/20110323/eof-002-expected.html
* css/CSSGrammar.y: Treat EOF during a function expression with an open parenthesis as a close parenthesis.
2011-12-13 Adam Klein <adamk@chromium.org>
V8Proxy cleanup: replace custom logging methods with standard WebCore calls
https://bugs.webkit.org/show_bug.cgi?id=74220
Reviewed by Adam Barth.
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::reportUnsafeAccessTo):
* bindings/v8/V8Proxy.h:
* bindings/v8/custom/V8CustomXPathNSResolver.cpp:
(WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
2011-12-13 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Get rid of layering violations in includes
WebKit/qt/API and WebKit/qt/WebCoreSupport should not be included
in the webcore.prf, but rather in each target that specificly needs
headers in these location. We used to include them directly in webcore
since we had layering violations between WebCore and WebKit, but now
that they are gone there's no reason to do that.
Reviewed by Simon Hausmann.
* bridge/qt/qt_instance.cpp:
* platform/graphics/qt/GraphicsContext3DQt.cpp:
* platform/graphics/qt/ImageQt.cpp:
* platform/network/qt/QNetworkReplyHandler.cpp:
* platform/network/qt/ResourceHandleQt.cpp:
* platform/qt/CookieJarQt.cpp:
* platform/qt/RenderThemeQStyle.cpp:
* platform/qt/RenderThemeQt.cpp:
2011-12-13 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Add scripts navigator sidebar to scripts panel.
https://bugs.webkit.org/show_bug.cgi?id=73086
Reviewed by Pavel Feldman.
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.sh:
* inspector/front-end/Images/domain.png: Added.
* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame.prototype.suggestedFileName):
* inspector/front-end/ScriptsNavigator.js: Added.
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded.get if):
(WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
(WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect):
(WebInspector.ScriptsPanel.prototype._reset):
(WebInspector.ScriptsPanel.prototype._removeSourceFrame):
(WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
(WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
(WebInspector.ScriptsPanel.prototype._updateExecutionLine):
(WebInspector.ScriptsPanel.prototype._scriptSelectedInNavigator):
(WebInspector.ScriptsPanel.prototype._createDebugToolbar):
* inspector/front-end/Settings.js:
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPane.prototype.appendTab):
(WebInspector.TabbedPane.prototype.selectTab):
(WebInspector.TabbedPane.prototype.highlightLine):
(WebInspector.TabbedPane.prototype.elementsToRestoreScrollPositionsFor):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode.prototype.get domain):
(WebInspector.UISourceCode.prototype.get folderName):
(WebInspector.UISourceCode.prototype.get displayName):
(WebInspector.UISourceCode.prototype._parseURL):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.css:
(.tabbed-pane):
(.tabbed-pane-content):
* inspector/front-end/inspector.html:
* inspector/front-end/networkPanel.css:
* inspector/front-end/scriptsPanel.css:
(#scripts-navigator-resizer-widget):
(.scripts-navigator-domain-tree-item .icon):
(.scripts-navigator-folder-tree-item .icon):
(.scripts-navigator-script-tree-item .icon):
(.scripts.panel .navigator):
(#scripts-navigator-tabbed-pane .tabbed-pane-header):
(#scripts-navigator-tabbed-pane .tabbed-pane-content):
(.scripts.panel .navigator li):
(.scripts.panel .navigator :focus li.selected):
(.scripts.panel .navigator li.selected .selection):
(.scripts.panel .navigator :focus li.selected .selection):
(.scripts.panel .navigator .icon):
(.scripts.panel .base-navigator-tree-element-title):
* inspector/front-end/treeoutline.js:
(TreeOutline):
(TreeOutline.prototype.appendChild):
2011-12-12 Andreas Kling <kling@webkit.org>
CollectionCache: Remove unused copy constructor and make it noncopyable.
<http://webkit.org/b/74378>
Reviewed by Simon Hausmann.
* html/CollectionCache.cpp:
* html/CollectionCache.h:
2011-12-13 Jarred Nicholls <jarred@sencha.com>
XHR should use m_responseTypeCode internally to be consistent with WebKit coding style
https://bugs.webkit.org/show_bug.cgi?id=74330
Reviewed by Alexey Proskuryakov.
No new tests needed, no behavioral changes.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseText):
(WebCore::XMLHttpRequest::responseXML):
(WebCore::XMLHttpRequest::responseBlob):
(WebCore::XMLHttpRequest::didReceiveData):
* xml/XMLHttpRequest.h:
(WebCore::XMLHttpRequest::asBlob):
2011-12-13 Kentaro Hara <haraken@chromium.org>
Use the [Supplemental] IDL for webaudio attributes in Chromium
https://bugs.webkit.org/show_bug.cgi?id=73394
Reviewed by Adam Barth.
- Overview: Using the [Supplemental] IDL, this patch moves the attribute
declarations of webaudio from DOMWindow.idl into a new IDL file
webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained
feature (aka a module).
- This patch changes the build flow of WebCore.gyp as follows:
Previous build flow:
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl;
generate-bindings.pl reads $idl;
generate-bindings.pl generates .h and .cpp files for $idl;
}
New build flow (See the discussions in bug 72138 for more details):
resolve-supplemental.pl depends on all IDL files;
resolve-supplemental.pl reads all IDL files;
resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
resolve-supplemental.pl outputs supplemental_dependency.tmp;
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
generate-bindings.pl reads $idl;
generate-bindings.pl reads supplemental_dependency.tmp;
generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl;
}
- This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL
will be removed after build scripts for all platforms support the [Supplemental] IDL.
The motivation for the [Supplemented] IDL is as follows:
In order to support the [Supplemental] IDL, we need to
(1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
(2) and run generate-bindings.pl with the supplemental_dependency.tmp.
This build flow requires a change on the following build scripts,
but changing all the build scripts all at once without any regression is too difficult:
- DerivedSources.make
- DerivedSources.pri
- GNUmakefile.am
- PlatformBlackBerry.cmake
- UseJSC.cmake
- UseV8.cmake
- WebCore.vcproj/MigrateScripts
- WebCore.vcproj/WebCore.vcproj
- bindings/gobject/GNUmakefile.am
- WebCore.gyp/WebCore.gyp
Thus, we are planning to change the build scripts one by one, which implies that
we need to allow the temporary state in which some build scripts support [Supplemental] IDL
but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
in another IDL file somewhere, like this:
DOMWindowWebAudio.idl:
interface [
Supplemental=DOMWindow
] DOMWindowWebAudio {
attribute attr1;
attribute attr2;
};
DOMWindow.idl:
interface [
] DOMWindow {
attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL
attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL.
attribute attr3;
attribute attr4;
};
Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:
- If a given build script supports the [Supplemental] IDL,
generate-bindings.pl ignores all attributes with the [Supplemented] IDL.
- Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
as normal attributes and instead ignores all attributes with the [Supplemental] IDL
(i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).
Tests: webaudio/*
* WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp),
which are described at the first column of each line in the input file.
If the file name is a "/cygdrive/c/..."-style path, it is converted to a "C:\cygwin\..."-style
path by the cygpath command.
* WebCore.gypi: Added DOMWindowWebAudio.idl.
* bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not
support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead
uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and
instead uses the [Supplemental] IDL.
Added the --additionalIdlFilesList option to specify the IDL files that are not listed in
supplemental-dependency.tmp but should generate .h and .cpp files.
* page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes.
As I described above, the [Supplemented] IDL will be removed after all platforms support
the [Supplemental] IDL.
* webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL.
The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.
2011-12-13 Yosifumi Inoue <yosin@chromium.org>
RenderTheme should have a function for disabled text color adjustment
https://bugs.webkit.org/show_bug.cgi?id=74143
Change disabledTextColor to private method.
Reviewed by Kent Tamura.
No new tests / existing tests cover this change.
* rendering/RenderThemeChromiumMac.h: Change disabledTextColor to private.
* rendering/RenderThemeChromiumSkia.h: Change disabledTextColor to private.
2011-12-12 Daniel Bates <dbates@webkit.org>
Unreviewed, rolling out r102656.
http://trac.webkit.org/changeset/102656
https://bugs.webkit.org/show_bug.cgi?id=74313
Broke the Mac, Windows and WinCairo builds. We need to look
into this patch some more.
* bindings/js/ScriptEventListener.cpp:
(WebCore::eventListenerHandlerLocation):
2011-12-12 Konrad Piascik <kpiascik@rim.com>
2011-12-12 Konrad Piascik <kpiascik@rim.com>
Implement the JavaScriptCore bindings for eventListenerHandlerLocation
https://bugs.webkit.org/show_bug.cgi?id=74313
Reviewed by Geoffrey Garen.
Open any page in Web Inspector and look at the event listeners. They should now
link to the script which created them.
* bindings/js/ScriptEventListener.cpp:
(WebCore::eventListenerHandlerLocation):
2011-12-12 Yosifumi Inoue <yosin@chromium.org>
RenderTheme should have a function for disabled text color adjustment
https://bugs.webkit.org/show_bug.cgi?id=74143
Reviewed by Kent Tamura.
No new tests / existing tests cover this change.
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::adjustInnerTextStyle): Use RenderTheme::disabledTextColor instead of PLATFORM wraped static function.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::disabledTextColor): Moved from RenderTextControl.cpp. This method implements for non-Chromium color.
* rendering/RenderTheme.h: Add new virtual method disabledTextColor.
* rendering/RenderThemeChromiumMac.h: Implementation of RenderTheme::disabledTextColor for Chrimium Mac.
* rendering/RenderThemeChromiumSkia.h: Implementation of RenderTheme::disabledTextColor for Chrimium.
2011-12-12 Kenneth Russell <kbr@google.com>
Unreviewed, rolling out r102648.
http://trac.webkit.org/changeset/102648
https://bugs.webkit.org/show_bug.cgi?id=74313
Broke the Snow Leopard and Windows builds
* bindings/js/ScriptEventListener.cpp:
(WebCore::eventListenerHandlerLocation):
2011-12-12 Andreas Kling <kling@webkit.org>
Resizing Cappuccino is very laggy on WebKit since Safari 5.1
<http://webkit.org/b/71354> and <rdar://problem/10565998>
Reviewed by Anders Carlsson.
* WebCore.exp.in: Export FloatPoint(const NSPoint&)
2011-12-12 Jarred Nicholls <jarred@sencha.com>
[Qt] QTKIT-based video support must target OS X 10.5 or higher
https://bugs.webkit.org/show_bug.cgi?id=74294
WebCore on OS X Lion fails to build when QTKIT video support is enabled, unless a
deployment target of 10.5+ is specified explicitly.
Reviewed by Noam Rosenthal.
No new tests as this is a build issue.
* Target.pri:
2011-12-12 Luke Macpherson <macpherson@chromium.org>
Implement CSS text-decoration property in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=74258
Reviewed by Andreas Kling.
No new tests / refactoring only.
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyTextDecoration::applyValue):
(WebCore::ApplyPropertyTextDecoration::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
2011-12-12 Adrienne Walker <enne@google.com>
iframe fails to scroll in composited page
https://bugs.webkit.org/show_bug.cgi?id=72682
Reviewed by Simon Fraser.
FrameView::scrollContentsSlowPath only was catching the case where a
child iframe had a composited parent. Now detect if the child iframe
has any composited ancestor.
Test: compositing/iframes/scroll-grandchild-iframe.html
* page/FrameView.cpp:
(WebCore::FrameView::scrollContentsSlowPath):
2011-12-12 Konrad Piascik <kpiascik@rim.com>
Implement the JavaScriptCore bindings for eventListenerHandlerLocation
https://bugs.webkit.org/show_bug.cgi?id=74313
Reviewed by Geoffrey Garen.
Open any page in Web Inspector and look at the event listeners. They should now
link to the script which created them.
* bindings/js/ScriptEventListener.cpp:
(WebCore::eventListenerHandlerLocation):
2011-12-12 Erik Arvidsson <arv@chromium.org>
[V8] CodeGeneratorV8.pm does not correctly work with inherited HasIndexGetter
https://bugs.webkit.org/show_bug.cgi?id=74027
Reviewed by Adam Barth.
Instead of having to write a custom indexer when the interface has an inherited indexer
we get the signature from the super interface.
Tested by existing tests.
* Target.pri: Remove V8DOMSettableTokenListCustom.cpp and V8WebKitCSSFilterValueCustom.cpp.
* UseV8.cmake: Ditto.
* WebCore.gypi: Ditto.
* bindings/scripts/CodeGenerator.pm:
(FindSuperMethod): Returns the first matching function in one of the ancestor interfaces.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateImplementationIndexer): If the current interface has no indexer try to find an
indexer in one of the super interfaces.
(GenerateImplementationNamedPropertyGetter): Ditto for named property getter.
* bindings/v8/custom/V8DOMSettableTokenListCustom.cpp: Removed.
* bindings/v8/custom/V8WebKitCSSFilterValueCustom.cpp: Removed.
2011-12-12 Simon Fraser <simon.fraser@apple.com>
Make it possible to substitute a different CALayer implementation for the main root layer
https://bugs.webkit.org/show_bug.cgi?id=74369
Reviewed by Anders Carlsson.
Some platforms may wish to have the main root layer (which corresponds with
the main frame's RenderView's layer) implemented by a custom platform layer,
for example to contain a cache of tiles.
Make this possible on Mac by adding a new method to GraphicsLayerClient(),
and implementing it in RenderLayerBacking. This new behavior is not yet enabled.
Also clean up some WebLayer/WebTiledLayer code.
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::shouldUseTileCache): New client method that indicates that the GraphicsLayer
should host a tile cache layer instead of a normal layer.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA): Ask the client, if any, whether to create a tile cache layer.
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm: NSClassFromString(@"CATransformLayer") was for Leopard;
we can just use the classname now. Handle LayerTypeTileCacheLayer.
(PlatformCALayer::PlatformCALayer):
* platform/graphics/ca/mac/WebTileCacheLayer.h: Copied from Source/WebCore/platform/graphics/mac/WebLayer.h.
* platform/graphics/ca/mac/WebTileCacheLayer.mm: Copied from Source/WebCore/platform/graphics/mac/WebLayer.h.
* platform/graphics/mac/WebLayer.h: Remove the setLayerNeedsDisplayInRect() hackery.
* platform/graphics/mac/WebLayer.mm: setLayerNeedsDisplayInRect() tried to share code between WebLayer and WebTiledLayer
by using Obj-C runtime methods to find the superclass. This causes infinite recursion if Web[Tiled]Layer is subclassed,
so remove it.
(-[WebLayer setNeedsDisplayInRect:]): Code moved here from setLayerNeedsDisplayInRect.
* platform/graphics/mac/WebTiledLayer.mm:
(-[WebTiledLayer setNeedsDisplayInRect:]): Code copied here from setLayerNeedsDisplayInRect.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking): Find out, and cache if we're the main frame's layer.
(WebCore::RenderLayerBacking::shouldUseTileCache): Return m_usingTiledCacheLayer, which is always false for now.
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Use m_isMainFrameRenderViewLayer.
(WebCore::RenderLayerBacking::paintingGoesToWindow): The tile cache layer needs to paint itself.
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.h: m_compositeForFixedPosition was unused.
2011-12-12 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r102357): respondToUnappliedEditing exits early for CreateLinkCommand
https://bugs.webkit.org/show_bug.cgi?id=74356
Reviewed by Enrica Casucci.
The problem was that isCreateLinkCommand was called on EditCommandComposition by respondToUnappliedEditing.
Fixed the bug by propagating the value of isCreteLinkCommand from CompositeEditCommand to
EditCommandComposition via wasCreateLinkCommand.
Also move isCreateLinkCommand from EditCommand to CompositeEditCommand to prevent this mistake in the future.
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::create):
(WebCore::EditCommandComposition::EditCommandComposition):
(WebCore::CompositeEditCommand::ensureComposition):
(WebCore::CompositeEditCommand::isCreateLinkCommand):
* editing/CompositeEditCommand.h:
(WebCore::EditCommandComposition::wasCreateLinkCommand):
* editing/SpellingCorrectionController.cpp:
(WebCore::SpellingCorrectionController::respondToUnappliedEditing):
* editing/SpellingCorrectionController.h:
2011-12-12 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions]Revert RenderObject::style() to its state before region styling
https://bugs.webkit.org/show_bug.cgi?id=74315
Reviewed by Tony Chang.
* rendering/RenderObject.h:
(WebCore::RenderObject::style):
2011-12-12 Adam Klein <adamk@chromium.org>
Don't crash in StyleAttributeMutationScope if the style declaration's element has been GCed
https://bugs.webkit.org/show_bug.cgi?id=74321
Reviewed by Ryosuke Niwa.
In r101101, Rafael Weinstein added code to CSSMutableStyleDeclaration.cpp
which depended on isInlineStyleDeclaration returning true iff the
element it pointed to was non-null (it will be nulled-out if the
element is garbage collected).
Then, in r101172, Andreas Kling changed the semantics so that
isInlineStyleDeclaration only described the type of the declaration,
not the state of the related element.
This change updates Rafael's code with an explicit check that the
element is still alive.
Test: fast/dom/css-inline-style-declaration-crash.html
* css/CSSMutableStyleDeclaration.cpp:
2011-12-12 Chris Fleizach <cfleizach@apple.com>
AX: aria-hidden inheritance broken when applying to some descendants
https://bugs.webkit.org/show_bug.cgi?id=73940
Reviewed by Darin Adler.
When adding children, we were not updating the children cache for direct AX descendants.
This meant that toggling aria-hidden could result in a stale cache where elements would not be reachable.
Making this fix also exposed a problem in AccessibilityTable where the AccessibilityHeaderObject was not
being managed correctly as a mock element.
Test: platform/mac/accessibility/aria-hidden-changes-for-non-ignored-elements.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addChildren):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::clearChildren):
(WebCore::AccessibilityTable::headerContainer):
* accessibility/AccessibilityTable.h:
2011-12-12 Jeremy Apthorp <jeremya@chromium.org>
When the mouse is dragged out of an :active element, it should lose :hover.
https://bugs.webkit.org/show_bug.cgi?id=57206
Reviewed by Ryosuke Niwa.
Test: fast/css/hover-active-drag.html
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseMoveEvent): Don't mark mouse-drag hit tests read-only, since they no longer are.
(WebCore::EventHandler::dragSourceEndedAt): Send a hit test request when the mouse goes up after a drag, so
RenderLayer has a chance to update the hover/active status.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateHoverActiveState): Only allow the :active state to change on mouse down or mouse up.
2011-12-12 Kenneth Russell <kbr@google.com>
Unreviewed Windows build fix after http://trac.webkit.org/changeset/102619 .
Remove OVERRIDE specifier from virtual destructor.
* html/HTMLPlugInImageElement.h:
2011-12-12 Ryosuke Niwa <rniwa@webkit.org>
WebKit code shouldn't be calling applyCommand directly
https://bugs.webkit.org/show_bug.cgi?id=74337
Reviewed by Darin Adler.
Make WebKit-layer code call Editor::replaceSelectionWithFragment and Editor::replaceSelectionWithText
instead of manually creating and applying ReplaceSelectionCommand.
The only behavioral difference is that new code will end up checking for spell checks. However, this
difference appears to be unintentional since the code predates http://trac.webkit.org/changeset/73886,
which introduced an invocation of spellcheck code.
Unfortunately no tests since there doesn't seem to be anyway to test this change.
* WebCore.exp.in:
* editing/EditCommand.cpp:
(WebCore::applyCommand):
* editing/EditCommand.h:
* editing/Editor.h:
2011-11-26 Adam Barth <abarth@webkit.org>
Remove platform/audio/fftw
https://bugs.webkit.org/show_bug.cgi?id=73163
Reviewed by Eric Seidel.
The FFTW library is GPL, not LGPL, like WebKit. This patch removes the
integration with the library so folks who use WebAudio don't
accidentially violate the GPL by linking in FFTW.
* GNUmakefile.am:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* platform/audio/FFTFrame.h:
* platform/audio/FFTFrameStub.cpp:
* platform/audio/fftw: Removed.
* platform/audio/fftw/FFTFrameFFTW.cpp: Removed.
2011-12-12 Kenneth Russell <kbr@google.com>
COMPILE_ASSERT in CSSStyleSelector.cpp doesn't compile on Windows
https://bugs.webkit.org/show_bug.cgi?id=74327
Unreviewed build fix. True fix should follow under above bug.
* css/CSSStyleSelector.cpp:
2011-12-12 David Grogan <dgrogan@chromium.org>
Fix compilation error when !ENABLE(WORKERS)
https://bugs.webkit.org/show_bug.cgi?id=74029
Reviewed by Yury Semikhatsky.
* storage/IDBFactory.cpp:
(WebCore::IDBFactory::open): add #if ENABLE(WORKERS) guard
2011-12-12 Brady Eidson <beidson@apple.com>
Page cache should support pages with plugins.
<rdar://problem/5190122> and https://bugs.webkit.org/show_bug.cgi?id=13634
Reviewed by Anders Carlsson.
By making plugin elements renderers go display:none when entering the page cache,
we destroy the plug-in in a cross platform way as well as handle invalidating script
objects created by that plugin.
By restoring the original style when leaving the page cache and forcing a style recalc
on the plugin element, the plugin is gracefully reinstantiated when the user goes back.
Test: plugins/netscape-plugin-page-cache-works.html
* dom/Document.cpp:
(WebCore::Document::documentDidBecomeActive): Copy this collection before iterating over
it, as the callbacks might result in mutating the set.
* dom/Node.h:
(WebCore::Node::setHasCustomStyleForRenderer):
(WebCore::Node::clearHasCustomStyleForRenderer): Expose the ability to stop using a
custom renderer and go back to the default renderer.
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame): Move the document inactivation call to the same place
we suspend active DOM objects. It is important this call be *after* the beforeunload event
is dispatched, and was coincidental non of the elements that using Document activation
had run in to this problem yet.
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame): If the page contains plugins but
the PageCacheSupportsPlugins setting is true, allow this page.
Kill and recreate the plugin by listening for Document activation callbacks and setting a custom
display:none render style:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::~HTMLPlugInImageElement): Unregister for document activation
callbacks.
(WebCore::HTMLPlugInImageElement::createRenderer): Once a renderer (ie. plugin instance) is
created, this element needs Document (in)activation callbacks.
(WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument): Manage Document activation
callback registration.
(WebCore::HTMLPlugInImageElement::didMoveToNewOwnerDocument): Ditto.
(WebCore::HTMLPlugInImageElement::documentWillBecomeInactive): Clone the element's current style
and set the clone's display value to None. Start using this custom style and force a style
recall. This destroys the renderer and therefore the plugin instance.
(WebCore::HTMLPlugInImageElement::documentDidBecomeActive): Stop using the custom style and
force a style recall to reinstantiate the plugin.
(WebCore::HTMLPlugInImageElement::customStyleForRenderer): Return the stand-in style that has
display:none set.
* html/HTMLPlugInImageElement.h:
Add a setting that allows runtime configuration of whether or not the page cache supports plugins:
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setPageCacheSupportsPlugins):
(WebCore::Settings::pageCacheSupportsPlugins):
2011-12-12 Ojan Vafai <ojan@chromium.org>
r102234 caused RuleData to use 33 bits in its bitmask
https://bugs.webkit.org/show_bug.cgi?id=74314
Reviewed by Antti Koivisto.
Lower m_position to something more reasonable. A million
should be plenty. Current large sites (e.g. gmail) seem to use
tens of thousands.
Added a COMPILE_ASSERT to ensure this doesn't regress.
No new tests.
* css/CSSStyleSelector.cpp:
2011-12-12 James Robinson <jamesr@chromium.org>
Rename webkitCancelRequestAnimationFrame to webkitCancelAnimationFrame to match spec change
https://bugs.webkit.org/show_bug.cgi?id=74231
Reviewed by Simon Fraser.
The RequestAnimationFrame spec has renamed cancelRequestAnimationFrame to cancelAnimationFrame in response to
feedback from Mozilla and Microsoft that the old name was too long and didn't parallel setTimeout/clearTimeout
and setInterval/clearInterval very well. This updates our IDL to match, while preserving the old name as an
alias to be compatible with current content.
* dom/Document.cpp:
(WebCore::Document::webkitCancelAnimationFrame):
* dom/Document.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::webkitCancelAnimationFrame):
* page/DOMWindow.h:
(WebCore::DOMWindow::webkitCancelRequestAnimationFrame):
* page/DOMWindow.idl:
2011-12-12 Shawn Singh <shawnsingh@chromium.org>
[chromium] Remove assumption that empty surface is always at end of list
https://bugs.webkit.org/show_bug.cgi?id=74037
Reviewed by James Robinson.
Test case added to CCLayerTreeHostCommonTest.cpp, which reproduces
a crash reported in http://code.google.com/p/chromium/issues/detail?id=106734
This patch fixes the crash in a less risky way to be merged into
m17, but the root of the issue needs to be addressed in a
follow-up patch.
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::calculateDrawTransformsAndVisibilityInternal):
2011-12-12 Simon Fraser <simon.fraser@apple.com>
Share code that checks for matching sets of transform operations
https://bugs.webkit.org/show_bug.cgi?id=74265
Reviewed by Dan Bernstein.
Add TransformOperations::operationsMatch() and call it from the
three places that used this same code.
Tested by existing tests.
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::validateTransformFunctionList):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::validateTransformFunctionList):
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::fetchTransformOperationList):
* platform/graphics/transforms/TransformOperations.cpp:
(WebCore::TransformOperations::operationsMatch):
* platform/graphics/transforms/TransformOperations.h:
2011-12-12 Antti Koivisto <antti@apple.com>
Cache visited link hash
https://bugs.webkit.org/show_bug.cgi?id=74095
Reviewed by Darin Adler.
Visited link hash is relatively expensive to compute. We can cache it for anchor elements
with minimal relative memory cost for faster style resolve.
On my machine this speeds up style matching on full HTML spec by ~100ms or ~1% of the total
CPU usage. It makes link elements 8 bytes larger, a relatively minor increase to their overall size.
Invalidate the hashes on base URL for completeness sake (lack of style invalidation means
that this scenario is not properly supported currently).
Covered by existing tests. No specific test for visited hash invalidation on dynamic base URL
change as the effect is not testable due to lack of style invalidation.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::determineLinkStateSlowCase):
(WebCore::SelectorChecker::visitedStateChanged):
* html/Document.cpp:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::HTMLAnchorElement):
(WebCore::HTMLAnchorElement::parseMappedAttribute):
* html/HTMLAnchorElement.h:
(WebCore::HTMLAnchorElement::visitedLinkHash):
2011-12-12 Martin Robinson <mrobinson@igalia.com>
[GTK] gtk_widget_size_allocate for plugin widgets should happen in the WebView size-allocate method
https://bugs.webkit.org/show_bug.cgi?id=72805
Reviewed by Gustavo Noronha Silva.
No new tests. This is only a performance tweak.
Instead of immediately calling gtk_widget_size during painting, defer
this until the size-allocate method of the WebView.
* plugins/gtk/PluginViewGtk.cpp:
(WebCore::PluginView::updateWidgetAllocationAndClip): Instead of immediately changing
the widget allocation, just record it in a GObject data attachment.
2011-12-12 Nate Chapin <japhet@chromium.org>
A SubresourceLoader in the middle of revalidating
a resource should be treated as finishing (similar to
didFinishLoading and didFail) to ensure that willCancel()
doesn't declare the revalidation as having failed reentrantly.
https://bugs.webkit.org/show_bug.cgi?id=72762
Reviewed by Adam Barth.
Test: http/tests/cache/cancel-during-revalidation-succeeded.html
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse):
2011-12-12 Mary Wu <mary.wu@torchmobile.com.cn>
Upstream 3 files into WebCore/platform/blackberry
https://bugs.webkit.org/show_bug.cgi?id=74275
Reviewed by Rob Buis.
Initial upstream, no new tests.
* platform/blackberry/ContextMenuBlackBerry.cpp: Added.
* platform/blackberry/ContextMenuItemBlackBerry.cpp: Added.
* platform/blackberry/TemporaryLinkStubs.cpp: Added.
2011-12-12 Pierre Rossi <pierre.rossi@gmail.com>
[Qt] Rendering issues with sliders and QStyle
https://bugs.webkit.org/show_bug.cgi?id=73921
With QStyle's origins being deeply rooted with widgets,
several styles make wrong assumptions, leading to sliders
not being painted properly in WebKit. We can solve a lot
of problems by systematically translating the painter to
the top left corner of the render object.
Reviewed by Simon Hausmann.
No new tests. The Qt tests are ran with the Windows
style, this fixes some quirks affecting other styles.
* platform/qt/RenderThemeQStyle.cpp:
(WebCore::RenderThemeQStyle::paintSliderTrack):
(WebCore::RenderThemeQStyle::paintSliderThumb):
2011-12-12 Mary Wu <mary.wu@torchmobile.com.cn>
Upstream 5 files into WebCore/platform/blackberry
https://bugs.webkit.org/show_bug.cgi?id=73798
Reviewed by Rob Buis.
Main contributors:
Genevieve Mak <gmak@rim.com>
Mike Lattanzio <mlattanzio@rim.com>
George Staikos <gstaikos@rim.com>
Initial upstream, no new tests.
* platform/blackberry/PlatformTouchEventBlackBerry.cpp: Added.
(WebCore::PlatformTouchEvent::PlatformTouchEvent):
* platform/blackberry/PlatformTouchPointBlackBerry.cpp: Added.
(WebCore::PlatformTouchPoint::PlatformTouchPoint):
* platform/blackberry/SharedBufferBlackBerry.cpp: Added.
(WebCore::SharedBuffer::createWithContentsOfFile):
* platform/blackberry/SharedTimerBlackBerry.cpp: Added.
(WebCore::SharedTimerBlackBerry::SharedTimerBlackBerry):
(WebCore::SharedTimerBlackBerry::~SharedTimerBlackBerry):
(WebCore::SharedTimerBlackBerry::instance):
(WebCore::SharedTimerBlackBerry::start):
(WebCore::SharedTimerBlackBerry::stop):
(WebCore::setSharedTimerFiredFunction):
(WebCore::setSharedTimerFireInterval):
(WebCore::stopSharedTimer):
* platform/blackberry/SystemTimeBlackBerry.cpp: Added.
(WebCore::userIdleTime):
2011-12-12 Alexander Pavlov <apavlov@chromium.org>
Implement a cache for CSSStyleRule::selectorText()
https://bugs.webkit.org/show_bug.cgi?id=74269
This change is geared towards speeding up the CSS selector profiler,
its implementation tracked at https://bugs.webkit.org/show_bug.cgi?id=74004.
Using a proof-of-concept implementation of the profiler, this change reduces
the profiler temporal overhead on PerformanceTests/Parser/html5-full-render.html
roughly by 86% (from ~72 seconds down to ~10 seconds). This change also does not
considerably increase average memory usage, as reading selectorText is a relatively
rare case during normal web browsing.
Reviewed by Andreas Kling.
No new tests, as this functionality is covered by existing tests.
* css/CSSRule.h:
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::~CSSStyleRule):
(WebCore::selectorTextCache):
(WebCore::CSSStyleRule::cleanup):
(WebCore::CSSStyleRule::generateSelectorText):
(WebCore::CSSStyleRule::selectorText):
(WebCore::CSSStyleRule::setSelectorText):
* css/CSSStyleRule.h:
2011-12-12 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: [Styles] Modified selector text needs sanitization
https://bugs.webkit.org/show_bug.cgi?id=74291
Reviewed by Yury Semikhatsky.
* inspector/front-end/StylesSidebarPane.js:
2011-12-12 Renata Hodovan <reni@webkit.org>
Fulfill FIXME in HTMLLinkElement.h.
https://bugs.webkit.org/show_bug.cgi?id=74278
Rename HTMLLinkElement::isLoading() to isStyleSheetLoading().
Reviewed by Andreas Kling.
No new tests because the functionality remains the same.
* dom/Document.cpp:
(WebCore::Document::recalcStyleSelector):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setDisabledState):
(WebCore::HTMLLinkElement::isStyleSheetLoading):
(WebCore::HTMLLinkElement::sheetLoaded):
* html/HTMLLinkElement.h:
2011-11-25 Alexander Pavlov <apavlov@chromium.org>
WebKit does not enumerate over CSS properties in HTMLElement.style
https://bugs.webkit.org/show_bug.cgi?id=23946
Reviewed by Darin Adler.
This change generates a list of JavaScript mirrors of the CSS properties and allows to enumerate them
using the "in" operator on the CSSStyleDeclaration object.
Test: fast/css/style-enumerate-properties.html
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Added.
* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
(WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): Added.
(WebCore::V8CSSStyleDeclaration::namedPropertyQuery): Added.
(WebCore::V8CSSStyleDeclaration::namedPropertyGetter): A small drive-by optimization (local initialization moved down).
* css/CSSStyleDeclaration.idl: Use a custom property enumerator.
* css/makeprop.pl: Add a function to convert CSS property names into JS ones.
2011-12-12 Alexander Pavlov <apavlov@chromium.org>
Unreviewed, build fix.
Revert r102570 which broke SnowLeopard builders.
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
(WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
* css/CSSStyleDeclaration.idl:
* css/makeprop.pl:
2011-12-12 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: chromium: UI: Detailed Heap snapshot shows too many objects' hidden properties.
https://bugs.webkit.org/show_bug.cgi?id=74289
WebCore objects have many hidden properties.
The Detailed Heap shapshot view shows all these props for a selected object.
The result view looks too heavy and users usually failed to find a useful information about the object.
Looks like such ability is unnecessary in the most cases.
I'd like to introduce a configurable property that will show/hide these props from the view.
Reviewed by Yury Semikhatsky.
* English.lproj/localizedStrings.js:
* inspector/front-end/DetailedHeapshotGridNodes.js:
* inspector/front-end/DetailedHeapshotView.js:
* inspector/front-end/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotProxy.prototype.createPathFinder):
* inspector/front-end/SettingsScreen.js:
(WebInspector.SettingsScreen):
2011-12-12 Kentaro Hara <haraken@chromium.org>
Unreviewed, rolling out r102556.
http://trac.webkit.org/changeset/102556
https://bugs.webkit.org/show_bug.cgi?id=73394
clobber build failure
* WebCore.gyp/WebCore.gyp:
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main):
* WebCore.gypi:
* bindings/scripts/generate-bindings.pl:
* page/DOMWindow.idl:
* webaudio/DOMWindowWebAudio.idl: Removed.
2011-12-12 Kentaro Hara <haraken@chromium.org>
Unreviewed, rolling out r102558.
http://trac.webkit.org/changeset/102558
https://bugs.webkit.org/show_bug.cgi?id=74160
clobber build failure
* WebCore.gypi:
* page/DOMWindow.idl:
* websockets/DOMWindowWebSocket.idl: Removed.
2011-11-25 Alexander Pavlov <apavlov@chromium.org>
WebKit does not enumerate over CSS properties in HTMLElement.style
https://bugs.webkit.org/show_bug.cgi?id=23946
Reviewed by Darin Adler.
This change generates a list of JavaScript mirrors of the CSS properties and allows to enumerate them
using the "in" operator on the CSSStyleDeclaration object.
Test: fast/css/style-enumerate-properties.html
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Added.
* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
(WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): Added.
(WebCore::V8CSSStyleDeclaration::namedPropertyQuery): Added.
(WebCore::V8CSSStyleDeclaration::namedPropertyGetter): A small drive-by optimization (local initialization moved down).
* css/CSSStyleDeclaration.idl: Use a custom property enumerator.
* css/makeprop.pl: Add a function to convert CSS property names into JS ones, and a string comparator.
2011-12-09 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: provide per Document Node count statistics
https://bugs.webkit.org/show_bug.cgi?id=74100
Memory agent now returns counters for nodes with given names. For each
object group root user will see total number of its descendtants and per
tag name counts.
This patch also moves generic CounterVisitor code out of V8 bindings. It
may well be used with both JS engines.
Reviewed by Pavel Feldman.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptProfiler.h:
(WebCore::ScriptProfiler::visitJSDOMWrappers):
* bindings/v8/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::visitJSDOMWrappers):
* bindings/v8/ScriptProfiler.h:
* inspector/DOMWrapperVisitor.h: Added.
(WebCore::DOMWrapperVisitor::~DOMWrapperVisitor):
* inspector/Inspector.json:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::getDOMNodeCount):
* inspector/InspectorMemoryAgent.h:
2011-12-12 Noel Gordon <noel.gordon@gmail.com>
WebPImageDecoder: Increase image/webp decoding performance 10-20%
https://bugs.webkit.org/show_bug.cgi?id=74263
Reviewed by Adam Barth.
Avoid copying data from the RGB buffer of decoded image output to the
backing pixel store. That is slow - costs 10% of the overall decoding
time at libwebp 0.1.2, and 20% at libwebp 0.1.3.
Instead, instruct the decoder to write the decoded pixels directly to
the backing pixel store.
No new tests. Covered by existing tests. No progressive decoding test
exists in DRT, see https://bugs.webkit.org/show_bug.cgi?id=74062
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(outputMode): Define output pixel format. On little-endian machines,
output BGRA pixels to the backing store, for example.
(WebCore::WEBPImageDecoder::WEBPImageDecoder):
(WebCore::WEBPImageDecoder::decode):
* platform/image-decoders/webp/WEBPImageDecoder.h:
2011-12-11 Zoltan Herczeg <zherczeg@webkit.org>
Add new CSS nth-children parsing tests
https://bugs.webkit.org/show_bug.cgi?id=74178
Reviewed by Darin Adler.
Test: fast/css/parsing-css-nth-child.html
* css/CSSParser.cpp:
(WebCore::isValidNthToken): Add "-n" to the possible identifiers.
2011-12-11 Kentaro Hara <haraken@chromium.org>
Use [Supplemental] IDL in WebSocket
https://bugs.webkit.org/show_bug.cgi?id=74160
Reviewed by Adam Barth.
By using the [Supplemental] IDL, this patch moves declarations of WebSocket
attributes from DOMWindow.idl to websocket/DOMWindowWebSocket.idl,
which helps make WebSocket a self-contained module.
No new tests, no change in behavior.
Confirm that http/tests/websocket/* pass.
* WebCore.gypi: Added DOMWindowWebSocket.idl.
* page/DOMWindow.idl: Added the [Supplemented] IDL to WebSocket-related attributes. This [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL (See bug 73394 for more details).
* websockets/DOMWindowWebSocket.idl: Added. Used the [Supplemental=DOMWindow] IDL. The attributes in this IDL file are treated as if they are described in DOMWindow.idl.
2011-12-11 Luke Macpherson <macpherson@chromium.org>
Implement webkit-line-grid and webkit-line-grid-snap CSS properties in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=74262
Reviewed by Andreas Kling.
No new tests / refactoring only.
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
2011-12-11 Kentaro Hara <haraken@chromium.org>
Use the [Supplemental] IDL for webaudio attributes in Chromium
https://bugs.webkit.org/show_bug.cgi?id=73394
Reviewed by Adam Barth.
- Overview: Using the [Supplemental] IDL, this patch moves the attribute
declarations of webaudio from DOMWindow.idl into a new IDL file
webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained
feature (aka a module).
- This patch changes the build flow of WebCore.gyp as follows:
Previous build flow:
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl;
generate-bindings.pl reads $idl;
generate-bindings.pl generates .h and .cpp files for $idl;
}
New build flow (See the discussions in bug 72138 for more details):
resolve-supplemental.pl depends on all IDL files;
resolve-supplemental.pl reads all IDL files;
resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
resolve-supplemental.pl outputs supplemental_dependency.tmp;
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
generate-bindings.pl reads $idl;
generate-bindings.pl reads supplemental_dependency.tmp;
generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl;
}
- This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL
will be removed after build scripts for all platforms support the [Supplemental] IDL.
The motivation for the [Supplemented] IDL is as follows:
In order to support the [Supplemental] IDL, we need to
(1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
(2) and run generate-bindings.pl with the supplemental_dependency.tmp.
This build flow requires a change on the following build scripts,
but changing all the build scripts all at once without any regression is too difficult:
- DerivedSources.make
- DerivedSources.pri
- GNUmakefile.am
- PlatformBlackBerry.cmake
- UseJSC.cmake
- UseV8.cmake
- WebCore.vcproj/MigrateScripts
- WebCore.vcproj/WebCore.vcproj
- bindings/gobject/GNUmakefile.am
- WebCore.gyp/WebCore.gyp
Thus, we are planning to change the build scripts one by one, which implies that
we need to allow the temporary state in which some build scripts support [Supplemental] IDL
but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
in another IDL file somewhere, like this:
DOMWindowWebAudio.idl:
interface [
Supplemental=DOMWindow
] DOMWindowWebAudio {
attribute attr1;
attribute attr2;
};
DOMWindow.idl:
interface [
] DOMWindow {
attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL
attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL.
attribute attr3;
attribute attr4;
};
Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:
- If a given build script supports the [Supplemental] IDL,
generate-bindings.pl ignores all attributes with the [Supplemented] IDL.
- Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
as normal attributes and instead ignores all attributes with the [Supplemental] IDL
(i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).
Tests: webaudio/*
* WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file. If the file name is a "/cygdrive/c/..."-style path, it is converted to a "C:\cygwin\..."-style path by the cygpath command.
* WebCore.gypi: Added DOMWindowWebAudio.idl.
* bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL.
* page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL.
* webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.
2011-12-11 Andreas Kling <kling@webkit.org>
Micro-optimize CSSStyleSelector::findSiblingForStyleSharing().
<http://webkit.org/b/74261>
Reviewed by Antti Koivisto.
Move the isStyledElement() check from canShareStyleWithElement() into the
loop in findSiblingForStyleSharing(), and tighten up the argument/return
types to StyledElement* as appropriate.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::canShareStyleWithElement):
(WebCore::CSSStyleSelector::findSiblingForStyleSharing):
(WebCore::CSSStyleSelector::locateSharedStyle):
* css/CSSStyleSelector.h:
2011-12-11 Shinya Kawanaka <shinyak@google.com>
Asynchronous path synchronous path of SpellChecker should share the code to mark misspellings.
https://bugs.webkit.org/show_bug.cgi?id=73616
Reviewed by Hajime Morita.
Asynchronous spellchecking path should call the same method for the synchronous spellchecking path
to mark misspellings.
No new tests. Covered by existing tests.
* editing/Editor.cpp:
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
(WebCore::Editor::markAndReplaceFor):
Takes SpellCheckRequest object.
* editing/Editor.h:
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::didCheck):
Calls the same method of synchronous spellchecking path.
2011-12-11 Luke Macpherson <macpherson@chromium.org>
Implement CSS display property in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=73500
Reviewed by Andreas Kling.
Refactoring only / no functionality changed.
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyDisplay::isValidDisplayValue):
(WebCore::ApplyPropertyDisplay::applyInheritValue):
(WebCore::ApplyPropertyDisplay::applyInitialValue):
(WebCore::ApplyPropertyDisplay::applyValue):
(WebCore::ApplyPropertyDisplay::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
2011-12-11 Geoffrey Garen <ggaren@apple.com>
Try to fix the Qt build.
Unreviewed.
* css/CSSStyleDeclaration.cpp: Maybe an #include will solve our problem?
Someday, compiler error messages will not suck. Today is not that day.
2011-12-11 Luke Macpherson <macpherson@chromium.org>
Implement CSS resize property in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=74162
Reviewed by Julien Chaffraix.
No new tests / refactoring only.
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyResize::applyValue):
(WebCore::ApplyPropertyResize::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
2011-12-11 Andreas Kling <kling@webkit.org>
Move CSSElementStyleDeclaration to its own cpp/h files.
<http://webkit.org/b/74256>
Reviewed by Sam Weinig.
CSSElementStyleDeclaration is old enough to move out of CSSMutableStyleDeclaration's
attic and into her own apartment.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMBinding.h:
* css/CSSElementStyleDeclaration.cpp: Added.
(WebCore::CSSElementStyleDeclaration::styleSheet):
* css/CSSElementStyleDeclaration.h: Added.
(WebCore::CSSElementStyleDeclaration::element):
(WebCore::CSSElementStyleDeclaration::setElement):
(WebCore::CSSElementStyleDeclaration::CSSElementStyleDeclaration):
(WebCore::CSSElementStyleDeclaration::~CSSElementStyleDeclaration):
* css/CSSInlineStyleDeclaration.h:
* css/CSSMutableStyleDeclaration.cpp:
* css/CSSMutableStyleDeclaration.h:
* dom/CSSMappedAttributeDeclaration.h:
2011-12-11 Benjamin Poulain <bpoulain@apple.com>
Add KillRingNone.cpp to Mac build system
https://bugs.webkit.org/show_bug.cgi?id=74168
Reviewed by David Kilzer.
Add KillRingNone.cpp so it can be used on iOS, but
blacklist the file from the build in order to avoid
conflicts with KillRingMac.
* Configurations/WebCore.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
2011-12-11 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: [protocol] alter some type names generated from Inspector.json
https://bugs.webkit.org/show_bug.cgi?id=74247
Reviewed by Pavel Feldman.
Manually-filled map added that contains problem type names and its replacement.
* inspector/CodeGeneratorInspector.py:
(fix_type_name.Result):
(fix_type_name.Result.output_comment):
(fix_type_name):
(TypeBindings.create_for_named_type_declaration.write_doc):
(TypeBindings.create_for_named_type_declaration.EnumBinding.generate_type_builder):
(TypeBindings.create_for_named_type_declaration.PlainString.generate_type_builder):
(TypeBindings):
(TypeBindings.create_for_named_type_declaration.ClassBinding.generate_type_builder):
(Generator.process_types):
2011-12-11 Andreas Kling <kling@webkit.org>
WK2/NetscapePlugin: Incorrect mouse event coordinates when frameScaleFactor != 1.
<http://webkit.org/b/74209> and <rdar://problem/10438197>
Reviewed by Anders Carlsson.
* WebCore.exp.in: Export AffineTransform::scale(double).
2011-12-10 Andreas Kling <kling@webkit.org>
Remove OS(SYMBIAN) block from Settings constructor.
<http://webkit.org/b/74248>
Reviewed by Benjamin Poulain.
Kill the last OS(SYMBIAN) block in WebKit!
* page/Settings.cpp:
(WebCore::Settings::Settings):
2011-12-11 Dan Bernstein <mitz@apple.com>
<rdar://problem/10561285> REGRESSION (r80438): First word on a line or after collapsed space may not be hyphenated even though it should
https://bugs.webkit.org/show_bug.cgi?id=74239
Reviewed by Anders Carlsson.
Tests: fast/text/hyphenate-first-word-after-skipped-space-expected.html
fast/text/hyphenate-first-word-after-skipped-space.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::tryHyphenating): Replaced the assumption that the character at lastSpace is a space
iff lastSpace is non-zero with a test of whether it is a space, in the sense that it should
not be counted as part of the prefix when comparing it to the value of hyphenate-limit-before.
2011-12-10 Benjamin Poulain <bpoulain@apple.com>
#ifdef the parts of the Mac platform which should not be used on iOS
https://bugs.webkit.org/show_bug.cgi?id=74246
Reviewed by David Kilzer.
* Configurations/WebCore.xcconfig:
* platform/FileSystem.cpp:
* platform/mac/FileSystemMac.mm:
* platform/mac/Language.mm:
(+[WebLanguageChangeObserver _webkit_languagePreferencesDidChange]):
(WebCore::createHTTPStyleLanguageCode):
(WebCore::platformDefaultLanguage):
* platform/mac/LocalizedStringsMac.mm:
(WebCore::localizedString):
(+[WebCoreSharedBufferData initialize]):
* platform/mac/WebCoreNSStringExtras.h:
* platform/mac/WebCoreNSStringExtras.mm:
* platform/mac/WebFontCache.mm:
* platform/mac/WebNSAttributedStringExtras.mm: The value NSAttachmentCharacter is
not defined in the iOS SDK so we add it here.
2011-12-10 Ryosuke Niwa <rniwa@webkit.org>
The previous fix broke Lion release build. Fix that.
* editing/SpellingCorrectionCommand.cpp:
2011-12-10 Ryosuke Niwa <rniwa@webkit.org>
Lion build fix attempt after r102527.
* editing/SpellingCorrectionCommand.cpp:
2011-12-10 Kevin Ollivier <kevino@theolliviers.com>
[wx] Unreviewed build fixes. Add missing header for CPP
DOM bindings and add stubs for new DPI methods.
* bindings/scripts/CodeGeneratorCPP.pm:
(AddIncludesForType):
* platform/wx/ScreenWx.cpp:
(WebCore::screenHorizontalDPI):
(WebCore::screenVerticalDPI):
2011-12-10 Ryosuke Niwa <rniwa@webkit.org>
Mac build fix. Remove an erroneous OVERRIDE.
* editing/CompositeEditCommand.h:
2011-12-09 Robert Hogan <robert@webkit.org>
CSS 2.1 failure: numerous counter-increment-* tests fail
https://bugs.webkit.org/show_bug.cgi?id=73360
Reviewed by Julien Chaffraix.
Allow counter-increment to handle integer underflow and overflow.
Also allow 'counter' to inherit.
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyCounter::applyInheritValue):
(WebCore::ApplyPropertyCounter::applyValue):
(WebCore::ApplyPropertyCounter::createHandler):
2011-12-09 Ryosuke Niwa <rniwa@webkit.org>
There should be a way to count the number of nodes held by undo stack
https://bugs.webkit.org/show_bug.cgi?id=74099
Reviewed by Enrica Casucci.
Add getNodesInCommand to all SimpleEditCommands and EditCommandComposition in debug builds.
We can easily aggregate the number of nodes held by the undo stack by calling
this function on each item in the undo stack.
* editing/AppendNodeCommand.cpp:
(WebCore::AppendNodeCommand::getNodesInCommand):
* editing/AppendNodeCommand.h:
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::getNodesInCommand):
* editing/CompositeEditCommand.h:
* editing/DeleteFromTextNodeCommand.cpp:
(WebCore::DeleteFromTextNodeCommand::getNodesInCommand):
* editing/DeleteFromTextNodeCommand.h:
* editing/EditCommand.cpp:
(WebCore::SimpleEditCommand::addNodeAndDescedents):
* editing/EditCommand.h:
* editing/Editor.cpp:
(WebCore::Editor::appliedEditing):
* editing/InsertIntoTextNodeCommand.cpp:
(WebCore::InsertIntoTextNodeCommand::getNodesInCommand):
* editing/InsertIntoTextNodeCommand.h:
* editing/InsertNodeBeforeCommand.cpp:
(WebCore::InsertNodeBeforeCommand::getNodesInCommand):
* editing/InsertNodeBeforeCommand.h:
* editing/MergeIdenticalElementsCommand.cpp:
(WebCore::MergeIdenticalElementsCommand::getNodesInCommand):
* editing/MergeIdenticalElementsCommand.h:
* editing/RemoveCSSPropertyCommand.cpp:
(WebCore::RemoveCSSPropertyCommand::getNodesInCommand):
* editing/RemoveCSSPropertyCommand.h:
* editing/RemoveNodeCommand.cpp:
(WebCore::RemoveNodeCommand::getNodesInCommand):
* editing/RemoveNodeCommand.h:
* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::ReplaceNodeWithSpanCommand::getNodesInCommand):
* editing/ReplaceNodeWithSpanCommand.h:
* editing/SetNodeAttributeCommand.cpp:
(WebCore::SetNodeAttributeCommand::getNodesInCommand):
* editing/SetNodeAttributeCommand.h:
* editing/SetSelectionCommand.h:
* editing/SplitElementCommand.cpp:
(WebCore::SplitElementCommand::getNodesInCommand):
* editing/SplitElementCommand.h:
* editing/SplitTextNodeCommand.cpp:
(WebCore::SplitTextNodeCommand::getNodesInCommand):
* editing/SplitTextNodeCommand.h:
* editing/WrapContentsInDummySpanCommand.cpp:
(WebCore::WrapContentsInDummySpanCommand::getNodesInCommand):
* editing/WrapContentsInDummySpanCommand.h:
2011-11-09 Robert Hogan <robert@webkit.org>
CSS 2.1 failure: outline-color-* tests fail
https://bugs.webkit.org/show_bug.cgi?id=71931
Reviewed by Julien Chaffraix.
Test: css2.1/20110323/outline-color-001.html
WebKit didn't paint the top block in this series of tests because it ignored the outline
of objects with a zero size. Fix this by taking account of both offset and width of the
outline when deciding whether to paint it.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paintOutline): paint the outline even when the block has zero size
2011-12-10 Arko Saha <arko@motorola.com>
Microdata: Fix compilation error in MICRODATA enabled build.
https://bugs.webkit.org/show_bug.cgi?id=74235
Reviewed by Andreas Kling.
* dom/Document.cpp:
(WebCore::Document::getItems):
2011-12-10 Jarred Nicholls <jarred@sencha.com>
[V8] Remove old ArrayBuffer guards from V8XMLHttpRequestCustom.cpp
https://bugs.webkit.org/show_bug.cgi?id=74234
Reviewed by Adam Barth.
No new tests are necessary.
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::V8XMLHttpRequest::responseAccessorGetter):
2011-12-10 Noel Gordon <noel.gordon@gmail.com>
WebPImageDecoder progressive decodes fail to decode valid images
https://bugs.webkit.org/show_bug.cgi?id=74062
Reviewed by Adam Barth.
The WEBP header is followed by a so-called P0 header, then some data to
decode. If a partial P0 header is received during progressive decodes,
WebPIDecGetRGB() returns false; that makes the decoder enter the failed
state, no image appears on the page.
James Zern (webp) recommended the following via e-mail:
WebPIUpdate() validates input data, and will return an error status for
malformed data (bit-stream error, invalid data). Otherwise, it returns
OK or SUSPENDED. OK means that decoding is done/complete/no-error, and
SUSPENDED means more input data is needed to complete decoding. A NULL
return from WebPIDecGetRGB() is valid at this time due to a partial P0,
and should not be interpreted as a decoding failure.
No new tests. Not something DumpRenderTree can easily test.
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::decode): A NULL WebPIDecGetRGB() return is
acceptable here. Return false instead of failing the decoder.
2011-12-09 Benjamin Poulain <bpoulain@apple.com>
Add the FileSystem functions of iOS
https://bugs.webkit.org/show_bug.cgi?id=74164
Reviewed by David Kilzer.
Two functions are needed on iOS for temporary files and directories.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/ios/FileSystemIOS.h: Added.
* platform/ios/FileSystemIOS.mm: Added.
(WebCore::createTemporaryDirectory):
(WebCore::createTemporaryFile):
2011-12-09 Jacky Jiang <zhajiang@rim.com>
Remove ResourceHandle::bufferedData() from ResourceHandleBlackBerry.cpp
https://bugs.webkit.org/show_bug.cgi?id=74197
The bufferedData() was removed in r95120.
Reviewed by Rob Buis.
Trivial fix, so no new tests.
* platform/network/blackberry/ResourceHandleBlackBerry.cpp:
2011-12-09 Eric Penner <epenner@google.com>
[chromium] Prevent ASSERT in legitimate out-of-memory case.
https://bugs.webkit.org/show_bug.cgi?id=74215
Reviewed by James Robinson.
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::updateCompositorResources):
2011-12-09 Arko Saha <arko@motorola.com>
NameNodeListCache should be invalidated when name attribute changes/modified.
https://bugs.webkit.org/show_bug.cgi?id=70810
Reviewed by Ryosuke Niwa.
Test: fast/dom/getelementsbyname-invalidation-cache.html
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseMappedAttribute):
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::parseMappedAttribute):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseMappedAttribute):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseMappedAttribute):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::parseMappedAttribute):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::parseMappedAttribute):
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::parseMappedAttribute):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseMappedAttribute):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::parseMappedAttribute):
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::parseMappedAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseMappedAttribute):
* html/HTMLParamElement.cpp:
(WebCore::HTMLParamElement::parseMappedAttribute):
2011-12-09 Anders Carlsson <andersca@apple.com>
Fix Lion release build.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
2011-12-09 Mark Pilgrim <pilgrim@chromium.org>
[FileSystem API] Entry.remove successCallback is required
https://bugs.webkit.org/show_bug.cgi?id=69639
Reviewed by Adam Barth.
Test: fast/filesystem/simple-required-arguments-remove.html
* fileapi/Entry.idl: remove [Optional] flag from Entry.remove.successCallback parameter
2011-12-09 Tim Horton <timothy_horton@apple.com>
background-image transitions trigger between equivalent images
https://bugs.webkit.org/show_bug.cgi?id=74229
<rdar://problem/10558627>
Reviewed by Darin Adler.
Patch by Simon Fraser.
For animation property wrappers around StyleImage properties,
test the equivalence of the image itself, instead of equality of
the StyleImage pointer.
Test: transitions/equivalent-background-image-no-transition.html
* page/animation/AnimationBase.cpp:
(WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper):
(WebCore::StyleImagePropertyWrapper::equals):
(WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper):
(WebCore::FillLayerStyleImagePropertyWrapper::equals):
(WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
(WebCore::AnimationBase::ensurePropertyMap):
2011-12-09 Mary Wu <mary.wu@torchmobile.com.cn>
Small style fix on DragDataBlackBerry.cpp
https://bugs.webkit.org/show_bug.cgi?id=74171
Reviewed by Rob Buis.
Style fix, no function impact, no new tests.
* platform/blackberry/DragDataBlackBerry.cpp:
(WebCore::DragData::containsURL):
(WebCore::DragData::asFilenames):
(WebCore::DragData::asURL):
(WebCore::DragData::asFragment):
2011-12-09 Tony Chang <tony@chromium.org>
add css parsing for flex-flow: wrap and wrap-reverse
https://bugs.webkit.org/show_bug.cgi?id=74008
Reviewed by Ojan Vafai.
Also save 2 bits in StyleFlexibleBoxData by changing the size of m_flexFlow (there are only 4 enum values).
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Print the wrap value if it exists.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Parse a second token and put the values into a CSSValueList.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EFlexWrap):
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyFlexFlow::applyInheritValue): Does not inherit.
(WebCore::ApplyPropertyFlexFlow::applyInitialValue):
(WebCore::ApplyPropertyFlexFlow::applyValue): Special handler for setting two render style values from one
CSS property.
(WebCore::ApplyPropertyFlexFlow::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSValueKeywords.in:
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::flexWrap):
(WebCore::InheritedFlags::setFlexWrap):
(WebCore::InheritedFlags::initialFlexWrap):
* rendering/style/RenderStyleConstants.h: EFlexWrap to hold flex wrap values.
* rendering/style/StyleFlexibleBoxData.cpp:
(WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
(WebCore::StyleFlexibleBoxData::operator==):
* rendering/style/StyleFlexibleBoxData.h: 2 bits is enough to hold the 4 flexFlow values.
2011-12-09 KwangHyuk Kim <hyuki.kim@samsung.com>
[EFL] Add RefPtrEfl specialization for evas_object.
https://bugs.webkit.org/show_bug.cgi?id=73790
Reviewed by Ryosuke Niwa.
As evas_object is also based on reference count, RefPtr is applied for evas_object.
* PlatformEfl.cmake:
* platform/efl/RefPtrEfl.cpp: Added.
(WTF::refIfNotNull):
(WTF::derefIfNotNull):
* platform/efl/RefPtrEfl.h: Added.
2011-12-09 Tony Chang <tony@chromium.org>
REGRESSION(102234): 2-3% layout regression
https://bugs.webkit.org/show_bug.cgi?id=74141
Reviewed by David Hyatt.
Don't allocate a RuleSet when there are no regions.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::initForRegionStyling):
2011-12-09 Anders Carlsson <andersca@apple.com>
Fix assertion failure in ScrollAnimatorMac
https://bugs.webkit.org/show_bug.cgi?id=74222
Reviewed by Andreas Kling.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
This can be called with a nil scrollerImp, just return NSZeroPoint when that happens.
2011-12-09 Anders Carlsson <andersca@apple.com>
Move the "is currently drawing into layer" flag out into ScrollbarThemeMac
https://bugs.webkit.org/show_bug.cgi?id=74217
Reviewed by Beth Dakin.
There's no need to store this flag inside ScrollAnimatorMac, just make it a global and put it in ScrollbarThemeMac instead.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate layer]):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::isCurrentlyDrawingIntoLayer):
(WebCore::ScrollbarThemeMac::paint):
2011-12-09 Anders Carlsson <andersca@apple.com>
Minor cleanup in ScrollAnimatorMac.mm
https://bugs.webkit.org/show_bug.cgi?id=74211
Reviewed by Andreas Kling.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
No need to get the scrollbar from the scroll animator anymore.
(-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
Try to get data from the scrollbar and/or the scrollable area instead of the scrollbar painter.
2011-12-09 David Levin <levin@chromium.org>
Regression(r53595): Sync xhr requests in workers aren't terminated on worker close.
https://bugs.webkit.org/show_bug.cgi?id=71695
Reviewed by Zoltan Herczeg.
Overview: Message loops rely on the message queue being killed in order
to exit. r53595 stopped this from happening because killing a message loop
would also stop it from doing database clean up tasks. The database clean up
tasks needed to be tasks due to ordering issues. (They wanted to run after
certain order tasks were run.) This was solved by once again terminating
the message queue but then still runnning clean-up tasks from the killed
message queue.
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::run): Added the call to run clean-up tasks.
(WebCore::WorkerRunLoop::runInMode):
(WebCore::WorkerRunLoop::runCleanupTasks): Loop to simply clear out all clean up tasks.
(WebCore::WorkerRunLoop::Task::performTask): Stop non-clean up tasks
from running after the loop has been terminated.
* workers/WorkerRunLoop.h:
(WebCore::WorkerRunLoop::terminated): Just made it const.
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadShutdownFinishTask::performTask): Removed
the terminate clause since it was put back in stop.
(WebCore::WorkerThread::stop): Terminate the run loop so
that all loops will exit and clean up tasks will run. Also removed a comment
about nested workers because nested workers are no longer imminent and the
issue mentioned is one of many that should logically be investigated -- behavior correctness
in the face of different orderings of shutdown between the document and each worker --
when implementing them.
2011-12-09 Tony Chang <tony@chromium.org>
Unreviewed, rolling out r102416.
http://trac.webkit.org/changeset/102416
https://bugs.webkit.org/show_bug.cgi?id=73394
Chromium Win clobber builds are failing.
* WebCore.gyp/WebCore.gyp:
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main):
* WebCore.gypi:
* bindings/scripts/generate-bindings.pl:
* page/DOMWindow.idl:
* webaudio/DOMWindowWebAudio.idl: Removed.
2011-12-09 Eric Carlson <eric.carlson@apple.com>
JSC wrappers for TextTrack and TextTrackCue should not be collected during event dispatch or when owner is reachable
https://bugs.webkit.org/show_bug.cgi?id=72179
Reviewed by Geoff Garen.
Tests: media/track/text-track-cue-is-reachable.html
media/track/text-track-is-reachable.html
* GNUmakefile.list.am: Add JSTextTrackCueCustom.cpp and JSTextTrackCustom.cpp.
* Target.pri: Ditto.
* WebCore.gypi: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto
* bindings/js/JSBindingsAllInOne.cpp: Ditto.
* bindings/js/JSTextTrackCueCustom.cpp: Added.
(WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots): New.
(WebCore::JSTextTrackCueOwner::visitChildren): New.
* bindings/js/JSTextTrackCustom.cpp: Added.
(WebCore::JSTextTrackOwner::isReachableFromOpaqueRoots): New.
(WebCore::JSTextTrack::visitChildren): New, mark all cues.
* bindings/js/JSTextTrackCustom.h: Added.
(WebCore::root): New.
* bindings/js/JSTextTrackListCustom.cpp:
(WebCore::JSTextTrackList::visitChildren): New, mark all tracks.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::trackWillBeRemoved): TextTracks::remove now takes a TextTrack*.
* html/LoadableTextTrack.h:
(WebCore::LoadableTextTrack::trackElement): New, return the <track>.
* html/TextTrack.cpp:
(WebCore::TextTrack::TextTrack): Initialize m_mediaElement.
* html/TextTrack.h:
(WebCore::TextTrack::setMediaElement): New.
(WebCore::TextTrack::mediaElement): Ditto.
* html/TextTrack.idl: Add CustomIsReachable and CustomMarkFunction.
* html/TextTrackCue.idl: Add CustomIsReachable.
* html/track/TextTrackList.cpp:
(TextTrackList::append): Set track's media element.
(TextTrackList::remove): Clear track's media element. Take a raw ptr, not a PassRefPtr.
* html/track/TextTrackList.h:
* html/track/TextTrackList.idl: Add CustomMarkFunction
2011-12-09 Chris Fleizach <cfleizach@apple.com>
WebKit should ignore images with @alt matching only whitespace
https://bugs.webkit.org/show_bug.cgi?id=74189
Reviewed by Darin Adler.
Test: accessibility/img-alt-tag-only-whitespace.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
2011-12-09 Anders Carlsson <andersca@apple.com>
Remove NSAnimationContext calls
https://bugs.webkit.org/show_bug.cgi?id=74207
Reviewed by Sam Weinig.
NSAnimationContext is not used for NSAnimation subclasses, so the calls to beginGrouping/endGrouping and setDuration:
are essentially no-ops. Remove them.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
2011-12-09 Anders Carlsson <andersca@apple.com>
Rename scrollAnimatorDestroyed to invalidate
https://bugs.webkit.org/show_bug.cgi?id=74206
Reviewed by Sam Weinig.
Since these methods can be called when both scrollbars are destroyed and the scroll animator itself is
destroyed, rename it to something more neutral.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollAnimationHelperDelegate invalidate]):
(-[WebScrollbarPartAnimation invalidate]):
(-[WebScrollbarPainterDelegate invalidate]):
(WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
2011-12-09 Anders Carlsson <andersca@apple.com>
WebScrollbarPainterControllerDelegate should know about the ScrollableArea, not the ScrollAnimatorMac
https://bugs.webkit.org/show_bug.cgi?id=74204
Reviewed by Sam Weinig.
It makes more logical sense to associate the WebScrollbarPainterControllerDelegate object with its ScrollableArea, since
painting has nothing to do with animation.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterControllerDelegate initWithScrollableArea:]):
(-[WebScrollbarPainterControllerDelegate invalidate]):
(-[WebScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]):
(-[WebScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]):
(-[WebScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]):
(-[WebScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
(-[WebScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
2011-12-09 Jarred Nicholls <jarred@sencha.com>
[JSC] Allow cached attributes in bindings that declare a custom mark function
https://bugs.webkit.org/show_bug.cgi?id=74187
Reviewed by Oliver Hunt.
No new tests, current binding tests are sufficient.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
2011-12-09 Anders Carlsson <andersca@apple.com>
Remove duplicate animation ivars
https://bugs.webkit.org/show_bug.cgi?id=74194
Reviewed by Sam Weinig.
Since we now have one WebScrollbarPainterDelegate for each scrollbar, we no longer need separate
vertical/horizontal animation objects, so get rid of them.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate cancelAnimations]):
(-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
(-[WebScrollbarPainterDelegate scrollAnimatorDestroyed]):
2011-12-09 Anders Carlsson <andersca@apple.com>
WebScrollbarPartAnimation should only know about the scrollbar it's animating
https://bugs.webkit.org/show_bug.cgi?id=74192
Reviewed by Sam Weinig.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
Change the designated initializer to just take the scrollbar. Also, make the animation non-blocking here
so we don't have to do it in all the call sites.
(-[WebScrollbarPartAnimation startAnimation]):
Update the scrollbar painter.
(-[WebScrollbarPartAnimation setCurrentProgress:]):
Just invalidate the scrollbar we're animating.
(-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
Update call sites to use the new designated initializer.
2011-12-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Inspector: Don't translate the context when rendering the highlights on a tiled layer.
https://bugs.webkit.org/show_bug.cgi?id=74085
Reviewed by Kenneth Rohde Christiansen.
When the frame view is using fixed layouting, the page overlay is the size of the whole
page and the context shouldn't be translated. The visible rect is still used in that
case to display element titles within the visible rect.
Also:
- Rename overlayRect to visibleRect to reduce confusion in this case.
- Remove the superfluous boundingBox check.
* inspector/DOMNodeHighlighter.cpp:
2011-12-09 Vsevolod Vlasov <vsevik@chromium.org>
Unreviewed inspector utilities syntax fix.
* inspector/front-end/utilities.js:
():
2011-12-09 Joone Hur <joone.hur@collabora.co.uk>, Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
[GTK] Initial implementation of Accelerated Compositing using Clutter
https://bugs.webkit.org/show_bug.cgi?id=73319
Reviewed by Gustavo Noronha Silva.
No new tests added as this feature will be able to reuse the existing
CSS3 transforms layout tests.
* GNUmakefile.am: Include WebCore/platform/graphics/clutter path.
* GNUmakefile.list.am: Add GraphicsLayerClutter.
* platform/clutter/GRefPtrClutter.cpp: Added.
(WTF::adoptGRef):
(WTF::ClutterActor):
* platform/clutter/GRefPtrClutter.h: Added.
* platform/graphics/GraphicsLayer.h: Define PlatformLayer type, which represents ClutterActor.
* platform/graphics/clutter/GraphicsLayerClutter.cpp: Boilerplate implementation.
(WebCore::GraphicsLayerClutter::GraphicsLayerClutter):
(WebCore::GraphicsLayerClutter::platformLayer):
* platform/graphics/clutter/GraphicsLayerClutter.h: Boilerplate implementation.
2011-12-08 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Introduce a Map class allowing to store values indexed by arbitrary objects.
https://bugs.webkit.org/show_bug.cgi?id=74084
Reviewed by Pavel Feldman.
Test: inspector/map.html
* inspector/front-end/treeoutline.js:
(TreeOutline):
():
(TreeElement.prototype.collapse):
(TreeElement.prototype.expand):
* inspector/front-end/utilities.js:
():
2011-12-09 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: [protocol] generate C++ classes for protocol JSON named types
https://bugs.webkit.org/show_bug.cgi?id=72835
Reviewed by Yury Semikhatsky.
Extends python generator functionality.
Makes constructor in InspectorObject public.
* inspector/CodeGeneratorInspector.py:
* inspector/InspectorValues.h:
2011-12-08 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK2] Webkit should release TextureMapper GL objects if page paint node is deallocated.
https://bugs.webkit.org/show_bug.cgi?id=73591
Reviewed by Noam Rosenthal.
Implementation of helper function to remove all GL allocated tiles
when QQuickWebView gets removed from canvas.
Tested by new API test in WK2 (tst_QQuickWebView::removeFromCanvas).
* platform/graphics/texmap/TextureMapperNode.cpp:
(WebCore::TextureMapperNode::purgeNodeTexturesRecursive):
* platform/graphics/texmap/TextureMapperNode.h:
2011-12-08 Leo Yang <leo.yang@torchmobile.com.cn>
Upstream platform/network/blackberry/DeferredData.{h, cpp}, NetworkJob.{h, cpp} and NetworkManager.{h, cpp}
https://bugs.webkit.org/show_bug.cgi?id=73791
Reviewed by Rob Buis.
Other main contributors:
Joe Mason <jmason@rim.com>
Lianghui Chen <liachen@rim.com>
Charles Wei <charles.wei@torchmobile.com.cn>
Initial upstream, can't be built yet, no new tests.
* platform/network/blackberry/DeferredData.cpp: Added.
* platform/network/blackberry/DeferredData.h: Added.
* platform/network/blackberry/NetworkJob.cpp: Added.
* platform/network/blackberry/NetworkJob.h: Added.
* platform/network/blackberry/NetworkManager.cpp: Added.
* platform/network/blackberry/NetworkManager.h: Added.
2011-12-08 Ryosuke Niwa <rniwa@webkit.org>
It's semantically incorrect to call notifyNodeListsAttributeChanged in dispatchSubtreeModifiedEvent
https://bugs.webkit.org/show_bug.cgi?id=74028
Reviewed by Darin Adler.
Remove a call to notifyNodeListsAttributeChanged in dispatchSubtreeModified and add explicit calls
to notifyNodeListsAttributeChanged at appropriate places.
Also merge notifyNodeListsChildrenChanged with notifyLocalNodeListsChildrenChanged, and
notifyNodeListsAttributeChanged with notifyLocalNodeListsAttributeChanged, and rename them to
invalidateNodeListsCacheAfterAttributeChanges and invalidateNodeListsCacheAfterNodeChanges respectively.
* dom/Attr.cpp:
(WebCore::Attr::childrenChanged):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::childrenChanged):
* dom/Document.cpp:
(WebCore::Document::updateRangesAfterNodeChanges):
* dom/Document.h:
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::addAttribute):
(WebCore::NamedNodeMap::removeAttribute):
* dom/Node.cpp:
(WebCore::removeNodeListCacheIfPossible):
(WebCore::Node::unregisterDynamicNodeList):
(WebCore::Node::invalidateNodeListsCacheAfterAttributeChanges):
(WebCore::Node::invalidateNodeListsCacheAfterNodeChanges):
(WebCore::Node::dispatchSubtreeModifiedEvent):
* dom/Node.h:
* dom/NodeRareData.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::classAttributeChanged):
2011-12-08 Kenichi Ishibashi <bashi@chromium.org>
Unreviewed, rolling out r102418.
http://trac.webkit.org/changeset/102418
https://bugs.webkit.org/show_bug.cgi?id=71870
Caused Chromium build failure.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::toV8Object):
* html/canvas/WebGLExtension.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
(WebCore::WebGLRenderingContext::maybeRestoreContext):
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebKitLoseContext.cpp: Renamed from Source/WebCore/html/canvas/WebGLLoseContext.cpp.
(WebCore::WebKitLoseContext::WebKitLoseContext):
(WebCore::WebKitLoseContext::~WebKitLoseContext):
(WebCore::WebKitLoseContext::getName):
(WebCore::WebKitLoseContext::create):
(WebCore::WebKitLoseContext::loseContext):
(WebCore::WebKitLoseContext::restoreContext):
* html/canvas/WebKitLoseContext.h: Renamed from Source/WebCore/html/canvas/WebGLLoseContext.h.
* html/canvas/WebKitLoseContext.idl: Renamed from Source/WebCore/html/canvas/WebGLLoseContext.idl.
2011-12-08 Fady Samuel <fsamuel@chromium.org>
[Chromium] Enable viewport metatag
https://bugs.webkit.org/show_bug.cgi?id=73495
Reviewed by Darin Fisher.
Recompute viewpot parameters on frame rect resize.
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
2011-12-08 Kent Tamura <tkent@chromium.org>
Build fix for r102419.
https://bugs.webkit.org/show_bug.cgi?id=73916
* platform/PopupMenuClient.h:
(WebCore::PopupMenuClient::listBoxSelectItem):
Remove unused argument names.
2011-12-08 Kentaro Hara <haraken@chromium.org>
Unreviewed. Rebaselined run-bindings-tests results.
* bindings/scripts/test/JS/JSFloat64Array.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2011-12-08 Mary Wu <mary.wu@torchmobile.com.cn>
Upstream BlackBerry porting of MIMETypeRegistry/KeyboardEvent
https://bugs.webkit.org/show_bug.cgi?id=73534
Reviewed by Rob Buis.
Other main contributors:
Mike Fenton <mifenton@rim.com>
Joe Mason <jmason@rim.com>
Max Feil <mfeil@qnx.com>
Lukas Sydorowski <lsydorowski@rim.com>
Crystal Zhang <haizhang@rim.com>
Initial upstream, no new tests.
* platform/blackberry/MIMETypeRegistryBlackBerry.cpp: Added.
(WebCore::MIMETypeRegistry::getMIMETypeForExtension):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
(WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
* platform/blackberry/PlatformKeyboardEventBlackBerry.cpp: Added.
(WebCore::keyIdentifierForBlackBerryCharacter):
(WebCore::windowsKeyCodeForBlackBerryCharacter):
(WebCore::adjustCharacterFromOS):
(WebCore::toWebCorePlatformKeyboardEventType):
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
(WebCore::PlatformKeyboardEvent::currentCapsLockState):
(WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
(WebCore::PlatformKeyboardEvent::getCurrentModifierState):
2011-12-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101619.
http://trac.webkit.org/changeset/101619
https://bugs.webkit.org/show_bug.cgi?id=74158
this patch produces bad behaviour on mac (Requested by
jeremya_ on #webkit).
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::dragSourceEndedAt):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateHoverActiveState):
2011-12-08 Adam Klein <adamk@chromium.org>
[MutationObservers] V8LazyEventHandler breaks microtask delivery semantics
https://bugs.webkit.org/show_bug.cgi?id=73492
Reviewed by Adam Barth.
Test: fast/mutation/inline-event-listener.html
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::prepareListenerObject): Call v8::Script::Run directly instead of going through V8Proxy.
2011-12-08 Hayato Ito <hayato@chromium.org>
Suppress rendering of light children when ShadowRoot is dynamically created.
https://bugs.webkit.org/show_bug.cgi?id=72441
Reviewed by Ryosuke Niwa.
Tests: fast/dom/shadow/dynamically-created-shadow-root-expected.html
fast/dom/shadow/dynamically-created-shadow-root.html
* dom/Element.cpp:
(WebCore::Element::setShadowRoot):
2011-12-08 Pierre Rossi <pierre.rossi@gmail.com>
Drop ENABLE_NO_LISTBOX_RENDERING, and make it a runtime decision.
https://bugs.webkit.org/show_bug.cgi?id=73916
This was needed for Qt since the mobile theme, which can be picked
up at runtime, delegates the rendering of list boxes.
Reviewed by Kent Tamura.
No new tests, there's no functional change.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::usesMenuList):
* html/HTMLSelectElement.h:
* platform/PopupMenuClient.h:
(WebCore::PopupMenuClient::listBoxSelectItem):
(WebCore::PopupMenuClient::multiple):
* platform/qt/RenderThemeQtMobile.h:
(WebCore::RenderThemeQtMobile::delegatesMenuListRendering):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::multiple):
* rendering/RenderMenuList.h:
* rendering/RenderTheme.h:
(WebCore::RenderTheme::delegatesMenuListRendering):
2011-12-08 Kenneth Russell <kbr@google.com>
Rename WEBKIT_lose_context to WEBKIT_WEBGL_lose_context
https://bugs.webkit.org/show_bug.cgi?id=71870
Reviewed by James Robinson.
Rename largely done with do-webcore-rename with a couple of
necessary manual fixups. Ran WebGL layout tests.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::toV8Object):
* html/canvas/WebGLExtension.h:
* html/canvas/WebGLLoseContext.cpp: Copied from Source/WebCore/html/canvas/WebKitLoseContext.cpp.
(WebCore::WebGLLoseContext::WebGLLoseContext):
(WebCore::WebGLLoseContext::~WebGLLoseContext):
(WebCore::WebGLLoseContext::getName):
(WebCore::WebGLLoseContext::create):
(WebCore::WebGLLoseContext::loseContext):
(WebCore::WebGLLoseContext::restoreContext):
* html/canvas/WebGLLoseContext.h: Copied from Source/WebCore/html/canvas/WebKitLoseContext.h.
* html/canvas/WebGLLoseContext.idl: Copied from Source/WebCore/html/canvas/WebKitLoseContext.idl.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
(WebCore::WebGLRenderingContext::maybeRestoreContext):
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebKitLoseContext.cpp: Removed.
* html/canvas/WebKitLoseContext.h: Removed.
* html/canvas/WebKitLoseContext.idl: Removed.
2011-12-08 Kentaro Hara <haraken@chromium.org>
Use the [Supplemental] IDL for webaudio attributes in Chromium
https://bugs.webkit.org/show_bug.cgi?id=73394
Reviewed by Adam Barth.
- Overview: Using the [Supplemental] IDL, this patch moves the attribute
declarations of webaudio from DOMWindow.idl into a new IDL file
webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained
feature (aka a module).
- This patch changes the build flow of WebCore.gyp as follows:
Previous build flow:
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl;
generate-bindings.pl reads $idl;
generate-bindings.pl generates .h and .cpp files for $idl;
}
New build flow (See the discussions in bug 72138 for more details):
resolve-supplemental.pl depends on all IDL files;
resolve-supplemental.pl reads all IDL files;
resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
resolve-supplemental.pl outputs supplemental_dependency.tmp;
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
generate-bindings.pl reads $idl;
generate-bindings.pl reads supplemental_dependency.tmp;
generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl;
}
- This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL
will be removed after build scripts for all platforms support the [Supplemental] IDL.
The motivation for the [Supplemented] IDL is as follows:
In order to support the [Supplemental] IDL, we need to
(1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
(2) and run generate-bindings.pl with the supplemental_dependency.tmp.
This build flow requires a change on the following build scripts,
but changing all the build scripts all at once without any regression is too difficult:
- DerivedSources.make
- DerivedSources.pri
- GNUmakefile.am
- PlatformBlackBerry.cmake
- UseJSC.cmake
- UseV8.cmake
- WebCore.vcproj/MigrateScripts
- WebCore.vcproj/WebCore.vcproj
- bindings/gobject/GNUmakefile.am
- WebCore.gyp/WebCore.gyp
Thus, we are planning to change the build scripts one by one, which implies that
we need to allow the temporary state in which some build scripts support [Supplemental] IDL
but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
in another IDL file somewhere, like this:
DOMWindowWebAudio.idl:
interface [
Supplemental=DOMWindow
] DOMWindowWebAudio {
attribute attr1;
attribute attr2;
};
DOMWindow.idl:
interface [
] DOMWindow {
attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL
attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL.
attribute attr3;
attribute attr4;
};
Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:
- If a given build script supports the [Supplemental] IDL,
generate-bindings.pl ignores all attributes with the [Supplemented] IDL.
- Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
as normal attributes and instead ignores all attributes with the [Supplemental] IDL
(i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).
Tests: webaudio/*
* WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file. If the file name is a "/cygdrive/c/..."-style path, it is converted to a "C:\cygwin\..."-style path by the cygpath command.
* WebCore.gypi: Added DOMWindowWebAudio.idl.
* bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL.
* page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL.
* webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.
2011-12-08 Van Lam <vanlam@google.com>
Caret keeps blinking during forward-delete
https://bugs.webkit.org/show_bug.cgi?id=38564
Reviewed by Darin Adler.
Currently updateAppearance determines if the caret should stop blinking
based on whether or not the editing operation changed the position of
the caret; so the caret stops blinking in case of typing text and
backwards delete (which always displace the caret) but does not stop
blinking in the case of forward delete (which does not displace the
caret).
Added a boolean member function shouldStopCaretBlinking in EditCommand
which will return true if the object is a TypingCommand (my
understanding here is that all TypingCommands should stop the caret
from blinking for a cycle, currently 0.5 seconds). Then used this
function to stop the caret from blinking if the last editing command
is a TypingCommand.
* editing/EditCommand.h:
(WebCore::EditCommand::shouldStopCaretBlinking):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::updateAppearance):
* editing/TypingCommand.h:
(WebCore::TypingCommand::shouldStopCaretBlinking):
2011-12-08 Adam Klein <adamk@chromium.org>
Use HashMap<Node*, OwnPtr<...>> in ChildListMutationScope
https://bugs.webkit.org/show_bug.cgi?id=73964
Reviewed by Darin Adler.
Re-landing r102267 with a fix for the clang build.
No new tests, refactoring only.
* dom/ChildListMutationScope.cpp:
(WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::childAdded):
(WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::willRemoveChild):
(WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::incrementScopingLevel):
(WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::decrementScopingLevel):
2011-12-08 Anders Carlsson <andersca@apple.com>
WebScrollbarPainterDelegate should have a pointer to its Scrollbar
https://bugs.webkit.org/show_bug.cgi?id=74149
Reviewed by Darin Adler.
This is another step towards making the scroll animation code more robust.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate initWithScrollbar:WebCore::]):
(-[WebScrollbarPainterDelegate scrollAnimator]):
(-[WebScrollbarPainterDelegate layer]):
(-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
(-[WebScrollbarPainterDelegate scrollAnimatorDestroyed]):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2011-12-08 Rakesh KN <rakesh.kn@motorola.com>
keyboard event doesn't fire while moving mouse with button pressed
https://bugs.webkit.org/show_bug.cgi?id=73821
Reviewed by Alexey Proskuryakov.
Autoscroll should not stop on key press.
Test: fast/events/autoscroll-should-not-stop-on-keypress.html
* page/EventHandler.cpp:
(WebCore::EventHandler::keyEvent):
Removed the check for autoscroll so that autoscroll is not stopped on
key press and key event is processed.
2011-12-08 Anders Carlsson <andersca@apple.com>
Add scrollAnimator getter method to WebScrollbarPainterDelegate
https://bugs.webkit.org/show_bug.cgi?id=74146
Reviewed by Beth Dakin.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate scrollAnimator]):
(-[WebScrollbarPainterDelegate layer]):
(-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
(-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
2011-12-08 James Robinson <jamesr@chromium.org>
Improve handling of frame removal during requestAnimationFrame callback invocation
https://bugs.webkit.org/show_bug.cgi?id=74036
Reviewed by Adam Barth.
See bug for details.
Test: fast/animation/request-animation-frame-detach-element.html
* dom/Document.cpp:
(WebCore::Document::removedLastRef):
(WebCore::Document::detach):
* dom/Document.h:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::~ScriptedAnimationController):
(WebCore::ScriptedAnimationController::serviceScriptedAnimations):
(WebCore::ScriptedAnimationController::scheduleAnimation):
* dom/ScriptedAnimationController.h:
(WebCore::ScriptedAnimationController::create):
(WebCore::ScriptedAnimationController::clearDocumentPointer):
* page/FrameView.cpp:
(WebCore::FrameView::serviceScriptedAnimations):
2011-12-08 Yongjun Zhang <yongjun_zhang@apple.com>
Use bitfield for bool data members in BitmapImage.
https://bugs.webkit.org/show_bug.cgi?id=74102
Reviewed by Darin Adler.
Class BitmapImage and FrameData has bool data members, we can use bitfield for those data
members to reduce the BitmapImage's memory footprint.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::BitmapImage):
* platform/graphics/BitmapImage.h:
(WebCore::FrameData::FrameData):
* platform/graphics/cairo/ImageCairo.cpp:
(WebCore::BitmapImage::BitmapImage):
* platform/graphics/cg/ImageCG.cpp:
(WebCore::BitmapImage::BitmapImage):
* platform/graphics/openvg/ImageOpenVG.cpp:
(WebCore::BitmapImage::BitmapImage):
* platform/graphics/qt/ImageQt.cpp:
(WebCore::BitmapImage::BitmapImage):
2011-12-08 Anders Carlsson <andersca@apple.com>
Fix a paste-o in ScrollAnimatorMac::updateScrollerStyle
https://bugs.webkit.org/show_bug.cgi?id=74145
Reviewed by Sam Weinig.
Call setHorizontalScrollerImp to set the horizontal scrollbar painter.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
2011-12-08 Anders Carlsson <andersca@apple.com>
Create one WebScrollbarPainterDelegate for each scrollbar
https://bugs.webkit.org/show_bug.cgi?id=74142
Reviewed by Sam Weinig.
Create and destroy WebScrollbarPainterDelegate objects as scrollbars come and go.
This is a step towards simplifying the WebScrollbarPainterDelegate object.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::cancelAnimations):
2011-12-08 David Reveman <reveman@chromium.org>
[Chromium] Add per-tile painting flag to DumpRenderTree and rename AcceleratedDrawing to AcceleratedPainting in chromium specific code.
https://bugs.webkit.org/show_bug.cgi?id=74017
Reviewed by James Robinson.
Add per-tile drawing to page settings.
No new tests.
* page/Settings.h:
(WebCore::Settings::setPerTileDrawingEnabled):
(WebCore::Settings::perTileDrawingEnabled):
* testing/Internals.cpp:
(WebCore::Internals::setPerTileDrawingEnabled):
* testing/Internals.h:
2011-12-08 Anders Carlsson <andersca@apple.com>
Add a scrollbarPainterForScrollbar helper function
https://bugs.webkit.org/show_bug.cgi?id=74139
Reviewed by Sam Weinig.
* platform/mac/ScrollAnimatorMac.mm:
(macScrollbarTheme):
(scrollbarPainterForScrollbar):
(WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
(WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
2011-12-08 James Robinson <jamesr@chromium.org>
[chromium] Move NonCompositedContentHost to WebKit
https://bugs.webkit.org/show_bug.cgi?id=74047
Reviewed by Kenneth Russell.
Updates WebCore.gypi to remove files no longer within WebCore and removes unused forward declaration and include
from LayerRendererChromium.
* WebCore.gypi:
* platform/graphics/chromium/LayerRendererChromium.cpp:
* platform/graphics/chromium/LayerRendererChromium.h:
2011-12-08 Sami Kyostila <skyostil@google.com>
[chromium] Layer contents scale change should trigger invalidation
https://bugs.webkit.org/show_bug.cgi?id=74086
When the contents scale of a layer is changed, the entire contents of
the layer should be marked dirty.
Reviewed by James Robinson.
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setContentsScale):
2011-12-08 Stephen White <senorblanco@chromium.org>
[chromium] Add CSS_FILTERS custom binding file to WebCore.gypi.
https://bugs.webkit.org/show_bug.cgi?id=74091
Reviewed by Adam Barth.
If it builds, you're happy.
* WebCore.gypi:
2011-12-08 Ryosuke Niwa <rniwa@webkit.org>
Line breaks are lost when pasted into textarea text starting with a blank line set while textarea is hidden
https://bugs.webkit.org/show_bug.cgi?id=74126
Reviewed by Tony Chang.
The bug was caused by the code that generated text out of pre-rendered text was generating div's inside the fragment
pasted into textarea even though serialization algorithm in textarea doesn't handle block elements.
Fixed the bug by special-casing this in createFragmentFromText. In the long run, we should really get rid of this
whole pre-rendering trick.
* editing/markup.cpp:
(WebCore::createFragmentFromText):
2011-12-08 Florin Malita <fmalita@google.com>
Moving SVG elements on the page doesn't always erase element at the old position
https://bugs.webkit.org/show_bug.cgi?id=74002
Reviewed by Darin Adler.
Test: svg/repaint/container-repaint.svg
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::layout):
Save the old repaint bounds before updating the viewport.
2011-12-08 Tim Horton <timothy_horton@apple.com>
Enable animations of CSS images using -webkit-cross-fade
https://bugs.webkit.org/show_bug.cgi?id=74049
<rdar://problem/10209303>
Reviewed by Simon Fraser.
Add support for animating CSS images in the following properties:
- background(-image)
- border-image(-source)
- list-style(-image)
- -webkit-mask-box-image(-source)
- -webkit-mask-image(-source)
This patch only adds support for transitioning between NinePieceImages
where all of the properties except the image itself are equal, and the
size of the images are equal. Other cases will not animate.
Add animation blend functions for StyleImage and NinePieceImage.
Apply the proper compositing operation to -webkit-cross-fade, and
fix handling of the destination and source areas to support scaling.
Tests: animations/cross-fade-background-image.html
animations/cross-fade-border-image-source.html
animations/cross-fade-list-style-image.html
animations/cross-fade-webkit-mask-box-image.html
animations/cross-fade-webkit-mask-image.html
* css/CSSCrossfadeValue.cpp:
(WebCore::cachedImageForCSSValue):
(WebCore::CSSCrossfadeValue::fixedSize):
(WebCore::CSSCrossfadeValue::image):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::CSSImageValue):
* css/CSSImageValue.h:
(WebCore::CSSImageValue::create):
* page/animation/AnimationBase.cpp:
(WebCore::crossfadeBlend):
(WebCore::blendFunc):
(WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper):
(WebCore::RefCountedPropertyWrapper::blend):
(WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper):
(WebCore::FillLayerRefCountedPropertyWrapper::blend):
(WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
(WebCore::AnimationBase::ensurePropertyMap):
(WebCore::addShorthandProperties):
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::drawCrossfade):
(WebCore::CrossfadeGeneratedImage::draw):
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/CrossfadeGeneratedImage.h:
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::setMaskImage):
2011-12-08 Stephen White <senorblanco@chromium.org>
Use Skia's implementation of Gaussian blur when accelerated filters
are enabled.
https://bugs.webkit.org/show_bug.cgi?id=73949
Reviewed by Zoltan Herczeg.
In the future, this will be covered by the SVG tests run in GPU mode.
* WebCore.gypi:
Add FEGaussianBlurSkia.cpp to the build.
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplySoftware):
Call out to platformApplySkia() when USE_SKIA is enabled.
* platform/graphics/filters/FEGaussianBlur.h:
platformApplySkia() declaration.
* platform/graphics/filters/skia: Added.
* platform/graphics/filters/skia/FEGaussianBlurSkia.cpp: Added.
(WebCore::FEGaussianBlur::platformApplySkia):
On the Skia port, use SkBlurImageFilter for drawing
Gaussian blurs in accelerated mode.
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBuffer::copyImage):
Implement ImageBuffer::copyImage() with DontCopyBackingStore semantics.
2011-12-08 Erik Arvidsson <arv@chromium.org>
CodeGeneratorV8: Fix issue with overloaded static conditional methods
https://bugs.webkit.org/show_bug.cgi?id=74114
Reviewed by Adam Barth.
The code generator was missing checks for Conditional for overloaded methods.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateOverloadedFunctionCallback): Generate needed #ifdefs.
(GenerateFunctionCallback): Ditto.
* bindings/scripts/test/V8/V8TestObj.cpp: Wrap conditional methods with #ifdefs.
(WebCore::ConfigureV8TestObjTemplate):
2011-12-08 Dominic Mazzoni <dmazzoni@google.com>
AccessibilityController should support listening to notifications on all elements.
https://bugs.webkit.org/show_bug.cgi?id=72866
Changes accessibilitySetShouldRepostNotifications from an instance method
into a class method so that it can be used for global notification listeners,
not just for listeners on a particular object.
Reviewed by Chris Fleizach.
Test: accessibility/notification-listeners.html
* accessibility/mac/WebAccessibilityObjectWrapper.h:
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(+[WebAccessibilityObjectWrapper accessibilitySetShouldRepostNotifications:]):
(-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]):
2011-12-08 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Rename createScriptCallStack() without parameters to createScriptCallStackForInspector().
https://bugs.webkit.org/show_bug.cgi?id=74120
Reviewed by Pavel Feldman.
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStackForInspector):
* bindings/js/ScriptCallStackFactory.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateFunctionCallback):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjInternal::customArgsAndExceptionCallback):
* bindings/v8/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStackForInspector):
* bindings/v8/ScriptCallStackFactory.h:
2011-12-08 Adrienne Walker <enne@google.com>
[chromium] Remove dead code in compositor
https://bugs.webkit.org/show_bug.cgi?id=74103
Reviewed by James Robinson.
Tested via the compiler.
* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/LayerRendererChromium.cpp:
* platform/graphics/chromium/LayerRendererChromium.h:
2011-12-08 Eric Penner <epenner@google.com>
[chromium] Need to adjust memory limit and viewport multipliers.
https://bugs.webkit.org/show_bug.cgi?id=74022
Reviewed by James Robinson.
* platform/graphics/chromium/TextureManager.cpp:
(WebCore::TextureManager::highLimitBytes): Changing constants
(WebCore::TextureManager::reclaimLimitBytes): ditto
2011-12-08 Benjamin Poulain <bpoulain@apple.com>
Add a platform EventLoop for iOS
https://bugs.webkit.org/show_bug.cgi?id=74043
Reviewed by David Kilzer.
* WebCore.xcodeproj/project.pbxproj:
* platform/ios/EventLoopIOS.mm: Added.
(WebCore::EventLoop::cycle):
2011-12-08 Pavel Feldman <pfeldman@google.com>
Web Inspector: return node counts on the document / detached root basis
https://bugs.webkit.org/show_bug.cgi?id=74104
Reviewed by Yury Semikhatsky.
* bindings/js/ScriptProfiler.h:
* bindings/v8/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::domNodeCount):
* bindings/v8/ScriptProfiler.h:
* inspector/Inspector.json:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::getDOMNodeCount):
(WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
* inspector/InspectorMemoryAgent.h:
(WebCore::InspectorMemoryAgent::create):
2011-12-08 Andreas Kling <kling@webkit.org>
RenderObject: Rename styleSlowCase() to styleInRegion().
Rubber-stamped by David Hyatt.
* WebCore.exp.in:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::styleInRegion):
* rendering/RenderObject.h:
(WebCore::RenderObject::style):
2011-12-08 Andreas Kling <kling@webkit.org>
Optimize RenderObject::containingBlock().
<http://webkit.org/b/74109>
Reviewed by David Hyatt.
When climbing the parent chain to locate the containing block-level element,
use !isRenderBlock() to reject renderers rather than checking against an arbitrary
list of non-block renderers and then rejecting anything that isn't a block anyway.
RenderObject::containingBlock() was very hot (2.0%) when scrolling on youtube.com.
This change takes it down to 1.0% (60% of which is RenderObject::isRenderBlock().)
* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock):
2011-12-08 Nayan Kumar K <nayankk@motorola.com>
Define DEBUG_GL_COMMANDS only in debug builds.
https://bugs.webkit.org/show_bug.cgi?id=74083
Reviewed by Noam Rosenthal.
No tests added as this change does not affect functionality.
* platform/graphics/opengl/TextureMapperGL.cpp:
2011-12-08 Ryosuke Niwa <rniwa@webkit.org>
CompositeEditCommand should not be kept alive for undo and redo
https://bugs.webkit.org/show_bug.cgi?id=64414
Reviewed by Enrica Casucci.
This patch introduces EditCommandComposition that replaces CompositeEditCommand for
undo and redo purposes. Furthermore, we now keep a list of commands instead of a tree of commands
to unapply and reapply edit commands that composes an undoable action.
Each top-level CompositeEditCommand holds a ref-pointer to EditCommandComposition,
and applyCommandToComposite adds new SimpleEditCommands to the list.
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::create):
(WebCore::EditCommandComposition::doApply): Never used.
(WebCore::EditCommandComposition::doUnapply):
(WebCore::EditCommandComposition::doReapply):
(WebCore::EditCommandComposition::append):
(WebCore::CompositeEditCommand::~CompositeEditCommand): Add an assertion to ensure we didn't create
a composition for CompositeEditCommands that have parents.
(WebCore::CompositeEditCommand::doUnapply): Never used.
(WebCore::CompositeEditCommand::doReapply): Never used.
(WebCore::CompositeEditCommand::ensureComposition): Creates and attaches a EditCommandComposition.
(WebCore::CompositeEditCommand::applyCommandToComposite): Append a SimpleEditCommand to the composition.
* editing/CompositeEditCommand.h:
(WebCore::EditCommandComposition::EditCommandComposition):
(WebCore::CompositeEditCommand::composition):
(WebCore::toEditCommandComposition):
(WebCore::toCompositeEditCommand):
* editing/DeleteButtonController.cpp: Wrap RemoveNodeCommand in RemoveTargetCommand since top level
commands are now required to be a CompositeEditCommand.
(WebCore::RemoveTargetCommand::create):
(WebCore::RemoveTargetCommand::RemoveTargetCommand):
(WebCore::RemoveTargetCommand::doApply):
(WebCore::DeleteButtonController::deleteTarget):
* editing/EditCommand.cpp:
(WebCore::EditCommand::EditCommand): New constructor; used by EditCommandComposition.
(WebCore::EditCommand::apply): Create a composition for a top-level command.
(WebCore::EditCommand::unapply): Since we clear m_parent of SimpleEditCommand as soon as they are
added to EditCommandComposition, we can't use isTopLevelCommand() to differentiate EditCommandComposition
from SimpleEditCommand. Use isEditCommandComposition() instead.
(WebCore::EditCommand::reapply): Ditto.
(WebCore::compositionIfPossible):
(WebCore::EditCommand::setStartingSelection): Update the starting selection of EditCommandComposition.
(WebCore::EditCommand::setEndingSelection): Ditto.
(WebCore::EditCommand::setParent): Accepts a null pointer in order to avoid keeping a stale pointer in
m_parent inside SimpleEditCommand when CompositeEditCommand goes away.
* editing/EditCommand.h:
(WebCore::EditCommand::isSimpleEditCommand):
(WebCore::EditCommand::isCompositeEditCommand):
(WebCore::EditCommand::isEditCommandComposition):
(WebCore::EditCommand::parent):
(WebCore::toSimpleEditCommand):
* editing/Editor.cpp:
(WebCore::Editor::appliedEditing): Register a EditCommandComposition, instead of a CompositeEditCommand
to the undo stack.
(WebCore::Editor::unappliedEditing): Unapplied or reapplied commands are now always EditCommandComposition.
(WebCore::Editor::reappliedEditing):
* editing/Editor.h:
2011-12-08 Stephen White <senorblanco@chromium.org>
Add missing V8 bindings to get CSS_FILTERS to compile in Chromium.
https://bugs.webkit.org/show_bug.cgi?id=74091
Reviewed by Kenneth Russell.
Will be covered by tests in css3/filters (when enabled).
* bindings/v8/custom/V8WebKitCSSFilterValueCustom.cpp: Added.
(WebCore::V8WebKitCSSFilterValue::indexedPropertyGetter):
2011-12-08 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=73348
REGRESSION: Assertion when loading a page with a scrollable RenderLayer
-and corresponding-
<rdar://problem/10518918>
Reviewed by Darin Adler.
The main problem here is that certain delegate calls into AppKit for overlay
scrollbars can cause AppKit to call back into WebKit looking for more information.
The assertion happens when WebKit tells AppKit that the scroll position has
changed during a layout, and AppKit immediately asks WebKit to convert some
coordinates, and WebKit asserts that you shouldn't do that while a layout is still
happening. It's still possible for AppKit to call this delegate method while a
layout is happening, and we should guard against that. This patch, however, does
not do that.
This change instead addresses the reason this assertion started happening much
more frequently recently, which is that it recently became true that
notifyPositionChanged() can be called when the position has not changed. To fix
the assertion AND the bug that that change was intended to fix, we can just make
sure that either the position OR the scroll origin has changed before calling
notifyPositionChanged().
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::immediateScrollToPoint):
Call resetScrollOriginChanged() after the scroll instead of before so that we know
whether or not to call notifyPositionChanged().
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):
2011-12-08 Kaustubh Atrawalkar <kaustubh@motorola.com>
Fixing support for static conditional overloaded functions.
https://bugs.webkit.org/show_bug.cgi?id=74068
Reviewed by Adam Barth.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Pushing "static" keyword after condition "#if".
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::overloadedMethod1): Added newly generated bindings.
* bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
(webkit_dom_test_obj_overloaded_method1):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
* bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
(WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
(WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
* bindings/scripts/test/JS/JSTestObj.h: Ditto.
* bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
* bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
(-[DOMTestObj overloadedMethod1:]):
* bindings/scripts/test/TestObj.idl: Ditto.
* bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
(WebCore::TestObjInternal::overloadedMethod11Callback):
(WebCore::TestObjInternal::overloadedMethod12Callback):
(WebCore::TestObjInternal::overloadedMethod1Callback):
(WebCore::ConfigureV8TestObjTemplate):
2011-12-08 Andreas Kling <kling@webkit.org>
Remove EventListenerMap destructor.
<http://webkit.org/b/74096>
Reviewed by Darin Adler.
Let the compiler generate ~EventListenerMap(). We only needed it when the hash map
was managing raw pointers.
We're losing the no-iterators assertion from clear() by doing this, but that was
superfluous to begin with - we were just using it to avoid duplicating code.
* dom/EventListenerMap.cpp:
* dom/EventListenerMap.h:
2011-12-08 Takashi Toyoshima <toyoshim@chromium.org>
Provide more specific error description for SocketStreamError.
https://bugs.webkit.org/show_bug.cgi?id=74066
Reviewed by Martin Robinson.
No new tests because this change just improve error messages for unexpected failures.
* platform/network/soup/SocketStreamError.h: Add an argument for passing error description.
(WebCore::SocketStreamError::SocketStreamError):
* platform/network/soup/SocketStreamHandleSoup.cpp: Add error description for SocketStreamError.
(WebCore::SocketStreamHandle::connected):
(WebCore::SocketStreamHandle::readBytes):
(WebCore::SocketStreamHandle::platformSend):
(WebCore::SocketStreamHandle::platformClose):
2011-12-08 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions][CSSOM] Implement NamedFlow interface
https://bugs.webkit.org/show_bug.cgi?id=66642
Reviewed by David Hyatt.
Add WebKitNamedFlow to support the NamedFlow interface. No methods are
yet implemented on this interface. The NamedFlow object is a live object.
The first time user asks for it, it gets a valid JS object whose properties
will reflect the changes to the flow thread.
Tests: fast/regions/webkit-named-flow-existing-flow.html
fast/regions/webkit-named-flow-flow-added.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
fast/regions/webkit-named-flow-same-object.html
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/GNUmakefile.am:
* dom/DOMAllInOne.cpp:
* dom/Document.cpp:
(WebCore::Document::webkitGetFlowByName):
* dom/Document.h:
* dom/Document.idl:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
* dom/WebKitNamedFlow.cpp: Added.
(WebCore::WebKitNamedFlow::WebKitNamedFlow):
(WebCore::WebKitNamedFlow::~WebKitNamedFlow):
* dom/WebKitNamedFlow.h: Added.
(WebCore::WebKitNamedFlow::create):
* dom/WebKitNamedFlow.idl: Added.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::ensureNamedFlow):
* rendering/RenderFlowThread.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
* rendering/RenderView.cpp:
(WebCore::RenderView::ensureRenderFlowThreadWithName):
* rendering/RenderView.h:
2011-12-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r102321.
http://trac.webkit.org/changeset/102321
https://bugs.webkit.org/show_bug.cgi?id=74072
"Breaks all Chromium clobbered builds" (Requested by apavlov_
on #webkit).
* WebCore.gyp/WebCore.gyp:
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main):
* WebCore.gypi:
* bindings/scripts/generate-bindings.pl:
* page/DOMWindow.idl:
* webaudio/DOMWindowWebAudio.idl: Removed.
2011-12-08 Shinya Kawanaka <shinyak@google.com>
Refactoring: Editor::requestCheckingFor should take SpellCheckRequest object.
https://bugs.webkit.org/show_bug.cgi?id=74033
Reviewed by Hajime Morita.
SpellChecker::requestCheckingFor takes SpellCheckRequest object in order to make it easy to
pass necessary information to requestCheckingFor.
No new tests. Covered by existing tests.
* editing/Editor.cpp:
(WebCore::Editor::replaceSelectionWithFragment):
Uses the new interface.
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): ditto.
* editing/SpellChecker.cpp:
(WebCore::SpellCheckRequest::SpellCheckRequest):
(WebCore::SpellCheckRequest::~SpellCheckRequest):
(WebCore::SpellCheckRequest::create):
Creates a new SpellCheckRequest object.
(WebCore::SpellChecker::requestCheckingFor):
Uses the new interface.
(WebCore::SpellChecker::didCheck):
* editing/SpellChecker.h:
(WebCore::SpellCheckRequest::setSequence):
(WebCore::SpellCheckRequest::sequence):
(WebCore::SpellCheckRequest::checkingRange):
(WebCore::SpellCheckRequest::paragraphRange):
(WebCore::SpellCheckRequest::text):
(WebCore::SpellCheckRequest::mask):
(WebCore::SpellCheckRequest::rootEditableElement):
2011-12-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r102323.
http://trac.webkit.org/changeset/102323
https://bugs.webkit.org/show_bug.cgi?id=74069
Caused Chromium and GTK build failure (Requested by bashi on
#webkit).
* testing/Internals.cpp:
(WebCore::Internals::getPageScaleFactor):
* testing/Internals.h:
* testing/Internals.idl:
2011-12-08 Fady Samuel <fsamuel@chromium.org>
Move scalePageBy from eventSender to window.internals
https://bugs.webkit.org/show_bug.cgi?id=64512
Reviewed by Simon Fraser.
Added setPageScaleFactor to window.internals.
Renamed window.internals.getPageScaleFactor to window.internals.pageScaleFactor
to match the webkit style.
* testing/Internals.cpp:
(WebCore::Internals::pageScaleFactor):
(WebCore::Internals::setPageScaleFactor):
* testing/Internals.h:
* testing/Internals.idl:
2011-12-08 Kentaro Hara <haraken@chromium.org>
Use the [Supplemental] IDL for webaudio attributes in Chromium
https://bugs.webkit.org/show_bug.cgi?id=73394
Reviewed by Adam Barth.
- Overview: Using the [Supplemental] IDL, this patch moves the attribute
declarations of webaudio from DOMWindow.idl into a new IDL file
webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained
feature (aka a module).
- This patch changes the build flow of WebCore.gyp as follows:
Previous build flow:
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl;
generate-bindings.pl reads $idl;
generate-bindings.pl generates .h and .cpp files for $idl;
}
New build flow (See the discussions in bug 72138 for more details):
resolve-supplemental.pl depends on all IDL files;
resolve-supplemental.pl reads all IDL files;
resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
resolve-supplemental.pl outputs supplemental_dependency.tmp;
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
generate-bindings.pl reads $idl;
generate-bindings.pl reads supplemental_dependency.tmp;
generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl;
}
- This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL
will be removed after build scripts for all platforms support the [Supplemental] IDL.
The motivation for the [Supplemented] IDL is as follows:
In order to support the [Supplemental] IDL, we need to
(1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
(2) and run generate-bindings.pl with the supplemental_dependency.tmp.
This build flow requires a change on the following build scripts,
but changing all the build scripts all at once without any regression is too difficult:
- DerivedSources.make
- DerivedSources.pri
- GNUmakefile.am
- PlatformBlackBerry.cmake
- UseJSC.cmake
- UseV8.cmake
- WebCore.vcproj/MigrateScripts
- WebCore.vcproj/WebCore.vcproj
- bindings/gobject/GNUmakefile.am
- WebCore.gyp/WebCore.gyp
Thus, we are planning to change the build scripts one by one, which implies that
we need to allow the temporary state in which some build scripts support [Supplemental] IDL
but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
in another IDL file somewhere, like this:
DOMWindowWebAudio.idl:
interface [
Supplemental=DOMWindow
] DOMWindowWebAudio {
attribute attr1;
attribute attr2;
};
DOMWindow.idl:
interface [
] DOMWindow {
attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL
attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL.
attribute attr3;
attribute attr4;
};
Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:
- If a given build script supports the [Supplemental] IDL,
generate-bindings.pl ignores all attributes with the [Supplemented] IDL.
- Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
as normal attributes and instead ignores all attributes with the [Supplemental] IDL
(i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).
Tests: webaudio/*
* WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file. If the file name is a "/cygdrive/c/..."-style path, it is converted to a "C:\cygwin\..."-style path by the cygpath command.
* WebCore.gypi: Added DOMWindowWebAudio.idl.
* bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL.
* page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL.
* webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.
2011-12-07 Yosifumi Inoue <yosin@chromium.org>
CSS color gets adjusted for disabled input elements
https://bugs.webkit.org/show_bug.cgi?id=54643
Reviewed by Kent Tamura.
No new tests. covered by existing tests. Need rebasing some existing tests for Chromimum.
Remove automatic color adjustment for disabled text control for Chromimum.
* css/themeChromium.css: Add CSS entries for default style for disabled input and textarea elements.
* WebCore/rendering/RenderTextControl.cpp:
(disabledTextColor): Removed for PLATFORM(CHROMIUM)
(RenderTextControl::adjustInnerTextStyle): Don't call disabledTextColor for Chromium.
2011-12-07 Dmitry Lomov <dslomov@google.com>
https://bugs.webkit.org/show_bug.cgi?id=74038
[V8][Chromium] Support legacy argument order in window.postMessage/window.webkitPostMessage.
Reviewed by David Levin.
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::isLegacyTargetOriginDesignation):
(WebCore::handlePostMessageCallback):
2011-12-07 Mary Wu <mary.wu@torchmobile.com.cn>
Upstream 4 files into WebCore/platform/blackberry
https://bugs.webkit.org/show_bug.cgi?id=73541
Reviewed by Antonio Gomes.
Initial upstream of BlackBerry porting of PlatformScreen/
SSLKeyGenerator/Sound/Widget, no new tests.
* PlatformBlackBerry.cmake: Modified to remove empty file "WheelEventBlackBerry.cpp"
* platform/blackberry/PlatformScreenBlackBerry.cpp: Added.
(WebCore::screenIsMonochrome):
(WebCore::screenDepthPerComponent):
(WebCore::screenDepth):
(WebCore::screenAvailableRect):
(WebCore::screenRect):
* platform/blackberry/SSLKeyGeneratorBlackBerry.cpp: Added.
(WebCore::getSupportedKeySizes):
(WebCore::signedPublicKeyAndChallengeString):
* platform/blackberry/SoundBlackBerry.cpp: Added.
(WebCore::systemBeep):
* platform/blackberry/WidgetBlackBerry.cpp: Added.
(WebCore::Widget::Widget):
(WebCore::Widget::~Widget):
(WebCore::Widget::hide):
(WebCore::Widget::paint):
(WebCore::Widget::setCursor):
(WebCore::Widget::setFocus):
(WebCore::Widget::setFrameRect):
(WebCore::Widget::setIsSelected):
(WebCore::Widget::show):
(WebCore::Widget::frameRect):
2011-12-07 Kenichi Ishibashi <bashi@chromium.org>
Refactor CSSParser::parseFontFaceSrc()
https://bugs.webkit.org/show_bug.cgi?id=73989
Reviewed by Darin Adler.
Test: fast/css/font-face-src-parsing.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFontFaceSrcURI): Added.
(WebCore::CSSParser::parseFontFaceSrcLocal): Added.
(WebCore::CSSParser::parseFontFaceSrc): Rewrote.
* css/CSSParser.h:
2011-12-07 Xingnan Wang <xingnan.wang@intel.com>
Implement the SSE optimization in SincResampler::process()
https://bugs.webkit.org/show_bug.cgi?id=73789
Reviewed by Benjamin Poulain.
Here is about 70% performance improvement on the hot spot of sample convolving.
* platform/audio/SincResampler.cpp:
2011-12-07 Luke Macpherson <macpherson@chromium.org>
Implement border image source properties in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=73981
Reviewed by Andreas Kling.
No new tests / refactoring only.
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyBorderImageSource::applyValue):
(WebCore::ApplyPropertyBorderImageSource::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
2011-12-07 Noel Gordon <noel.gordon@gmail.com>
WebPImageDecoder should not do a full image decode if progressive decoding is active
https://bugs.webkit.org/show_bug.cgi?id=74041
Reviewed by Adam Barth.
If the decoder input data state reaches allDataReceived during a progressive image
decode, the decoder performs a full image decode.
On allDataReceived, check if we already have a decoder, and if so, continue to run
the progressive decoder.
No new tests. No change in behavior.
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::decode):
2011-12-07 Alexandre Elias <aelias@google.com>
[chromium] Add page-scale animation support to Impl thread
https://bugs.webkit.org/show_bug.cgi?id=72996
Reviewed by James Robinson.
This adds a new math helper class to compute the progress of the
animation, and code in the CCLayerTreeHostImpl to apply the animation
frame by frame.
No new tests. (https://bugs.webkit.org/show_bug.cgi?id=71529 filed.)
* WebCore.gypi:
* platform/graphics/chromium/cc/CCInputHandler.h:
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::animate):
(WebCore::CCLayerTreeHostImpl::startPageScaleAnimation):
(WebCore::CCLayerTreeHostImpl::processScrollDeltas):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
* platform/graphics/chromium/cc/CCPageScaleAnimation.cpp: Added.
(WebCore::CCPageScaleAnimation::CCPageScaleAnimation):
(WebCore::CCPageScaleAnimation::initialize):
(WebCore::CCPageScaleAnimation::zoomTo):
(WebCore::CCPageScaleAnimation::zoomWithAnchor):
(WebCore::CCPageScaleAnimation::zoomElsewhere):
(WebCore::CCPageScaleAnimation::scrollOffsetAtTime):
(WebCore::CCPageScaleAnimation::pageScaleAtTime):
(WebCore::CCPageScaleAnimation::isAnimationCompleteAtTime):
(WebCore::CCPageScaleAnimation::progressRatioForTime):
(WebCore::CCPageScaleAnimation::scrollOffsetAtRatio):
(WebCore::CCPageScaleAnimation::pageScaleAtRatio):
* platform/graphics/chromium/cc/CCPageScaleAnimation.h: Added.
(WebCore::CCPageScaleAnimation::startTime):
(WebCore::CCPageScaleAnimation::duration):
(WebCore::CCPageScaleAnimation::endTime):
(WebCore::CCPageScaleAnimation::finalScrollOffset):
(WebCore::CCPageScaleAnimation::finalPageScale):
2011-12-07 Shinya Kawanaka <shinyak@google.com>
Editor::markAndReplaceFor should take Range instead of TextCheckingParagraph.
https://bugs.webkit.org/show_bug.cgi?id=74035
Reviewed by Hajime Morita.
Editor::markAndReplaceFor takes chekcing range and paragraph range instead of
spelling paragraph and grammar paragraph.
No new tests. Covered by existing tests.
* editing/Editor.cpp:
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
(WebCore::Editor::markAndReplaceFor):
* editing/Editor.h:
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingParagraph::TextCheckingParagraph):
* editing/TextCheckingHelper.h:
2011-12-07 Ami Fischman <fischman@chromium.org>
Force LTR layout for media controls even in RTL documents.
https://bugs.webkit.org/show_bug.cgi?id=74024
Reviewed by Darin Adler.
Test: media/controls-layout-direction.html
* css/mediaControls.css:
(::-webkit-media-controls):
2011-12-07 Mark Pilgrim <pilgrim@chromium.org>
[FileSystem API] requestFileSystem successCallback is required
https://bugs.webkit.org/show_bug.cgi?id=69637
Reviewed by Darin Adler.
* page/DOMWindow.idl: remove [Optional] flag from successCallback parameter
2011-12-07 Leo Yang <leo.yang@torchmobile.com.cn>
Upstream the BlackBerry porting of network Resource
https://bugs.webkit.org/show_bug.cgi?id=73388
Reviewed by Rob Buis.
Other main contributors:
Joe Mason <jmason@rim.com>
Yong Li <yoli@rim.com>
Gary Simmons <gsimmons@rim.com>
Genevieve Mak <gmak@rim.com>
Chris Guan <chris.guan@torchmobile.com.cn>
Mike Lattanzio <mlattanzio@rim.com>
Initial upstream, can't be built yet, no new tests.
* platform/network/blackberry/ResourceError.h: Added.
* platform/network/blackberry/ResourceErrorBlackBerry.cpp: Added.
* platform/network/blackberry/ResourceHandleBlackBerry.cpp: Added.
* platform/network/blackberry/ResourceRequest.h: Added.
* platform/network/blackberry/ResourceRequestBlackBerry.cpp: Added.
* platform/network/blackberry/ResourceResponse.h: Added.
* platform/network/blackberry/ResourceResponseBlackBerry.cpp: Added.
2011-12-07 Fady Samuel <fsamuel@chromium.org>
[Chromium] Plumb DPI info into PlatformScreen
https://bugs.webkit.org/show_bug.cgi?id=70556
Reviewed by Darin Fisher.
Make DPI information accessible from WebKit through
PlatformScreen. This is useful when making scaling
computations on various devices (e.g. Viewport meta tag).
This patch adds DPI plumbing on Chromium Win/Mac/Linux
platforms.
* page/Screen.cpp:
(WebCore::Screen::horizontalDPI):
(WebCore::Screen::verticalDPI):
* page/Screen.h:
* platform/PlatformScreen.h:
* platform/chromium/PlatformScreenChromium.cpp:
(WebCore::screenHorizontalDPI):
(WebCore::screenVerticalDPI):
* platform/chromium/PlatformSupport.h:
* platform/efl/PlatformScreenEfl.cpp:
(WebCore::screenHorizontalDPI):
(WebCore::screenVerticalDPI):
* platform/gtk/PlatformScreenGtk.cpp:
(WebCore::screenHorizontalDPI):
(WebCore::screenVerticalDPI):
* platform/mac/PlatformScreenMac.mm:
(WebCore::screenHorizontalDPI):
(WebCore::screenVerticalDPI):
* platform/qt/PlatformScreenQt.cpp:
(WebCore::screenHorizontalDPI):
(WebCore::screenVerticalDPI):
* platform/win/PlatformScreenWin.cpp:
(WebCore::screenHorizontalDPI):
(WebCore::screenVerticalDPI):
2011-12-07 Aaron Colwell <acolwell@chromium.org>
Revert mixed content handling for video fix and follow-up test expectations & Skipped changes.
(r101883, r101918, r101927, r101981, r101986, r101997)
https://bugs.webkit.org/show_bug.cgi?id=72178
Reviewed by Adam Barth.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest):
* loader/cache/CachedRawResource.cpp:
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.cpp:
(WebCore::defaultPriorityForResourceType):
(WebCore::cachedResourceTypeToTargetType):
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource):
(WebCore::CachedResourceLoader::checkInsecureContent):
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::requestResource):
2011-12-07 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Introduce AssertMatchingEnums.cpp.
https://bugs.webkit.org/show_bug.cgi?id=65238
Reviewed by Filip Pizlo.
Remove switch statement which convert EWK_TOUCH_PointType enum values to
WebCore::PlatformTouchPoint::State enum values.
Newly added AssertMatchingEnums.cpp assure that they are equal.
No new tests, no new functionality.
* platform/efl/PlatformTouchEventEfl.cpp:
(WebCore::PlatformTouchEvent::PlatformTouchEvent):
2011-12-07 Shawn Singh <shawnsingh@chromium.org>
[chromium] Clearing root surface should happen after damage tracking
https://bugs.webkit.org/show_bug.cgi?id=73958
Reviewed by James Robinson.
No new semantics, covered by existing layout tests.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::clearSurfaceForDebug):
(WebCore::LayerRendererChromium::drawLayersOntoRenderSurfaces):
(WebCore::LayerRendererChromium::drawLayersInternal):
* platform/graphics/chromium/LayerRendererChromium.h:
2011-12-07 Florin Malita <fmalita@google.com>
<li value="0"> behaves like <li> (the same for negative numbers)
https://bugs.webkit.org/show_bug.cgi?id=73911
Reviewed by Alexey Proskuryakov.
Allow LI values <= 0 and consolidate the value processing logic.
* html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::parseMappedAttribute):
Delegated value parsing to parseValue().
(WebCore::HTMLLIElement::attach):
Ditto. Explicit value null testing is no longer necessary,
as parseValue's toInt() performs an equivalent check.
(WebCore::HTMLLIElement::parseValue):
Consolidated value parsing logic.
* html/HTMLLIElement.h:
2011-12-07 Joshua Bell <jsbell@chromium.org>
IndexedDB: Replace bool args in IDBKeyRange private methods with enum
https://bugs.webkit.org/show_bug.cgi?id=70743
Reviewed by Tony Chang.
No new tests - no functional changes.
* storage/IDBKeyRange.cpp:
(WebCore::IDBKeyRange::IDBKeyRange):
(WebCore::IDBKeyRange::bound):
* storage/IDBKeyRange.h:
(WebCore::IDBKeyRange::create):
(WebCore::IDBKeyRange::lowerOpen):
(WebCore::IDBKeyRange::upperOpen):
2011-12-07 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r102267.
http://trac.webkit.org/changeset/102267
https://bugs.webkit.org/show_bug.cgi?id=74032
Breaks build on Chromium Mac Debug (Requested by aklein on
#webkit).
* dom/ChildListMutationScope.cpp:
(WebCore::MutationAccumulationRouter::MutationAccumulationRouter::childAdded):
(WebCore::MutationAccumulationRouter::MutationAccumulationRouter::willRemoveChild):
(WebCore::MutationAccumulationRouter::MutationAccumulationRouter::incrementScopingLevel):
(WebCore::MutationAccumulationRouter::MutationAccumulationRouter::decrementScopingLevel):
2011-12-07 Kentaro Hara <haraken@chromium.org>
REGRESSION (r95249): Right side can be truncated when printing
https://bugs.webkit.org/show_bug.cgi?id=73868
Reviewed by Darin Adler.
When we print a page with an overflowed width, the right side of the page
can be truncated. This is due to a wrong rendering calculation.
Since 'maximumShrinkFactor' is a ratio based on 'pageSize',
'maximumShrinkFactor' should multiply (not 'originalPageSize') but 'pageSize'.
This bug happens if all the following conditions are met:
- pageLogicalWidth < docLogicalWidth
- originalPageSize.width * maximumShrinkFactor < docLogicalWidth
- docLogicalWidth < pageLogicalWidth * maximumShrinkFactor
Test: printing/width-overflow.html
* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutForPagination):
2011-12-07 Yong Li <yoli@rim.com>
Defer ScriptExecutionContext::Task's in Document when page loading is deferred.
Schedule them with timer when page loading is resumed. The tasks will be performed
in the original order. This fixes the problem that database callbacks could be missed
when page loading was deferred.
https://bugs.webkit.org/show_bug.cgi?id=49401
Reviewed by Darin Adler.
Manual test added: ManualTests/database-callback-deferred.html.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::didReceiveTask):
(WebCore::Document::postTask):
(WebCore::Document::pendingTasksTimerFired):
(WebCore::Document::suspendScheduledTasks):
(WebCore::Document::resumeScheduledTasks):
* dom/Document.h:
* page/PageGroupLoadDeferrer.cpp:
(WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
(WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
2011-12-07 Andreas Kling <kling@webkit.org>
RenderObject::style(): Inline early-return condition.
<http://webkit.org/b/74019>
Reviewed by Anders Carlsson.
style() was very hot (6.1%) when scrolling around on youtube.com,
and 100% of the calls were taking the early return path.
Inlined the !isRenderFlowThread() check and renamed the function to
styleSlowCase().
* rendering/RenderObject.cpp:
(WebCore::RenderObject::styleSlowCase):
* rendering/RenderObject.h:
(WebCore::RenderObject::style):
2011-12-07 Adam Klein <adamk@chromium.org>
Use HashMap<Node*, OwnPtr<...>> in ChildListMutationScope
https://bugs.webkit.org/show_bug.cgi?id=73964
Reviewed by Ryosuke Niwa.
No new tests, refactoring only.
* dom/ChildListMutationScope.cpp:
(WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::childAdded):
(WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::willRemoveChild):
(WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::incrementScopingLevel):
(WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::decrementScopingLevel):
2011-12-07 Andreas Kling <kling@webkit.org>
RenderLayer::updateZOrderLists(): Inline early-return condition.
<http://webkit.org/b/74013>
Reviewed by Anders Carlsson.
updateZOrderLists() was hot (1.2%) when scrolling around on youtube.com,
and 85% of the calls were taking the early return path.
Inlined the two checks for the early return and renamed the function
to updateZOrderListsSlowCase(). Also reversed their order to avoid the
virtual call (RenderObject::isRenderView()) if possible.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateZOrderListsSlowCase):
* rendering/RenderLayer.h:
(WebCore::RenderLayer::updateZOrderLists):
2011-12-07 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r102244.
http://trac.webkit.org/changeset/102244
https://bugs.webkit.org/show_bug.cgi?id=74016
caused debug test timeouts (Requested by simonjam on #webkit).
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::putImageData):
(WebCore::ImageBuffer::putUnmultipliedImageData):
(WebCore::ImageBuffer::putPremultipliedImageData):
2011-12-07 Adam Klein <adamk@chromium.org>
Layout Test inspector/debugger/dom-breakpoints.html fails on chromium linux debug with ENABLE(MUTATION_OBSERVERS)
https://bugs.webkit.org/show_bug.cgi?id=73919
Reviewed by Ojan Vafai.
Use StyleAttributeMutationScope to manage DOM breakpoints for style property changes.
Instead of calling InspectorInstrumentation::didInvalidateStyleAttr()
directly in setNeedsStyleRecalc, set a bool in the current
StyleAttributeMutationScope, and delay the call until the scope's
counter runs down to zero. This keeps the inspector JS from re-entering
CSSMutableStyleDeclaration until all StyleAttributeMutationScope work is done.
Also fix a small bug in StyleAttributeMutationScope, where
s_shouldDeliver wasn't getting reset properly to false.
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc):
2011-12-07 Ken Buchanan <kenrb@chromium.org>
Crash from multicol spans with layers
https://bugs.webkit.org/show_bug.cgi?id=68030
Reviewed by David Hyatt.
The layer tree diverges from the render tree when a span is being split
between columns. This patch causes the layer tree to be updated when necessary.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::splitFlow)
(WebCore::RenderBlock::splitBlocks)
2011-12-07 Alexey Proskuryakov <ap@apple.com>
Handling of !important in inline style sets is broken
https://bugs.webkit.org/show_bug.cgi?id=73941
Reviewed by Dave Hyatt.
This behavior was introduced in bug 8223 to match IE and Firefox. But it doesn't appear that we're matching
any browser today, and CSSOM spec agrees with them.
* WebCore.exp.in: Don't export CSSStyleDeclaration::setProperty(), no one is using it.
* bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::putDelegate): Use regular
setProperty(), not the incorrect version that's being removed. Properties set via IDL attributes are never
important.
* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertySetter):
Made the same fix for v8. Why did v8 bindings authors copy/paste the code?!
* css/CSSStyleDeclaration.cpp:
* css/CSSStyleDeclaration.h:
Removed a version of setProperty() that attempted to parse the value and extract !important from it.
* html/ImageDocument.cpp:
(WebCore::ImageDocument::resizeImageToFit):
(WebCore::ImageDocument::restoreImageSize):
(WebCore::ImageDocument::windowSizeChanged):
* page/DragController.cpp:
(WebCore::DragController::concludeEditDrag):
We never needed to use this version of setProperty() here, it was just unnecessarily slower.
2011-12-07 Xianzhu Wang <wangxianzhu@chromium.org>
In FontCacheAndroid.cpp should keep the pointer valid returned from CString::data()
https://bugs.webkit.org/show_bug.cgi?id=73849
The changed code has been covered by many existing layout tests.
Reviewed by Adam Barth.
* platform/graphics/chromium/FontCacheAndroid.cpp:
(WebCore::FontCache::createFontPlatformData):
2011-12-07 Xiaomei Ji <xji@chromium.org>
Turn on move caret by word visually for Windows platform.
https://bugs.webkit.org/show_bug.cgi?id=59652
Reviewed by Ryosuke Niwa.
We already support (arrow key) moving cursor by character in visual order.
This patch implements (ctrl/alt-arrow) moving cursor by word in visual order (in Windows).
It matches Firefox's default behavior.
Without this patch, ctrl(alt for mac)-arrow key or
selection.modify("move", "left"/"right", "word") moves cursor by word in logical order.
IE implements moving cursor by logical order for both arrow key and ctrl-arrow key.
Firefox implements moving cursor by visual order for both operations.
From Chromium bug report, native speakers would like moving cursor by visual order since it
is more intuitive.
The patch is only enabled for Windows (by EditingBehavior) because current implementation
matches Windows' native behavior.
For exmaple, if the logical text is "abc def hij", the cursor positions are
"|abc |def |hij|" no matter pressing ctrl-left-arrow or ctrl-right-arrow.
Mac and Linux's native behavior is slightly different. In which, when pressing
ctrl-left-arrow, the cursor positions are "|abc |def |hij|". When pressing ctrl-right-arrow,
the cursor positions are "|abc| def| hij|". We will implement it next.
Test: editing/selection/move-left-right-by-word-mac.html
* editing/EditingBehavior.h:
(WebCore::EditingBehavior::shouldMoveLeftRightByWordInVisualOrder):
* editing/FrameSelection.cpp: Remove experimental enum WebKitVisualWordGranularity.
(WebCore::FrameSelection::modifyExtendingRight):
(WebCore::FrameSelection::modifyExtendingForward):
(WebCore::FrameSelection::modifyMovingRight):
(WebCore::FrameSelection::modifyMovingForward):
(WebCore::FrameSelection::modifyExtendingLeft):
(WebCore::FrameSelection::modifyExtendingBackward):
(WebCore::FrameSelection::modifyMovingLeft):
(WebCore::FrameSelection::modifyMovingBackward):
* editing/TextGranularity.h: Remove experimental enum WebKitVisualWordGranularity.
* editing/VisibleSelection.cpp: Remove experimental enum WebKitVisualWordGranularity.
(WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
* page/DOMSelection.cpp: Remove experimental experimental flag -webkit-visual-word.
(WebCore::DOMSelection::modify):
2011-12-07 Jonathan Backer <backer@chromium.org>
[chromium] Plumb damage from WebExternalTextureLayer and WebPluginContainer to CCDamageTracker
https://bugs.webkit.org/show_bug.cgi?id=73485
Reviewed by Darin Fisher.
* platform/graphics/chromium/PluginLayerChromium.cpp:
(WebCore::PluginLayerChromium::updateCompositorResources):
(WebCore::PluginLayerChromium::invalidateRect):
* platform/graphics/chromium/PluginLayerChromium.h:
2011-12-07 Mary Wu <mary.wu@torchmobile.com.cn>
Upstream 5 files into WebCore/platform/blackberry
https://bugs.webkit.org/show_bug.cgi?id=73632
Reviewed by Rob Buis.
Initial upstream, no new tests.
* PlatformBlackBerry.cmake: Remove two empty files from build list.
* platform/blackberry/PopupMenuBlackBerry.cpp: Added.
(WebCore::PopupMenuBlackBerry::PopupMenuBlackBerry):
(WebCore::PopupMenuBlackBerry::~PopupMenuBlackBerry):
(WebCore::PopupMenuBlackBerry::show):
(WebCore::PopupMenuBlackBerry::hide):
(WebCore::PopupMenuBlackBerry::updateFromElement):
(WebCore::PopupMenuBlackBerry::disconnectClient):
* platform/blackberry/PopupMenuBlackBerry.h: Added.
(WebCore::PopupMenuBlackBerry::client):
* platform/blackberry/ScrollbarThemeBlackBerry.cpp: Added.
(WebCore::ScrollbarTheme::nativeTheme):
* platform/blackberry/SearchPopupMenuBlackBerry.cpp: Added.
(WebCore::SearchPopupMenuBlackBerry::SearchPopupMenuBlackBerry):
(WebCore::SearchPopupMenuBlackBerry::popupMenu):
(WebCore::SearchPopupMenuBlackBerry::enabled):
(WebCore::SearchPopupMenuBlackBerry::saveRecentSearches):
(WebCore::SearchPopupMenuBlackBerry::loadRecentSearches):
* platform/blackberry/SearchPopupMenuBlackBerry.h: Added.
2011-12-07 Dan Bernstein <mitz@apple.com>
Fixed the definition of BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING from r102246.
* platform/mac/ThemeMac.mm: Added parentheses.
2011-12-07 Dan Bernstein <mitz@apple.com>
<rdar://problem/10542095> Focus rings are not drawn around push buttons, radio buttons and checkboxes
Reviewed by Darin Adler.
Instead of relying on -setShowsFirstResponder: to make -drawWithFrame:inView: draw the focus
ring, use -drawFocusRingMaskWithFrame:inView:.
* platform/mac/ThemeMac.mm:
(-[NSCell _web_drawFocusRingWithFrame:inView:]): Added. Sets up the focus ring style and a
transparency layer, then uses -drawFocusRingMaskWithFrame:inView: to draw the focus ring.
(WebCore::updateStates): Eliminated calls to get and set showsFirstResponder.
(WebCore::paintCheckbox): Changed to use -_web_drawFocusRingWithFrame:inView:.
(WebCore::paintRadio): Ditto.
(WebCore::paintButton): Ditto.
2011-12-07 Brian Salomon <bsalomon@google.com>
[CHROMIUM/SKIA] Handle put[Un/Pre]multipliedImageData conversions in Skia rather than ImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=73953
Reviewed by Stephen White.
Tested by existing canvas2d layout tests.
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::putImageData):
(WebCore::ImageBuffer::putUnmultipliedImageData):
(WebCore::ImageBuffer::putPremultipliedImageData):
2011-12-07 Andreas Kling <kling@webkit.org>
Micro-optimize ScrollView::visibleContentRect().
<http://webkit.org/b/74001>
Reviewed by Anders Carlsson.
Reorder the scrollbar exclusion code to minimize the number of virtual calls
to ScrollableArea::verticalScrollbar(), ScrollableArea::horizontalScrollbar()
and Scrollbar::isOverlayScrollbar().
* platform/ScrollView.cpp:
(WebCore::ScrollView::visibleContentRect):
2011-12-07 Andreas Kling <kling@webkit.org>
ApplyPropertyBorderImage: Remove unneeded template argument for mapNinePieceImage().
<http://webkit.org/b/73998>
Reviewed by Antti Koivisto.
Have ApplyPropertyBorderImage call mapNinePieceImage() directly now that it's
public (instead of passing it as a template argument.)
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyBorderImage::applyValue):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2011-12-07 Jessie Berlin <jberlin@apple.com>
Mac build fix after r102235.
* WebCore.exp.in:
2011-11-30 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] V8 debug build fixes.
Reviewed by Tor Arne Vestbø.
* Target.pri: Add missing files to the build.
* loader/SubresourceLoader.cpp: Add missing CString.h header file inclusion,
that is implicitly included with Chromium builds and only needed in ASSERTS
in debug builds.
* loader/cache/CachedResource.cpp: Ditto.
* page/FrameTree.cpp: Ditto.
* platform/graphics/MediaPlayer.cpp: Ditto.
2011-11-30 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] V8 build fixes.
Reviewed by Tor Arne Vestbø.
* Target.pri: Don't load(javascriptcore) if we're building with v8.
2011-12-07 Mary Wu <mary.wu@torchmobile.com.cn>
Change function name InitializeLoggingChannelsIfNecessary to follow coding style guideline
https://bugs.webkit.org/show_bug.cgi?id=73986
Reviewed by Kenneth Rohde Christiansen.
Just function name change, no new tests.
* platform/Logging.h:
* platform/efl/LoggingEfl.cpp:
(WebCore::initializeLoggingChannelsIfNecessary):
* platform/gtk/LoggingGtk.cpp:
(WebCore::initializeLoggingChannelsIfNecessary):
* platform/mac/LoggingMac.mm:
(WebCore::initializeLoggingChannelsIfNecessary):
* platform/qt/LoggingQt.cpp:
(WebCore::initializeLoggingChannelsIfNecessary):
* platform/win/LoggingWin.cpp:
(WebCore::initializeLoggingChannelsIfNecessary):
* platform/wx/LoggingWx.cpp:
(WebCore::initializeLoggingChannelsIfNecessary):
2011-12-07 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions]Add support for background-color in region styling
https://bugs.webkit.org/show_bug.cgi?id=71488
Reviewed by David Hyatt.
Tests: fast/regions/region-style-block-background-color.html
fast/regions/region-style-block-background-color2.html
fast/regions/region-style-image-background-color.html
fast/regions/region-style-inline-background-color.html
* WebCore.exp.in:
* css/CSSStyleSelector.cpp:
(WebCore::RuleData::regionStyleRule):
(WebCore::CSSStyleSelector::CSSStyleSelector):
(WebCore::CSSStyleSelector::addMatchedDeclaration):
(WebCore::CSSStyleSelector::matchRules):
(WebCore::CSSStyleSelector::matchAllRules):
(WebCore::CSSStyleSelector::initForRegionStyling):
(WebCore::CSSStyleSelector::styleForElement):
(WebCore::CSSStyleSelector::pseudoStyleForElement):
(WebCore::RuleData::RuleData):
(WebCore::RuleSet::RuleSet):
(WebCore::RuleSet::addToRuleSet):
(WebCore::CSSStyleSelector::applyDeclarations):
(WebCore::isValidRegionStyleProperty):
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSStyleSelector.h:
(WebCore::CSSStyleSelector::setRegionForStyling):
(WebCore::CSSStyleSelector::regionForStyling):
(WebCore::CSSStyleSelector::applyPropertyToRegionStyle):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::clearRenderRegionRangeMap):
(WebCore::RenderFlowThread::~RenderFlowThread):
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::clearRenderObjectCustomStyle):
(WebCore::RenderFlowThread::setRegionRangeForBox):
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::CurrentRenderRegionMaintainer::CurrentRenderRegionMaintainer):
(WebCore::CurrentRenderRegionMaintainer::~CurrentRenderRegionMaintainer):
(WebCore::RenderLayer::paint):
(WebCore::RenderLayer::hitTest):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::style):
* rendering/RenderObject.h:
(WebCore::RenderObject::canHaveRegionStyle):
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::removeChildNode):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::layout):
(WebCore::RenderRegion::renderObjectRegionStyle):
(WebCore::RenderRegion::computeStyleInRegion):
(WebCore::RenderRegion::clearObjectStyleInRegion):
* rendering/RenderRegion.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
* rendering/RenderView.h:
(WebCore::RenderView::currentRenderRegion):
(WebCore::RenderView::setCurrentRenderRegion):
2011-12-01 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Extract default call stack creation and check for front-end from console.
https://bugs.webkit.org/show_bug.cgi?id=73566
Reviewed by Yury Semikhatsky.
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
* bindings/js/ScriptCallStackFactory.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateFunctionCallback):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjInternal::customArgsAndExceptionCallback):
* bindings/v8/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
* bindings/v8/ScriptCallStackFactory.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::hasFrontendForScriptContext):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::hasFrontendForScriptContext):
* inspector/WorkerInspectorController.h:
(WebCore::WorkerInspectorController::hasFrontend):
* page/Console.cpp:
* page/Console.h:
2011-12-07 Shinya Kawanaka <shinyak@google.com>
Internals should have a method to reutrn the max sequence number of spellcheck reqeust.
https://bugs.webkit.org/show_bug.cgi?id=73511
Reviewed by Hajime Morita.
Internal state of SpellChecker should be able to be exposed for testing SpellChecker.
This patch will enable us to know asynchronous spellcheck has finished or not.
Test: editing/spelling/spellcheck-sequencenum.html
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::SpellChecker):
(WebCore::SpellChecker::createRequest):
(WebCore::SpellChecker::didCheck):
* editing/SpellChecker.h:
(WebCore::SpellChecker::lastRequestSequence):
Interface to take SpellCheck sequence numbers.
(WebCore::SpellChecker::lastProcessedSequence): ditto.
* testing/Internals.cpp:
(WebCore::spellchecker):
(WebCore::Internals::lastSpellCheckRequestSequence):
(WebCore::Internals::lastSpellCheckProcessedSequence):
* testing/Internals.h:
* testing/Internals.idl:
2011-12-07 Ryosuke Niwa <rniwa@webkit.org>
TypingCommand duplicates code to obtain the last typing command
https://bugs.webkit.org/show_bug.cgi?id=73984
Reviewed by Kent Tamura.
Extracted lastTypingCommandIfStillOpenForTyping out of isOpenForMoreTypingCommand
and a bunch of TypingCommand static member functions.
Also made more member functions of TypingCommand private.
* editing/Editor.cpp:
(WebCore::Editor::setComposition):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelection):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::deleteSelection):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
(WebCore::TypingCommand::insertText):
(WebCore::TypingCommand::insertLineBreak):
(WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
(WebCore::TypingCommand::insertParagraphSeparator):
(WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
(WebCore::TypingCommand::closeTyping):
* editing/TypingCommand.h:
(WebCore::TypingCommand::isOpenForMoreTyping):
(WebCore::TypingCommand::closeTyping):
2011-12-06 Mary Wu <mary.wu@torchmobile.com.cn>
upstream BlackBerry porting of KURL/Logging
https://bugs.webkit.org/show_bug.cgi?id=73524
Reviewed by Antonio Gomes.
* platform/blackberry/KURLBlackBerry.cpp: Added.
(WebCore::KURL::fileSystemPath):
* platform/blackberry/LoggingBlackBerry.cpp: Added.
(WebCore::initializeWithUserDefault):
(WebCore::InitializeLoggingChannelsIfNecessary):
2011-12-06 Leo Yang <leo.yang@torchmobile.com.cn>
[BlackBerry] Remove redundant files in PlatformBlackBerry.cmake
https://bugs.webkit.org/show_bug.cgi?id=73976
Reviewed by Antonio Gomes.
The listing of the following files in PlatformBlackBerry.cmake are redundant. They should be removed.
platform/network/blackberry/MultipartResponseDelegate.cpp
platform/network/blackberry/NetworkManager.cpp
platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp
platform/network/blackberry/ResourceErrorBlackBerry.cpp
platform/network/blackberry/ResourceRequestBlackBerry.cpp
* PlatformBlackBerry.cmake:
2011-12-06 Shinya Kawanaka <shinyak@google.com>
Refactoring: Editor::markAllMisspellingsAndBadGrammarInRanges should be refactored.
https://bugs.webkit.org/show_bug.cgi?id=73628
Reviewed by Hajime Morita.
Extracted a code for adding markers and replacing misspelled words from WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges.
No new tests. covered by existing tests.
* editing/Editor.cpp:
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
Extracted a code for adding markers and replacing missplled words, and moved to markAndReplaceFor.
(WebCore::Editor::markAndReplaceFor):
* editing/Editor.h:
2011-12-06 Julien Chaffraix <jchaffraix@webkit.org>
Avoid calling calculateRects in RenderLayer::paintLayer when the rectangles are not needed
https://bugs.webkit.org/show_bug.cgi?id=73754
Reviewed by Simon Fraser.
Performance change, no change in behavior.
RenderLayer::paintLayer can easily be called a million time when scrolling on a big table with
td { overflow: hidden; }. We would spend a lot of time recomputing the rectangles that we never
unused for painting as our layer was not self-painting (clipping layer only) and we did not paint
some overlay scrollbars.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer):
Simplified and moved the shouldPaint logic earlier in the function. Now the branches
are checking the same boolean which makes the logic more obvious. A consequence of
filling shouldPaint earlier is that we call |calculateRects| only if there is a chance
the rectangles will used. Also cached the result of isSelfPaintingLayer() in a local
variable (isSelfPaintingLayer() is fairly expensive due to several virtual calls).
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer):
For coherency, applied the same optimizations here too: added an early return instead
of conditionaly call |calculateRects| as we don't have to restore any clip.
2011-12-06 Benjamin Poulain <benjamin@webkit.org>
Simplify KURL's checkEncodedString()
https://bugs.webkit.org/show_bug.cgi?id=73890
Reviewed by Andreas Kling.
The Macro UNUSED_PARAM is not supposed to be used for this case,
use ASSERT_UNUSED instead.
* platform/KURL.cpp:
(WebCore::checkEncodedString):
2011-12-06 Ryosuke Niwa <rniwa@webkit.org>
The code to create a NodeListsNodeData is duplicated everywhere
https://bugs.webkit.org/show_bug.cgi?id=73961
Reviewed by Darin Adler.
Extracted the logic to create NodeListsNodeData as NodeRareData::ensureNodeLists.
* dom/Document.cpp:
(WebCore::Document::getItems):
* dom/Node.cpp:
(WebCore::Node::childNodes):
(WebCore::Node::registerDynamicNodeList):
(WebCore::Node::getElementsByTagName):
(WebCore::Node::getElementsByTagNameNS):
(WebCore::Node::getElementsByName):
(WebCore::Node::getElementsByClassName):
* dom/NodeRareData.h:
(WebCore::NodeRareData::ensureNodeLists):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::labels):
2011-12-06 Leo Yang <leo.yang@torchmobile.com.cn>
Upstream about: feature in WebKit/blackberry/WebCoreSupport/
https://bugs.webkit.org/show_bug.cgi?id=73612
Reviewed by Antonio Gomes.
* PlatformBlackBerry.cmake: Move platform/network/blackberry/AboutData.{h, cpp}
to WebKit/blackberry/WebCoreSupport
2011-12-06 Benjamin Poulain <bpoulain@apple.com>
WebKit Mac does not build without CONTEXT MENU
https://bugs.webkit.org/show_bug.cgi?id=73962
Reviewed by Pavel Feldman.
In the patch r100903, the symbols were exported under ENABLE(CONTEXT_MENUS)
because the feature is triggered from the menus.
The implementation has no dependency on the context menu but is necessary to build
when the inspector is enabled.
This patch moves the exported symbols from ENABLE(CONTEXT_MENUS) to ENABLE(INSPECTOR).
* WebCore.exp.in:
2011-12-06 Adrienne Walker <enne@google.com>
[chromium] setNeedsCommit on non-composited host layers should trigger commit
https://bugs.webkit.org/show_bug.cgi?id=73711
Reviewed by James Robinson.
Pipe non-composited content host syncs to setNeedsCommit.
Since now the NonCompositedContentHost generates setNeedsCommit, don't
call it unnecessarily, e.g. calling setBackgroundColor to the same
color each frame should not retrigger more commits.
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setAnchorPoint):
(WebCore::GraphicsLayerChromium::setTransform):
(WebCore::GraphicsLayerChromium::setChildrenTransform):
(WebCore::GraphicsLayerChromium::setMasksToBounds):
(WebCore::GraphicsLayerChromium::setBackgroundColor):
(WebCore::GraphicsLayerChromium::clearBackgroundColor):
(WebCore::GraphicsLayerChromium::setContentsOpaque):
(WebCore::GraphicsLayerChromium::setBackfaceVisibility):
(WebCore::GraphicsLayerChromium::setOpacity):
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setNeedsCommit):
(WebCore::LayerChromium::setAnchorPoint):
(WebCore::LayerChromium::setAnchorPointZ):
(WebCore::LayerChromium::setBackgroundColor):
(WebCore::LayerChromium::setMasksToBounds):
(WebCore::LayerChromium::setMaskLayer):
(WebCore::LayerChromium::setOpacity):
(WebCore::LayerChromium::setOpaque):
(WebCore::LayerChromium::setPosition):
(WebCore::LayerChromium::setSublayerTransform):
(WebCore::LayerChromium::setTransform):
(WebCore::LayerChromium::setScrollPosition):
(WebCore::LayerChromium::setScrollable):
(WebCore::LayerChromium::setDoubleSided):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::setReplicaLayer):
* platform/graphics/chromium/NonCompositedContentHost.cpp:
(WebCore::NonCompositedContentHost::notifySyncRequired):
* platform/graphics/chromium/NonCompositedContentHost.h:
2011-12-06 Kenichi Ishibashi <bashi@chromium.org>
[Chromium] unknown characters symbol on \n in complex script text (RTL and LTR)
https://bugs.webkit.org/show_bug.cgi?id=73806
Reviewed by Tony Chang.
Sets fMergeNeutralItems to 1 instead of merging script items based on their tags.
Tests: platform/chromium/fast/text/international/chromium-complex-text-non-printable-expected.html
platform/chromium/fast/text/international/chromium-complex-text-non-printable.html
* platform/graphics/chromium/UniscribeHelper.cpp:
(WebCore::UniscribeHelper::fillRuns): Removed a block which merges script items.
2011-12-06 Luke Macpherson <macpherson@chromium.org>
Implement remaining border-image and webkit-maskbox-image properties in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=73391
Reviewed by Hajime Morita.
No new tests / refacoring only.
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyBorderImageModifier::getValue):
(WebCore::ApplyPropertyBorderImageModifier::setValue):
(WebCore::ApplyPropertyBorderImageModifier::applyInheritValue):
(WebCore::ApplyPropertyBorderImageModifier::applyInitialValue):
(WebCore::ApplyPropertyBorderImageModifier::applyValue):
(WebCore::ApplyPropertyBorderImageModifier::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSStyleSelector.h:
2011-12-06 Pavel Feldman <pfeldman@google.com>
Web Inspector: introduce a memory agent stub.
https://bugs.webkit.org/show_bug.cgi?id=73930
Reviewed by Timothy Hatcher.
We'd like to experiment with the memory stats and hence need a
nice home for that. Adding this undocumented agent / domain for now.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptProfiler.h:
(WebCore::ScriptProfiler::nodeCount):
* bindings/v8/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::nodeCount):
* bindings/v8/ScriptProfiler.h:
* inspector/Inspector.json:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorMemoryAgent.cpp: Added.
(WebCore::InspectorMemoryAgent::~InspectorMemoryAgent):
(WebCore::InspectorMemoryAgent::getNodeCounter):
(WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
* inspector/InspectorMemoryAgent.h: Added.
(WebCore::InspectorMemoryAgent::create):
2011-12-06 Julien Chaffraix <jchaffraix@webkit.org>
Unreviewed build fix after 102183.
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::initialGridTrackValue):
Use DEFINE_STATIC_LOCAL to avoid having an exit-time destructor.
2011-12-06 Julien Chaffraix <jchaffraix@webkit.org>
Inline RenderObject::view()
https://bugs.webkit.org/show_bug.cgi?id=73733
Reviewed by Darin Adler.
Micro-performance optimization, no change in behavior.
RenderObject::view() is super hot and is taking ~4-5% of the time in some
benchmarks as it is called several hundred thousands times. For some reason,
the compiler did not inline it even though it is very simple in release builds.
* WebCore.exp.in: Removed RenderObject::view() as it is inlined now.
* rendering/RenderObject.cpp: Moved the implementation from here ...
* rendering/RenderView.h:
(WebCore::RenderObject::view): ... to here to avoid a cyclic
dependency between RenderObject and RenderView. Also marked the
function as ALWAYS_INLINE.
* rendering/RenderObject.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
Added #include "RenderView.h" as the code checks for view() during repaint.
2011-12-06 Julien Chaffraix <jchaffraix@webkit.org>
CSS Grid Layout: Add support for parsing multiple grid-columns or grid-rows
https://bugs.webkit.org/show_bug.cgi?id=73272
Reviewed by Tony Chang.
Test: fast/css-grid-layout/grid-columns-rows-get-set-multiple.html
Updated our supported syntax to match the following:
<track-list> := [ <track-breadth> ]+ | 'none'
<track-breadth> := <length> | <percentage> | 'auto'
(the naming loosely matches the specification)
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridTrackBreadth): Added function to handle a breadth
(extended with 'auto' that the spec puts in <track-minmax>).
(WebCore::valueForGridTrackList): Create a space seperated list of
track breadth or none.
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Updated
to use the new functions.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTrackList): Extended the function to
match the new syntax.
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Removed our
simple implementation. Replaced by the CSSStyleSelector functions.
* css/CSSStyleSelector.cpp:
(WebCore::createGridTrackBreadth):
(WebCore::createGridTrackList):
Added those 2 functions to convert the CSSPrimitiveValue to a Vector
as expected by RenderStyle.
(WebCore::CSSStyleSelector::applyProperty): Added our 2 properties
now that it is not handled by CSSStyleApplyProperty.
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::gridColumns):
(WebCore::InheritedFlags::gridRows):
(WebCore::InheritedFlags::setGridColumns):
(WebCore::InheritedFlags::setGridRows):
(WebCore::InheritedFlags::initialGridColumns):
(WebCore::InheritedFlags::initialGridRows):
Updated the previous methods to take a Vector of Length.
(WebCore::InheritedFlags::initialGridTrackValue):
Needed function to return a Vector with one 'none' Length (the initial
value per the specification).
* rendering/style/StyleGridData.h: Updated to use a Vector.
2011-12-06 David Reveman <reveman@chromium.org>
[Chromium] Implement tile-sized painting using SkPicture.
https://bugs.webkit.org/show_bug.cgi?id=71869
Reviewed by James Robinson.
Add texture uploader that paints tile-sized chunks using SkPicture
recording and playback. Expose setting which allows this texture
updater to be enabled.
No new tests. Covered by existing tests.
* WebCore.gypi:
* platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: Added.
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::Texture):
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect):
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::updateRect):
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::create):
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::BitmapSkPictureCanvasLayerTextureUpdater):
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::~BitmapSkPictureCanvasLayerTextureUpdater):
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::createTexture):
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::sampledTexelFormat):
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect):
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::updateTextureRect):
* platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: Added.
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::textureUpdater):
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::orientation):
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::createTextureUpdater):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
2011-12-06 Adrienne Walker <enne@google.com>
[chromium] Don't crash if tile upload happens without painting first
https://bugs.webkit.org/show_bug.cgi?id=73939
Reviewed by James Robinson.
Remove at least one place (in ImageLayerChromium) where this could
happen.
Although this shouldn't happen, we should be robust to it in the
chance that other code causes it to.
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerChromium::paintContentsIfDirty):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::updateCompositorResources):
2011-12-06 Ruben <chromium@hybridsource.org>
Enable web audio by default on non-Mac POSIX platforms
https://bugs.webkit.org/show_bug.cgi?id=73491
Reviewed by Tony Chang.
No new tests, just changing gyp includes.
* WebCore.gyp/WebCore.gyp:
2011-12-06 Benjamin Poulain <benjamin@webkit.org>
Put length in its own variable in KURL copyASCII
https://bugs.webkit.org/show_bug.cgi?id=73928
Reviewed by Darin Adler.
* platform/KURL.cpp:
(WebCore::copyASCII):
2011-12-06 Dana Jansens <danakj@chromium.org>
[chromium] Set opaque flag for ImageLayerChromium
https://bugs.webkit.org/show_bug.cgi?id=72964
Reviewed by James Robinson.
Unit test in tests/ImageLayerChromiumTest.cpp.
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setContentsToImage):
* platform/graphics/chromium/GraphicsLayerChromium.h:
(WebCore::GraphicsLayerChromium::contentsLayer):
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerChromium::setContents):
2011-12-06 Alexandre Elias <aelias@google.com>
[chromium] Apply sent deltas on finishCommit
https://bugs.webkit.org/show_bug.cgi?id=73884
Reviewed by James Robinson.
This moves scroll and pageScale "sent" deltas to be applied to
the layer at the end of the commit, instead of the beginning.
This has several advantages, especially for page scale:
- When pageScale changes, no longer any need to change the scroll's
coordinate space at beginning of commit, which is complex and prone to
bugs (this fixes a problem where we were forgetting to modify the
scrollPosition before).
- No need for non-commit-related code to consider the "sent" values.
m_pageScale is now always the content scale factor, and
m_pageScaleDelta is the scale to be on the impl-side matrix.
- This will make it easy to send arbitrary fake or future delta
values for example while pinch zooming out.
The scroll logic is similarly altered for consistency's sake. Note that
I also moved the tree synchronize to the beginning of finishCommit
in order to avoid having to change the pageScale coordinate space of
sentScrollDelta in adjustScrollsForPageScaleChange().
No new tests. (Refactoring of existing code.)
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::pushPropertiesTo):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::finishCommitOnImplThread):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::setPageScaleFactorAndLimits):
(WebCore::CCLayerTreeHostImpl::applyPageScaleDeltaToScrollLayer):
(WebCore::CCLayerTreeHostImpl::processScrollDeltas):
2011-12-06 Gavin Barraclough <barraclough@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=68328
The generator and intrinsic fields in HashTableValue/HashEntry and associated structures and methods are redundant
Reviewed by Geoff Garen.
Intrinsic is no longer in the DFG namespace, is always in the
hash table. Removed ThunkGenerator.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHashTable):
2011-12-06 Dimitri Glazkov <dglazkov@chromium.org>
Unreviewed, rolling out r102091.
http://trac.webkit.org/changeset/102091
https://bugs.webkit.org/show_bug.cgi?id=73711
Caused Clang Linux compile failure.
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setAnchorPoint):
(WebCore::GraphicsLayerChromium::setTransform):
(WebCore::GraphicsLayerChromium::setChildrenTransform):
(WebCore::GraphicsLayerChromium::setMasksToBounds):
(WebCore::GraphicsLayerChromium::setBackgroundColor):
(WebCore::GraphicsLayerChromium::clearBackgroundColor):
(WebCore::GraphicsLayerChromium::setContentsOpaque):
(WebCore::GraphicsLayerChromium::setBackfaceVisibility):
(WebCore::GraphicsLayerChromium::setOpacity):
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setNeedsCommit):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::setAnchorPoint):
(WebCore::LayerChromium::setAnchorPointZ):
(WebCore::LayerChromium::setBackgroundColor):
(WebCore::LayerChromium::setMasksToBounds):
(WebCore::LayerChromium::setMaskLayer):
(WebCore::LayerChromium::setOpacity):
(WebCore::LayerChromium::setOpaque):
(WebCore::LayerChromium::setPosition):
(WebCore::LayerChromium::setSublayerTransform):
(WebCore::LayerChromium::setTransform):
(WebCore::LayerChromium::setScrollPosition):
(WebCore::LayerChromium::setScrollable):
(WebCore::LayerChromium::setDoubleSided):
(WebCore::LayerChromium::setReplicaLayer):
* platform/graphics/chromium/NonCompositedContentHost.cpp:
(WebCore::NonCompositedContentHost::notifySyncRequired):
* platform/graphics/chromium/NonCompositedContentHost.h:
2011-12-06 Dana Jansens <danakj@chromium.org>
[Chromium] Make root layer always opaque
https://bugs.webkit.org/show_bug.cgi?id=70564
Reviewed by James Robinson.
* platform/graphics/chromium/NonCompositedContentHost.cpp:
(WebCore::NonCompositedContentHost::NonCompositedContentHost):
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::CCTiledLayerImpl::draw):
2011-12-06 Noel Gordon <noel.gordon@gmail.com>
WebPImageDecoder computes image width and height multiple times
https://bugs.webkit.org/show_bug.cgi?id=73796
Reviewed by Adam Barth.
Once sufficient image data arrives, we can compute the decoded image height
and width from the WEBP image header data.
From then on, the decoded image size is known so there's no need to re-read
it from the WEBP image header again.
No change in behavior, so no new tests.
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::decode):
2011-12-06 Mike Reed <reed@google.com>
optimize TransformationMatrix::scale by not calling through to generic multiply
https://bugs.webkit.org/show_bug.cgi?id=73830
Reviewed by Kenneth Russell.
No new tests. Optimization only, existing tests exercise the code
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::TransformationMatrix::scaleNonUniform):
(WebCore::TransformationMatrix::scale3d):
2011-12-06 Eric Carlson <eric.carlson@apple.com>
Revert WebCore track Settings changes made in r101977
https://bugs.webkit.org/show_bug.cgi?id=73879
Reviewed by Sam Weinig.
No new tests yet, still nothing to test.
* page/Settings.cpp: Move the preference setters back into the .h file.
* page/Settings.h:
(WebCore::Settings::setShouldDisplaySubtitles):
(WebCore::Settings::setShouldDisplayCaptions):
(WebCore::Settings::setShouldDisplayTextDescriptions):
2011-12-06 Andreas Kling <kling@webkit.org>
MediaList: Remove constructor that takes a CSSImportRule*.
<http://webkit.org/b/73833>
Reviewed by Antti Koivisto.
* css/MediaList.h:
* css/MediaList.cpp:
Remove MediaList(CSSImportRule*, ...) constructor.
* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::CSSImportRule):
Have CSSImportRule construct its MediaList by passing the parent
style sheet, which is exactly what the old constructor accomplished.
Also assert that we're always created with a non-null parent sheet.
2011-12-06 Jarred Nicholls <jarred@sencha.com>
getComputedStyle returns wrong value for margin-*
https://bugs.webkit.org/show_bug.cgi?id=73334
margin-* getComputedStyle values should return the "used" absolute value when there is a renderer
and the specified value is relative (percentage, auto, etc.).
When there is no renderer, the specified value should be returned.
See http://dev.w3.org/csswg/cssom/#resolved-values.
Reviewed by Darin Adler.
Test: fast/css/getComputedStyle/getComputedStyle-resolved-values.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2011-12-06 Alexey Proskuryakov <ap@apple.com>
REGRESSION (WebKit2): Kill ring is not cleared when selection changes
https://bugs.webkit.org/show_bug.cgi?id=73888
<rdar://problem/10532310>
Reviewed by Mark Rowe.
Test: editing/pasteboard/emacs-ctrl-k-with-move.html
* editing/Editor.cpp: (WebCore::Editor::respondToChangedSelection): Moved the code to clear
kill ring from Mac WebKit, as it's needed in all Mac ports at least.
2011-12-06 Darin Adler <darin@apple.com>
Use HashMap<OwnPtr> in CollectionCache
https://bugs.webkit.org/show_bug.cgi?id=73784
Reviewed by Andreas Kling.
* html/CollectionCache.cpp:
(WebCore::CollectionCache::copyCacheMap): Use adoptPtr.
(WebCore::CollectionCache::reset): Removed now-unneeded calls to deleteAllValues.
(WebCore::append): Added. Helper function for appending elements to the maps from
the collection cache.
* html/CollectionCache.h: Changed mapped type in NodeCacheMap to OwnPtr.
Added append function.
* html/HTMLCollection.cpp:
(WebCore::nameShouldBeVisibleInDocumentAll): Added, to factor out common code in
two functions below.
(WebCore::HTMLCollection::checkForNameMatch): Changed to call nameShouldBeVisibleInDocumentAll.
(WebCore::HTMLCollection::updateNameCache): Ditto. Also updated cache code to use the append
function, so it will work with OwnPtr. Also eliminated an unneeded get call before
each hash table add; we do both at once in the new append function.
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::updateNameCache): More of the same.
2011-12-06 Yury Semikhatsky <yurys@chromium.org>
[Chromium] Web Inspector: getFunctionLocation should return scriptId as String not as int
https://bugs.webkit.org/show_bug.cgi?id=73892
Reviewed by Pavel Feldman.
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::functionLocationCallback): scriptId should be a string not a number
* inspector/Inspector.json: removed unused parameter
2011-11-21 Balazs Kelemen <kbalazs@webkit.org>
Enable ParallelJobs by default
https://bugs.webkit.org/show_bug.cgi?id=70032
Reviewed by Zoltan Herczeg.
Covered by existing tests.
According to measurements on Mac and Linux it is a
considerable speedup for SVG on multicore.
Remove the ENABLE(PARALLEL_JOBS) guard. Fix the Windows build
by qualifying ParallelJobs with the WTF namespace (otherwise
MSVC believes it belongs to WebCore which is likely a compiler bug).
* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::setInteriorPixelsWorker):
(WebCore::FEConvolveMatrix::platformApplySoftware):
* platform/graphics/filters/FEConvolveMatrix.h:
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplyWorker):
(WebCore::FEGaussianBlur::platformApply):
* platform/graphics/filters/FEGaussianBlur.h:
* platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::platformApplyGenericWorker):
(WebCore::FELighting::platformApplyGeneric):
* platform/graphics/filters/FELighting.h:
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::platformApplyWorker):
(WebCore::FEMorphology::platformApply):
* platform/graphics/filters/FEMorphology.h:
* platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::fillRegionWorker):
(WebCore::FETurbulence::platformApplySoftware):
* platform/graphics/filters/FETurbulence.h:
* platform/graphics/filters/arm/FELightingNEON.cpp:
(WebCore::FELighting::platformApplyNeonWorker):
* platform/graphics/filters/arm/FELightingNEON.h:
(WebCore::FELighting::platformApplyNeon):
2011-12-06 Andreas Kling <kling@webkit.org>
Unreviewed assertion fix for r102123.
* platform/KURL.cpp:
(WebCore::checkEncodedString):
2011-12-06 Benjamin Poulain <benjamin@webkit.org>
Simplify KURL's checkEncodedString()
https://bugs.webkit.org/show_bug.cgi?id=73890
Reviewed by Andreas Kling.
The method was reimplementing String::containsOnlyASCII().
Use the method from String and we can remove the #if NDEBUG.
* platform/KURL.cpp:
(WebCore::checkEncodedString):
2011-12-06 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r102111.
http://trac.webkit.org/changeset/102111
https://bugs.webkit.org/show_bug.cgi?id=73902
Breaks compilation (Requested by vsevik on #webkit).
* editing/Editor.cpp:
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
* editing/Editor.h:
2011-12-06 Hajime Morrita <morrita@chromium.org>
[Refactoring] Accessing Node::m_document should be minimized.
https://bugs.webkit.org/show_bug.cgi?id=73800
Reviewed by Kent Tamura.
No new tests. No behavioral change.
Replaced m_document reference with the document() accessor
or temporaril variables. This is a preparation for using
m_document space to point a shadow root pointer.
* dom/Document.h:
(WebCore::Node::Node):
* dom/Node.cpp:
(WebCore::Node::~Node):
2011-12-06 Shinya Kawanaka <shinyak@google.com>
https://bugs.webkit.org/show_bug.cgi?id=73889
TextCheckingParagraph::offsetTo should not have a side effect.
Reviewed by Hajime Morita.
Since TextCheckingParagraph::offsetTo had a side effect, its cache often became inconsistent.
This is likely to cause a bug when changing SpellChecker and Editor.
No new tests. Covered by existing tests.
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingParagraph::offsetTo):
2011-12-06 Eric Penner <epenner@google.com>
[chromium] Set texture limits as multiples of viewport size instead of hardcoded values
https://bugs.webkit.org/show_bug.cgi?id=72202
Reviewed by James Robinson.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawLayers): added viewport param
(WebCore::LayerRendererChromium::initializeSharedObjects): ditto
* platform/graphics/chromium/TextureManager.cpp:
(WebCore::TextureManager::highLimitBytes): calculated based on viewport
(WebCore::TextureManager::reclaimLimitBytes): ditto
(WebCore::TextureManager::lowLimitBytes): ditto
(WebCore::TextureManager::TextureManager): added viewport param
(WebCore::TextureManager::setMaxMemoryLimitBytes): changed name
(WebCore::TextureManager::setPreferredMemoryLimitBytes): added function
(WebCore::TextureManager::requestTexture): added viewport param
* platform/graphics/chromium/TextureManager.h: ditto
(WebCore::TextureManager::create): ditto
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp: ditto
(WebCore::CCLayerTreeHost::initialize): ditto
(WebCore::CCLayerTreeHost::beginCommitOnImplThread): ditto
(WebCore::CCLayerTreeHost::setViewport): ditto
(WebCore::CCLayerTreeHost::setVisible): ditto
(WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread): ditto
2011-12-06 Huang Dongsung <luxtella@company100.net>
[TexMap][QT] Draw the borders of media and webgl elements in TexMap.
https://bugs.webkit.org/show_bug.cgi?id=73817
GraphicsContext3D only draws the content of the WebGL canvas, not the additional
CSS such as the borders. TextureMapper should render the content of a
media/webgl layer before drawing the actual canvas.
This makes LayoutTests/compositing/webgl/webgl-reflection.html work.
Reviewed by Noam Rosenthal.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setContentsNeedsDisplay):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/TextureMapperNode.cpp:
(WebCore::TextureMapperNode::renderContent):
(WebCore::TextureMapperNode::paintSelf):
2011-12-06 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r102043.
http://trac.webkit.org/changeset/102043
https://bugs.webkit.org/show_bug.cgi?id=73898
Breaks chromium mac-cg compilation. (Requested by vsevik on
#webkit).
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setContentsToImage):
* platform/graphics/chromium/GraphicsLayerChromium.h:
(WebCore::GraphicsLayerChromium::contentsLayer):
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerChromium::setContents):
2011-12-06 Shinya Kawanaka <shinyak@google.com>
Refactoring: Editor::markAllMisspellingsAndBadGrammarInRanges should be refactored.
https://bugs.webkit.org/show_bug.cgi?id=73628
Reviewed by Hajime Morita.
Extracted a code for adding markers and replacing misspelled words from WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges.
No new tests. covered by existing tests.
* editing/Editor.cpp:
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
Extracted a code for adding markers and replacing missplled words, and moved to markAndReplaceFor.
(WebCore::Editor::markAndReplaceFor):
* editing/Editor.h:
2011-12-05 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: [Audits] Implement "Stop" button and progress bar instead of spinner.
https://bugs.webkit.org/show_bug.cgi?id=73626
Reviewed by Yury Semikhatsky.
* English.lproj/localizedStrings.js:
* inspector/front-end/AuditLauncherView.js:
(WebInspector.AuditLauncherView):
(WebInspector.AuditLauncherView.prototype._setAuditRunning):
(WebInspector.AuditLauncherView.prototype._launchButtonClicked):
(WebInspector.AuditLauncherView.prototype._createLauncherUI):
(WebInspector.AuditLauncherView.prototype._updateResourceProgress):
(WebInspector.AuditLauncherView.prototype._updateButton):
* inspector/front-end/AuditRules.js:
(WebInspector.AuditRules.GzipRule.prototype.doRun):
(WebInspector.AuditRules.CombineExternalResourcesRule.prototype.doRun):
(WebInspector.AuditRules.MinimizeDnsLookupsRule.prototype.doRun):
(WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback):
(WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.documentLoaded):
(WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback):
(WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback):
(WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback):
(WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
(WebInspector.AuditRules.CacheControlRule.prototype.doRun):
(WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun):
(WebInspector.AuditRules.CssInHeadRule.prototype.doRun):
(WebInspector.AuditRules.CssInHeadRule.prototype.doRun.externalStylesheetsReceived):
(WebInspector.AuditRules.CssInHeadRule.prototype.doRun.inlineStylesReceived):
(WebInspector.AuditRules.CssInHeadRule.prototype.doRun.onDocumentAvailable):
(WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun):
(WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.cssBeforeInlineReceived):
(WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.lateStylesReceived):
(WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.onDocumentAvailable):
(WebInspector.AuditRules.CookieRuleBase.prototype.doRun.resultCallback):
(WebInspector.AuditRules.CookieRuleBase.prototype.doRun):
* inspector/front-end/AuditsPanel.js:
(WebInspector.AuditsPanel):
(WebInspector.AuditsPanel.prototype._executeAudit.ruleResultReadyCallback):
(WebInspector.AuditsPanel.prototype._executeAudit):
(WebInspector.AuditsPanel.prototype._auditFinishedCallback):
(WebInspector.AuditsPanel.prototype.terminateAudit):
(WebInspector.AuditCategory.prototype.run):
(WebInspector.AuditRule.prototype.run):
(WebInspector.AuditRule.prototype.doRun):
(WebInspector.AuditProgressMonitor):
(WebInspector.AuditProgressMonitor.prototype.setTotalWork):
(WebInspector.AuditProgressMonitor.prototype.worked):
(WebInspector.AuditProgressMonitor.prototype.get indeterminate):
(WebInspector.AuditProgressMonitor.prototype.done):
(WebInspector.AuditProgressMonitor.prototype.get canceled):
(WebInspector.AuditProgressMonitor.prototype.set canceled):
2011-12-06 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
[Qt] [WK2] MiniBrowser assert on startup in debug build after r101713
https://bugs.webkit.org/show_bug.cgi?id=73874
This change partially reverts r101713 restoring original behaviour for
KUrl creation from empty string and fixes asserts in debug build.
Reviewed by Alexey Proskuryakov.
No new tests. Tests from r101713 pass.
* platform/KURL.cpp:
(WebCore::KURL::init):
(WebCore::KURL::parse):
* platform/KURL.h:
2011-12-06 Andreas Kling <kling@webkit.org>
Use HashMap<OwnPtr> for EventListenerMap's internal map.
<http://webkit.org/b/73761>
Reviewed by Benjamin Poulain.
Changed the value type of EventListenerMap::m_hashMap to OwnPtr<EventListenerVector>.
This means we no longer need to manually delete the vectors when taking them out of
the map, which makes the code a little prettier.
A few tweaks were necessary; release() instead of leakPtr() when switching modes
and adoptPtr()/get() sprinkled as needed.
* dom/EventListenerMap.h:
* dom/EventListenerMap.cpp:
(WebCore::EventListenerMap::clear):
(WebCore::EventListenerMap::add):
(WebCore::EventListenerMap::remove):
(WebCore::EventListenerMap::find):
(WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup):
(WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
2011-12-05 Rafael Weinstein <rafaelw@chromium.org>
[MutationObservers] Support 'attributes' mutation records for element.removeAttribute
https://bugs.webkit.org/show_bug.cgi?id=73880
Reviewed by Ojan Vafai.
* dom/Element.cpp:
(WebCore::enqueueAttributesMutationRecord):
(WebCore::Element::removeAttribute):
2011-12-05 Dana Jansens <danakj@chromium.org>
Set opaque flag for WebGLLayerChromium
https://bugs.webkit.org/show_bug.cgi?id=73876
Reviewed by James Robinson.
New unit test in tests/WebGLLayerChromiumTest.cpp
* platform/graphics/chromium/DrawingBufferChromium.cpp:
(WebCore::DrawingBuffer::platformLayer):
2011-12-05 Benjamin Poulain <bpoulain@apple.com>
Upstream the Cursor implementation of iOS
https://bugs.webkit.org/show_bug.cgi?id=73724
Reviewed by David Kilzer.
iOS does not need to support the Cursor of WebKit. For compatibility, Cursor
is implemented as an empty class on the platform.
* Configurations/WebCore.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* platform/Cursor.h:
(WebCore::Cursor::Cursor):
* platform/ios/CursorIOS.cpp: Added.
(WebCore::cursor):
(WebCore::pointerCursor):
(WebCore::crossCursor):
(WebCore::handCursor):
(WebCore::moveCursor):
(WebCore::iBeamCursor):
(WebCore::waitCursor):
(WebCore::helpCursor):
(WebCore::eastResizeCursor):
(WebCore::northResizeCursor):
(WebCore::northEastResizeCursor):
(WebCore::northWestResizeCursor):
(WebCore::southResizeCursor):
(WebCore::southEastResizeCursor):
(WebCore::southWestResizeCursor):
(WebCore::westResizeCursor):
(WebCore::northSouthResizeCursor):
(WebCore::eastWestResizeCursor):
(WebCore::northEastSouthWestResizeCursor):
(WebCore::northWestSouthEastResizeCursor):
(WebCore::columnResizeCursor):
(WebCore::rowResizeCursor):
(WebCore::middlePanningCursor):
(WebCore::eastPanningCursor):
(WebCore::northPanningCursor):
(WebCore::northEastPanningCursor):
(WebCore::northWestPanningCursor):
(WebCore::southPanningCursor):
(WebCore::southEastPanningCursor):
(WebCore::southWestPanningCursor):
(WebCore::westPanningCursor):
(WebCore::verticalTextCursor):
(WebCore::cellCursor):
(WebCore::contextMenuCursor):
(WebCore::noDropCursor):
(WebCore::notAllowedCursor):
(WebCore::progressCursor):
(WebCore::aliasCursor):
(WebCore::zoomInCursor):
(WebCore::zoomOutCursor):
(WebCore::copyCursor):
(WebCore::noneCursor):
(WebCore::grabCursor):
(WebCore::grabbingCursor):
(WebCore::determineHotSpot):
2011-12-05 Noel Gordon <noel.gordon@gmail.com>
[GTK] GIF image test crashes on 32- and 64-bit Release
https://bugs.webkit.org/show_bug.cgi?id=73812
Reviewed by Adam Barth.
Call resize() on the image pixel backing store after allocation to see if
that stops the GIF image decoder animation tests crashes on GTK.
No new tests, covered by exiting tests ...
fast/backgrounds/animated-gif-as-background.html
fast/images/dont-crash-with-null-gif-frames.html
fast/images/gif-loop-count.html
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageFrame::setSize):
2011-12-05 Erik Arvidsson <arv@chromium.org>
Could save a lot of memory in CharacterData by not always storing a String
https://bugs.webkit.org/show_bug.cgi?id=72404
Reviewed by Ojan Vafai.
When a Text node is created by the parser we check if the string is all whitespace
and if so we put it in the AtomicString table so that all future identical whitespace
strings can share the StringImpl.
No new tests. Covered by existing tests.
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLNames::isAllWhitespace):
(WebCore::HTMLConstructionSite::insertTextNode):
If we do not know whether the string is all whitespace this now checks the string
If the string is all whitespace we create an AtomicString for it.
* html/parser/HTMLConstructionSite.h:
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeadingNonWhitespace): We never cared about the return value here.
(WebCore::HTMLTreeBuilder::processCharacterBuffer): Pass WhitespaceMode in the case we know whether the string is all whitespace or not.
(WebCore::HTMLTreeBuilder::defaultForInTableText): Ditto.
2011-12-05 Benjamin Poulain <benjamin@webkit.org>
Update KURL's copy copyASCII to avoid String::characters()
https://bugs.webkit.org/show_bug.cgi?id=73794
Reviewed by Andreas Kling.
When the String is already on 8 bits, we can simply copy the
data. In the 16 bits case, everything remains the same.
* platform/KURL.cpp:
(WebCore::copyASCII):
(WebCore::appendASCII):
(WebCore::KURL::init):
(WebCore::KURL::parse):
(WebCore::KURL::copyToBuffer):
2011-12-05 Yong Li <yoli@rim.com>
https://bugs.webkit.org/show_bug.cgi?id=73683
Implement KeyframeValueList::operator=() and KeyframeValueList::swap().
Reviewed by Darin Adler.
No new tests as no functional change.
* platform/graphics/GraphicsLayer.h:
(WebCore::KeyframeValueList::operator=): Added
(WebCore::KeyframeValueList::swap): Added
2011-12-05 Adrienne Walker <enne@google.com>
[chromium] setNeedsCommit on non-composited host layers should trigger commit
https://bugs.webkit.org/show_bug.cgi?id=73711
Reviewed by James Robinson.
Pipe non-composited content host syncs to setNeedsCommit.
Since now the NonCompositedContentHost generates setNeedsCommit, don't
call it unnecessarily, e.g. calling setBackgroundColor to the same
color each frame should not retrigger more commits.
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setAnchorPoint):
(WebCore::GraphicsLayerChromium::setTransform):
(WebCore::GraphicsLayerChromium::setChildrenTransform):
(WebCore::GraphicsLayerChromium::setMasksToBounds):
(WebCore::GraphicsLayerChromium::setBackgroundColor):
(WebCore::GraphicsLayerChromium::clearBackgroundColor):
(WebCore::GraphicsLayerChromium::setContentsOpaque):
(WebCore::GraphicsLayerChromium::setBackfaceVisibility):
(WebCore::GraphicsLayerChromium::setOpacity):
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setNeedsCommit):
(WebCore::LayerChromium::setAnchorPoint):
(WebCore::LayerChromium::setAnchorPointZ):
(WebCore::LayerChromium::setBackgroundColor):
(WebCore::LayerChromium::setMasksToBounds):
(WebCore::LayerChromium::setMaskLayer):
(WebCore::LayerChromium::setOpacity):
(WebCore::LayerChromium::setOpaque):
(WebCore::LayerChromium::setPosition):
(WebCore::LayerChromium::setSublayerTransform):
(WebCore::LayerChromium::setTransform):
(WebCore::LayerChromium::setScrollPosition):
(WebCore::LayerChromium::setScrollable):
(WebCore::LayerChromium::setDoubleSided):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::setReplicaLayer):
* platform/graphics/chromium/NonCompositedContentHost.cpp:
(WebCore::NonCompositedContentHost::notifySyncRequired):
* platform/graphics/chromium/NonCompositedContentHost.h:
2011-12-05 Tony Chang <tony@chromium.org>
small refactor of RenderFlexibleBox
https://bugs.webkit.org/show_bug.cgi?id=73854
Reviewed by Darin Adler.
No new tests, just a refactor.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::isLeftToRightFlow): Inline isReverseFlow since it's only used in one place.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Rename startEdge
to mainAxisOffset. Rename logicalTop to crossAxisOffset. Get rid of
logicalLeft local variable since it's confusing. Move shouldFlipMainAxis
out of the for loop to avoid computing it each iteration.
* rendering/RenderFlexibleBox.h:
2011-12-05 Florin Malita <fmalita@google.com>
Heap-buffer-overflow in WebCore::HTMLTreeBuilder::processEndTag
https://bugs.webkit.org/show_bug.cgi?id=73765
Reviewed by Adam Barth.
Test: fast/parser/foreign-content-crash.html
Use m_tree.currentNode() instead of m_tree.currentElement() as the top node is not always an Element.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processEndTag):
2011-12-05 Stephen White <senorblanco@chromium.org>
Allow the ImageBuffers used by SVG filters to be accelerated
https://bugs.webkit.org/show_bug.cgi?id=73842
Reviewed by Kenneth Russell.
Regressions covered by existing SVG tests; new functionality to be
tested by the API exposed on Internals.
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setAcceleratedFiltersEnabled):
(WebCore::Settings::acceleratedFiltersEnabled):
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::platformApplySoftware):
* platform/graphics/filters/Filter.h:
(WebCore::Filter::Filter):
(WebCore::Filter::renderingMode):
(WebCore::Filter::setRenderingMode):
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::asImageBuffer):
(WebCore::FilterEffect::createImageBufferResult):
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBuffer::platformTransformColorSpace):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage):
* rendering/svg/SVGImageBufferTools.cpp:
(WebCore::SVGImageBufferTools::createImageBuffer):
* rendering/svg/SVGImageBufferTools.h:
* testing/Internals.cpp:
(WebCore::Internals::setAcceleratedFiltersEnabled):
* testing/Internals.h:
* testing/Internals.idl:
2011-12-05 Benjamin Poulain <bpoulain@apple.com>
Upstream htmlSelectMultipleItems needed for <select multiple> by iOS
https://bugs.webkit.org/show_bug.cgi?id=73734
Reviewed by David Kilzer.
* platform/DefaultLocalizationStrategy.cpp:
(WebCore::DefaultLocalizationStrategy::htmlSelectMultipleItems):
* platform/DefaultLocalizationStrategy.h:
2011-12-05 Darin Adler <darin@apple.com>
Use HashMap<OwnPtr> in CrossOriginPreflightResultCache
https://bugs.webkit.org/show_bug.cgi?id=73785
Reviewed by Andreas Kling.
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCache::appendEntry): Changed code to use set
instead of add, since it wants to replace existing entries. Also removed leakPtr
and removed the FIXME that documented the memory leak now fixed here.
(WebCore::CrossOriginPreflightResultCache::canSkipPreflight): Removed unneeded
std:: prefix here and also unneeded explicit delete call.
(WebCore::CrossOriginPreflightResultCache::empty): Removed unneeded deleteAllValues
call here.
* loader/CrossOriginPreflightResultCache.h: Make mapped value of the
CrossOriginPreflightResultHashMap be OwnPtr instead of raw pointer.
2011-12-05 Darin Adler <darin@apple.com>
Some small improvements to ContainerNode.h
https://bugs.webkit.org/show_bug.cgi?id=73786
Reviewed by Alexey Proskuryakov.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::suspendPostAttachCallbacks): Added a FIXME comment about the
peculiar behavior of this function. Somehow the post-attach suspend state is both
global and specific to a certain Page object. That can't be right. If it was truly
global then this would be a static member function. If it was truly per-page, then
the related functions could not be static.
* dom/ContainerNode.h: Removed some unneeded argument names. Moved the hasChildNodes
function up with the other basic getters. Put the other getters, childNodeCount and
childNode, right after the basic getters. Used ASSERT_NO_EXCEPTION in all the basic
mutation functions so they can be used in a cleaner fashion in C++ code where we have
some reason to know an exception won't occur. Grouped all the overrides of functions
from Node into a single paragraph and used the OVERRIDE macro on all of them. Made the
queuePostAttachCallback and postAttachCallbacksAreSuspended functions protected.
* dom/Element.h: Moved the include of ExceptionCodePlaceholder.h into ContainerNode.h.
* dom/Node.cpp:
(WebCore::Node::lazyAttach): Use hasChildNodes instead of firstChild for clarity.
(WebCore::Node::isDescendantOf): Ditto.
2011-12-05 Benjamin Poulain <benjamin@webkit.org>
Get rid of KURL::KURL(ParsedURLStringTag, const char*);
https://bugs.webkit.org/show_bug.cgi?id=73792
Reviewed by Andreas Kling.
In all cases where the constructor is used, the constructor
taking a String is as effective because the string is valid and converted
to String for m_string.
This patch remove the constructor KURL::KURL(ParsedURLStringTag, const char*)
and change the call sites that were using that constructor to build
empty URLs.
* dom/Document.cpp:
(WebCore::Document::initSecurityContext):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::init):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::createWindow):
* platform/KURL.cpp:
* platform/KURL.h:
* platform/KURLGoogle.cpp:
2011-12-05 Benjamin Poulain <benjamin@webkit.org>
Remove methods declared but never implemented with GOOGLEURL
https://bugs.webkit.org/show_bug.cgi?id=73795
Reviewed by Adam Barth.
* platform/KURL.h:
2011-12-05 Darin Adler <darin@apple.com>
Change CSSFontSelector to use HashMap<OwnPtr>
https://bugs.webkit.org/show_bug.cgi?id=73781
Reviewed by Dan Bernstein.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::~CSSFontSelector): Removed calls to deleteAllValues.
(WebCore::CSSFontSelector::addFontFaceRule): Updated to use OwnPtr instead of raw
pointer for the entry in m_fontFaces and m_locallyInstalledFontFaces.
(WebCore::CSSFontSelector::getFontData): Updated to use OwnPtr instead of raw
pointer for the entry in m_fonts. Also removed an unneeded std:: prefix.
* css/CSSFontSelector.h: Made m_fontFaces, m_locallyInstalledFontFaces, and m_fonts
be HashMap<OwnPtr>.
2011-12-05 Adam Klein <adamk@chromium.org>
V8RecursionScope should call didLeaveScriptContext when recursionLevel reaches zero
https://bugs.webkit.org/show_bug.cgi?id=73867
Reviewed by Adam Barth.
Moved V8RecursionScope into its own file, and moved
V8Proxy::didLeaveScriptContext into that file, along with a static
recursionLevel accessor, hiding the V8BindingPerIsolateData methods
from V8Proxy.
This will make it easy and less error-prone to use V8RecursionScope
properly. I plan to make use of it in V8LazyEventListener to fix
https://bugs.webkit.org/show_bug.cgi?id=73492.
No new tests, refactoring only.
* Target.pri:
* UseV8.cmake:
* WebCore.gypi:
* bindings/v8/V8Binding.h:
(WebCore::V8BindingPerIsolateData::incrementRecursionLevel): return the new recursion level.
(WebCore::V8BindingPerIsolateData::decrementRecursionLevel): return the new recursion level.
* bindings/v8/V8Proxy.cpp: remove didLeaveScriptContext.
(WebCore::V8Proxy::runScript): remove explicit call to didLeaveScriptContext.
(WebCore::V8Proxy::instrumentedCallFunction): remove explicit call to didLeaveScriptContext.
* bindings/v8/V8Proxy.h: remove didLeaveScriptContext.
* bindings/v8/V8RecursionScope.cpp: Added.
(WebCore::V8RecursionScope::didLeaveScriptContext): copied from V8Proxy.cpp.
* bindings/v8/V8RecursionScope.h: Added.
(WebCore::V8RecursionScope::V8RecursionScope):
(WebCore::V8RecursionScope::~V8RecursionScope):
(WebCore::V8RecursionScope::recursionLevel):
2011-12-05 Benjamin Poulain <bpoulain@apple.com>
Build fix for SecurityOrigin.cpp when neither BLOB nor FILE_SYSTEM are defined
Reviewed by David Kilzer.
When neither BLOB nor FILE_SYSTEM are defined, the parameter is unused.
* page/SecurityOrigin.cpp:
(WebCore::shouldUseInnerURL):
2011-12-05 Darin Adler <darin@apple.com>
Change RuleSet to use HashMap<OwnPtr>
https://bugs.webkit.org/show_bug.cgi?id=73783
Reviewed by Andreas Kling.
* css/CSSStyleSelector.cpp: Make RuleSet::AtomRuleMap use OwnPtr for the mapped values.
(WebCore::RuleSet::addToRuleSet): Use add instead of get/set to set up a new entry in the
map or find the old entry in the map.
2011-12-05 Mario Sanchez Prada <msanchez@igalia.com>
[GTK] Move emissions of AtkDocument signals down to WebCore
https://bugs.webkit.org/show_bug.cgi?id=73750
Reviewed by Chris Fleizach.
Implement the needed infrastructure to allow notifying
accessibility, in a cross-platform way, when a event related to
the load of a document happens. Added a generic method, which will
be called from the FrameLoader, and platform specific versions of
it so every port has a chance to decide what to do with those
notifications.
This patch doesn't include a new test because the one testing this
functionality is the GTK-specific unit test added along with patch
for bug 73746: testWebkitAtkDocumentLoadingEvents.
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::frameLoadingEventNotification): New, called
from the FrameLoader to notify accessibility when an event happens.
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): New,
platform specific function to let ports decide what to do.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::frameLoadingEventNotification): New.
* accessibility/chromium/AXObjectCacheChromium.cpp:
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
implementation of the platform specific function for chromium.
* accessibility/gtk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
implementation of the platform specific function for the Mac.
* accessibility/win/AXObjectCacheWin.cpp:
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
implementation of the platform specific function for Windows.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::prepareForLoadStart): Notify accessibility
by calling the new frameLoadingEventNotification() function.
(WebCore::FrameLoader::checkLoadCompleteForThisFrame): Ditto.
2011-12-05 Benjamin Poulain <benjamin@webkit.org>
Update String::containsOnlyASCII() to handle 8 bits strings
https://bugs.webkit.org/show_bug.cgi?id=73799
Reviewed by Darin Adler.
When possible, change the call sites from charactersAreAllASCII()
to the optimized version String::containsOnlyASCII().
* platform/KURL.cpp:
(WebCore::KURL::init):
* platform/cf/BinaryPropertyList.cpp:
(WebCore::BinaryPropertyListPlan::writeStringObject):
* platform/graphics/chromium/FontCacheChromiumWin.cpp:
(WebCore::FontCodepage::if):
2011-12-01 Vangelis Kokkevis <vangelis@chromium.org>
[chromium] Use ANGLE's texture_usage and texture_storage extensions when allocating compositor textures
https://bugs.webkit.org/show_bug.cgi?id=73621
When the extensions are available, compositor textures are allocated via
glTexStorage2DEXT instead of glTexImage2D to eliminate creation of unnecessary
mip levels on the service side. In addition, the GL_FRAMEBUFFER_ATTACHMENT_ANGLE
is specified for all textures used by RenderSurfaces to eliminate the need for
a system memory bitmap allocation.
Reviewed by Kenneth Russell.
* platform/graphics/chromium/Extensions3DChromium.h:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
(WebCore::LayerRendererChromium::initializeSharedObjects):
* platform/graphics/chromium/TrackingTextureAllocator.cpp:
(WebCore::TrackingTextureAllocator::TrackingTextureAllocator):
(WebCore::textureToStorageFormat):
(WebCore::isTextureFormatSupportedForStorage):
(WebCore::TrackingTextureAllocator::createTexture):
* platform/graphics/chromium/TrackingTextureAllocator.h:
(WebCore::TrackingTextureAllocator::setTextureUsageHint):
(WebCore::TrackingTextureAllocator::setUseTextureStorageExt):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
2011-12-05 Chris Fleizach <cfleizach@apple.com>
AX: aria-hidden doesn't work on iframe elements
https://bugs.webkit.org/show_bug.cgi?id=73857
Reviewed by Darin Adler.
Test: platform/mac/accessibility/iframe-aria-hidden.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addAttachmentChildren):
(WebCore::AccessibilityRenderObject::addChildren):
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::accessibilityIsIgnored):
(WebCore::AccessibilityScrollView::addChildren):
* accessibility/AccessibilityScrollView.h:
2011-12-05 Chris Fleizach <cfleizach@apple.com>
AX: web search mechanism does not work with frames
https://bugs.webkit.org/show_bug.cgi?id=73836
Reviewed by Beth Dakin.
This allows searching for, and within, frames for elements using the accessibility
search mechanism.
Test: platform/mac/accessibility/search-with-frames.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
(WebCore::appendAccessibilityObject):
(WebCore::appendChildrenToArray):
2011-12-05 Anders Carlsson <andersca@apple.com>
Make LayerFlushSchedulerClient::flushLayers indicate whether the flush was successful or not
https://bugs.webkit.org/show_bug.cgi?id=73862
Reviewed by Andy Estes.
Change LayerFlushSchedulerClient::flushLayers to return a boolean. If it returns true, the flush was
successful and the run loop observer will be invalidated.
* platform/graphics/ca/LayerFlushScheduler.h:
* platform/graphics/ca/LayerFlushSchedulerClient.h:
* platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
(WebCore::LayerFlushScheduler::runLoopObserverCallback):
2011-12-05 Dana Jansens <danakj@chromium.org>
[chromium] Set opaque flag for ImageLayerChromium
https://bugs.webkit.org/show_bug.cgi?id=72964
Reviewed by James Robinson.
New unit test in tests/ImageLayerChromiumTest.cpp.
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setContentsToImage):
* platform/graphics/chromium/GraphicsLayerChromium.h:
(WebCore::GraphicsLayerChromium::contentsLayer):
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerChromium::setContents):
2011-12-05 Julien Chaffraix <jchaffraix@webkit.org>
TD width in precentage doesn't work.
https://bugs.webkit.org/show_bug.cgi?id=34758
Reviewed by David Hyatt.
Test: fast/table/colspan-with-all-percent-cells.html
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
In the case where all our columns have percent lengths, split the colspan
logical width using the percentages from the lengths. This should be properly
handled by the massive 'else' case but it is not and I did not feel like refactor
that due to massive compatibility issues that would arise.
2011-12-05 Chris Fleizach <cfleizach@apple.com>
platform/mac/accessibility/search-when-element-starts-in-table.html is failing
https://bugs.webkit.org/show_bug.cgi?id=73751
When encountering a table, the rows() and not the cells() should be queried (otherwise
we can end up finding the element we started with).
When searching in reverse, we also need to account for searching elements within the
parent hierarchy. because technically it is "behind" the start element.
Reviewed by Darin Adler.
* accessibility/AccessibilityObject.cpp:
(WebCore::appendChildrenToArray):
(WebCore::AccessibilityObject::objectMatchesSearchCriteriaWithResultLimit):
(WebCore::AccessibilityObject::findMatchingObjects):
* accessibility/AccessibilityObject.h:
2011-12-02 Jer Noble <jer.noble@apple.com>
<video> elements should disable the system and display sleep when playing on OS X.
https://bugs.webkit.org/show_bug.cgi?id=73730
<rdar://problem/9502155>
Reviewed by Alexey Proskuryakov.
No new tests; platform specific system behavior only.
Create a new DisplaySleepDisabler object when the playback rate becomes non-zero, and destroy
that object when the playback rate drops back to zero.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerRateChanged):
* html/HTMLMediaElement.h:
2011-12-05 Peter Beverloo <peter@chromium.org>
[Chromium] Add Android keycodes and build Linux clipboard/filesystem files.
https://bugs.webkit.org/show_bug.cgi?id=73672
Add the KeyCodeConversionAndroid.cpp file, which is a partial re-land
of an older file from the Android port:
http://trac.webkit.org/browser/trunk/WebCore/platform/android/KeyEventAndroid.cpp?rev=56704
Add IconChromiumAndroid.cpp which nullifies the rendering of icons in
file upload boxes, which is not something we want to support now. Also
include ClipboardChromiumLinux.cpp and FileSystemChromiumLinux.cpp
as their functionality can be re-used for Android.
Reviewed by Adam Barth.
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* platform/chromium/KeyCodeConversionAndroid.cpp: Added.
(WebCore::windowsKeyCodeForKeyEvent):
* platform/graphics/chromium/IconChromiumAndroid.cpp: Added.
(WebCore::Icon::Icon):
(WebCore::Icon::~Icon):
(WebCore::Icon::paint):
2011-12-05 Steve Falkenburg <sfalken@apple.com>
Reviewed by Sam Weinig.
On Windows, filenames not properly preserved when copied into a file list exposed by Event.dataTransfer
https://bugs.webkit.org/show_bug.cgi?id=73841
<rdar://problem/10521879>
No test since repro case involves dropping a file onto the WebView.
Calling characters() explicitly causes a non-terminated string buffer to get passed back
to the String() constructor that expects a terminated buffer. The characters() call isn't
necessary at all, since we have a String and the method we're calling expects a String.
* platform/win/ClipboardWin.cpp:
(WebCore::ClipboardWin::files): Remove characters() since it doesn't null terminate.
2011-12-05 Timothy Hatcher <timothy@apple.com>
Keep both InspectorBackend.js and InspectorBackendStub.js in Release builds after
they have been combined into inspector.js.
The InspectorBackend.js file split out of the generated InspectorBackendStub.js
in r101670, and both files are needed to be useful.
https://webkit.org/b/73839
Reviewed by Joseph Pecoraro and Brian Weinstein.
* WebCore.xcodeproj/project.pbxproj: Pass -not -name "InspectorBackend*.js" to find
instead of -not -name InspectorBackendStub.js.
2011-12-05 Mikhail Naganov <mnaganov@chromium.org>
Web Inspector: [Chromium] Heap profiler should designate weak references.
https://bugs.webkit.org/show_bug.cgi?id=69948
Weak references are now ignored when tracing paths to GC roots.
Reviewed by Yury Semikhatsky.
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotEdge.prototype.get isWeak):
(WebInspector.HeapSnapshotEdge.prototype.toString):
(WebInspector.HeapSnapshotEdge.prototype.get _hasStringName):
(WebInspector.HeapSnapshotRetainerEdge.prototype.get isWeak):
(WebInspector.HeapSnapshot.prototype._init):
(WebInspector.HeapSnapshotPathFinder.prototype._fillRootChildren):
(WebInspector.HeapSnapshotPathFinder.prototype._skipEdge):
2011-12-05 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r102004.
http://trac.webkit.org/changeset/102004
https://bugs.webkit.org/show_bug.cgi?id=73835
Breaks qt minimal release compilation (Requested by vsevik on
#webkit).
* inspector/CodeGeneratorInspector.py:
(Capitalizer.upper_camel_case_to_lower):
(RawTypes.get):
(RawTypes.String.get_c_param_type):
(RawTypes.Object.get_c_param_type):
(RawTypes.Object):
(ParamType):
(TypeData.__init__):
(TypeData.get_raw_type):
(TypeMap.__init__):
(InspectorFrontend_h):
(InspectorArray):
(InspectorObject):
(String):
(InspectorBackendDispatcher_h):
(Generator.process_command):
* inspector/InspectorValues.h:
2011-12-05 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: [protocol] generate C++ classes for protocol JSON named types
https://bugs.webkit.org/show_bug.cgi?id=72835
Reviewed by Yury Semikhatsky.
Extends python generator functionality.
Makes constructor in InspectorObject public.
* inspector/CodeGeneratorInspector.py:
* inspector/InspectorValues.h:
2011-12-05 Pavel Podivilov <podivilov@chromium.org>
Web Inspector: fix fronted compilation.
https://bugs.webkit.org/show_bug.cgi?id=73831
Reviewed by Yury Semikhatsky.
* inspector/front-end/CompilerSourceMapping.js:
(WebInspector.ClosureCompilerSourceMappingPayload):
2011-12-05 Eric Carlson <eric.carlson@apple.com>
Out-of-band text tracks may only load from same origin as the media element's Document's origin
https://bugs.webkit.org/show_bug.cgi?id=73184
Reviewed by Sam Weinig.
Test: http/tests/security/text-track-crossorigin.html
* html/HTMLTrackElement.cpp:
(WebCore::urlForLogging): Debug-only function for logging urls.
(WebCore::HTMLTrackElement::scheduleLoad): Call canLoadUrl() before passing control off to
the Track.
(WebCore::HTMLTrackElement::canLoadUrl): Don't ask HTMLMediaElement to validate the url, the
requirements for <track> are different from <video>.
(WebCore::HTMLTrackElement::didCompleteLoad): Change bool param to enum.
(WebCore::HTMLTrackElement::mediaElementCrossOriginAttribute): New, return parent 'crossorigin'
attribute value.
* html/HTMLTrackElement.h:
* html/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::scheduleLoad): Add comments from the spec.
(WebCore::LoadableTextTrack::loadTimerFired): Always cancel pending loads. Let the caller know
if the loader refuses the url immediately.
(WebCore::LoadableTextTrack::cueLoadingStarted): The <track> deals with readyState.
(WebCore::LoadableTextTrack::cueLoadingCompleted): HTMLTrackElement::didCompleteLoad takes
an enum, not a bool.
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::corsPolicyPreventedLoad): New, log the error and set m_state.
(WebCore::TextTrackLoader::notifyFinished): Check for CORS failure.
(WebCore::TextTrackLoader::load): Take media element cross-origin attribute as a param so we
can make the correct checks.
* loader/TextTrackLoader.h:
2011-12-05 Roland Steiner <rolandsteiner@chromium.org>
"Raw" pseudo selectors don't match if immediately after a child or descendant combinator
https://bugs.webkit.org/show_bug.cgi?id=72933
Remove shortcut that prevents universal selectors from being created before shadow pseudo-elements.
Reviewed by Antti Koivisto.
* css/CSSParser.cpp:
(WebCore::CSSParser::updateSpecifiersWithElementName):
2011-12-05 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101983.
http://trac.webkit.org/changeset/101983
https://bugs.webkit.org/show_bug.cgi?id=73827
It broke all tests on GTK and on Qt in debug mode (Requested
by Ossy on #webkit).
* dom/Document.h:
(WebCore::Node::Node):
* dom/Node.cpp:
(WebCore::Node::~Node):
* dom/Node.h:
(WebCore::Node::inDocument):
2011-12-05 Roland Steiner <rolandsteiner@chromium.org>
<style scoped>: Add 'scoped' attribute
https://bugs.webkit.org/show_bug.cgi?id=67718
Add 'scoped' attribute to IDL and attribute list,
implement and test setting/resetting of the attribute.
Reviewed by Antti Koivisto.
Test: fast/css/style-scoped/basic-attribute.html
* html/HTMLAttributeNames.in:
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::scoped):
(WebCore::HTMLStyleElement::setScoped):
(WebCore::HTMLStyleElement::scopingElement):
* html/HTMLStyleElement.h:
* html/HTMLStyleElement.idl:
2011-12-05 Hajime Morrita <morrita@chromium.org>
[Refactoring] Accessing Node::m_document should be minimized.
https://bugs.webkit.org/show_bug.cgi?id=73800
Reviewed by Kent Tamura.
No new tests. No behavioral change.
Replaced m_document reference with the document() accessor
or temporaril variables. This is a preparation for using
m_document space to point a shadow root pointer.
* dom/Document.h:
(WebCore::Node::Node):
* dom/Node.cpp:
(WebCore::Node::~Node):
* dom/Node.h:
(WebCore::Node::inDocument):
2011-12-05 Shinya Kawanaka <shinyak@google.com>
Asynchronous SpellChecker should consider multiple requests.
https://bugs.webkit.org/show_bug.cgi?id=72939
Reviewed by Hajime Morita.
Now SpellChecker saves a request when it is processing the previous spellcheck request.
If there is a request having the same root editable element, the older request is replaced by newer request
Test: editing/spelling/spellcheck-queue.html
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::SpellCheckRequest::SpellCheckRequest):
A structure to have spell check request.
(WebCore::SpellChecker::SpellCheckRequest::sequence):
(WebCore::SpellChecker::SpellCheckRequest::range):
(WebCore::SpellChecker::SpellCheckRequest::text):
(WebCore::SpellChecker::SpellCheckRequest::mask):
(WebCore::SpellChecker::SpellCheckRequest::rootEditableElement):
(WebCore::SpellChecker::SpellChecker):
(WebCore::SpellChecker::createRequest):
(WebCore::SpellChecker::timerFiredToProcessQueuedRequest):
When timer is fired, queued request is processed if any.
(WebCore::SpellChecker::canCheckAsynchronously):
(WebCore::SpellChecker::requestCheckingFor):
When the spellchecker is processing another request, the latest request is queued.
(WebCore::SpellChecker::invokeRequest):
(WebCore::SpellChecker::enqueueRequest):
Enqueues a request. If there is an older request whose root editable element is the same as the request,
it will be replaced.
(WebCore::SpellChecker::didCheck):
* editing/SpellChecker.h:
2011-12-05 Eric Carlson <eric.carlson@apple.com>
WebCore part of: Add WebKit preferences for text track settings
https://bugs.webkit.org/show_bug.cgi?id=73721
Reviewed by John Sullivan.
No new tests yet, still nothing to test.
* page/Settings.cpp:
(WebCore::Settings::setShouldDisplaySubtitles): Move the setters to the .cpp file so they
aren't inlined.
(WebCore::Settings::setShouldDisplayCaptions): Ditto.
(WebCore::Settings::setShouldDisplayTextDescriptions): Ditto.
* page/Settings.h:
2011-12-05 Noel Gordon <noel.gordon@gmail.com>
ImageDecoder setSize() should check for backing store allocation failure
https://bugs.webkit.org/show_bug.cgi?id=72864
Reviewed by Adam Barth.
The backing store of a decoded image is a Vector<PixelData> on the affected
ports. And Vector<> provides a resize capacity member that returns false if
memory allocation fails.
setSize() should be called once only during an image decode - add an ASSERT
for that. Resize the backing store capacity to the requested image size and
return false if memory allocation fails.
ImageDecoder::isOverSize(width, height) is called to check that the decoded
width and height won't overflow 'width x height x sizeof(PixelData)' before
calls to setSize(). Refer to http://webkit.org/b/48634
No new tests. Covered by fast/images/size-failure.html
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageFrame::setSize):
2011-12-04 Andreas Kling <kling@webkit.org>
CSSStyleSheet can't be reparented, enforce this at compile time.
<http://webkit.org/b/73793>
Reviewed by Benjamin Poulain.
* css/StyleSheet.h:
(WebCore::StyleSheet::clearOwnerRule):
Changed setParentRule(CSSImportRule*) to clearOwnerRule() to document and
enforce the fact that style sheets should never be reparented after creation.
(WebCore::StyleSheet::ownerRule):
Renamed parentRule() to ownerRule() to match the CSSOM name.
(WebCore::StyleSheet::ownerNode):
(WebCore::StyleSheet::clearOwnerNode):
Also renamed StyleSheet::m_parentNode to m_ownerNode to match its accessors.
* css/CSSStyleSheet.h:
Removed ownerRule() as we now inherit it from StyleSheet.
* bindings/js/JSDOMBinding.h:
(WebCore::root):
* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::~CSSImportRule):
(WebCore::CSSImportRule::setCSSStyleSheet):
* css/StyleSheet.cpp:
(WebCore::StyleSheet::StyleSheet):
(WebCore::StyleSheet::parentStyleSheet):
(WebCore::StyleSheet::baseURL):
* inspector/InspectorStyleSheet.cpp:
(WebCore::fillMediaListChain):
Update call sites to use the new names.
2011-12-04 Andreas Kling <kling@webkit.org>
border-width: initial and border-color: initial cannot be removed via CSSOM.
<http://webkit.org/b/68551>
Reviewed by Darin Adler.
Test: fast/css/cssom-remove-shorthand-property.html
When asked to remove a shorthand property, we should toss out both the
sub-properties of that shorthand as well as the shorthand itself, should the
declaration contain it. The latter part was missing in our implementation.
* css/CSSMutableStyleDeclaration.h:
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
(WebCore::CSSMutableStyleDeclaration::removeShorthandProperty):
Changed to return true only if something was actually removed.
2011-12-04 Ryosuke Niwa <rniwa@webkit.org>
HIERARCHY_REQUEST_ERR check in checkAcceptChild should be optimized for newChild without children
https://bugs.webkit.org/show_bug.cgi?id=73737
Reviewed by Darin Adler.
It turned out that 50-70% of nodes inserted by DOM APIs such as insertBefore and appendChild
don't have any descendent nodes. Optimize isDescendantOf which is used by checkAcceptChild for this case.
On a test case attached on the bug, we see a 40% improvement.
Also optimize for cases where either new child or new parent but not both are in document as suggested
by Erik Arvidsson. This appears to happen about 40-70% of the time, and the symmetric difference between
the two cases is about 50% so it's worth implementing both optimizations.
Unfortunately no tests because we still have a O(n) algorithm somewhere.
* dom/Node.cpp:
(WebCore::Node::isDescendantOf):
(WebCore::Node::contains):
2011-12-04 Andreas Kling <kling@webkit.org>
CSSValuePool: Inline trivial getters.
<http://webkit.org/b/73763>
Reviewed by Anders Carlsson.
* css/CSSValuePool.cpp:
* css/CSSValuePool.h:
(WebCore::CSSValuePool::createInheritedValue): Inlined.
(WebCore::CSSValuePool::createImplicitInitialValue): Ditto.
(WebCore::CSSValuePool::createExplicitInitialValue): Ditto.
2011-12-03 Noel Gordon <noel.gordon@gmail.com>
Fix WebPImageDecoder decoder leak.
https://bugs.webkit.org/show_bug.cgi?id=73756
Reviewed by Andreas Kling.
Delete the m_decoder member in the destructor if needed with WebPIDelete.
No new tests, it's valgrind territory.
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::~WEBPImageDecoder):
2011-12-03 Andreas Kling <kling@webkit.org>
CSSStyleSheet: Parent rule can only ever be @import, enforce this at compile time.
<http://webkit.org/b/73725>
Reviewed by Darin Adler.
Made StyleSheet::m_parentRule a CSSImportRule* rather than a CSSRule*
and updated getters, setters and constructors accordingly.
There is no change in behavior, this simply enforces the status quo.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorV8.pm:
(AddIncludesForType):
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::CSSStyleSheet):
* css/CSSStyleSheet.h:
(WebCore::CSSStyleSheet::create):
(WebCore::CSSStyleSheet::ownerRule):
* css/StyleSheet.cpp:
(WebCore::StyleSheet::StyleSheet):
* css/StyleSheet.h:
(WebCore::StyleSheet::parentRule):
(WebCore::StyleSheet::setParentRule):
2011-12-03 Andreas Kling <kling@webkit.org>
Unreviewed, revert accidental change from r101932.
* bindings/scripts/CodeGeneratorV8.pm:
(AddIncludesForType):
2011-12-03 Mary Wu <mary.wu@torchmobile.com.cn>
Upstream 4 files into WebCore/platform/blackberry
https://bugs.webkit.org/show_bug.cgi?id=73614
Reviewed by Eric Seidel.
* platform/blackberry/CursorBlackBerry.cpp: Added.
(WebCore::AllCursors::AllCursors):
(WebCore::getCursor):
(WebCore::Cursor::Cursor):
(WebCore::Cursor::~Cursor):
(WebCore::Cursor::operator=):
(WebCore::aliasCursor):
(WebCore::cellCursor):
(WebCore::columnResizeCursor):
(WebCore::contextMenuCursor):
(WebCore::copyCursor):
(WebCore::crossCursor):
(WebCore::eastResizeCursor):
(WebCore::eastWestResizeCursor):
(WebCore::grabbingCursor):
(WebCore::grabCursor):
(WebCore::handCursor):
(WebCore::helpCursor):
(WebCore::iBeamCursor):
(WebCore::moveCursor):
(WebCore::noDropCursor):
(WebCore::noneCursor):
(WebCore::northEastResizeCursor):
(WebCore::northEastSouthWestResizeCursor):
(WebCore::northResizeCursor):
(WebCore::northSouthResizeCursor):
(WebCore::northWestResizeCursor):
(WebCore::northWestSouthEastResizeCursor):
(WebCore::notAllowedCursor):
(WebCore::pointerCursor):
(WebCore::progressCursor):
(WebCore::rowResizeCursor):
(WebCore::southEastResizeCursor):
(WebCore::southResizeCursor):
(WebCore::southWestResizeCursor):
(WebCore::verticalTextCursor):
(WebCore::waitCursor):
(WebCore::westResizeCursor):
(WebCore::zoomInCursor):
(WebCore::zoomOutCursor):
(WebCore::middlePanningCursor):
(WebCore::eastPanningCursor):
(WebCore::northPanningCursor):
(WebCore::northEastPanningCursor):
(WebCore::northWestPanningCursor):
(WebCore::southPanningCursor):
(WebCore::southEastPanningCursor):
(WebCore::southWestPanningCursor):
(WebCore::westPanningCursor):
* platform/blackberry/DragDataBlackBerry.cpp: Added.
(WebCore::DragData::canSmartReplace):
(WebCore::DragData::containsColor):
(WebCore::DragData::containsCompatibleContent):
(WebCore::DragData::containsFiles):
(WebCore::DragData::containsPlainText):
(WebCore::DragData::containsURL):
(WebCore::DragData::asFilenames):
(WebCore::DragData::asColor):
(WebCore::DragData::asPlainText):
(WebCore::DragData::asURL):
(WebCore::DragData::asFragment):
* platform/blackberry/DragImageBlackBerry.cpp: Added.
(WebCore::createDragImageFromImage):
(WebCore::createDragImageIconForCachedImage):
(WebCore::deleteDragImage):
(WebCore::dissolveDragImageToFraction):
(WebCore::scaleDragImage):
(WebCore::dragImageSize):
* platform/blackberry/EventLoopBlackBerry.cpp: Added.
(WebCore::EventLoop::platformInit):
(WebCore::EventLoop::cycle):
2011-12-03 Andreas Kling <kling@webkit.org>
Cache CSSInitialValue instances per-document.
<http://webkit.org/b/73745>
Reviewed by Oliver Hunt.
Test: http/tests/security/cross-origin-css-primitive.html
Have CSSValuePool manage the caching of CSSInitialValue objects.
* css/CSSInitialValue.h:
(WebCore::CSSInitialValue::createExplicit):
(WebCore::CSSInitialValue::createImplicit):
(WebCore::CSSInitialValue::CSSInitialValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::parseAnimationShorthand):
(WebCore::CSSParser::parseTransitionShorthand):
(WebCore::CSSParser::parseShorthand):
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::CSSValuePool):
(WebCore::CSSValuePool::createImplicitInitialValue):
(WebCore::CSSValuePool::createExplicitInitialValue):
* css/CSSValuePool.h:
2011-12-03 Andreas Kling <kling@webkit.org>
Keep CSSInheritedValue in the CSS value pool.
<http://webkit.org/b/73747>
Reviewed by Antti Koivisto.
We only need one CSSInheritedValue instance per document, so cache it
in CSSValuePool and have the parser create it through there.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::CSSValuePool):
(WebCore::CSSValuePool::createInheritedValue):
* css/CSSValuePool.h:
2011-12-03 Andreas Kling <kling@webkit.org>
Rename CSSPrimitiveValueCache to CSSValuePool.
<http://webkit.org/b/73742>
Reviewed by Antti Koivisto.
CSSPrimitiveValueCache -> CSSValuePool
Document::primitiveValueCache() -> Document::cssValuePool()
This is in preparation for sharing more than just primitive values.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorV8.pm:
(AddIncludesForType):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForNinePieceImageSlice):
(WebCore::valueForNinePieceImageQuad):
(WebCore::valueForNinePieceImageRepeat):
(WebCore::valueForNinePieceImage):
(WebCore::zoomAdjustedPixelValue):
(WebCore::zoomAdjustedNumberValue):
(WebCore::zoomAdjustedPixelValueForLength):
(WebCore::valueForReflection):
(WebCore::getPositionOffsetValue):
(WebCore::CSSComputedStyleDeclaration::currentColorOrValidColor):
(WebCore::getBorderRadiusCornerValue):
(WebCore::computedTransform):
(WebCore::CSSComputedStyleDeclaration::valueForFilter):
(WebCore::valueForGridTrackList):
(WebCore::getDelayValue):
(WebCore::getDurationValue):
(WebCore::createLineBoxContainValue):
(WebCore::CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword):
(WebCore::CSSComputedStyleDeclaration::valueForShadow):
(WebCore::valueForFamily):
(WebCore::renderTextDecorationFlagsToCSSValue):
(WebCore::fillRepeatToCSSValue):
(WebCore::fillSizeToCSSValue):
(WebCore::contentToCSSValue):
(WebCore::counterToCSSValue):
(WebCore::fontFamilyFromStyle):
(WebCore::lineHeightFromStyle):
(WebCore::fontSizeFromStyle):
(WebCore::fontStyleFromStyle):
(WebCore::fontVariantFromStyle):
(WebCore::fontWeightFromStyle):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::parseColorValue):
(WebCore::parseSimpleLengthValue):
(WebCore::CSSParser::setStyleSheet):
(WebCore::CSSParser::createPrimitiveNumericValue):
(WebCore::CSSParser::createPrimitiveStringValue):
(WebCore::CSSParser::parseValidPrimitive):
(WebCore::CSSParser::parseValue):
(WebCore::parseBackgroundClip):
(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::parsePage):
(WebCore::CSSParser::parseSizeParameter):
(WebCore::CSSParser::parseContent):
(WebCore::CSSParser::parseAttr):
(WebCore::CSSParser::parseBackgroundColor):
(WebCore::CSSParser::parseFillPositionX):
(WebCore::CSSParser::parseFillPositionY):
(WebCore::CSSParser::parseFillPositionComponent):
(WebCore::CSSParser::parseFillPosition):
(WebCore::CSSParser::parseFillRepeat):
(WebCore::CSSParser::parseFillSize):
(WebCore::CSSParser::parseFillProperty):
(WebCore::CSSParser::parseAnimationDirection):
(WebCore::CSSParser::parseAnimationFillMode):
(WebCore::CSSParser::parseAnimationIterationCount):
(WebCore::CSSParser::parseAnimationName):
(WebCore::CSSParser::parseAnimationPlayState):
(WebCore::CSSParser::parseAnimationProperty):
(WebCore::CSSParser::parseAnimationTimingFunction):
(WebCore::CSSParser::parseGridTrackList):
(WebCore::CSSParser::parseDashboardRegions):
(WebCore::CSSParser::parseCounterContent):
(WebCore::CSSParser::parseShape):
(WebCore::CSSParser::parseWrapShape):
(WebCore::CSSParser::parseFont):
(WebCore::CSSParser::parseFontFamily):
(WebCore::CSSParser::parseFontStyle):
(WebCore::CSSParser::parseFontVariant):
(WebCore::CSSParser::parseFontWeight):
(WebCore::CSSParser::parseColor):
(WebCore::ShadowParseContext::ShadowParseContext):
(WebCore::ShadowParseContext::commitLength):
(WebCore::ShadowParseContext::commitStyle):
(WebCore::CSSParser::parseShadow):
(WebCore::CSSParser::parseReflect):
(WebCore::CSSParser::parseFlex):
(WebCore::BorderImageParseContext::BorderImageParseContext):
(WebCore::CSSParser::parseBorderImage):
(WebCore::CSSParser::parseBorderImageRepeat):
(WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext):
(WebCore::BorderImageSliceParseContext::commitNumber):
(WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
(WebCore::CSSParser::parseBorderImageSlice):
(WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext):
(WebCore::BorderImageQuadParseContext::commitNumber):
(WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
(WebCore::CSSParser::parseBorderImageQuad):
(WebCore::CSSParser::parseBorderRadius):
(WebCore::CSSParser::parseAspectRatio):
(WebCore::CSSParser::parseCounter):
(WebCore::parseDeprecatedGradientPoint):
(WebCore::parseDeprecatedGradientColorStop):
(WebCore::CSSParser::parseDeprecatedGradient):
(WebCore::valueFromSideKeyword):
(WebCore::parseGradientColorOrKeyword):
(WebCore::CSSParser::parseLinearGradient):
(WebCore::CSSParser::parseRadialGradient):
(WebCore::CSSParser::parseCrossfade):
(WebCore::CSSParser::parseCustomFilter):
(WebCore::CSSParser::parseFilter):
(WebCore::CSSParser::parseFlowThread):
(WebCore::CSSParser::parseRegionThread):
(WebCore::CSSParser::parseTextEmphasisStyle):
(WebCore::CSSParser::parseFontFeatureSettings):
* css/CSSParser.h:
(WebCore::CSSParser::cssValuePool):
* css/CSSValuePool.cpp: Renamed from Source/WebCore/css/CSSPrimitiveValueCache.cpp.
(WebCore::CSSValuePool::CSSValuePool):
(WebCore::CSSValuePool::~CSSValuePool):
(WebCore::CSSValuePool::createIdentifierValue):
(WebCore::CSSValuePool::createColorValue):
(WebCore::CSSValuePool::createValue):
* css/CSSValuePool.h: Renamed from Source/WebCore/css/CSSPrimitiveValueCache.h.
(WebCore::CSSValuePool::create):
(WebCore::CSSValuePool::createValue):
* css/mediaControlsGtk.css:
(audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
* dom/Document.cpp:
(WebCore::Document::cssValuePool):
* dom/Document.h:
2011-12-03 Andreas Kling <kling@webkit.org>
Shrink CSSValueList.
<http://webkit.org/b/73732>
Reviewed by Antti Koivisto.
Packed CSSValueList::m_isSpaceSeparated into the CSSValue bit field
and renamed it to m_isSpaceSeparatedValue, shrinking CSSValueList
by one CPU word.
Also renamed CSSValue::m_isImplicit to m_isImplicitInitialValue
for good measure.
* css/CSSInitialValue.h:
(WebCore::CSSInitialValue::CSSInitialValue):
* css/CSSValue.h:
(WebCore::CSSValue::isImplicitInitialValue):
(WebCore::CSSValue::CSSValue):
* css/CSSValueList.cpp:
(WebCore::CSSValueList::CSSValueList):
(WebCore::CSSValueList::copy):
(WebCore::CSSValueList::customCssText):
* css/CSSValueList.h:
(WebCore::CSSValueList::isSpaceSeparated):
2011-12-02 Philippe Normand <pnormand@igalia.com>
[GStreamer] Fullscreen controller support for the new WebKit Fullscreen API
https://bugs.webkit.org/show_bug.cgi?id=66968
Reviewed by Martin Robinson.
* GNUmakefile.am: Don't use the Quicktime fullscreen CSS anymore,
it wasn't suited for GTK in the first place anyway.
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::extraFullScreenStyleSheet): Simply reuse
GTK CSS.
2011-12-03 Alejandro G. Castro <alex@igalia.com>
[GTK] TextureMapperNode should not use Qt types and functions
https://bugs.webkit.org/show_bug.cgi?id=73713
Replace qreal with double and qMin with std::min.
Reviewed by Noam Rosenthal.
* platform/graphics/texmap/TextureMapperNode.cpp:
(WebCore::solveCubicBezierFunction):
(WebCore::solveStepsFunction):
2011-12-03 Dan Winship <danw@gnome.org>
[GTK] Remove lots of code that is now unnecessary after
SoupRequestHTTP API changes.
https://bugs.webkit.org/show_bug.cgi?id=71611
Reviewed by Martin Robinson.
No new tests; behavior is unchanged
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal): remove
no-longer-needed fields.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::finishedCallback): remove this, and m_finished, which
we no longer need to explicitly track
(WebCore::statusWillBeHandledBySoup):
(WebCore::soupErrorShouldCauseLoadFailure): No longer needed;
SoupRequestHTTP's logic is now aligned with WebKit's.
(WebCore::gotChunkCallback): remove gotChunkCallback, which
is no longer needed
(WebCore::startHTTPRequest):
(WebCore::sendRequestCallback):
(WebCore::gotHeadersCallback):
(WebCore::contentSniffedCallback): merge the code from
gotHeadersCallback and contentSniffedCallback into
sendRequestCallback
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::updateFromSoupMessage): move the
sniffing override logic here
2011-12-03 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101904.
http://trac.webkit.org/changeset/101904
https://bugs.webkit.org/show_bug.cgi?id=73739
It broke zillions of tests on all bot (Requested by
Ossy_weekend on #webkit).
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::handlePostMessage):
2011-12-02 Kentaro Hara <haraken@chromium.org>
[Refactoring] Use join(", ", @arguments) to build a method argument string in CodeGenerator*.pm
https://bugs.webkit.org/show_bug.cgi?id=73651
Reviewed by Darin Adler.
The code in CodeGenerator*.pm to build a method argument string is really dirty
and error-prone. It is building an argument string incrementally judging whether
", " is necessary or not, like this:
my $method = ... ? "func(" : "func(a";
if (...) {
$method .= $method =~ /\($/ ? "b" : ", b";
}
$method .= ")";
Alternatively, we can refactor the code as follows:
my $funcName = "func";
my @arguments;
push(@arguments, "a") if (...);
push(@arguments, "b") if (...);
my $method = $funcName . "(" . join(", ", @arguments) . ")";
This patch just refactors the code, and generated .h and .cpp files should be
exactly the same as the current .h and .cpp files.
Tests: bindings/scripts/test/*
* bindings/scripts/CodeGenerator.pm:
(GetterExpression):
(SetterExpression):
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorGObject.pm:
():
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
(GenerateNormalAttrSetter):
2011-12-02 David Levin <levin@chromium.org>
Rename WTF class from TemporarilyChange to TemporaryChange.
https://bugs.webkit.org/show_bug.cgi?id=73479
Reviewed by Eric Seidel.
* ForwardingHeaders/wtf/TemporarilyChange.h: Removed.
* ForwardingHeaders/wtf/TemporaryChange.h: Added.
* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutParentViewIfNeeded):
(WebCore::FrameView::layout):
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::autoSizeIfEnabled):
2011-12-02 Armand Navabi <armand.navabi@gmail.com>
ASSERT fails in updateState ACTION_DRAW case
https://bugs.webkit.org/show_bug.cgi?id=73351
Reviewed by James Robinson.
Changed ASSERT in CCSchedulerStateMachine to include ( || !m_visible) as discussed in bug
report. m_commitState is set to COMMIT_STATE_WAITING_FOR_FIRST_DRAW if m_needsCommit or
!m_visible, so in ACTION_DRAW the assert should have both conditions.
* platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
(WebCore::CCSchedulerStateMachine::updateState):
2011-12-02 Shawn Singh <shawnsingh@chromium.org>
[chromium] Scissor rect optimization for chromium compositor
https://bugs.webkit.org/show_bug.cgi?id=67341
Reviewed by James Robinson.
Mostly covered by damage tracker tests. Currently this relies on
manually running layout tests, because this patch requires partial
swaps that are not supported by DumpRenderTree. The feature
automatically disables if partial swap is not supported.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
(WebCore::LayerRendererChromium::trackDamageForAllSurfaces):
(WebCore::LayerRendererChromium::drawLayersOntoRenderSurfaces):
(WebCore::LayerRendererChromium::drawLayersInternal):
(WebCore::LayerRendererChromium::swapBuffers):
(WebCore::LayerRendererChromium::drawLayer):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
(WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::draw):
* platform/graphics/chromium/cc/CCRenderSurface.h:
2011-12-02 Dmitry Lomov <dslomov@google.com>
https://bugs.webkit.org/show_bug.cgi?id=73691
[JSC] Implement correct order of window.postMessage arguments.
Reviewed by Geoffrey Garen.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::handlePostMessage):
2011-12-02 Stephen Chenney <schenney@chromium.org>
REGRESSION (r91125): Polyline tool in google docs is broken
https://bugs.webkit.org/show_bug.cgi?id=65796
Reviewed by Darin Adler.
Work around a bug in CoreGraphics, that caused incorrect bounds for paths
consisting only of move-to elements. This causes problems in SVG, when the enormous
bounds prevented the drawing of things behind.
Tests: svg/custom/path-moveto-only-rendering.svg
svg/custom/subpaths-moveto-only-rendering.svg
* platform/graphics/cg/PathCG.cpp:
(WebCore::PathIsEmptyOrSingleMoveTester::PathIsEmptyOrSingleMoveTester): Class to
test for isEmpty accoridng ot the same rules as other platforms.
(WebCore::PathIsEmptyOrSingleMoveTester::isEmpty): Query the result
(WebCore::PathIsEmptyOrSingleMoveTester::testPathElement): Path iterator method
(WebCore::PathHasOnlyMoveToTester::PathHasOnlyMoveToTester): Class to test whether a
path contains only move-to elements, and hence should have null bounds.
(WebCore::PathHasOnlyMoveToTester::hasOnlyMoveTo): Query the result
(WebCore::PathHasOnlyMoveToTester::testPathElement): Path iterator method.
(WebCore::Path::boundingRect): Modified to check for move-to only paths
(WebCore::Path::fastBoundingRect): Modified to check for move-to only paths
(WebCore::Path::isEmpty): Now uses the method that matches other platforms.
(WebCore::Path::hasCurrentPoint): Now uses CGPathIsEmpty directly
(WebCore::Path::transform) : Now uses CGPathIsEmpty directly
2011-12-02 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions]More renaming for region style rules.
https://bugs.webkit.org/show_bug.cgi?id=73526
Reviewed by Eric Seidel.
Rename isRegionStyleRule() -> isRegionRule()
WEBKIT_REGION_STYLE_RULE -> WEBKIT_REGION_RULE.
* bindings/objc/DOMCSS.mm:
(kitClass):
* bindings/v8/custom/V8CSSRuleCustom.cpp:
(WebCore::toV8):
* css/CSSGrammar.y:
* css/CSSParser.cpp:
(WebCore::CSSParser::createRegionRule):
* css/CSSParser.h:
* css/CSSRule.cpp:
(WebCore::CSSRule::cssText):
(WebCore::CSSRule::destroy):
* css/CSSRule.h:
(WebCore::CSSRule::isRegionRule):
* css/CSSRule.idl:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::addRegionRule):
(WebCore::RuleSet::addRulesFromSheet):
* css/CSSStyleSelector.h:
* css/WebKitCSSRegionRule.cpp:
(WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
* css/tokenizer.flex:
2011-12-02 Tom Sepez <tsepez@chromium.org>
XSSAuditor includes more terminating characters when truncating
attribute values.
https://bugs.webkit.org/show_bug.cgi?id=73684
Reviewed by Daniel Bates.
* html/parser/XSSAuditor.cpp:
(WebCore::isTerminatingCharacter):
(WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
2011-12-02 Tony Chang <tony@chromium.org>
Need to implement flex-flow: column-reverse
https://bugs.webkit.org/show_bug.cgi?id=73504
Reviewed by David Hyatt.
We can't just change the direction of the FlexOrderIterator because we want the overflow to be
on the top. We can't just position them in the reverse location since we don't know where the
bottom edge is until we've layed out the flex items. So we do an extra pass, but it should be
fast since we're not laying out, just moving.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::flowAwareBorderEnd):
(WebCore::RenderFlexibleBox::flowAwarePaddingEnd):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::layoutColumnReverse): Do an extra pass to reposition flexitems in the reverse order.
* rendering/RenderFlexibleBox.h:
2011-12-02 Stephen Chenney <schenney@chromium.org>
Divide by zero for zero-length arcs
https://bugs.webkit.org/show_bug.cgi?id=73021
Reviewed by Nikolas Zimmermann.
A zero-length path produces divide by zero, resulting in nothing being
drawn. This change modifies the behavior to produce a zero-length line
which will generate correct linecaps.
Test: svg/stroke/zero-length-arc-linecaps-rendering.svg
* svg/SVGPathParser.cpp:
(WebCore::SVGPathParser::parseArcToSegment): Catch the case of
zero-length arcs and convert them to lines (the same as would happen
for zero arc radii).
2011-12-02 James Wei <james.wei@intel.com> & Xingnan Wang <xingnan.wang@intel.com>
-Implement the SSE optimization for vsmul and vadd.
https://bugs.webkit.org/show_bug.cgi?id=73182
Reviewed by Kenneth Russell.
* platform/audio/VectorMath.cpp:
(WebCore:VectorMath):
2011-12-02 David Grogan <dgrogan@chromium.org>
Grant workers experimental access to IndexedDB.
https://bugs.webkit.org/show_bug.cgi?id=73609
Reviewed by Nate Chapin.
No new tests - there will be chromium ui tests that depend on
webkit.org/b/73297.
* storage/IDBFactory.cpp:
(WebCore::IDBFactory::open): Call new function,
IDBFactoryBackendInterface::openFromWorker.
* storage/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::open):
(WebCore::IDBFactoryBackendImpl::openFromWorker):
(WebCore::IDBFactoryBackendImpl::openInternal):
* storage/IDBFactoryBackendImpl.h:
* storage/IDBFactoryBackendInterface.h:
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::webkitIndexedDB): Stores
IDBFactoryBackendInterface, implemented by IDBFactoryBackendProxy in
chromium, in the WorkerContext. For the Document case it is stored in
the PageGroup. Storing it in the WorkerContext causes more memory
churn, but that should be trivial. I don't know of any better
alternatives.
* workers/WorkerContext.h:
* workers/WorkerContext.idl:
2011-12-02 Aaron Colwell <acolwell@chromium.org>
Fix mixed content handling for video in Chromium by having
CachedResourceLoader & SubresourceLoader use the
ResourceRequest::TargetType when determining if a RawResource can
be requested.
https://bugs.webkit.org/show_bug.cgi?id=72178
Reviewed by Adam Barth.
Tests: http/tests/security/mixedContent/insecure-video-in-iframe.html
http/tests/security/mixedContent/insecure-video-in-main-frame.html
http/tests/security/mixedContent/redirect-http-to-https-video-in-main-frame.html
http/tests/security/mixedContent/redirect-https-to-http-video-in-main-frame.html
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest):
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::CachedRawResource):
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.cpp:
(WebCore::defaultPriorityForResourceType):
(WebCore::cachedResourceTypeToTargetType):
(WebCore::CachedResource::targetTypeToCachedResourceType):
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource):
(WebCore::CachedResourceLoader::checkInsecureContent):
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::requestResource):
2011-12-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101731.
http://trac.webkit.org/changeset/101731
https://bugs.webkit.org/show_bug.cgi?id=73706
Broke copy and paste in chromium. (Requested by dcheng on #webkit).
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::SpellChecker):
(WebCore::SpellChecker::initRequest):
(WebCore::SpellChecker::clearRequest):
(WebCore::SpellChecker::canCheckAsynchronously):
(WebCore::SpellChecker::isBusy):
(WebCore::SpellChecker::isValid):
(WebCore::SpellChecker::requestCheckingFor):
(WebCore::SpellChecker::doRequestCheckingFor):
(WebCore::SpellChecker::didCheck):
* editing/SpellChecker.h:
2011-12-02 Fady Samuel <fsamuel@chromium.org>
When page scaling is in use position:fixed has incorrect results
https://bugs.webkit.org/show_bug.cgi?id=68617
Reviewed by Simon Fraser.
Add the option for position:fixed elements to be fixed to the frame
instead of the layout rectangle of the document.
Tests: fast/repaint/fixed-in-page-scale.html
fast/repaint/fixed-right-bottom-in-page-scale.html
fast/repaint/fixed-right-in-page-scale.html
* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::reset):
(WebCore::FrameView::scrollXForFixedPosition):
(WebCore::FrameView::scrollYForFixedPosition):
If position:fixed elements are relative to the frame, disregard the
drag factor.
(WebCore::FrameView::setShouldLayoutFixedElementsRelativeToFrame):
* page/FrameView.h:
(WebCore::FrameView::shouldLayoutFixedElementsRelativeToFrame):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::shouldLayoutFixedElementRelativeToFrame):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
If position:fixed elements are relative to the frame, their container
is the frame instead of the layout rect of the document.
This allows proper positioning of these elements to the right and
bottom.
* rendering/RenderBox.h:
* testing/Internals.cpp:
(WebCore::Internals::setShouldLayoutFixedElementsRelativeToFrame):
* testing/Internals.h:
* testing/Internals.idl:
Allow enabling and disabling the new behavior in layout tests.
2011-12-02 Benjamin Poulain <bpoulain@apple.com>
Build fix for SubresourceLoader when building with Core Foundation
https://bugs.webkit.org/show_bug.cgi?id=73709
Reviewed by David Kilzer.
The patch r100311 removed SubresourceClient and merged it in SubresourceLoader.
Consequently, m_client does not exist anymore and there is no need to do the check
before invoking didReceiveData().
* loader/cf/SubresourceLoaderCF.cpp:
(WebCore::SubresourceLoader::didReceiveDataArray):
2011-12-02 Andreas Kling <kling@webkit.org>
StyledElement: Simplify addCSSColor().
<http://webkit.org/b/73703>
Reviewed by Darin Adler.
The Color(const String&) constructor handles both named and 3/6-digit
hex colors, so there's no need to handle those separately here.
Also tweaked some comments and minor things.
* dom/StyledElement.cpp:
(WebCore::StyledElement::addCSSColor):
2011-12-02 Benjamin Poulain <bpoulain@apple.com>
Update platform/iphone to platform/ios
https://bugs.webkit.org/show_bug.cgi?id=73708
Reviewed by Darin Adler.
The platform is now best known as iOS, update the platform layer accordingly.
* Configurations/WebCore.xcconfig:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/KeyEventCocoa.mm:
* platform/ios/KeyEventCodesIOS.h: Renamed from Source/WebCore/platform/iphone/KeyEventCodesIPhone.h.
* platform/ios/KeyEventIOS.mm: Renamed from Source/WebCore/platform/iphone/KeyEventIPhone.mm.
(WebCore::keyIdentifierForKeyEvent):
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
(WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
(WebCore::PlatformKeyboardEvent::currentCapsLockState):
(WebCore::PlatformKeyboardEvent::getCurrentModifierState):
2011-12-02 Jonathan Backer <backer@chromium.org>
[chromium] Eliminate unnecessary state on previous CL
https://bugs.webkit.org/show_bug.cgi?id=73661
Reviewed by Kenneth Russell.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::initialize):
(WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
(WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
2011-12-02 Dan Bernstein <mitz@apple.com>
<rdar://problem/10520670> REGRESSION (r91738): didFinishLoad is called before custom fonts have finished loading
https://bugs.webkit.org/show_bug.cgi?id=73688
Reviewed by Darin Adler.
The problem was that after CSSFontFaceSource::getFontData() had scheduled a 0-delay timer to
begin loading the font, but before that timer fired, the subresource loader appeared to have
had no resources waiting to be loaded, and therefore didFinishLoad could be called. This change
reworks the fix for <http://webkit.org/b/65123> so that while the load is still started on a
0-delay timer, the subresource loader’s request count is incremented immediately, preventing
it from hitting 0 while the font load is scheduled to begin. The delayed load mechanism is
moved from CSSFontFaceSource into CSSFontSelector in order to safely handle the possibility of
the latter being decommissioned while waiting for font loading to begin.
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::CSSFontFaceSource): Removed initializer for m_loadStartTimer.
(WebCore::CSSFontFaceSource::~CSSFontFaceSource): Removed stopping of m_loadStartTimer.
(WebCore::CSSFontFaceSource::getFontData): Replaced code to schedule loading on a timer with
a call to CSSFontSelector::beginLoadingFontSoon.
* css/CSSFontFaceSource.h: Removed m_loadStartTimer and m_fontSelector member variables.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::CSSFontSelector): Added initialized for m_beginLoadingTimer.
(WebCore::CSSFontSelector::~CSSFontSelector): Added call to clearDocument(), to deal with
anything remaining in m_fontsToBeginLoading at this time.
(WebCore::CSSFontSelector::clearDocument): Now stops m_beginLoadingTimer and balances
incrementRequestCount() calls for anything remaining in m_fontsToBeginLoading.
(WebCore::CSSFontSelector::beginLoadingFontSoon): Added. Schedules the actual call to
CachedFont::beginLoadingIfNeeded on a 0-delay timer, and meanwhile increments the request count
on the CachedResourceLoader, which ensures that didFinishLoad will not be called while waiting
for the timer to fire.
(WebCore::CSSFontSelector::beginLoadTimerFired): Added. Actually calls
CachedFont::beginLoadIfNeeded and balances the incrementRequestCount() made when the timer was
scheduled.
* css/CSSFontSelector.h:
2011-12-02 David Tseng <dtseng@google.com>
Send an AXCheckedStateChanged notification when the aria-checked attribute changes.
https://bugs.webkit.org/show_bug.cgi?id=72754
Reviewed by Chris Fleizach.
Test: accessibility/aria-checkbox-sends-notification.html
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::checkedStateChanged):
* accessibility/AXObjectCache.h:
* dom/Element.cpp:
(WebCore::Element::updateAfterAttributeChanged):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setChecked):
2011-12-02 Grace Kloba <klobag@chromium.org>
[chromium] Recycle tile-sized textures during commit to prevent reallocations
https://bugs.webkit.org/show_bug.cgi?id=70645
Reviewed by James Robinson.
Currently texture request is capped by the high limit while we reclaim the
textures in each commit. This triggers new tiles always allocated when scrolling.
The proposal is to recycle the texture during request if the total used memory
is about to exceed the reclaim limit.
* platform/graphics/chromium/ManagedTexture.cpp:
(WebCore::ManagedTexture::reserve):
* platform/graphics/chromium/TextureManager.cpp:
(WebCore::TextureManager::setMemoryLimitBytes):
(WebCore::TextureManager::replaceTexture):
(WebCore::TextureManager::requestTexture):
* platform/graphics/chromium/TextureManager.h:
2011-12-02 Kent Tamura <tkent@chromium.org>
[Chromium] Show placeholder even if the element is focused
https://bugs.webkit.org/show_bug.cgi?id=73629
Reviewed by Hajime Morita.
No new tests. Need to update some existing placeholder tests.
* rendering/RenderThemeChromiumMac.h: Add shouldShowPlaceholderWhenFocused().
* rendering/RenderThemeChromiumMac.mm:
(WebCore::RenderThemeChromiumMac::shouldShowPlaceholderWhenFocused):
Returns true.
* rendering/RenderThemeChromiumSkia.cpp:
(WebCore::RenderThemeChromiumSkia::shouldShowPlaceholderWhenFocused): ditto.
* rendering/RenderThemeChromiumSkia.h: Add shouldShowPlaceholderWhenFocused().
2011-12-02 Kent Tamura <tkent@chromium.org>
[Lion][Windows] Both of placeholder and input text are shown in <input type=number>
https://bugs.webkit.org/show_bug.cgi?id=73615
Reviewed by Joseph Pecoraro.
Placeholder visibility was checked by HTMLInputElement::value
emptiness. It should be innerTextValue emptiness because it is
possible that a number field has empty HTMLInputElement::value and
non-empty innerTextValue.
Tests: fast/forms/number/number-placeholder-with-unacceptable-value.html
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateInnerTextValue):
We should update placeholder visiblity when the innerTextValue is updated.
(WebCore::HTMLInputElement::subtreeHasChanged): ditto.
(WebCore::HTMLInputElement::setSuggestedValue):
We don't need to call updatePlaceholderVisibility() because updateInnerTextValue() calls it.
(WebCore::HTMLInputElement::setValueFromRenderer):
We don't need to call updatePlaceholderVisibility() because subtreeHasChanged() calls it.
* html/HTMLInputElement.h: Checks innerTextValue emptiness.
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::setValue):
We don't need to call updatePlaceholderVisibility() because updateInnerTextValue() calls it.
2011-12-01 Alok Priyadarshi <alokp@chromium.org>
[chromium] CCLayerQuad does not return FloatQuad in correct order
https://bugs.webkit.org/show_bug.cgi?id=73247
Reviewed by James Robinson.
Returned the FloatQuad coordinates in correct order.
Covered by new unit tests in CCLayerQuadTest.cpp.
* platform/graphics/chromium/cc/CCLayerQuad.cpp:
(WebCore::CCLayerQuad::floatQuad):
2011-12-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101833.
http://trac.webkit.org/changeset/101833
https://bugs.webkit.org/show_bug.cgi?id=73678
test_expectations file invalid: run Tools/Scripts/new-run-
webkit-tests --lint-test-files (Requested by scheib on
#webkit).
* platform/graphics/chromium/cc/CCLayerQuad.cpp:
(WebCore::CCLayerQuad::floatQuad):
2011-12-02 Alok Priyadarshi <alokp@chromium.org>
[chromium] CCLayerQuad does not return FloatQuad in correct orientation
https://bugs.webkit.org/show_bug.cgi?id=73247
Reviewed by James Robinson.
Returned the FloatQuad coordinates in correct order.
Covered by new unit tests in CCLayerQuadTest.cpp.
* platform/graphics/chromium/cc/CCLayerQuad.cpp:
(WebCore::CCLayerQuad::floatQuad):
2011-12-01 Dmitry Lomov <dslomov@google.com>
https://bugs.webkit.org/show_bug.cgi?id=73589
[V8][Chromium] Adjust postMessage to the latest "implementation-ready" spec.
- postMessage should support transfer of MessagePorts
- the order of arguments to Window::postMessage and Window::webkitPostMessage should be (msg, targetOrigin [, transfer])
Reviewed by David Levin.
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::handlePostMessageCallback):
* bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
(WebCore::handlePostMessageCallback):
* bindings/v8/custom/V8MessagePortCustom.cpp:
(WebCore::handlePostMessageCallback):
* bindings/v8/custom/V8WorkerCustom.cpp:
(WebCore::handlePostMessageCallback):
2011-12-02 Enrica Casucci <enrica@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=73497
This is a followup to the patch submitted for the bug above.
Tha patch was landed in r101575 and I missed to make one of the changes
suggested by the reviewer that had pointed out that the code was still
making use of the deprecatedNode method.
Unreviewed.
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::removeRedundantBlocks): Changed deprecatedNode to containerNode.
2011-12-02 Tom Sepez <tsepez@chromium.org>
Content-security-policy script-src not enforced on workers.
https://bugs.webkit.org/show_bug.cgi?id=73240
Reviewed by Adam Barth.
Add a CSP check in AbstractWorker.cpp as part of resolving URL.
Test: http/tests/security/contentSecurityPolicy/worker-script-src.html
* workers/AbstractWorker.cpp:
(WebCore::AbstractWorker::resolveURL):
2011-12-02 Daniel Cheng <dcheng@chromium.org>
[chromium] Add plumbing for supporting custom MIME types in DataTransfer.
https://bugs.webkit.org/show_bug.cgi?id=73594
Reviewed by David Levin.
Tests: editing/pasteboard/clipboard-customData.html
fast/events/drag-customData.html
* platform/chromium/ChromiumDataObject.cpp:
(WebCore::ChromiumDataObject::types):
(WebCore::ChromiumDataObject::getData):
(WebCore::ChromiumDataObject::setData):
* platform/chromium/ChromiumDataObject.h:
(WebCore::ChromiumDataObject::customData):
* platform/chromium/PlatformSupport.h:
2011-12-02 Darin Adler <darin@apple.com>
[Mac] Form stream data structures still not threadsafe
https://bugs.webkit.org/show_bug.cgi?id=73674
Reviewed by Anders Carlsson.
* platform/network/mac/FormDataStreamMac.mm:
(WebCore::streamFieldsMapMutex): Added.
(WebCore::associateStreamWithResourceHandle): Use streamFieldsMapMutex.
(WebCore::formCreate): Ditto.
(WebCore::formFinalize): Ditto.
(WebCore::httpBodyFromStream): Ditto.
2011-12-02 Joshua Bell <jsbell@chromium.org>
IndexedDB: Rename "multientry" to "multiEntry" per spec change
https://bugs.webkit.org/show_bug.cgi?id=73578
Reviewed by Darin Fisher.
* storage/IDBIndex.h:
(WebCore::IDBIndex::multiEntry):
* storage/IDBIndex.idl:
* storage/IDBIndexBackendImpl.cpp:
(WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
* storage/IDBIndexBackendImpl.h:
(WebCore::IDBIndexBackendImpl::create):
(WebCore::IDBIndexBackendImpl::multiEntry):
* storage/IDBIndexBackendInterface.h:
* storage/IDBLevelDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::getIndexes):
(WebCore::IDBLevelDBBackingStore::createIndex):
* storage/IDBLevelDBCoding.cpp:
* storage/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex):
* storage/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore::IDBObjectStoreBackendImpl::createIndex):
(WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
(WebCore::IDBObjectStoreBackendImpl::loadIndexes):
* storage/IDBObjectStoreBackendImpl.h:
* storage/IDBObjectStoreBackendInterface.h:
2011-12-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101805.
http://trac.webkit.org/changeset/101805
https://bugs.webkit.org/show_bug.cgi?id=73670
Many canvas tests started failing due to the isEmpty change
(Requested by darin on #webkit).
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::boundingRect):
(WebCore::Path::fastBoundingRect):
(WebCore::Path::isEmpty):
2011-12-01 Darin Adler <darin@apple.com>
[Mac] Reference count threading violation in FormDataStreamMac.mm
https://bugs.webkit.org/show_bug.cgi?id=73627
Reviewed by Sam Weinig.
Shows up as a crash during existing layout test runs so no new tests are required.
* platform/network/mac/FormDataStreamMac.mm:
(WebCore::streamFieldsMap): Replaced getStreamFormDataMap with this.
Use an NSMapTable instead of a HashMap because we need to remove items from this
on a non-main thread.
(WebCore::associateStreamWithResourceHandle): Use NSMapGet instead of
HashMap::contains here.
(WebCore::formCreate): FormStreamFields now stores a RefPtr to the form data.
Added the code to fill that in. Did it in a more modern way to avoid the leakRef
and adoptRef that were used before. Replaced the code that set up the stream
form data map entry with code that sets an entry in the streamFieldsMap.
(WebCore::formFinishFinalizationOnMainThread): Added. Contains the work of
finalization that must be done on the main thread, specifically, destroying the
fields structure that contains objects with RefPtr in them. We can't touch these
reference counts on non-main threads.
(WebCore::formFinalize): Changed this to use NSMapRemove on the streamFieldsMap.
Added a callOnMainThread to finish the finalization.
(WebCore::setHTTPBody): Removed the leakRef, no longer needed, that used to be
balanced by an adoptRef in formCreate.
(WebCore::httpBodyFromStream): Changed to use NSMapGet.
2011-12-02 Antti Koivisto <antti@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=73520
REGRESSION(r101524): Article titles invisible until hover on blaze.com
Reviewed by Darin Adler.
We need to invalidate the matched declaration cache when new web fonts are loaded.
Fonts in the cached RenderStyles may not be valid anymore.
Also renamed m_matchStyleDeclarationCache -> m_matchedStyleDeclarationCache.
Test reduction by the Reduction Fairy (aka kling).
Test: fast/css/font-face-cache-bug.html
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::findFromMatchedDeclarationCache):
(WebCore::CSSStyleSelector::addToMatchedDeclarationCache):
(WebCore::CSSStyleSelector::invalidateMatchedDeclarationCache):
* css/CSSStyleSelector.h:
2011-11-02 Jer Noble <jer.noble@apple.com>
MediaControls should use MediaController if present.
https://bugs.webkit.org/show_bug.cgi?id=71410
Reviewed by Eric Carlson.
No new tests; covered by existing tests.
Add support for individual media controls to control the MediaController of their associated
HTMLMediaElement, if present.
The video spec requires that UA provided media controls be implemented in terms of their
HTMLMediaElement's MediaController, if present. So for each of the media controls, modify
their constructor to take a Document* instead of an HTMLMediaElement, and add an setter
taking a MediaControllerInterface.
Now that MediaControls have an abstract interface instead of an HTMLMediaElement, use toParentMediaElement
to find the controllingVideoElement.
* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaControlsContainer::controllingVideoElement):
Pass the MediaController or the HTMLMediaElement when setting up the elements controls.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::createMediaControls):
(WebCore::HTMLMediaElement::setMediaController):
The following functions have only constructor changes:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlElement::MediaControlElement):
(WebCore::MediaControlPanelElement::MediaControlPanelElement):
(WebCore::MediaControlPanelElement::create):
(WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement):
(WebCore::MediaControlTimelineContainerElement::create):
(WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement):
(WebCore::MediaControlVolumeSliderContainerElement::create):
(WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement):
(WebCore::MediaControlStatusDisplayElement::create):
(WebCore::MediaControlInputElement::MediaControlInputElement):
(WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement):
(WebCore::MediaControlMuteButtonElement::defaultEventHandler):
(WebCore::MediaControlPanelMuteButtonElement::MediaControlPanelMuteButtonElement):
(WebCore::MediaControlPanelMuteButtonElement::create):
(WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement):
(WebCore::MediaControlVolumeSliderMuteButtonElement::create):
(WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement):
(WebCore::MediaControlPlayButtonElement::create):
(WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement):
(WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement):
(WebCore::MediaControlSeekForwardButtonElement::create):
(WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement):
(WebCore::MediaControlSeekBackButtonElement::create):
(WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement):
(WebCore::MediaControlRewindButtonElement::create):
(WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement):
(WebCore::MediaControlReturnToRealtimeButtonElement::create):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::create):
(WebCore::MediaControlTimelineElement::MediaControlTimelineElement):
(WebCore::MediaControlTimelineElement::create):
(WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement):
(WebCore::MediaControlVolumeSliderElement::create):
(WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
(WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement):
(WebCore::MediaControlFullscreenVolumeSliderElement::create):
(WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
(WebCore::MediaControlFullscreenButtonElement::create):
(WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement):
(WebCore::MediaControlFullscreenVolumeMinButtonElement::create):
(WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement):
(WebCore::MediaControlFullscreenVolumeMaxButtonElement::create):
(WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement):
(WebCore::MediaControlTimeRemainingDisplayElement::create):
(WebCore::MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement):
(WebCore::MediaControlCurrentTimeDisplayElement::create):
(WebCore::MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement):
* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::MediaControlRootElement):
(WebCore::MediaControls::create):
(WebCore::MediaControlRootElement::create):
* html/shadow/MediaControlRootElement.h:
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::MediaControls):
* html/shadow/MediaControls.h:
The following functions now call MediaControllerInterface instead of HTMLMediaElement directly:
* html/shadow/MediaControlElements.h:
(WebCore::MediaControlStatusDisplayElement::update):
(WebCore::MediaControlMuteButtonElement::updateDisplayType):
(WebCore::MediaControlPlayButtonElement::defaultEventHandler):
(WebCore::MediaControlPlayButtonElement::updateDisplayType):
(WebCore::MediaControlSeekButtonElement::startTimer):
(WebCore::MediaControlSeekButtonElement::stopTimer):
(WebCore::MediaControlSeekButtonElement::nextRate):
(WebCore::MediaControlSeekButtonElement::seekTimerFired):
(WebCore::MediaControlRewindButtonElement::defaultEventHandler):
(WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
(WebCore::MediaControlToggleClosedCaptionsButtonElement::updateDisplayType):
(WebCore::MediaControlTimelineElement::defaultEventHandler):
(WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
(WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler):
(WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler):
* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::reset):
(WebCore::MediaControlRootElement::playbackStarted):
(WebCore::MediaControlRootElement::playbackProgressed):
(WebCore::MediaControlRootElement::playbackStopped):
(WebCore::MediaControlRootElement::updateTimeDisplay):
(WebCore::MediaControlRootElement::loadedMetadata):
(WebCore::MediaControlRootElement::changedVolume):
(WebCore::MediaControlRootElement::enteredFullscreen):
(WebCore::MediaControlRootElement::showVolumeSlider):
(WebCore::MediaControlRootElement::defaultEventHandler):
(WebCore::MediaControlRootElement::startHideFullscreenControlsTimer):
(WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired):
* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
(WebCore::MediaControls::create):
(WebCore::MediaControlRootElementChromium::create):
(WebCore::MediaControlRootElementChromium::reset):
(WebCore::MediaControlRootElementChromium::playbackStarted):
(WebCore::MediaControlRootElementChromium::playbackProgressed):
(WebCore::MediaControlRootElementChromium::playbackStopped):
(WebCore::MediaControlRootElementChromium::updateTimeDisplay):
(WebCore::MediaControlRootElementChromium::defaultEventHandler):
(WebCore::MediaControlRootElementChromium::changedVolume):
(WebCore::MediaControlRootElementChromium::showVolumeSlider):
* html/shadow/MediaControlRootElementChromium.h:
The following functions set the current MediaControllerInterface.
* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::setMediaController):
* html/shadow/MediaControlElements.h:
(WebCore::MediaControlElement::setMediaController):
(WebCore::MediaControlElement::mediaController):
(WebCore::MediaControlInputElement::setMediaController):
(WebCore::MediaControlInputElement::mediaController):
* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlRootElementChromium::setMediaController):
2011-12-02 Stephen Chenney <schenney@chromium.org>
REGRESSION (r91125): Polyline tool in google docs is broken
https://bugs.webkit.org/show_bug.cgi?id=65796
Reviewed by Darin Adler.
Work around a bug in CoreGraphics, that caused incorrect bounds for paths
consisting only of move-to elements. This causes problems in SVG, when the enormous
bounds prevented the drawing of things behind.
Tests: svg/custom/path-moveto-only-rendering.svg
svg/custom/subpaths-moveto-only-rendering.svg
* platform/graphics/cg/PathCG.cpp:
(WebCore::PathIsEmptyOrSingleMoveTester::PathIsEmptyOrSingleMoveTester): Class to
test for isEmpty accoridng ot the same rules as other platforms.
(WebCore::PathIsEmptyOrSingleMoveTester::isEmpty): Query the result
(WebCore::PathIsEmptyOrSingleMoveTester::testPathElement): Path iterator method
(WebCore::PathHasOnlyMoveToTester::PathHasOnlyMoveToTester): Class to test whether a
path contains only move-to elements, and hence should have null bounds.
(WebCore::PathHasOnlyMoveToTester::hasOnlyMoveTo): Query the result
(WebCore::PathHasOnlyMoveToTester::testPathElement): Path iterator method.
(WebCore::Path::boundingRect): Modified to check for move-to only paths
(WebCore::Path::fastBoundingRect): Modified to check for move-to only paths
(WebCore::Path::isEmpty): Now uses the method that matches other platforms.
2011-12-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101794.
http://trac.webkit.org/changeset/101794
https://bugs.webkit.org/show_bug.cgi?id=73656
Broke win build (Requested by vsevik on #webkit).
* bindings/js/ScriptCallStackFactory.cpp:
* bindings/js/ScriptCallStackFactory.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateFunctionCallback):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjInternal::customArgsAndExceptionCallback):
* bindings/v8/ScriptCallStackFactory.cpp:
* bindings/v8/ScriptCallStackFactory.h:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorInstrumentation.h:
* inspector/WorkerInspectorController.h:
* page/Console.cpp:
(WebCore::Console::shouldCaptureFullStackTrace):
* page/Console.h:
2011-12-02 Raphael Kubo da Costa <kubo@profusion.mobi>
Unreviewed, revert r101347.
https://bugs.webkit.org/show_bug.cgi?id=73580
It breaks the linking of Tools/ targets due to missing functions.
* PlatformEfl.cmake:
* platform/graphics/GraphicsLayer.cpp:
* platform/graphics/GraphicsLayer.h:
* platform/graphics/efl/GraphicsLayerEfl.cpp: Added.
(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerEfl::GraphicsLayerEfl):
(WebCore::GraphicsLayerEfl::~GraphicsLayerEfl):
(WebCore::GraphicsLayerEfl::setNeedsDisplay):
(WebCore::GraphicsLayerEfl::setNeedsDisplayInRect):
* platform/graphics/efl/GraphicsLayerEfl.h: Added.
* platform/graphics/texmap/TextureMapperNode.cpp:
(WebCore::solveCubicBezierFunction):
(WebCore::solveStepsFunction):
2011-12-01 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Extract default call stack creation and check for front-end from console.
https://bugs.webkit.org/show_bug.cgi?id=73566
Reviewed by Yury Semikhatsky.
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
* bindings/js/ScriptCallStackFactory.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateFunctionCallback):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjInternal::customArgsAndExceptionCallback):
* bindings/v8/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
* bindings/v8/ScriptCallStackFactory.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::hasFrontendForScriptContext):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::hasFrontendForScriptContext):
* inspector/WorkerInspectorController.h:
(WebCore::WorkerInspectorController::hasFrontend):
* page/Console.cpp:
* page/Console.h:
2011-12-02 Gavin Peters <gavinp@chromium.org>
Remove instrumentation tracking a fixed bug
https://bugs.webkit.org/show_bug.cgi?id=73471
The underlying bug is fixed (bug 72068), and this instrumentation was intrusive and using
memory, plus the conditional compilation made me sad.
Reviewed by Nate Chapin.
No new tests.
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::requestScript):
(WebCore::ScriptElement::stopLoadRequest):
(WebCore::ScriptElement::notifyFinished):
* dom/ScriptElement.h:
* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::queueScriptForExecution):
2011-12-02 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Split view works weirdly in network panel when resizing, showing/hiding main element.
https://bugs.webkit.org/show_bug.cgi?id=73650
Reviewed by Pavel Feldman.
* inspector/front-end/SplitView.js:
(WebInspector.SplitView.prototype._updateResizer):
(WebInspector.SplitView.prototype.hideMainElement):
(WebInspector.SplitView.prototype.showMainElement):
(WebInspector.SplitView.prototype.onResize):
(WebInspector.SplitView.prototype._restoreSidebarWidth):
2011-12-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101783.
http://trac.webkit.org/changeset/101783
https://bugs.webkit.org/show_bug.cgi?id=73652
Broke chromium win build. (Requested by vsevik on #webkit).
* WebCore.gyp/WebCore.gyp:
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main):
* WebCore.gypi:
* bindings/scripts/generate-bindings.pl:
* page/DOMWindow.idl:
* webaudio/DOMWindowWebAudio.idl: Removed.
2011-11-28 Alexander Pavlov <apavlov@chromium.org>
Inline non-replaced elements are reported to have zero width and height
https://bugs.webkit.org/show_bug.cgi?id=61117
Reviewed by Antti Koivisto.
According to http://www.w3.org/TR/CSS21/visudet.html, the "width" and "height" properties
do not apply for inline non-replaced elements and should have their initial value of "auto"
as their computed values.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2011-12-02 Sami Kyostila <skyostil@chromium.org>
[chromium] Make CCInputHandler scrolling stateful
https://bugs.webkit.org/show_bug.cgi?id=73345
This change makes the scrolling part of CCInputHandler stateful by
replacing scrollRootLayer() with scrollBegin(), scrollBy() and
scrollEnd(). This is done in preparation for scrollable sublayers.
Specifically, scrollBegin() will allow CCLayerTreeHostImpl to perform
input event hit testing to find the layer to be scrolled.
Reviewed by Steve Block.
Tested in CCLayerTreeHostImplTest.
* platform/graphics/chromium/cc/CCInputHandler.h:
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
(WebCore::CCLayerTreeHostImpl::currentTimeMs):
(WebCore::CCLayerTreeHostImpl::setNeedsRedraw):
(WebCore::findInnermostScrollableLayerAtPoint):
(WebCore::CCLayerTreeHostImpl::scrollBegin):
(WebCore::CCLayerTreeHostImpl::scrollBy):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2011-12-02 Kentaro Hara <haraken@chromium.org>
Use the [Supplemental] IDL for webaudio attributes in Chromium
https://bugs.webkit.org/show_bug.cgi?id=73394
Reviewed by Adam Barth.
- Overview: Using the [Supplemental] IDL, this patch moves the attribute
declarations of webaudio from DOMWindow.idl into a new IDL file
webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained
feature (aka a module).
- This patch changes the build flow of WebCore.gyp as follows:
Previous build flow:
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl;
generate-bindings.pl reads $idl;
generate-bindings.pl generates .h and .cpp files for $idl;
}
New build flow (See the discussions in bug 72138 for more details):
resolve-supplemental.pl depends on all IDL files;
resolve-supplemental.pl reads all IDL files;
resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
resolve-supplemental.pl outputs supplemental_dependency.tmp;
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
generate-bindings.pl reads $idl;
generate-bindings.pl reads supplemental_dependency.tmp;
generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl;
}
- This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL
will be removed after build scripts for all platforms support the [Supplemental] IDL.
The motivation for the [Supplemented] IDL is as follows:
In order to support the [Supplemental] IDL, we need to
(1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
(2) and run generate-bindings.pl with the supplemental_dependency.tmp.
This build flow requires a change on the following build scripts,
but changing all the build scripts all at once without any regression is too difficult:
- DerivedSources.make
- DerivedSources.pri
- GNUmakefile.am
- PlatformBlackBerry.cmake
- UseJSC.cmake
- UseV8.cmake
- WebCore.vcproj/MigrateScripts
- WebCore.vcproj/WebCore.vcproj
- bindings/gobject/GNUmakefile.am
- WebCore.gyp/WebCore.gyp
Thus, we are planning to change the build scripts one by one, which implies that
we need to allow the temporary state in which some build scripts support [Supplemental] IDL
but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
in another IDL file somewhere, like this:
DOMWindowWebAudio.idl:
interface [
Supplemental=DOMWindow
] DOMWindowWebAudio {
attribute attr1;
attribute attr2;
};
DOMWindow.idl:
interface [
] DOMWindow {
attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL
attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL.
attribute attr3;
attribute attr4;
};
Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:
- If a given build script supports the [Supplemental] IDL,
generate-bindings.pl ignores all attributes with the [Supplemented] IDL.
- Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
as normal attributes and instead ignores all attributes with the [Supplemental] IDL
(i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).
Tests: webaudio/*
* WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file.
* WebCore.gypi: Added DOMWindowWebAudio.idl.
* bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL.
* page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL.
* webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.
2011-12-02 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Network panel row highlighting does not work.
https://bugs.webkit.org/show_bug.cgi?id=73644
Reviewed by Pavel Feldman.
* inspector/front-end/networkLogView.css:
(.network-log-grid tr.highlighted-row):
(from):
(to):
2011-12-02 Pavel Feldman <pfeldman@google.com>
Not reviewed: remove console.timeStamp from the inspector backend dispatcher.
* inspector/front-end/InspectorBackend.js:
(InspectorBackendClass.prototype.sendMessageObjectToBackend):
2011-12-02 Hajime Morrita <morrita@chromium.org>
Unreviewed, rolling out r101751 and r101775.
http://trac.webkit.org/changeset/101751
http://trac.webkit.org/changeset/101775
https://bugs.webkit.org/show_bug.cgi?id=73191
breaks Windows build
* ForwardingHeaders/runtime/JSExportMacros.h: Removed.
* ForwardingHeaders/wtf/ExportMacros.h: Removed.
* WebCore.vcproj/QTMovieWinCommon.vsprops:
* WebCore.xcodeproj/project.pbxproj:
* config.h:
* platform/PlatformExportMacros.h: Removed.
2011-12-02 Pavel Feldman <pfeldman@google.com>
Web Inspector: introduce backend stub generation from JSON for the standalone development / remote front-ends.
https://bugs.webkit.org/show_bug.cgi?id=73636
Reviewed by Yury Semikhatsky.
* inspector/front-end/DOMStorage.js:
* inspector/front-end/Database.js:
* inspector/front-end/InspectorBackend.js:
(InspectorBackendClass):
(InspectorBackendClass.prototype.registerCommand):
(InspectorBackendClass.prototype.registerEvent):
(InspectorBackendClass.prototype.runAfterPendingDispatches):
(InspectorBackendClass.prototype.loadFromJSONIfNeeded):
* inspector/front-end/TimelineManager.js:
* inspector/front-end/inspector.js:
2011-12-02 MORITA Hajime <morrita@google.com>
Unreviewed, another attempt to build fix for r101751:
Adding an include path to make PlatformExportMacros.h visibile from QTMovieWin.
* WebCore.vcproj/QTMovieWinCommon.vsprops:
2011-12-02 Hajime Morrita <morrita@chromium.org>
Unreviewed, rolling out r101772.
http://trac.webkit.org/changeset/101772
It didn't fix the build failure
* WebCore.vcproj/QTMovieWinCommon.vsprops:
2011-12-02 MORITA Hajime <morrita@google.com>
Unreviewed attempt to build fix for r101751:
Adding an include path to make PlatformExportMacros.h visibile from QTMovieWin.
* WebCore.vcproj/QTMovieWinCommon.vsprops:
2011-12-01 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: [Extensions API] pass preferred resource line number to extension's open resource handler
https://bugs.webkit.org/show_bug.cgi?id=73084
Reviewed by Pavel Feldman.
* inspector/front-end/ExtensionAPI.js:
(injectedExtensionAPI.Panels.prototype.setOpenResourceHandler.else.callbackWrapper):
(injectedExtensionAPI.Panels.prototype.setOpenResourceHandler):
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._handleOpenURL):
* inspector/front-end/HandlerRegistry.js:
(get WebInspector.HandlerRegistry.prototype.set dispatch):
* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype.populateLineGutterContextMenu):
(WebInspector.SourceFrame.prototype.populateTextAreaContextMenu):
(WebInspector.TextViewerDelegateForSourceFrame.prototype.populateLineGutterContextMenu):
(WebInspector.TextViewerDelegateForSourceFrame.prototype.populateTextAreaContextMenu):
* inspector/front-end/TextViewer.js:
(WebInspector.TextViewer.prototype._contextMenu):
(WebInspector.TextViewerDelegate.prototype.populateLineGutterContextMenu):
(WebInspector.TextViewerDelegate.prototype.populateTextAreaContextMenu):
* inspector/front-end/externs.js:
(WebInspector.populateResourceContextMenu):
* inspector/front-end/inspector.js:
(WebInspector.populateResourceContextMenu):
(WebInspector._showAnchorLocation):
2011-12-01 Nayan Kumar K <nayankk@motorola.com>
[GTK] Add compilation options to enable/disable Accelerated Compositing and to choose texture mapper implementation.
https://bugs.webkit.org/show_bug.cgi?id=73458
Reviewed by Martin Robinson.
No new tests added as this patch doesn't affect any functionality.
* GNUmakefile.am: Guard the include files.
* GNUmakefile.list.am: Guard the compilation of few files.
* platform/graphics/GraphicsLayer.h: Guard the typedef of GraphicsLayer.
2011-12-01 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: use object properties, not element attributes to pass preferred panel/line/request id in linkified anchors
https://bugs.webkit.org/show_bug.cgi?id=73556
Reviewed by Pavel Feldman.
* inspector/front-end/AuditFormatters.js:
(WebInspector.AuditFormatters.resourceLink):
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype._formatMessage.else.else.linkifier):
(WebInspector.ConsoleMessageImpl.prototype._formatMessage):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyLocation):
(WebInspector.DebuggerPresentationModel.Linkifier.prototype._updateAnchor):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkPanel.prototype._resourceByAnchor):
(WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell):
* inspector/front-end/ResourceUtils.js:
(WebInspector.linkifyStringAsFragment):
(WebInspector.linkifyResourceAsNode):
(WebInspector.linkifyRequestAsNode):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.showAnchorLocation):
* inspector/front-end/inspector.js:
(WebInspector._showAnchorLocation):
2011-12-02 Pavel Feldman <pfeldman@google.com>
Web Inspector: refactor InspectorBackendDispatcher so that it does not use JSON-serialized command templates.
https://bugs.webkit.org/show_bug.cgi?id=73569
Reviewed by Yury Semikhatsky.
* inspector/CodeGeneratorInspector.py:
(Generator.process_command):
* inspector/Inspector.json:
* inspector/front-end/InspectorBackend.js:
(InspectorBackendClass.prototype._wrap.callback):
(InspectorBackendClass.prototype._wrap):
(InspectorBackendClass.prototype.registerCommand):
(InspectorBackendClass.prototype._invoke):
(InspectorBackendClass.prototype._sendMessageToBackend):
(InspectorBackendClass.prototype._wrapCallbackAndSendMessageObject):
2011-12-02 Yosifumi Inoue <yosin@chromium.org>
Range sliders and spin buttons don't work with multi-columns.
https://bugs.webkit.org/show_bug.cgi?id=70898
Reviewed by Dan Bernstein.
This patch makes RenderBlock::hitTestColumns and
RenderBoxModelObject::mapAbsoluteToLocal to handle point
in multi-column same logic.
In multi-column, coordinate of box model rendering object is different
from absolute coordinate.. Columns in box model rendering object spans
vertically rather than horizontally.
When absolute point is represented in (column[i]+dx, column[0]+dy),
it is (column[0]+dx, column[0] + columnHeight + dy) in box model
rendering object coordinate.
Tests: fast/events/document-elementFromPoint.html
fast/events/offsetX-offsetY.html
fast/forms/number/spin-in-multi-column.html
fast/forms/range/slider-in-multi-column.html
fast/forms/select/listbox-in-multi-column.html
* rendering/RenderBlock.cpp:
(WebCore::ColumnRectIterator::ColumnRectIterator): Added
(WebCore::ColumnRectIterator::advance): Added
(WebCore::ColumnRectIterator::columnRect): Added
(WebCore::ColumnRectIterator::hasMore): Added
(WebCore::ColumnRectIterator::adjust): Added
(WebCore::ColumnRectIterator::update): Added
(WebCore::RenderBlock::hitTestColumns): Use ColumnRectIterator.
(WebCore::RenderBlock::adjustForColumnRect): Added
* rendering/RenderBlock.h: Add adjustForColumnRect.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapAbsoluteToLocalPoint): Call RenderBoxModelObject::mapAbsoluteToLocalPoint.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint): Move from RenderInline::mapAbsoluteToLocalPoint and call RenderBlock::adjustForColumnRect.
* rendering/RenderBoxModelObject.h: add mapAbsoluteToLocalPoint.
* rendering/RenderInline.cpp: Move mapAbsoluteToLocalPoint to RenderBoxModelObject.
* rendering/RenderInline.h: remove mapAbsoluteToLocalPoint.
2011-12-02 Pavel Feldman <pfeldman@google.com>
InspectorController destruction order leads to use-after-free
https://bugs.webkit.org/show_bug.cgi?id=73582
Reviewed by Yury Semikhatsky.
* inspector/InspectorBaseAgent.h:
(WebCore::InspectorBaseAgentInterface::discardAgent):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::~InspectorCSSAgent):
(WebCore::InspectorCSSAgent::discardAgent):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::~InspectorController):
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::~InspectorDOMDebuggerAgent):
(WebCore::InspectorDOMDebuggerAgent::discardAgent):
* inspector/InspectorDOMDebuggerAgent.h:
2011-12-02 Leo Yang <leo.yang@torchmobile.com.cn>
image element with src attribute can't be replaced by content: url() style
https://bugs.webkit.org/show_bug.cgi?id=42840
ImageLoader were updating renderer even if the renderer's image is
style generated content. This was wrong because if an image element
with src attribute and style="content: url(...)" attribute the
src image might override content image. The correct behavior should
be showing content image.
This patch is differentiating style generated RenderImage from the
normal RenderImage and keeps the RenderImageSource untouched if the
renderer is generated content.
Reviewed by Darin Adler.
Test: fast/images/image-css3-content-data.html
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::renderImageResource):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::RenderImage):
* rendering/RenderImage.h:
(WebCore::RenderImage::setIsGeneratedContent):
(WebCore::RenderImage::isGeneratedContent):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
2011-12-01 David Levin <levin@chromium.org>
Add a way to automatically size a single frame to fit its content.
https://bugs.webkit.org/show_bug.cgi?id=73420
Reviewed by Dmitry Titov.
No new functionality exposed so no new tests. (There is a Chromium
specific test in https://bugs.webkit.org/show_bug.cgi?id=73058.)
* page/FrameView.cpp:
(WebCore::FrameView::FrameView): Initialized the new variables.
(WebCore::FrameView::layout):
(WebCore::FrameView::autoSizeIfEnabled):
(WebCore::FrameView::enableAutoSizeMode):
* page/FrameView.h:
2011-12-01 Hajime Morrita <morrita@chromium.org>
JS_INLINE and WTF_INLINE should be visible from WebCore
https://bugs.webkit.org/show_bug.cgi?id=73191
Reviewed by Kevin Ollivier.
- Moved export related definitions from config.h
to ExportMacros.h, JSExportMacros.h and PlatformExportMacros.h
- Added forwarding headers which are referred from config.h
No new tests. Only build related changes.
* ForwardingHeaders/runtime/JSExportMacros.h: Added.
* ForwardingHeaders/wtf/ExportMacros.h: Added.
* WebCore.xcodeproj/project.pbxproj:
* config.h:
* platform/PlatformExportMacros.h: Copied from Source/JavaScriptCore/wtf/ExportMacros.h.
2011-12-01 Jon Lee <jonlee@apple.com>
[WK2] Add further support for notifications
https://bugs.webkit.org/show_bug.cgi?id=73572
<rdar://problem/10472195>
Reviewed by Darin Adler.
* WebCore.exp.in: Export constructor and dispatch functions
* dom/EventNames.h: Add show event.
* notifications/Notification.cpp:
(WebCore::Notification::show): For the Mac platform, we just forward the show() call to the
notification client and update the state, because we cannot get synchronous acknowledgment that the
notification got delivered.
(WebCore::Notification::dispatchShowEvent): Create simple events and dispatch to the notification.
(WebCore::Notification::dispatchClickEvent): Ditto.
(WebCore::Notification::dispatchCloseEvent): Ditto.
(WebCore::Notification::dispatchErrorEvent): Ditto.
* notifications/Notification.h: Add dispatch functions.
* notifications/Notification.idl: Add onshow event listener. The ondisplay event listener should be
removed when implementations change the event listener to onshow.
2011-12-01 Max Vujovic <mvujovic@adobe.com>
Focus ring of imagemap's area element does not scale when CSS zoom style is applied
https://bugs.webkit.org/show_bug.cgi?id=73595
Reviewed by Darin Adler.
Tests: fast/images/imagemap-focus-ring-zoom-style-expected.html
fast/images/imagemap-focus-ring-zoom-style.html
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::computePath):
The computePath method now uses the RenderObject's effectiveZoom
instead of the Frame's page zoom to compute the path for the area
element's focus ring.
2011-12-01 Kent Tamura <tkent@chromium.org>
REGRESSION(r90971): Placeholder text of input control is rendered
over positioned elements with z-index:0.
https://bugs.webkit.org/show_bug.cgi?id=67408
Reviewed by Darin Adler.
The bug was caused by "position:relative" in the default style of
-webkit-input-placeholder. If there were other positioned elements
with z-index:0, a placeholder might be rendered over them.
"position:relative" is not needed because RenderTextControlSingleLine
and RenderTextControlMultipleLine lay out the placeholder renderer by
custom layout code.
Tests: fast/forms/placeholder-with-positioned-element.html
* css/html.css:
(::-webkit-input-placeholder): Remove position:relative.
2011-12-01 Andreas Kling <kling@webkit.org>
CSSMutableStyleDeclaration: Removed unused multiLength argument in setLengthProperty().
<http://webkit.org/b/73602>
Reviewed by Darin Adler.
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::setLengthProperty):
* css/CSSMutableStyleDeclaration.h:
2011-12-01 Kentaro Hara <haraken@chromium.org>
Unreviewed, rolling out r101737.
http://trac.webkit.org/changeset/101737
https://bugs.webkit.org/show_bug.cgi?id=73394
Chromium/Mac and Chromium/Win build are broken
* WebCore.gyp/WebCore.gyp:
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main):
* WebCore.gypi:
* bindings/scripts/generate-bindings.pl:
* page/DOMWindow.idl:
* webaudio/DOMWindowWebAudio.idl: Removed.
2011-12-01 Kentaro Hara <haraken@chromium.org>
Use the [Supplemental] IDL for webaudio attributes in Chromium
https://bugs.webkit.org/show_bug.cgi?id=73394
Reviewed by Adam Barth.
- Overview: Using the [Supplemental] IDL, this patch moves the attribute
declarations of webaudio from DOMWindow.idl into a new IDL file
webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained
feature (aka a module).
- This patch changes the build flow of WebCore.gyp as follows:
Previous build flow:
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl;
generate-bindings.pl reads $idl;
generate-bindings.pl generates .h and .cpp files for $idl;
}
New build flow (See the discussions in bug 72138 for more details):
resolve-supplemental.pl depends on all IDL files;
resolve-supplemental.pl reads all IDL files;
resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
resolve-supplemental.pl outputs supplemental_dependency.tmp;
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
generate-bindings.pl reads $idl;
generate-bindings.pl reads supplemental_dependency.tmp;
generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl;
}
- This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL
will be removed after build scripts for all platforms support the [Supplemental] IDL.
The motivation for the [Supplemented] IDL is as follows:
In order to support the [Supplemental] IDL, we need to
(1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
(2) and run generate-bindings.pl with the supplemental_dependency.tmp.
This build flow requires a change on the following build scripts,
but changing all the build scripts all at once without any regression is too difficult:
- DerivedSources.make
- DerivedSources.pri
- GNUmakefile.am
- PlatformBlackBerry.cmake
- UseJSC.cmake
- UseV8.cmake
- WebCore.vcproj/MigrateScripts
- WebCore.vcproj/WebCore.vcproj
- bindings/gobject/GNUmakefile.am
- WebCore.gyp/WebCore.gyp
Thus, we are planning to change the build scripts one by one, which implies that
we need to allow the temporary state in which some build scripts support [Supplemental] IDL
but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
in another IDL file somewhere, like this:
DOMWindowWebAudio.idl:
interface [
Supplemental=DOMWindow
] DOMWindowWebAudio {
attribute attr1;
attribute attr2;
};
DOMWindow.idl:
interface [
] DOMWindow {
attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL
attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL.
attribute attr3;
attribute attr4;
};
Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:
- If a given build script supports the [Supplemental] IDL,
generate-bindings.pl ignores all attributes with the [Supplemented] IDL.
- Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
as normal attributes and instead ignores all attributes with the [Supplemental] IDL
(i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).
Tests: webaudio/*
* WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file.
* WebCore.gypi: Added DOMWindowWebAudio.idl.
* bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL.
* page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL.
* webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.
2011-12-01 Rafael Weinstein <rafaelw@chromium.org>
[MutationObservers] StyleAttributeMutationScope shouldn't be implemented with static classes
https://bugs.webkit.org/show_bug.cgi?id=73596
Reviewed by Ojan Vafai.
No tests needed. This patch is a minor refactor.
* css/CSSMutableStyleDeclaration.cpp:
2011-12-01 Andreas Kling <kling@webkit.org>
CSSMutableStyleDeclaration: Remove unused function setStringProperty().
<http://webkit.org/b/73597>
Reviewed by Darin Adler.
* css/CSSMutableStyleDeclaration.cpp:
* css/CSSMutableStyleDeclaration.h:
2011-12-01 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r101268): Intermittent assertion failure in fast/block/child-not-removed-from-parent-lineboxes-crash.html
https://bugs.webkit.org/show_bug.cgi?id=73250
Reviewed by Darin Adler.
Reset the position when exiting early in layoutRunsAndFloatsInRange.
No new tests because we don't have a reliable reproduction for this failure.
However, the failure is caught by the existing fast/block/child-not-removed-from-parent-lineboxes-crash.html
intermittently with about 30% probability.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
2011-12-01 Shinya Kawanaka <shinyak@google.com>
Asynchronous SpellChecker should consider multiple requests.
https://bugs.webkit.org/show_bug.cgi?id=72939
Reviewed by Hajime Morita.
Now SpellChecker saves a request when it is processing the previous spellcheck request.
If there is a request having the same root editable element, the older request is replaced by newer request.
Test: editing/spelling/spellcheck-queue.html
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::SpellCheckRequest::SpellCheckRequest):
A structure to have spell check request.
(WebCore::SpellChecker::SpellCheckRequest::sequence):
(WebCore::SpellChecker::SpellCheckRequest::range):
(WebCore::SpellChecker::SpellCheckRequest::text):
(WebCore::SpellChecker::SpellCheckRequest::mask):
(WebCore::SpellChecker::SpellCheckRequest::rootEditableElement):
(WebCore::SpellChecker::SpellChecker):
(WebCore::SpellChecker::createRequest):
(WebCore::SpellChecker::timerFiredToProcessQueuedRequest):
When timer is fired, queued request is processed if any.
(WebCore::SpellChecker::canCheckAsynchronously):
(WebCore::SpellChecker::requestCheckingFor):
When the spellchecker is processing another request, the latest request is queued.
(WebCore::SpellChecker::invokeRequest):
(WebCore::SpellChecker::enqueueRequest):
Enqueues a request. If there is an older request whose root editable element is the same as the request,
it will be replaced.
(WebCore::SpellChecker::didCheck):
* editing/SpellChecker.h:
2011-12-01 Takashi Toyoshima <toyoshim@chromium.org>
bufferedAmount calculation is wrong in CLOSING and CLOSED state.
https://bugs.webkit.org/show_bug.cgi?id=73404
Reviewed by Kent Tamura.
WebSocket::bufferedAmount() must return buffered frame size including
disposed frames which are passed via send() calls after close().
Old implementation had a problem at CLOSING state. Buffered frame size
was added to m_bufferedAmountAfterClose at close(). But the function
returns the sum of m_bufferedAmountAfterClose and internally buffered
frame size, or m_channel->bufferedAmount(). So, buffered frames was
double counted.
In new implementation, m_bufferedAmount always represents buffered
frame size and m_bufferedAmountAfterClose does disposed frame size.
As a result, bufferedAmount() implementation become just to return the
sum of m_bufferedAmount and m_bufferedAmountAfterClose.
Test: http/tests/websocket/tests/hybi/bufferedAmount-after-close-in-busy.html
* websockets/WebSocket.cpp: Implement new bufferedAmount handling.
(WebCore::saturateAdd):
(WebCore::WebSocket::WebSocket):
(WebCore::WebSocket::send):
(WebCore::WebSocket::close):
(WebCore::WebSocket::bufferedAmount):
(WebCore::WebSocket::didUpdateBufferedAmount):
(WebCore::WebSocket::didClose):
* websockets/WebSocket.h:
2011-12-01 Kentaro Hara <haraken@chromium.org>
Replace a custom constructor of window.Option with the [NamedConstructor] IDL
https://bugs.webkit.org/show_bug.cgi?id=73498
Reviewed by Adam Barth.
Removes JSOptionConstructor.{h,cpp} and generates the constructor of window.Option
by the [NamedConstructor] IDL.
Tests: fast/js/custom-constructors.html
fast/forms/option-index.html
fast/forms/add-and-remove-option.html
fast/dom/dom-add-optionelement.html
* GNUmakefile.list.am: Removed JSOptionConstructor.{h,cpp}.
* Target.pri: Ditto.
* UseJSC.cmake: Ditto.
* WebCore.gypi: Ditto.
* WebCore.order: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSBindingsAllInOne.cpp: Ditto.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::option): Specifies the NamedConstructor.
* bindings/js/JSOptionConstructor.cpp: Removed.
* bindings/js/JSOptionConstructor.h: Removed.
* page/DOMWindow.idl: Removed the [JSCustomConstructor] IDL.
2011-12-01 Kentaro Hara <haraken@chromium.org>
Replace a custom constructor of window.Audio with the [NamedConstructor] IDL
https://bugs.webkit.org/show_bug.cgi?id=73496
Reviewed by Adam Barth.
Removes JSAudioConstructor.{h,cpp} and generates the constructor of window.Audio
by the [NamedConstructor] IDL.
Tests: fast/js/custom-constructors.html
media/audio-constructor.html
media/audio-constructor-src.html
media/audio-constructor-preload.html
media/audio-controls-do-not-fade-out.html
media/audio-controls-rendering.html
* GNUmakefile.list.am: Removed JSAudioConstructor.{h,cpp}.
* Target.pri: Ditto.
* UseJSC.cmake: Ditto.
* WebCore.gypi: Ditto.
* WebCore.order: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSBindingsAllInOne.cpp: Ditto.
* bindings/js/JSAudioConstructor.cpp: Removed.
* bindings/js/JSAudioConstructor.h: Removed.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::audio): Specifies the NamedConstructor.
* page/DOMWindow.idl: Removed the [JSCustomConstructor] IDL.
2011-12-01 Mark Pilgrim <pilgrim@chromium.org>
[FileSystem API] DirectoryEntry.removeRecursively successCallback is required
https://bugs.webkit.org/show_bug.cgi?id=69644
Reviewed by Adam Barth.
* fileapi/DirectoryEntry.idl: remove [Optional] flag from successCallback
2011-12-01 Mark Pilgrim <pilgrim@chromium.org>
[FileSystem API] DirectoryEntry.getDirectory path argument is required
https://bugs.webkit.org/show_bug.cgi?id=69643
Reviewed by Adam Barth.
Test: fast/filesystem/simple-required-arguments-getdirectory.html
* bindings/js/JSDirectoryEntryCustom.cpp:
(WebCore::JSDirectoryEntry::getDirectory): throw TypeError if not enough arguments
* bindings/v8/custom/V8DirectoryEntryCustom.cpp:
(WebCore::V8DirectoryEntry::getDirectoryCallback): throw TypeError if not enough arguments
2011-12-01 Rafael Weinstein <rafaelw@chromium.org>
V8 bindings cleanup: V8WindowErrorHandler shouldn't be directly invoking script
https://bugs.webkit.org/show_bug.cgi?id=73576
Reviewed by Adam Barth.
No tests needed. This patch is just bindings hygiene.
* bindings/v8/V8WindowErrorHandler.cpp:
(WebCore::V8WindowErrorHandler::callListenerFunction):
2011-12-01 Benjamin Poulain <benjamin@webkit.org>
URLs are encoded in UTF-8, then decoded as if they are Latin1
https://bugs.webkit.org/show_bug.cgi?id=71758
Reviewed by Darin Adler.
Previously, invalid URLs could have a string emanating from a
partial parsing of the input. The creation of the string was done
through the Latin1 codec regardless of the encoding of the char* url.
This caused two types of issues, URLs were evaluated as half-parsed,
and the coding and decoding of the string was not consistent.
This patch changes KURL::parse() to fallback on the original string
whenever the parsing of the URL fails.
Test: fast/url/invalid-urls-utf8.html
* platform/KURL.cpp:
(WebCore::KURL::KURL):
(WebCore::KURL::init):
(WebCore::KURL::parse):
Previously, originalString was only used as an optimization to avoid
the allocation of a string. Since this optimization depends on the
comparison of the incoming string and the encoded buffer.
This patches generalizes originalString to always be the original string
being parsed by KURL. The optimization is kept by comparing that string
and the final parsed result.
* platform/KURL.h:
(WebCore::KURL::parse):
* platform/cf/KURLCFNet.cpp:
(WebCore::KURL::KURL):
* platform/mac/KURLMac.mm:
(WebCore::KURL::KURL):
2011-12-01 Martin Robinson <mrobinson@igalia.com>
[GTK] Add a helper function to find the current executable's path
https://bugs.webkit.org/show_bug.cgi?id=73473
Reviewed by Gustavo Noronha Silva.
No new tests. This should not change behavior.
* platform/gtk/FileSystemGtk.cpp:
(WebCore::applicationDirectoryPath): Now use the new WTF function to get the
current executable's path.
2011-12-01 Andreas Kling <kling@webkit.org>
StyledElement: Clean up inline style accessors.
<http://webkit.org/b/73568>
Reviewed by Antti Koivisto.
Renamed StyledElement's getInlineStyleDecl() to ensureInlineStyleDecl() to
make it clear that it will always return non-null as opposed to inlineStyleDecl().
Also updated call sites to store the return value in a CSSInlineStyleDeclaration*
rather than a CSSMutableStyleDeclaration*, and reduced scoping of temporaries
in some cases.
* dom/StyledElement.cpp:
(WebCore::StyledElement::createInlineStyleDecl):
(WebCore::StyledElement::destroyInlineStyleDecl):
(WebCore::StyledElement::parseMappedAttribute):
(WebCore::StyledElement::ensureInlineStyleDecl):
(WebCore::StyledElement::style):
(WebCore::StyledElement::copyNonAttributeProperties):
(WebCore::StyledElement::addSubresourceAttributeURLs):
* dom/StyledElement.h:
(WebCore::StyledElement::inlineStyleDecl):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
(WebCore::ApplyStyleCommand::addBlockStyle):
(WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI):
(WebCore::DeleteButtonController::show):
(WebCore::DeleteButtonController::hide):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
(WebCore::ReplaceSelectionCommand::handleStyleSpans):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
* html/ValidationMessage.cpp:
(WebCore::adjustBubblePosition):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlElement::show):
(WebCore::MediaControlElement::hide):
(WebCore::MediaControlPanelElement::setPosition):
(WebCore::MediaControlPanelElement::resetPosition):
(WebCore::MediaControlPanelElement::makeOpaque):
(WebCore::MediaControlPanelElement::makeTransparent):
(WebCore::MediaControlInputElement::show):
(WebCore::MediaControlInputElement::hide):
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterValueElement::setWidthPercentage):
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressValueElement::setWidthPercentage):
* html/shadow/SliderThumbElement.cpp:
(WebCore::TrackLimiterElement::create):
2011-12-01 Kelly Norton <knorton@google.com>
More void functions eager to return values in RenderObject & WebFrameImpl
https://bugs.webkit.org/show_bug.cgi?id=73571
Reviewed by Adam Barth.
* rendering/RenderObject.h:
(WebCore::RenderObject::computeAbsoluteRepaintRect):
2011-12-01 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101691.
http://trac.webkit.org/changeset/101691
https://bugs.webkit.org/show_bug.cgi?id=73588
Tests fail on Chromium bots, early warning system warned
committer, please adjust test_expectations in patch (Requested
by scheib on #webkit).
* platform/KURL.cpp:
(WebCore::KURL::KURL):
(WebCore::KURL::init):
(WebCore::KURL::parse):
* platform/KURL.h:
* platform/cf/KURLCFNet.cpp:
(WebCore::KURL::KURL):
* platform/mac/KURLMac.mm:
(WebCore::KURL::KURL):
2011-12-01 Peter Beverloo <peter@chromium.org>
[Chromium] Add the FontCache implementation for Android
https://bugs.webkit.org/show_bug.cgi?id=73452
Add the FontCache implementation specific for the Chromium WebKit
port on Android, and include various font-related files intended for
Linux which can be re-used.
Reviewed by Adam Barth.
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* platform/graphics/chromium/FontCacheAndroid.cpp: Added.
(WebCore::getFallbackFontName):
(WebCore::isFallbackFamily):
(WebCore::FontCache::platformInit):
(WebCore::FontCache::getFontDataForCharacters):
(WebCore::FontCache::getSimilarFontPlatformData):
(WebCore::FontCache::getLastResortFallbackFont):
(WebCore::FontCache::getTraitsInFamily):
(WebCore::FontCache::createFontPlatformData):
2011-12-01 Tony Chang <tony@chromium.org>
Need to implement flex-flow: row-reverse
https://bugs.webkit.org/show_bug.cgi?id=70778
Reviewed by Ojan Vafai.
We can't just change the direction of the FlexOrderIterator because we want the overflow to be
on the left side. Instead, we apply similar logic as when we're laying out RTL content. Putting
the check in isLeftToRightFlow() lets us flip the flexbox's border and padding and the flexitems'
margins. We then layout from right to left in layoutAndPlaceChildren.
Also remove 2 uncalled functions.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::isReverseFlow):
(WebCore::RenderFlexibleBox::isLeftToRightFlow):
* rendering/RenderFlexibleBox.h:
2011-12-01 Daniel Sievers <sievers@chromium.org>
[Chromium] Early returns in calculateDrawTransformsAndVisibilityInternal() are not respected by parent.
https://bugs.webkit.org/show_bug.cgi?id=73270
Non-drawing child trees should not be added to the parent render surface's layer list
and should neither extend the parent layer's drawable content rect.
This also fixes assertions from the content texture residency logic, which doesn't like it
if we try to use a render surface through a parent, while that surface itself was never 'used'
in the same frame.
Reviewed by James Robinson.
Added unit test.
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::calculateDrawTransformsAndVisibilityInternal):
2011-12-01 David Reveman <reveman@chromium.org>
[Chromium] Use contentBounds instead of bounds for invalidation.
https://bugs.webkit.org/show_bug.cgi?id=73525
Reviewed by James Robinson.
Use setNeedsDisplay() instead of setNeedsDisplayRect() when possible.
No new tests.
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setBounds):
2011-12-01 Andreas Kling <kling@webkit.org>
CSSStyleSelector: Add missing fields to constructor initializer list.
<http://webkit.org/b/73565>
Reviewed by Antti Koivisto.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::CSSStyleSelector):
2011-12-01 Benjamin Poulain <bpoulain@apple.com>
Get rid of the unused function nameForCursorType()
https://bugs.webkit.org/show_bug.cgi?id=73529
Reviewed by Joseph Pecoraro.
The function nameForCursorType was introduced in r63339 and has not been used anywhere
since that commit.
* WebCore.exp.in:
* platform/Cursor.cpp:
* platform/Cursor.h:
2011-12-01 Andreas Kling <kling@webkit.org>
CSSMutableStyleDeclaration: Unnecessary double hash lookup in construction.
<http://webkit.org/b/73564>
Reviewed by Antti Koivisto.
Use HashMap::find() instead of contains() followed by get() on
successful lookup.
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
2011-11-30 Benjamin Poulain <benjamin@webkit.org>
URLs are encoded in UTF-8, then decoded as if they are Latin1
https://bugs.webkit.org/show_bug.cgi?id=71758
Reviewed by Darin Adler.
Previously, invalid URLs could have a string emanating from a
partial parsing of the input. The creation of the string was done
through the Latin1 codec regardless of the encoding of the char* url.
This caused two types of issues, URLs were evaluated as half-parsed,
and the coding and decoding of the string was not consistent.
This patch changes KURL::parse() to fallback on the original string
whenever the parsing of the URL fails.
Test: fast/url/invalid-urls-utf8.html
* platform/KURL.cpp:
(WebCore::KURL::KURL):
(WebCore::KURL::init):
(WebCore::KURL::parse):
Previously, originalString was only used as an optimization to avoid
the allocation of a string. Since this optimization depends on the
comparison of the incoming string and the encoded buffer.
This patches generalizes originalString to always be the original string
being parsed by KURL. The optimization is kept by comparing that string
and the final parsed result.
* platform/KURL.h:
(WebCore::KURL::parse):
* platform/cf/KURLCFNet.cpp:
(WebCore::KURL::KURL):
* platform/mac/KURLMac.mm:
(WebCore::KURL::KURL):
2011-12-01 Wei Charles <charles.wei@torchmobile.com.cn>
[Blackberry] Upstream BlackBerry porting of plugin framework -- part 2
https://bugs.webkit.org/show_bug.cgi?id=73513
Reviewed by Antonio Gomes.
No new tests for now.
* plugins/blackberry/NPCallbacksBlackBerry.cpp: Added.
* plugins/blackberry/NPCallbacksBlackBerry.h: Added.
* plugins/blackberry/PluginViewPrivateBlackBerry.cpp: Added.
* plugins/blackberry/PluginViewPrivateBlackBerry.h: Added.
2011-12-01 Andreas Kling <kling@webkit.org>
JSC/CSSOM: root(CSSElementStyleDeclaration) should never need to follow the element.
<http://webkit.org/b/73561>
Reviewed by Antti Koivisto.
A CSSElementStyleDeclaration should always either have a null element pointer,
or return a valid parentStyleSheet(), since having an element pointer implies
having an associated element sheet.
In light of this, replace the opaque-root-from-element path for style declarations
by an assertion.
* bindings/js/JSDOMBinding.h:
(WebCore::root):
2011-12-01 Patrick Gansterer <paroga@webkit.org>
[CMake] Make the feature defines for DOM names explicit
https://bugs.webkit.org/show_bug.cgi?id=72812
Reviewed by Daniel Bates.
* CMakeLists.txt:
2011-11-30 Dmitry Lomov <dslomov@google.com>
https://bugs.webkit.org/show_bug.cgi?id=73503
[Chromium][V8] Implement ArrayBuffer transfer in chromium.
Portions of this patch come from Luke Zarko.
Reviewed by David Levin.
Test: fast/canvas/webgl/arraybuffer-transfer-of-control.html
* bindings/v8/SerializedScriptValue.cpp:
(WebCore::V8ObjectMap::Writer::writeTransferredArrayBuffer):
(WebCore::V8ObjectMap::Serializer::Serializer):
(WebCore::V8ObjectMap::Serializer::writeAndGreyArrayBufferView):
(WebCore::V8ObjectMap::Serializer::writeArrayBuffer):
(WebCore::V8ObjectMap::Serializer::writeTransferredArrayBuffer):
(WebCore::V8ObjectMap::Serializer::doSerialize):
(WebCore::V8ObjectMap::Reader::read):
(WebCore::V8ObjectMap::Reader::readArrayBufferView):
(WebCore::V8ObjectMap::Deserializer::Deserializer):
(WebCore::V8ObjectMap::Deserializer::tryGetTransferredArrayBuffer):
(WebCore::SerializedScriptValue::create):
(WebCore::neuterBinding):
(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::deserialize):
* bindings/v8/SerializedScriptValue.h:
2011-12-01 Roland Steiner <rolandsteiner@chromium.org>
Shadow ID pseudo-element selectors serialize incorrectly
https://bugs.webkit.org/show_bug.cgi?id=73542
Avoid space for ShadowDescendant combinator.
Reviewed by Dimitri Glazkov.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
2011-12-01 Wajahat Siddiqui <mdwajahatali.siddiqui@motorola.com>
Popup menu can get stuck in closed state when GtkMenu can't grab mouse.
https://bugs.webkit.org/show_bug.cgi?id=56466
Add a check if popup menu is not visible due to no mouse grab,
Ensure WebCore is in sync with proper state.
Reviewed by Martin Robinson.
* platform/gtk/PopupMenuGtk.cpp:
(WebCore::PopupMenuGtk::show):
2011-12-01 Eric Carlson <eric.carlson@apple.com>
When playing audio in <video>, the poster is hidden on play
https://bugs.webkit.org/show_bug.cgi?id=73405
Reviewed by Darin Adler.
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::hasAvailableVideoFrame): Don't return true if the file
doesn't have video.
2011-12-01 Eric Carlson <eric.carlson@apple.com>
Add Settings for text track types
https://bugs.webkit.org/show_bug.cgi?id=73383
Reviewed by Darin Adler.
No new tests, settings are not used yet.
* page/Settings.cpp:
(WebCore::Settings::Settings): Initialize new settings.
* page/Settings.h:
(WebCore::Settings::setShouldDisplaySubtitles): New.
(WebCore::Settings::shouldDisplaySubtitles): Ditto.
(WebCore::Settings::setShouldDisplayCaptions): Ditto.
(WebCore::Settings::shouldDisplayCaptions): Ditto.
(WebCore::Settings::setShouldDisplayTextDescriptions): Ditto.
(WebCore::Settings::shouldDisplayTextDescriptions): Ditto.
2011-12-01 Eric Carlson <eric.carlson@apple.com>
HTMLTrackElement.readyState should return TextTrack "readiness state".
https://bugs.webkit.org/show_bug.cgi?id=73466
Reviewed by Darin Adler.
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::HTMLTrackElement): Don't initialize m_readyState.
(WebCore::HTMLTrackElement::setReadyState): Return the TextTrack state.
(WebCore::HTMLTrackElement::readyState): Set the TextTrack state.
* html/HTMLTrackElement.h: Remove m_readyState.
* html/TextTrack.cpp:
(WebCore::TextTrack::TextTrack): Initialize m_readinessState.
* html/TextTrack.h:
(WebCore::TextTrack::readinessState): New.
(WebCore::TextTrack::setReadinessState): New.
2011-12-01 Kentaro Hara <haraken@chromium.org>
Unreviewed, rolling out r101669.
http://trac.webkit.org/changeset/101669
https://bugs.webkit.org/show_bug.cgi?id=73394
Win build and Mac build are failing
* WebCore.gyp/WebCore.gyp:
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main):
* WebCore.gypi:
* bindings/scripts/generate-bindings.pl:
* page/DOMWindow.idl:
* webaudio/DOMWindowWebAudio.idl: Removed.
2011-12-01 Pavel Feldman <pfeldman@google.com>
Web Inspector: further align front-end configurations: get rid of saveAsAvailable preference, inline drag glass pane.
https://bugs.webkit.org/show_bug.cgi?id=73555
Reviewed by Yury Semikhatsky.
* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendClientLocal.h:
(WebCore::InspectorFrontendClientLocal::canSaveAs):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::canSaveAs):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype.hasExtensions):
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.canSaveAs):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._contextMenu):
* inspector/front-end/ResourcesPanel.js:
* inspector/front-end/Settings.js:
* inspector/front-end/SettingsScreen.js:
(WebInspector.SettingsScreen):
* inspector/front-end/StylesSidebarPane.js:
* inspector/front-end/UIUtils.js:
(WebInspector.elementDragStart):
(WebInspector.elementDragEnd):
2011-12-01 Pavel Feldman <pfeldman@google.com>
Web Inspector: extract static part of the InspectorBackend from the generator.
https://bugs.webkit.org/show_bug.cgi?id=73562
Reviewed by Timothy Hatcher.
We should only generate the mapping between the command parameters and slots,
rest of the backend is static.
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/CodeGeneratorInspector.py:
(Generator.go):
(Generator.process_event):
(Generator.process_command):
* inspector/compile-front-end.sh:
* inspector/front-end/InspectorBackend.js: Added.
(InspectorBackendClass):
(InspectorBackendClass.prototype.registerCommand):
(InspectorBackendClass.prototype.registerEvent):
(InspectorBackendClass.prototype._invoke):
(InspectorBackendClass.prototype._sendMessageToBackend):
(InspectorBackendClass.prototype._wrapCallbackAndSendMessageObject):
(InspectorBackendClass.prototype.sendMessageObjectToBackend):
(InspectorBackendClass.prototype.registerDomainDispatcher):
(InspectorBackendClass.prototype.dispatch.messageObject.error.__proto__.getDescription):
(InspectorBackendClass.prototype.dispatch.messageObject.error.__proto__.toString):
(InspectorBackendClass.prototype.dispatch.messageObject.error.__proto__.getMessage):
(InspectorBackendClass.prototype.dispatch):
(InspectorBackendClass.prototype.reportProtocolError):
(InspectorBackendClass.prototype.runAfterPendingDispatches):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
2011-12-01 Kentaro Hara <haraken@chromium.org>
Use the [Supplemental] IDL for webaudio attributes in Chromium
https://bugs.webkit.org/show_bug.cgi?id=73394
Reviewed by Adam Barth.
- Overview: Using the [Supplemental] IDL, this patch moves the attribute
declarations of webaudio from DOMWindow.idl into a new IDL file
webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained
feature (aka a module).
- This patch changes the build flow of WebCore.gyp as follows:
Previous build flow:
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl;
generate-bindings.pl reads $idl;
generate-bindings.pl generates .h and .cpp files for $idl;
}
New build flow (See the discussions in bug 72138 for more details):
resolve-supplemental.pl depends on all IDL files;
resolve-supplemental.pl reads all IDL files;
resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
resolve-supplemental.pl outputs supplemental_dependency.tmp;
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
generate-bindings.pl reads $idl;
generate-bindings.pl reads supplemental_dependency.tmp;
generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl;
}
- This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL
will be removed after build scripts for all platforms support the [Supplemental] IDL.
The motivation for the [Supplemented] IDL is as follows:
In order to support the [Supplemental] IDL, we need to
(1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
(2) and run generate-bindings.pl with the supplemental_dependency.tmp.
This build flow requires a change on the following build scripts,
but changing all the build scripts all at once without any regression is too difficult:
- DerivedSources.make
- DerivedSources.pri
- GNUmakefile.am
- PlatformBlackBerry.cmake
- UseJSC.cmake
- UseV8.cmake
- WebCore.vcproj/MigrateScripts
- WebCore.vcproj/WebCore.vcproj
- bindings/gobject/GNUmakefile.am
- WebCore.gyp/WebCore.gyp
Thus, we are planning to change the build scripts one by one, which implies that
we need to allow the temporary state in which some build scripts support [Supplemental] IDL
but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
in another IDL file somewhere, like this:
DOMWindowWebAudio.idl:
interface [
Supplemental=DOMWindow
] DOMWindowWebAudio {
attribute attr1;
attribute attr2;
};
DOMWindow.idl:
interface [
] DOMWindow {
attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL
attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL.
attribute attr3;
attribute attr4;
};
Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:
- If a given build script supports the [Supplemental] IDL,
generate-bindings.pl ignores all attributes with the [Supplemented] IDL.
- Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
as normal attributes and instead ignores all attributes with the [Supplemental] IDL
(i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).
Tests: webaudio/*
* WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file.
* WebCore.gypi: Added DOMWindowWebAudio.idl.
* bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL.
* page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL.
* webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.
2011-12-01 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
Upstream credential storage files of BlackBerry porting
https://bugs.webkit.org/show_bug.cgi?id=73280
Reviewed by Rob Buis.
Added the basic structure of class CredentialBackingStore
to persist the credential data, and generated
platform/network/blackberry/CredentialStorageBlackBerry.cpp,
to implement CredentialStorage::getFromPersistentStorage
for BlackBerry porting.
Contributed by Torch Team.
* platform/network/blackberry/CredentialBackingStore.cpp: Added.
(WebCore::CredentialBackingStore::instance):
(WebCore::CredentialBackingStore::CredentialBackingStore):
(WebCore::CredentialBackingStore::~CredentialBackingStore):
(WebCore::CredentialBackingStore::open):
(WebCore::CredentialBackingStore::close):
(WebCore::CredentialBackingStore::addLogin):
(WebCore::CredentialBackingStore::updateLogin):
(WebCore::CredentialBackingStore::hasLogin):
(WebCore::CredentialBackingStore::getLogin):
(WebCore::CredentialBackingStore::removeLogin):
(WebCore::CredentialBackingStore::clear):
(WebCore::CredentialBackingStore::encryptedString):
(WebCore::CredentialBackingStore::decryptedString):
* platform/network/blackberry/CredentialBackingStore.h: Added.
* platform/network/blackberry/CredentialStorageBlackBerry.cpp: Added.
(WebCore::CredentialStorage::getFromPersistentStorage):
2011-11-30 Andreas Kling <kling@webkit.org>
StyledElement: Tidy up copyNonAttributeProperties().
<http://webkit.org/b/73501>
Reviewed by Antti Koivisto.
* css/CSSStyleDeclaration.h:
Made CSSStyleDeclaration non-copyable.
* css/CSSMutableStyleDeclaration.h:
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::copyPropertiesFrom):
copyPropertiesAndStrictnessFrom() redone as copyPropertiesFrom()
since we can copy the strictness bit using existing accessors.
* dom/StyledElement.cpp:
(WebCore::StyledElement::copyNonAttributeProperties):
Use copyPropertiesFrom() and copy the strictness bit to the new
inline style using the dedicated accessors. Also added some
assertions for good measure.
2011-12-01 Kentaro Hara <haraken@chromium.org>
run-bindings-tests is failing on Gtk/Qt/SnowLeopard/Lion bots
https://bugs.webkit.org/show_bug.cgi?id=73558
Reviewed by Csaba Osztrogonác.
The cause of the bug:
foreach my $idlFile (keys %documents) {
$supplementals{$idlFile} = [];
foreach my $dataNode (...) {
if (...) {
...;
push(@{$supplementals{$targetIdlFile}}, $idlFile);
...;
}
}
}
Even if we did push(@{$supplementals{$targetIdlFile}}, $idlFile),
the $supplementals{$targetIdlFile} can be re-initialized by
$supplementals{$idlFile} = [] in subsequent loops.
This patch fixes the bug.
Tests: bindings/scripts/test/TestInterface.idl
* bindings/scripts/resolve-supplemental.pl:
2011-12-01 Pavel Feldman <pfeldman@chromium.org>
Web Inspector: restore WebKit2 Safari menu items after capabilities refactoring regression.
https://bugs.webkit.org/show_bug.cgi?id=73554
Reviewed by Yury Semikhatsky.
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::frontendLoaded):
(WebCore::InspectorFrontendClientLocal::isDebuggingEnabled):
(WebCore::InspectorFrontendClientLocal::setDebuggingEnabled):
(WebCore::InspectorFrontendClientLocal::isTimelineProfilingEnabled):
(WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled):
(WebCore::InspectorFrontendClientLocal::isProfilingJavaScript):
(WebCore::InspectorFrontendClientLocal::startProfilingJavaScript):
(WebCore::InspectorFrontendClientLocal::stopProfilingJavaScript):
(WebCore::InspectorFrontendClientLocal::showConsole):
(WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
* inspector/InspectorFrontendClientLocal.h:
* inspector/front-end/InspectorFrontendAPI.js:
(InspectorFrontendAPI._pendingCommands.isDebuggingEnabled):
(InspectorFrontendAPI.setDebuggingEnabled):
(InspectorFrontendAPI.isTimelineProfilingEnabled):
(InspectorFrontendAPI.setTimelineProfilingEnabled):
(InspectorFrontendAPI.isProfilingJavaScript):
(InspectorFrontendAPI.startProfilingJavaScript):
(InspectorFrontendAPI.stopProfilingJavaScript):
(InspectorFrontendAPI.setAttachedWindow):
(InspectorFrontendAPI.showConsole):
(InspectorFrontendAPI.dispatch):
(InspectorFrontendAPI.loadCompleted):
* inspector/front-end/inspector.js:
2011-12-01 Pavel Feldman <pfeldman@google.com>
Web Inspector: remove capabilities along with the MetaAgent
https://bugs.webkit.org/show_bug.cgi?id=73550
Reviewed by Yury Semikhatsky.
We are now using explicit query commands in order to find out about the capabilities.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* inspector/CodeGeneratorInspector.py:
(Generator.go):
* inspector/Inspector.json:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorMetaAgent.cpp: Removed.
* inspector/InspectorMetaAgent.h: Removed.
* inspector/generate-protocol-externs:
2011-12-01 Pavel Feldman <pfeldman@google.com>
Web Inspector: front-end should open with elements panel selected upon Inspect Element action.
https://bugs.webkit.org/show_bug.cgi?id=73539
Reviewed by Yury Semikhatsky.
* inspector/front-end/inspector.js:
(WebInspector.doLoadedDone.showInitialPanel):
(WebInspector.inspect):
2011-11-30 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: totalOffsetLeft and totalOffsetTop should take scroll into account.
https://bugs.webkit.org/show_bug.cgi?id=73443
Reviewed by Pavel Feldman.
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype._boxForAnchorAtStart):
(WebInspector.TextPrompt.SuggestBox):
* inspector/front-end/utilities.js:
(Element.prototype.totalOffsetLeft):
(Element.prototype.totalOffsetTop):
(Element.prototype.boxInWindow):
2011-12-01 Pavel Feldman <pfeldman@google.com>
Web Inspector: query backend for capabilities explicitly.
https://bugs.webkit.org/show_bug.cgi?id=73442
Reviewed by Yury Semikhatsky.
This change removes the hardcoded Capabilities values in favor of
explicit query commands issued against the backend. I'll remove the
Meta agent in a subsequent change.
* bindings/js/ScriptDebugServer.h:
(WebCore::ScriptDebugServer::causesRecompilation):
(WebCore::ScriptDebugServer::supportsNativeBreakpoints):
* bindings/js/ScriptProfiler.h:
(WebCore::ScriptProfiler::causesRecompilation):
(WebCore::ScriptProfiler::isSampling):
(WebCore::ScriptProfiler::hasHeapProfiler):
* bindings/v8/ScriptDebugServer.h:
(WebCore::ScriptDebugServer::causesRecompilation):
(WebCore::ScriptDebugServer::supportsNativeBreakpoints):
* bindings/v8/ScriptProfiler.h:
(WebCore::ScriptProfiler::causesRecompilation):
(WebCore::ScriptProfiler::isSampling):
(WebCore::ScriptProfiler::hasHeapProfiler):
* inspector/Inspector.json:
* inspector/InspectorClient.h:
(WebCore::InspectorClient::canClearBrowserCache):
(WebCore::InspectorClient::canClearBrowserCookies):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::show):
* inspector/InspectorController.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::causesRecompilation):
(WebCore::InspectorDebuggerAgent::canSetScriptSource):
(WebCore::InspectorDebuggerAgent::supportsNativeBreakpoints):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::frontendLoaded):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::causesRecompilation):
(WebCore::InspectorProfilerAgent::isSampling):
(WebCore::InspectorProfilerAgent::hasHeapProfiler):
(WebCore::InspectorProfilerAgent::disable):
(WebCore::InspectorProfilerAgent::enable):
(WebCore::InspectorProfilerAgent::setFrontend):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::canClearBrowserCache):
(WebCore::InspectorResourceAgent::canClearBrowserCookies):
* inspector/InspectorResourceAgent.h:
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel):
(WebInspector.DebuggerModel.prototype.enableDebugger):
(WebInspector.DebuggerModel.prototype.canSetScriptSource):
* inspector/front-end/NetworkItemView.js:
(WebInspector.NetworkItemView):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.onCanClearBrowserCache):
(WebInspector.NetworkLogView.onCanClearBrowserCookies):
(WebInspector.NetworkLogView):
(WebInspector.NetworkLogView.prototype._contextMenu):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
* inspector/front-end/ScriptsPanel.js:
* inspector/front-end/Settings.js:
* inspector/front-end/SettingsScreen.js:
(WebInspector.SettingsScreen):
* inspector/front-end/inspector.js:
(WebInspector.get inspectedPageDomain):
(WebInspector._initializeCapability):
(WebInspector.doLoadedDone):
2011-11-28 Hans Wennborg <hans@chromium.org>
IndexedDB: Fix reverse cursor with non-existent upper bound
https://bugs.webkit.org/show_bug.cgi?id=73220
Reviewed by Tony Chang.
The code previously did not properly handle the case where the
specified upper bound for a reverse cursor did not exist.
Test: storage/indexeddb/cursor-reverse-bug.html
* storage/IDBLevelDBBackingStore.cpp:
(WebCore::findGreatestKeyLessThanOrEqual):
(WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
(WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
(WebCore::IDBLevelDBBackingStore::openIndexCursor):
2011-11-29 Hans Wennborg <hans@chromium.org>
IndexedDB: Cursor pre-fetching
https://bugs.webkit.org/show_bug.cgi?id=73025
Reviewed by Darin Fisher.
No new tests. This doesn't change any semantics.
Actual pre-fetching will not happen in DumpRenderTree.
Chromium will request pre-fetching and have tests for it.
* storage/IDBBackingStore.h:
* storage/IDBCallbacks.h:
* storage/IDBCursor.cpp:
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::postSuccessHandlerCallback):
Adds a callback that is called everytime the onsuccess handler has
executed on a cursor. This allows the cursor to see if a new call
to continue() was made in the onsuccess handler.
* storage/IDBCursor.h:
* storage/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::continueFunction):
(WebCore::IDBCursorBackendImpl::prefetchContinue):
(WebCore::IDBCursorBackendImpl::prefetchContinueInternal):
This is the function that does actual pre-fetching. When called,
it will attempt to step the cursor up to n steps and send the
results back via the new onSuccessWithPrefetch() callback.
(WebCore::IDBCursorBackendImpl::prefetchReset):
This resets the cursor to the position it was at before the last
prefetch call.
* storage/IDBCursorBackendImpl.h:
(WebCore::IDBCursorBackendImpl::postSuccessHandlerCallback):
* storage/IDBCursorBackendInterface.h:
* storage/IDBKey.h:
(WebCore::IDBKey::createInvalid):
(WebCore::IDBKey::createNumber):
(WebCore::IDBKey::createString):
(WebCore::IDBKey::createDate):
(WebCore::IDBKey::createArray):
(WebCore::IDBKey::sizeEstimate):
* storage/IDBLevelDBBackingStore.cpp:
(WebCore::CursorOptions::CursorImplCommon::CursorImplCommon):
(WebCore::CursorOptions::ObjectStoreCursorImpl::clone):
(WebCore::CursorOptions::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
(WebCore::CursorOptions::IndexKeyCursorImpl::clone):
(WebCore::CursorOptions::IndexKeyCursorImpl::IndexKeyCursorImpl):
(WebCore::CursorOptions::IndexCursorImpl::clone):
(WebCore::CursorOptions::IndexCursorImpl::IndexCursorImpl):
* storage/IDBRequest.cpp:
(WebCore::IDBRequest::dispatchEvent):
Update dispatchEvent() to call the postSuccessHandlerCallback()
* storage/IDBRequest.h:
(WebCore::IDBRequest::onSuccessWithPrefetch):
* storage/IDBTransactionBackendImpl.cpp:
(WebCore::IDBTransactionBackendImpl::addPendingEvents):
Allow for adding an arbitrary number of extra pending events.
When a cursor pre-fetches n elements, the transaction should
expect to see n extra onsuccess calls.
* storage/IDBTransactionBackendImpl.h:
* storage/IDBTransactionBackendInterface.h:
2011-12-01 Philippe Normand <pnormand@igalia.com>
[GTK] WebAudio wav resources access and management
https://bugs.webkit.org/show_bug.cgi?id=73080
Reviewed by Martin Robinson.
For the uninstalled case we assume the user will set a
AUDIO_RESOURCES_PATH environment variable pointing to
WebCore/platform/audio/resources.
* GNUmakefile.am: Install WAV resources.
* platform/audio/gtk/AudioBusGtk.cpp:
(WebCore::AudioBus::loadPlatformResource): Support for loading
uninstalled resources.
2011-12-01 Florin Malita <fmalita@google.com>
SVG Gaussian blur in 1-dimension is incorrect
https://bugs.webkit.org/show_bug.cgi?id=73029
Reviewed by Simon Fraser.
Ensure that the last blurBox result is stored when applying one-dimensional blurs.
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplyGeneric):
2011-12-01 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Elements Panel edit as html looks weird with an arrow inside edit box.
https://bugs.webkit.org/show_bug.cgi?id=73462
Reviewed by Pavel Feldman.
* inspector/front-end/elementsPanel.css:
(#elements-content .editing):
(.elements-tree-editor):
* inspector/front-end/inspector.css:
2011-12-01 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: [Styles] Exclamation mark hint ignores property case
https://bugs.webkit.org/show_bug.cgi?id=73535
Reviewed by Pavel Feldman.
* inspector/front-end/StylesSidebarPane.js:
2011-12-01 Pavel Feldman <pfeldman@google.com>
Web Inspector: fix dedicated workers inspection (undefined is not an object).
https://bugs.webkit.org/show_bug.cgi?id=73537
Reviewed by Yury Semikhatsky.
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype.resourceForURL):
* inspector/front-end/WorkerManager.js:
(WebInspector.WorkerManager.loadCompleted):
2011-12-01 Kentaro Hara <haraken@chromium.org>
[JSC] When XXXX has a NamedConstructor, window.XXXX should be XXXXConstructor
https://bugs.webkit.org/show_bug.cgi?id=73521
Reviewed by Adam Barth.
This is a regression caused by a patch of bug 73307.
If we replaced a custom constructor of window.XXXX (e.g. XXXX is Audio or Option)
with the [NamedConstructor] IDL, fast/js/global-constructors.html,
fast/dom/Window/window-properties.html and fast/dom/call-a-constructor-as-a-function.html
start to fail in JSC.
Before a patch of bug 73007: (correct behavior)
window.Audio => AudioConstructor
window.Option => OptionConstructor
window.HTMLAudioElement => HTMLAudioElementConstructor
window.HTMLOptionElement => HTMLOptionElementConstructor
After a patch of bug 73007: (wrong behavior)
window.Audio => HTMLAudioElementConstructor
window.Option => HTMLOptionElementConstructor
window.HTMLAudioElement => HTMLAudioElementConstructor
window.HTMLOptionElement => HTMLOptionElementConstructor
This patch fixes the above behavior.
Tests: bindings/scripts/test/TestNamedConstructor.idl
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/IDLParser.pm:
(parseExtendedAttributes):
(ParseInterface):
* bindings/scripts/test/TestNamedConstructor.idl: The test IDL was wrong. NamedConstructor=XXXX(arguments) is a correct format.
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Updated a run-bindings-tests result.
2011-11-30 David Grogan <dgrogan@chromium.org>
Move data in IDBPendingTransactionMonitor from static to
ThreadSpecific.
https://bugs.webkit.org/show_bug.cgi?id=73389
IDBPendingTransactionMonitor previously stored transactions in
a static member variable so that they could be aborted if they were
had no work queued up when leaving script execution. That was fine when
IndexedDB could only be used on the main thread, but is insufficient
for IndexedDB on workers. In addition to not being thread-safe, this
caused pending transactions that were created from a worker thread to
abort when the main thread left script execution.
Reviewed by David Levin.
No new tests - IndexedDB worker tests forthcoming.
* storage/IDBPendingTransactionMonitor.cpp:
(WebCore::transactions): Create the TLS. The other methods used to
manage the container's memory lifetime but now we just leak it until
the thread shuts down in the interest of simpler code.
(WebCore::IDBPendingTransactionMonitor::addPendingTransaction):
(WebCore::IDBPendingTransactionMonitor::removePendingTransaction):
(WebCore::IDBPendingTransactionMonitor::abortPendingTransactions):
* storage/IDBPendingTransactionMonitor.h:
2011-11-30 Leo Yang <leo.yang@torchmobile.com.cn>
Upstream platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp
https://bugs.webkit.org/show_bug.cgi?id=73522
Reviewed by Daniel Bates.
Initial upstream, can't be built yet, no new tests.
* platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp: Added.
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
(WebCore::NetworkStateNotifier::networkStateChange):
2011-11-30 David Reveman <reveman@chromium.org>
[Chromium] Improve tile invalidation
https://bugs.webkit.org/show_bug.cgi?id=71872
Reviewed by James Robinson.
Virtualize LayerChromium::setNeedsDisplay so that dirty rectangles can
be handled directly by the TiledLayerChromium class. Replace
LayerChromium::dirtyRect() with LayerChromium::needsDisplay() and
remove unnecessary union of dirty rectangles. By invalidating existing
tiles using the initial dirty rectangles instead of their union we
avoid a large amount of unnecessary tile updates.
Update LayerChromiumTest.
* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::updateCompositorResources):
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::paintContentsIfDirty):
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setNeedsDisplayInRect):
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerChromium::setContents):
(WebCore::ImageLayerChromium::paintContentsIfDirty):
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
(WebCore::LayerChromium::setBounds):
(WebCore::LayerChromium::setNeedsDisplayRect):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::setNeedsDisplay):
(WebCore::LayerChromium::needsDisplay):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::setNeedsDisplayRect):
(WebCore::TiledLayerChromium::invalidateRect):
* platform/graphics/chromium/TiledLayerChromium.h:
* platform/graphics/chromium/VideoLayerChromium.cpp:
(WebCore::VideoLayerChromium::updateCompositorResources):
* platform/graphics/chromium/WebGLLayerChromium.cpp:
(WebCore::WebGLLayerChromium::updateCompositorResources):
2011-11-30 Alexey Proskuryakov <ap@apple.com>
SocketStreamHandleCFNet doesn't check for proxy errors
https://bugs.webkit.org/show_bug.cgi?id=71965
Reviewed by Darin Adler.
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::getStoredCONNECTProxyCredentials): Added a FIXME about retrieving proxy credentials.
(WebCore::SocketStreamHandle::addCONNECTCredentials): Added human readable messages to errors,
they go to Web Inspector console.
(WebCore::SocketStreamHandle::readStreamCallback): Handle proxy response codes other than 200
and 407 by failing cleanly.
2011-11-30 Jeremy Apthorp <jeremya@google.com>
When the mouse is dragged out of an :active element, it should lose :hover.
https://bugs.webkit.org/show_bug.cgi?id=57206
Reviewed by Ryosuke Niwa.
Test: fast/css/hover-active-drag.html
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseMoveEvent): Don't mark mouse-drag hit tests read-only, since they no longer are.
(WebCore::EventHandler::dragSourceEndedAt): Send a hit test request when the mouse goes up after a drag, so
RenderLayer has a chance to update the hover/active status.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateHoverActiveState): Only allow the :active state to change on mouse down or mouse up.
2011-11-30 Hans Muller <hmuller@adobe.com>
XHR 'progress' event code assumes wrongly that expectedLength >= 0
https://bugs.webkit.org/show_bug.cgi?id=36156
Reviewed by Alexey Proskuryakov
Avoid passing a negative value as the dispatchProgressEvent's total parameter and always use 0 when lengthComputable is false.
Test: http/tests/xmlhttprequest/chunked-progress-event-expectedLength.html
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::didReceiveData):
2011-11-30 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed. Fix build error when NOTIFICATIONS feature is enabled.
* CMakeLists.txt:
2011-11-30 Noel Gordon <noel.gordon@gmail.com>
Remove ImageFrame::setSize() style nits
https://bugs.webkit.org/show_bug.cgi?id=73490
Reviewed by Andreas Kling.
Equality comparisons to 0 should be performed with the not operator, write
width() == 0 && height() == 0 as !width() && !height().
No new tests, style refactor.
* platform/image-decoders/qt/ImageFrameQt.cpp:
(WebCore::ImageFrame::setSize):
* platform/image-decoders/skia/ImageDecoderSkia.cpp:
(WebCore::ImageFrame::setSize):
2011-11-30 Alexey Proskuryakov <ap@apple.com>
Remove an unneeded argument from FrameLoaderClient::download
https://bugs.webkit.org/show_bug.cgi?id=73486
Reviewed by Andreas Kling.
No change in functionality.
* loader/FrameLoaderClient.h: Removed initialRequest argument.
* loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy):
We're already passing ResourceHandle, why also pass its data member?
* loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::download): Updated for the change.
2011-11-30 Alexey Proskuryakov <ap@apple.com>
Original page URL is not set in quarantine information when downloading using context menu Save Linked File
https://bugs.webkit.org/show_bug.cgi?id=73475
<rdar://problem/10500337>
Reviewed by Dan Bernstein.
* WebCore.exp.in: Exported FrameLoader::setOriginalURLForDownloadRequest.
2011-11-30 Mark Pilgrim <pilgrim@chromium.org>
[FileSystem API] DirectoryEntry.getFile path argument is required
https://bugs.webkit.org/show_bug.cgi?id=69642
Reviewed by Adam Barth.
Test: fast/filesystem/simple-required-arguments-getfile.html
* bindings/js/JSDirectoryEntryCustom.cpp:
(WebCore::JSDirectoryEntry::getFile): check args length and throw TypeError if not enough arguments
* bindings/v8/custom/V8DirectoryEntryCustom.cpp:
(WebCore::V8DirectoryEntry::getFileCallback): check args length and throw TypeError if not enough arguments
2011-11-30 Joshua Bell <jsbell@chromium.org>
IndexedDB: Implement IDBIndex multientry feature
https://bugs.webkit.org/show_bug.cgi?id=73232
Reviewed by Tony Chang.
The multientry flag is used when populating indexes, either when the index
is created on an existing store or as new values are added to the store.
Per the spec the semantics are: if the flag is set and the index key is
calculated to be an array, each member of the array is used as an index key
instead.
Test: storage/indexeddb/index-multientry.html
* storage/IDBBackingStore.h:
* storage/IDBIndex.h:
(WebCore::IDBIndex::multientry):
* storage/IDBIndex.idl:
* storage/IDBIndexBackendImpl.cpp:
(WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
* storage/IDBIndexBackendImpl.h:
(WebCore::IDBIndexBackendImpl::create):
(WebCore::IDBIndexBackendImpl::multientry):
* storage/IDBIndexBackendInterface.h:
* storage/IDBLevelDBBackingStore.cpp:
(WebCore::checkIndexAndMetaDataKey):
(WebCore::IDBLevelDBBackingStore::getIndexes):
(WebCore::IDBLevelDBBackingStore::createIndex):
* storage/IDBLevelDBBackingStore.h:
* storage/IDBLevelDBCoding.cpp:
* storage/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex):
* storage/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore::IDBObjectStoreBackendImpl::populateIndex):
(WebCore::IDBObjectStoreBackendImpl::createIndex):
(WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
(WebCore::IDBObjectStoreBackendImpl::loadIndexes):
* storage/IDBObjectStoreBackendImpl.h:
* storage/IDBObjectStoreBackendInterface.h:
2011-11-30 David Reveman <reveman@chromium.org>
[Chromium] Add support for painting into an SkPicture and then rasterizing into tile-sized chunks.
https://bugs.webkit.org/show_bug.cgi?id=71388
Reviewed by James Robinson.
Add UpdatableTexture class, which allows texture updater to
allocate tile specific resources and paint tiles separately.
Rename texture uploader classes and move them to separate files.
No new tests. Covered by existing tests.
* WebCore.gypi:
* platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: Added.
(WebCore::BitmapCanvasLayerTextureUpdater::Texture::Texture):
(WebCore::BitmapCanvasLayerTextureUpdater::Texture::~Texture):
(WebCore::BitmapCanvasLayerTextureUpdater::Texture::updateRect):
(WebCore::BitmapCanvasLayerTextureUpdater::create):
(WebCore::BitmapCanvasLayerTextureUpdater::BitmapCanvasLayerTextureUpdater):
(WebCore::BitmapCanvasLayerTextureUpdater::~BitmapCanvasLayerTextureUpdater):
(WebCore::BitmapCanvasLayerTextureUpdater::createTexture):
(WebCore::BitmapCanvasLayerTextureUpdater::sampledTexelFormat):
(WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate):
(WebCore::BitmapCanvasLayerTextureUpdater::updateTextureRect):
* platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: Copied from Source/WebCore/platform/graphics/chromium/LayerTextureUpdater.h.
(WebCore::BitmapCanvasLayerTextureUpdater::Texture::textureUpdater):
(WebCore::BitmapCanvasLayerTextureUpdater::orientation):
* platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCTextureUpdater.h.
(WebCore::CanvasLayerTextureUpdater::CanvasLayerTextureUpdater):
(WebCore::CanvasLayerTextureUpdater::~CanvasLayerTextureUpdater):
(WebCore::CanvasLayerTextureUpdater::paintContents):
* platform/graphics/chromium/CanvasLayerTextureUpdater.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCTextureUpdater.h.
(WebCore::CanvasLayerTextureUpdater::contentRect):
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::createTextureUpdater):
* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: Added.
(WebCore::FrameBuffer::FrameBuffer::FrameBuffer):
(WebCore::FrameBuffer::FrameBuffer::~FrameBuffer):
(WebCore::FrameBuffer::FrameBuffer::initialize):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::Texture):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::~Texture):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::updateRect):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::create):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::FrameBufferSkPictureCanvasLayerTextureUpdater):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::~FrameBufferSkPictureCanvasLayerTextureUpdater):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::createTexture):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::sampledTexelFormat):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h: Copied from Source/WebCore/platform/graphics/chromium/LayerTextureUpdater.h.
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::textureUpdater):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::orientation):
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerTextureUpdater::Texture::Texture):
(WebCore::ImageLayerTextureUpdater::Texture::updateRect):
(WebCore::ImageLayerTextureUpdater::Texture::textureUpdater):
(WebCore::ImageLayerTextureUpdater::createTexture):
* platform/graphics/chromium/LayerRendererChromium.cpp:
* platform/graphics/chromium/LayerTextureUpdater.h:
(WebCore::LayerTextureUpdater::Texture::~Texture):
(WebCore::LayerTextureUpdater::Texture::texture):
(WebCore::LayerTextureUpdater::Texture::prepareRect):
(WebCore::LayerTextureUpdater::Texture::Texture):
(WebCore::LayerTextureUpdater::prepareToUpdate):
* platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: Removed.
* platform/graphics/chromium/LayerTextureUpdaterCanvas.h: Removed.
* platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCTextureUpdater.h.
(WebCore::SkPictureCanvasLayerTextureUpdater::SkPictureCanvasLayerTextureUpdater):
(WebCore::SkPictureCanvasLayerTextureUpdater::~SkPictureCanvasLayerTextureUpdater):
(WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate):
(WebCore::SkPictureCanvasLayerTextureUpdater::drawPicture):
* platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCTextureUpdater.h.
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::UpdatableTile::UpdatableTile):
(WebCore::UpdatableTile::texture):
(WebCore::UpdatableTile::managedTexture):
(WebCore::TiledLayerChromium::updateCompositorResources):
(WebCore::TiledLayerChromium::pushPropertiesTo):
(WebCore::TiledLayerChromium::createTile):
(WebCore::TiledLayerChromium::protectTileTextures):
(WebCore::TiledLayerChromium::prepareToUpdate):
* platform/graphics/chromium/cc/CCTextureUpdater.cpp:
(WebCore::CCTextureUpdater::append):
(WebCore::CCTextureUpdater::update):
* platform/graphics/chromium/cc/CCTextureUpdater.h:
2011-11-30 Rafael Weinstein <rafaelw@chromium.org>
[MutationObservers] Make WebKitMutationObserver::deliverAllMutations() tolerant of re-entrant calls
https://bugs.webkit.org/show_bug.cgi?id=73472
Reviewed by Ojan Vafai.
No new tests. This patch just adds a static guard which makes more explicit the current semantics.
* dom/WebKitMutationObserver.cpp:
(WebCore::WebKitMutationObserver::deliverAllMutations):
2011-11-30 Takashi Toyoshima <toyoshim@chromium.org>
Add OVERRIDE to WebSocket related sources for safe inheritances.
https://bugs.webkit.org/show_bug.cgi?id=73308
Reviewed by Kent Tamura.
No new tests because this change contains no functional change.
* platform/network/chromium/SocketStreamHandle.h:
* websockets/CloseEvent.h:
* websockets/WebSocket.h:
* websockets/WebSocketChannel.h:
* websockets/WorkerThreadableWebSocketChannel.h:
2011-11-30 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions]Rename CSSRegionStyleRule to WebKitCSSRegionRule
https://bugs.webkit.org/show_bug.cgi?id=73450
Reviewed by Andreas Kling.
No functionality changed so no new tests. The new name has the webkit prefix as required for new api.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSParser.cpp:
(WebCore::CSSParser::createRegionStylingRule):
* css/CSSRule.cpp:
(WebCore::CSSRule::cssText):
(WebCore::CSSRule::destroy):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::addRegionStyleRule):
(WebCore::CSSStyleSelector::checkRegionStyle):
(WebCore::RuleSet::addRulesFromSheet):
* css/CSSStyleSelector.h:
* css/WebKitCSSRegionRule.cpp: Renamed from Source/WebCore/css/CSSRegionStyleRule.cpp.
(WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
(WebCore::WebKitCSSRegionRule::~WebKitCSSRegionRule):
(WebCore::WebKitCSSRegionRule::cssText):
* css/WebKitCSSRegionRule.h: Renamed from Source/WebCore/css/CSSRegionStyleRule.h.
2011-11-30 Jeff Timanus <twiz@chromium.org>
Alter an early return that was preventing HTMLCanvasElement::didDraw notifications
from being triggered when accelerated compositing was enabled. The notification is
necessary to make sure that any cached state is cleared in the HTMLCanvasElement object.
To prevent performance regressions, the cached state is explicitly cleared, as the didDraw
machinery is not necessary for accelerated canvases.
https://bugs.webkit.org/show_bug.cgi?id=73257
Reviewed by Stephen White.
Test: fast/canvas/webgl/canvas-2d-webgl-texture.html
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::didDraw):
(WebCore::HTMLCanvasElement::setSurfaceSize):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::didDraw):
2011-11-30 Kentaro Hara <haraken@chromium.org>
Implement the StorageEvent constructor
https://bugs.webkit.org/show_bug.cgi?id=71685
Reviewed by Adam Barth.
This patch makes StorageEvent constractable.
The spec: http://www.whatwg.org/specs/web-apps/current-work/#storageevent
Test: fast/events/constructors/storage-event-constructor.html
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::tryGetProperty):
(WebCore::JSDictionary::convertValue): Returns a Storage object corresponding to a given key.
* bindings/js/JSDictionary.h:
(WebCore::JSDictionary::tryGetProperty):
* bindings/v8/OptionsObject.cpp:
(WebCore::OptionsObject::get): Ditto.
* bindings/v8/OptionsObject.h:
* storage/StorageEvent.cpp: Added an implementation of the StorageEvent constructor.
(WebCore::StorageEventInit::StorageEventInit):
(WebCore::StorageEvent::create):
(WebCore::StorageEvent::StorageEvent):
* storage/StorageEvent.h: Added a definition of StorageEventInit.
(WebCore::StorageEvent::key):
(WebCore::StorageEvent::oldValue):
(WebCore::StorageEvent::newValue):
(WebCore::StorageEvent::url):
(WebCore::StorageEvent::storageArea):
* storage/StorageEvent.idl: Added [ConstructorTemplate=Event] IDL.
2011-11-30 Naveen Bobbili <qghc36@motorola.com>
window.getMatchedCSSRules() not supporting pseudo element
https://bugs.webkit.org/show_bug.cgi?id=72930
Reviewed by Darin Adler.
Added functionality to retrieve CSS rules of psuedo elements using
getMatchedCSSRules.
Test: fast/dom/Window/getMatchedCSSRules-with-pseudo-elements.html
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getMatchedCSSRules):
Retreiving CSS Rules of the appropriate pseudo element.
2011-11-30 Grace Kloba <klobag@chromium.org>
[chromium] TextureManager LRU list is not fully honor the order tiles are used
https://bugs.webkit.org/show_bug.cgi?id=73344
Reviewed by James Robinson.
Reorder the texture in the LRU list only when protectTexture() is called.
* platform/graphics/chromium/TextureManager.cpp:
(WebCore::TextureManager::hasTexture):
(WebCore::TextureManager::protectTexture):
2011-11-30 Ken Buchanan <kenrb@chromium.org>
Crash from first letter text fragments having flows split
https://bugs.webkit.org/show_bug.cgi?id=72759
Reviewed by David Hyatt.
When an inline flow is split that contains a first letter block
and its remaining text, it can prevent the remaining text fragment
from getting updated if the first letter block is replaced. This
patch enables the text fragment to be found and updated properly.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateFirstLetterBlock):
2011-11-30 Takashi Toyoshima <toyoshim@chromium.org>
Get rid of AllowCrossThreadAccess throughout ThreadableWebSocketChannelClientWrapper.
https://bugs.webkit.org/show_bug.cgi?id=73336
Reviewed by David Levin.
No new tests because it contains no functional change.
* websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
(WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
(WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
(WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
(WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback):
(WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmountCallback):
(WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
(WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
* websockets/ThreadableWebSocketChannelClientWrapper.h:
2011-11-30 Leo Yang <leo.yang@torchmobile.com.cn>
[BlackBerry] Add 2 cpp files to the BlackBerry build system
https://bugs.webkit.org/show_bug.cgi?id=73408
platform/network/blackberry/DeferredData.cpp and platform/network/blackberry/NetworkJob.cpp
will be added, change build system first.
Reviewed by Antonio Gomes.
* PlatformBlackBerry.cmake:
2011-11-30 Gregg Tavares <gman@google.com>
Implement draft WEBGL_compressed_textures WebGL extension
https://bugs.webkit.org/show_bug.cgi?id=72086
Reviewed by Kenneth Russell.
No new tests. Will write final test once on hardware.
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::toV8Object):
* html/canvas/WebGLCompressedTextures.cpp: Added.
(WebCore::WebGLCompressedTextures::WebGLCompressedTextures):
(WebCore::WebGLCompressedTextures::~WebGLCompressedTextures):
(WebCore::WebGLCompressedTextures::getName):
(WebCore::WebGLCompressedTextures::create):
(WebCore::WebGLCompressedTextures::supported):
(WebCore::WebGLCompressedTextures::validateCompressedTexFormat):
(WebCore::WebGLCompressedTextures::validateCompressedTexFuncData):
(WebCore::WebGLCompressedTextures::validateCompressedTexSubDimensions):
(WebCore::WebGLCompressedTextures::compressedTexImage2D):
(WebCore::WebGLCompressedTextures::compressedTexSubImage2D):
(WebCore::WebGLCompressedTextures::getCompressedTextureFormats):
* html/canvas/WebGLCompressedTextures.h: Added.
* html/canvas/WebGLCompressedTextures.idl: Added.
* html/canvas/WebGLExtension.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getParameter):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
* html/canvas/WebGLRenderingContext.h:
* platform/graphics/Extensions3D.h:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::compressedTexImage2D):
(WebCore::GraphicsContext3D::compressedTexSubImage2D):
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::compressedTexImage2D):
(WebCore::GraphicsContext3D::compressedTexSubImage2D):
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::compressedTexImage2D):
(WebCore::GraphicsContext3D::compressedTexSubImage2D):
2011-11-18 Nat Duca <nduca@chromium.org>
[chromium] Enable threaded compositing via CCThreadProxy::hasThread only
https://bugs.webkit.org/show_bug.cgi?id=70838
Reviewed by James Robinson.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
* platform/graphics/chromium/WebGLLayerChromium.cpp:
(WebCore::WebGLLayerChromium::layerRendererContext):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::enabled):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::initialize):
(WebCore::CCLayerTreeHost::context):
(WebCore::CCLayerTreeHost::setNeedsAnimate):
(WebCore::CCLayerTreeHost::setNeedsCommit):
(WebCore::CCLayerTreeHost::setNeedsRedraw):
(WebCore::CCLayerTreeHost::composite):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
* platform/graphics/chromium/cc/CCProxy.cpp:
(WebCore::CCProxy::isMainThread):
(WebCore::CCProxy::isImplThread):
(WebCore::CCProxy::setMainThreadIsImplThread):
* platform/graphics/chromium/cc/CCProxy.h:
* platform/graphics/chromium/cc/CCSingleThreadProxy.h:
(WebCore::DebugScopedSetImplThread::DebugScopedSetImplThread):
(WebCore::DebugScopedSetImplThread::~DebugScopedSetImplThread):
2011-11-30 Enrica Casucci <enrica@apple.com>
Copy/paste of the same content produces increasingly nested markup
https://bugs.webkit.org/show_bug.cgi?id=73497
<rdar://problem/10208605>
When pasting a fragment over a selection, we perfom a DeleteSelection command
followed by a ReplaceSelection command. Delete selection preserves the style
of the selection start, leaving all the blocks containing the insertion point.
This patch eliminates all the nested divs that don't provide additional style,
avoiding the proliferation of nested divs.
Reviewed by Darin Adler.
Tests: editing/deleting/delete-and-cleanup.html
editing/pasteboard/paste-without-nesting.html
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::removeRedundantBlocks):
(WebCore::DeleteSelectionCommand::doApply):
* editing/DeleteSelectionCommand.h:
2011-11-30 Dan Bernstein <mitz@apple.com>
WebCore part of: Allow the length of a page along the pagination axis to differ from the length of the view
https://bugs.webkit.org/show_bug.cgi?id=73476
Reviewed by Anders Carlsson.
* page/Page.cpp:
(WebCore::Page::setPagination): Changed to use Pagination::operator==.
* page/Page.h:
(WebCore::Page::Pagination::Pagination): Added initializer for the new pageLength member variable.
(WebCore::Page::Pagination::operator==): Added.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutColumns): Narrowed the scope of a local variable.
* rendering/RenderBlock.h: Promoted setDesiredColumnCountAndWidth() from private to protected,
allowing its use from RenderView::calcColumnWidth(). Made calcColumnWidth() virtual.
* rendering/RenderView.cpp:
(WebCore::RenderView::calcColumnWidth): Added. Uses the page length specified in the pagination
parameters to set the column width, if pages are to be laid out one next to the other.
(WebCore::RenderView::viewLogicalHeight): Added. Uses the page length specified in the pagination
parameters as the height, if pages are to be laid out one after the other.
* rendering/RenderView.h:
2011-11-30 Chris Fleizach <cfleizach@apple.com>
AX: Nodes are reporting that focus can be set when they really can't
https://bugs.webkit.org/show_bug.cgi?id=72791
Reviewed by Beth Dakin.
Whether focus can be set on a node shouldn't rely only on the role.
It should depend on whether the node supports focus.
Test: platform/mac/accessibility/supports-focus-setting.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::canSetFocusAttribute):
2011-11-30 Chris Fleizach <cfleizach@apple.com>
WebKit does not send mouse down/up/click events to ARIA tabs
https://bugs.webkit.org/show_bug.cgi?id=72573
Reviewed by Darin Adler.
There are a number of "control" type elements that should perform a click on the actual element.
Test: accessibility/press-works-on-control-types.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::actionElement):
2011-11-30 Chris Fleizach <cfleizach@apple.com>
AX: Searching mechanism is too slow when finding the element.
https://bugs.webkit.org/show_bug.cgi?id=72523
Reviewed by Beth Dakin.
This makes the element searching mechanism much faster. Previously, searching literally went
through every element, looking for the start element before "starting" the search.
Now we only go through the elements that need to be searched. This is done by going up the
start object parent chain. At each level, a DFS is done. As we go up the parent chain,
only the elements before/after the current element are examined.
* accessibility/AccessibilityObject.cpp:
(WebCore::appendChildrenToArray):
(WebCore::AccessibilityObject::findMatchingObjects):
2011-11-30 Ryosuke Niwa <rniwa@webkit.org>
Cannot select RTL text inside LTR text from right to left by a mouse drag
https://bugs.webkit.org/show_bug.cgi?id=73056
Reviewed by Eric Seidel.
The bug was caused by positionAtRightBoundaryOfBiDiRun using current inline box's offset
even when creating a position with previous inline box. Fixed the bug by using the correct offset.
* editing/RenderedPosition.cpp:
(WebCore::RenderedPosition::positionAtLeftBoundaryOfBiDiRun):
(WebCore::RenderedPosition::positionAtRightBoundaryOfBiDiRun):
2011-11-30 Chris Fleizach <cfleizach@apple.com>
AX: Searching mechanism gets stuck when searching tables
https://bugs.webkit.org/show_bug.cgi?id=72519
When searching through the elements within a data table, the children() method should not
be used, since that contains elements (like a table header column) which have the same children
as the table itself. Instead the cells() should be searched.
Reviewed by Beth Dakin.
Test: platform/mac/accessibility/search-when-element-starts-in-table.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::findMatchingObjects):
2011-11-29 Ryosuke Niwa <rniwa@webkit.org>
Assertion failure (m_nestedIsolateCount >= 1) in BidiResolver::exitIsolate()
https://bugs.webkit.org/show_bug.cgi?id=69267
Reviewed by Eric Seidel.
The failure was caused by our updating bidi resolver's current position in layoutRunsAndFloatsInRange
without updating the number of nested isolated ancestors. Fixed the bug by computing the number of
isolated ancestors when setting a new position to the bidi resolver.
Also renamed the existing BidiResolver::setPosition to setPositionIgnoringNestedIsolates because this
version can be used only when we don't have to update the number of nested isolates.
Tests: fast/text/bidi-isolate-hang-with-neutral-expected.html
fast/text/bidi-isolate-hang-with-neutral.html
fast/text/bidi-isolate-nextlinebreak-failure.html
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawBidiText):
* platform/text/BidiResolver.h:
(WebCore::BidiResolver::setPositionIgnoringNestedIsolates):
(WebCore::BidiResolver::setPosition):
* rendering/InlineIterator.h:
(WebCore::numberOfIsolateAncestors): Takes InlineIterator instead of object and root.
(WebCore::InlineBidiResolver::appendRun):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::constructBidiRuns):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::determineStartPosition):
2011-11-30 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Correct SimpleFontData implementation to match Apple results.
https://bugs.webkit.org/show_bug.cgi?id=73474
Reviewed by Adam Roben.
Tested by existing dom/xhtml/level3/core/nodegetbaseuri05.xhtml
and dom/xhtml/level3/core/nodegetbaseuri07.xhtml
* platform/graphics/SimpleFontData.h: Add declaration for new
'ascentConsideringMacAscentHack' method.
* platform/graphics/win/SimpleFontDataCGWin.cpp: Remove implementation
of 'platformCharWidthInit' (moved to SimpleFontDataWin.cpp). Also
use new 'ascentConsideringMacAscentHack' method.
* platform/graphics/win/SimpleFontDataCairoWin.cpp: Remove dummy
implementation.
(WebCore::SimpleFontData::platformInit): Add logic to handle the
'shouldApplyMacAscentHack' case, as well as to identify system font
using the same criteria as the Apple port.
(WebCore::SimpleFontData::platformWidthForGlyph): Add check for
missing font data state.
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::ascentConsideringMacAscentHack): New
(WebCore::SimpleFontData::platformCharWidthInit): Moved from the
CG implementation.
2011-11-30 David Levin <levin@chromium.org>
Make FrameView use TemporarilyChange in a few places.
https://bugs.webkit.org/show_bug.cgi?id=73403
Reviewed by Dmitry Titov.
No new functionality exposed so no new tests.
* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutParentViewIfNeeded): Since this function isn't
re-entrant, TemporarilyChange does the same thing but in a more robust manner
in case there would be a return added in the function.
(WebCore::FrameView::layout): This place is the key reason for the change.
layout is re-entrant, but layout will set m_layoutSchedulingEnabled to true when
leaving though the "layout" function higher in the stack would still have it set
to false (which works ok but is hit by another change I'm working on).
The majority of the change is due to indenting the code to make m_layoutSchedulingEnabled
and TemporarilyChange behave like they did before. A few variables were moved before
the scoping to allow them to be used after the scope is closed.
(WebCore::FrameView::setScrollPosition): TemporarilyChange does exactly what
this code did before (saving the old value and restoring it).
2011-11-30 Alejandro G. Castro <alex@igalia.com>
[GTK] Add TextureMapperCairo boilerplate implementation
https://bugs.webkit.org/show_bug.cgi?id=73440
Add TextureMapperCairo class and TextureMapper classes compilation
for GTK+.
Reviewed by Martin Robinson.
* GNUmakefile.am:
* GNUmakefile.list.am:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/GraphicsLayer.cpp:
* platform/graphics/GraphicsLayer.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::platformLayer):
* platform/graphics/cairo/TextureMapperCairo.cpp: Added.
(WebCore::BitmapTextureCairo::destroy):
(WebCore::BitmapTextureCairo::size):
(WebCore::BitmapTextureCairo::reset):
(WebCore::BitmapTextureCairo::beginPaint):
(WebCore::BitmapTextureCairo::endPaint):
(WebCore::BitmapTextureCairo::updateContents):
(WebCore::BitmapTextureCairo::save):
(WebCore::BitmapTextureCairo::setContentsToImage):
(WebCore::TextureMapperCairo::beginClip):
(WebCore::TextureMapperCairo::endClip):
(WebCore::TextureMapperCairo::viewportSize):
(WebCore::TextureMapperCairo::TextureMapperCairo):
(WebCore::TextureMapperCairo::setGraphicsContext):
(WebCore::TextureMapperCairo::graphicsContext):
(WebCore::TextureMapperCairo::bindSurface):
(WebCore::TextureMapperCairo::drawTexture):
(WebCore::TextureMapper::create):
(WebCore::TextureMapperCairo::createTexture):
(WebCore::BitmapTextureCairo::BitmapTextureCairo):
(WebCore::TextureMapperCairo::beginPainting):
(WebCore::TextureMapperCairo::endPainting):
* platform/graphics/cairo/TextureMapperCairo.h: Added.
(WebCore::BitmapTextureCairo::~BitmapTextureCairo):
(WebCore::BitmapTextureCairo::isValid):
(WebCore::BitmapTextureCairo::sourceRect):
(WebCore::BitmapTextureCairo::pack):
(WebCore::BitmapTextureCairo::unpack):
(WebCore::BitmapTextureCairo::isPacked):
(WebCore::BitmapTextureCairo::cr):
(WebCore::TextureMapperCairo::allowSurfaceForRoot):
(WebCore::TextureMapperCairo::create):
2011-11-30 Tim Horton <timothy_horton@apple.com>
Implement CSS3 Images cross-fade() image function
https://bugs.webkit.org/show_bug.cgi?id=52162
<rdar://problem/10209254>
Reviewed by Simon Fraser.
Fix platform layering violation by moving CachedImage invalidation code into
CSSCrossfadeValue (instead of CrossfadeGeneratedImage).
No new tests.
* css/CSSCrossfadeValue.cpp:
(WebCore::loadSubimage):
(WebCore::CSSCrossfadeValue::~CSSCrossfadeValue):
(WebCore::CSSCrossfadeValue::customCssText):
(WebCore::CSSCrossfadeValue::fixedSize):
(WebCore::CSSCrossfadeValue::isPending):
(WebCore::CSSCrossfadeValue::loadSubimages):
(WebCore::CSSCrossfadeValue::image):
(WebCore::CSSCrossfadeValue::CrossfadeSubimageObserverProxy::imageChanged):
* css/CSSCrossfadeValue.h:
(WebCore::CSSCrossfadeValue::create):
(WebCore::CSSCrossfadeValue::setPercentage):
(WebCore::CSSCrossfadeValue::CSSCrossfadeValue):
(WebCore::CSSCrossfadeValue::CrossfadeSubimageObserverProxy::CrossfadeSubimageObserverProxy):
(WebCore::CSSCrossfadeValue::CrossfadeSubimageObserverProxy::~CrossfadeSubimageObserverProxy):
(WebCore::CSSCrossfadeValue::CrossfadeSubimageObserverProxy::setReady):
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
(WebCore::CrossfadeGeneratedImage::drawCrossfade):
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/CrossfadeGeneratedImage.h:
(WebCore::CrossfadeGeneratedImage::create):
2011-11-30 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: [Regression] Successfully loaded XHRs are shown as canceled.
https://bugs.webkit.org/show_bug.cgi?id=72873
Reviewed by Nate Chapin.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::cancelIfNotFinishing):
* loader/SubresourceLoader.h:
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::allClientsRemoved):
2011-11-30 Simon Hausmann <simon.hausmann@nokia.com>
[V8] Make WebCoreTestingSupport::resetInternalsObject more robust
https://bugs.webkit.org/show_bug.cgi?id=73437
Reviewed by Adam Barth.
The Qt DRT may end up calling resetInternalsObject at a time when
there's no internals object yet. In that case the looking of the internals
object in the global object fails and returns undefined. V8Internals::toNative
doesn't handle that and causing failing assertions. This patch adds a simple
check to handle this case.
* testing/v8/WebCoreTestSupport.cpp:
(WebCoreTestSupport::resetInternalsObject):
2011-11-30 James Simonsen <simonjam@chromium.org>
Fix valgrind issue in SubresourceLoader::didFinishLoading
https://bugs.webkit.org/show_bug.cgi?id=72787
Hang on to CachedResource until finish() is called.
Reviewed by Nate Chapin.
Test: fast/loader/subresource-load-failed-crash.html (under asan)
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::SubresourceLoader::didFail):
2011-11-30 Tim Horton <timothy_horton@apple.com>
feImage referencing a primitive draws incorrectly
https://bugs.webkit.org/show_bug.cgi?id=71731
<rdar://problem/10408178>
Reviewed by Simon Fraser.
If the target of an <feImage> appears to be a local fragment identifier, but
it hasn't resolved yet, defer resolution instead of loading a bogus image.
Invalidate <feImage> if the xlink:href attribute changes.
Don't attempt to render an <feImage> if the referenced element is of size 0x0.
Tests: svg/filters/feImage-reference-invalidation.svg
svg/filters/feImage-reference-svg-primitive.svg
svg/filters/feImage-zero-size-crash.svg
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::parseMappedAttribute):
(WebCore::SVGFEImageElement::build):
2011-11-30 Robin Dunn <robin@alldunn.com>
[wx] Ensure we always notify the popup client that the popup
was hidden, and fix handling of empty menu items.
https://bugs.webkit.org/show_bug.cgi?id=73464
Reviewed by Kevin Ollivier.
* platform/wx/PopupMenuWx.cpp:
(WebCore::PopupMenuEventHandler::OnMenuItemSelected):
(WebCore::PopupMenuWx::show):
2011-11-30 Tim Horton <timothy_horton@apple.com>
dx causes non-BMP characters to fail to render
https://bugs.webkit.org/show_bug.cgi?id=18039
<rdar://problem/10422142>
Reviewed by Simon Fraser.
Don't split the surrogate pairs of non-BMP characters across
elements of <text> positioning lists.
Test: svg/text/non-bmp-positioning-lists.svg
* rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
(WebCore::SVGTextLayoutAttributesBuilder::propagateLayoutAttributes):
2011-11-30 Robin Dunn <robin@alldunn.com>
[wx] Add a scope for the raw bitmap access so that wx
will not make a copy when creating the wxMemoryDC.
https://bugs.webkit.org/show_bug.cgi?id=73461
Reviewed By Kevin Ollivier.
* platform/wx/LocalDC.h:
(WebCore::LocalDC::LocalDC):
2011-11-30 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Inspect element does not highlight element in elements panel when inspector is opened.
https://bugs.webkit.org/show_bug.cgi?id=73459
Reviewed by Pavel Feldman.
This regressed in r101503.
* inspector/InjectedScriptHost.cpp:
(WebCore::InjectedScriptHost::InjectedScriptHost):
(WebCore::InjectedScriptHost::disconnect):
(WebCore::InjectedScriptHost::inspectImpl):
* inspector/InjectedScriptHost.h:
(WebCore::InjectedScriptHost::init):
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::enable):
(WebCore::InspectorAgent::inspect):
* inspector/InspectorAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::connectFrontend):
(WebCore::WorkerInspectorController::disconnectFrontend):
2011-11-30 Tony Chang <tony@chromium.org>
Remove dead flexible box code
https://bugs.webkit.org/show_bug.cgi?id=73377
Reviewed by Darin Adler.
We used to use these with an earlier version of the spec where margins
set to auto were treated as flex(1).
No new tests, just removing some uncalled methods.
* rendering/RenderFlexibleBox.cpp:
* rendering/RenderFlexibleBox.h:
2011-11-30 Antti Koivisto <antti@apple.com>
Reuse cached style fully if the parent inherited styles are equal
https://bugs.webkit.org/show_bug.cgi?id=73421
Reviewed by Oliver Hunt.
The matched declaration cache currently restores the non-inherted properties from the cache
entry but still applies all inherited properties normally. In case the current parent
inherited style is equivalent to the cache entry's, also the inherited style can be reused
and no properties need to be applied. This is faster and saves memory (by sharing the
style substructures better).
The new optimized code path has a pretty good hit rate, >50% of all cases on many pages.
Loading the HTML5 spec this reduces style memory consumption by ~20% (5MB, ~2.5% of total) and
speeds up style applying by ~25% for ~0.4s (2-3%) gain in the spec loading benchmark.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyDeclaration):
(WebCore::CSSStyleSelector::applyDeclarations):
Remove the code that dynamically disables inherited only applying. We now don't allow
styles with explicitly inherited properties to be cached in the first place.
(WebCore::CSSStyleSelector::findFromMatchedDeclarationCache):
Return the full cache item.
(WebCore::CSSStyleSelector::addToMatchedDeclarationCache):
Also the parent style is now needed for the check for full sharing.
(WebCore::isCacheableInMatchedDeclarationCache):
Don't allow styles with explicitly inherited properties to be cached at all.
(WebCore::CSSStyleSelector::applyMatchedDeclarations):
If the parent inherited styles are equal reuse the cache entry fully and return without
doing anything else.
* css/CSSStyleSelector.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::inheritedDataShared):
* rendering/style/RenderStyle.h:
Add fast check for equal inherited properties.
2011-11-30 Renata Hodovan <reni@webkit.org>
CG buildfix after r101517.
Rubber stamped by Zoltan Herczeg.
* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::fillShape):
2011-11-30 Anna Cavender <annacc@chromium.org>
Missing RuntimeEnabled check for <track>
https://bugs.webkit.org/show_bug.cgi?id=73398
Reviewed by Eric Carlson.
No new tests. This fixes a problem when --enable-video-track is not used,
but the tests use this flag.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::trackWillBeRemoved):
2011-11-30 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: [refactoring] do not clone nodes that contain linkified URLs
https://bugs.webkit.org/show_bug.cgi?id=73323
Reviewed by Pavel Feldman.
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylePropertiesSection):
(WebInspector.StylePropertiesSection.prototype._createRuleOriginNode):
(WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback):
(WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted):
(WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace):
(WebInspector.BlankStylePropertiesSection.prototype.makeNormal):
* inspector/front-end/elementsPanel.css:
(.styles-section a[data-uncopyable]):
(.styles-section a[data-uncopyable]::before):
2011-11-30 Renata Hodovan <reni@webkit.org>
Add new renderer for SVGRectElement.
https://bugs.webkit.org/show_bug.cgi?id=65769
Reviewed by Nikolas Zimmermann.
This patch introduces a new common base class called RenderSVGShape which
replaces the RenderSVGPath. This new base class has the same purpose
as the replaced class and has specialized descendants for common
shapes (like Rectangles and Circles), which allows faster painting
of these shapes when certain conditions are fulfilled. On some
benchmark programs we have seen 5% speedup.
The biggest motivation of this refactor is taking advantage
of faster primitive drawing in the most common and frequent
cases. However in some rare cases, like painting rounded
rects, we need to fallback to the original code path, which
is fully kept in the RenderSVGShape base class. Some other
cases, like dashed strokes, can be painted but mouse pointer
events cannot be handled by the descendant classes. A different
fallback mechanism is used in such cases which redirects
only the pointer event handling to the base class.
Tests: svg/custom/pointer-events-on-rounded-rect.xhtml
svg/custom/pointer-events-with-linecaps-and-miterlimits.xhtml
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* platform/graphics/FloatRect.cpp:
(WebCore::FloatRect::contains):
* platform/graphics/FloatRect.h:
(WebCore::FloatRect::contains):
* rendering/RenderObject.h:
(WebCore::RenderObject::isSVGRect):
(WebCore::RenderObject::isSVGShape):
* rendering/RenderTreeAsText.cpp:
(WebCore::write):
* rendering/svg/RenderSVGAllInOne.cpp:
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::isGraphicsElement):
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::RenderSVGPath):
(WebCore::RenderSVGPath::inflateWithStrokeAndMarkerBounds): Unite the markerBounds with strokeBoundingBox.
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.cpp: Added.
(WebCore::RenderSVGRect::RenderSVGRect):
(WebCore::RenderSVGRect::~RenderSVGRect):
(WebCore::RenderSVGRect::createShape):
(WebCore::RenderSVGRect::objectBoundingBox):
(WebCore::RenderSVGRect::strokeBoundingBox):
(WebCore::RenderSVGRect::fillShape):
(WebCore::RenderSVGRect::strokeShape):
(WebCore::RenderSVGRect::shapeDependentStrokeContains):
(WebCore::RenderSVGRect::shapeDependentFillContains):
* rendering/svg/RenderSVGRect.h: Added.
(WebCore::RenderSVGRect::isSVGRect):
(WebCore::RenderSVGRect::renderName):
(WebCore::RenderSVGRect::isEmpty):
* rendering/svg/RenderSVGResource.h:
(WebCore::RenderSVGResource::postApplyResource): A new shape argument was added to allow shape specific faster painting.
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::postApplyResource):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::RenderSVGResourceGradient::applyResource):
* rendering/svg/RenderSVGResourceGradient.h:
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::postApplyResource):
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceSolidColor.cpp:
(WebCore::RenderSVGResourceSolidColor::postApplyResource):
* rendering/svg/RenderSVGResourceSolidColor.h:
* rendering/svg/RenderSVGShape.cpp: Copied from Source/WebCore/rendering/svg/RenderSVGPath.cpp.
(WebCore::RenderSVGShape::RenderSVGShape):
(WebCore::RenderSVGShape::~RenderSVGShape):
(WebCore::RenderSVGShape::createShape):
(WebCore::RenderSVGShape::isEmpty):
(WebCore::RenderSVGShape::fillShape):
(WebCore::RenderSVGShape::objectBoundingBox):
(WebCore::RenderSVGShape::strokeBoundingBox):
(WebCore::RenderSVGShape::strokeShape):
(WebCore::RenderSVGShape::shapeDependentStrokeContains):
The purpose of this virtual function allows decendants to use their own fast checks.
(WebCore::RenderSVGShape::shapeDependentFillContains):
The purpose of this virtual function allows decendants to use their own fast checks.
(WebCore::RenderSVGShape::fillContains):
(WebCore::RenderSVGShape::strokeContains):
(WebCore::RenderSVGShape::layout):
(WebCore::RenderSVGShape::shouldStrokeZeroLengthSubpath):
(WebCore::RenderSVGShape::zeroLengthSubpathRect):
(WebCore::RenderSVGShape::setupSquareCapPath):
(WebCore::RenderSVGShape::setupNonScalingStrokePath):
(WebCore::RenderSVGShape::fillAndStrokePath):
(WebCore::RenderSVGShape::paint):
(WebCore::RenderSVGShape::addFocusRingRects):
(WebCore::RenderSVGShape::nodeAtFloatPoint):
(WebCore::RenderSVGShape::calculateMarkerBoundsIfNeeded):
(WebCore::RenderSVGShape::updateCachedBoundaries):
(WebCore::RenderSVGShape::strokeWidth):
* rendering/svg/RenderSVGShape.h: Copied from Source/WebCore/rendering/svg/RenderSVGPath.h.
(WebCore::BoundingRectStrokeStyleApplier::BoundingRectStrokeStyleApplier):
(WebCore::BoundingRectStrokeStyleApplier::strokeStyle):
(WebCore::RenderSVGShape::setNeedsShapeUpdate):
(WebCore::RenderSVGShape::setNeedsBoundariesUpdate):
(WebCore::RenderSVGShape::setNeedsTransformUpdate):
(WebCore::RenderSVGShape::isPaintingFallback):
(WebCore::RenderSVGShape::path):
(WebCore::RenderSVGShape::setIsPaintingFallback):
(WebCore::RenderSVGShape::setStrokeAndMarkerBoundingBox):
(WebCore::RenderSVGShape::hasPath):
(WebCore::RenderSVGShape::repaintRectInLocalCoordinates):
(WebCore::RenderSVGShape::localToParentTransform):
(WebCore::RenderSVGShape::localTransform):
(WebCore::RenderSVGShape::isSVGShape):
(WebCore::RenderSVGShape::renderName):
(WebCore::RenderSVGShape::isRoundedRect):
(WebCore::RenderSVGShape::inflateWithMarkerBounds):
(WebCore::toRenderSVGShape):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::releasePaintingResource):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::finishRenderSVGContent):
(WebCore::SVGRenderSupport::layoutChildren):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeStyle):
(WebCore::operator<<):
(WebCore::write):
* rendering/svg/SVGRenderTreeAsText.h:
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::drawSVGGlyphs):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::svgAttributeChanged):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::svgAttributeChanged):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::svgAttributeChanged):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::svgAttributeChanged):
(WebCore::SVGPathElement::pathSegListChanged):
(WebCore::SVGPathElement::createRenderer):
* svg/SVGPathElement.h:
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::svgAttributeChanged):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::svgAttributeChanged):
(WebCore::SVGRectElement::createRenderer):
* svg/SVGRectElement.h:
2011-11-30 Adam Roben <aroben@apple.com>
Another Clang build fix after r101507
* platform/network/SocketStreamHandleClient.h:
(WebCore::SocketStreamHandleClient::didUpdateBufferedAmount): Removed unused parameter.
2011-11-30 Renata Hodovan <reni@webkit.org>
MAC build fix after r101507.
Rubber stamped by Csaba Osztrogonac.
* platform/network/SocketStreamHandleClient.h:
(WebCore::SocketStreamHandleClient::didUpdateBufferedAmount):
* websockets/WebSocket.cpp:
(WebCore::WebSocket::didUpdateBufferedAmount):
* websockets/WebSocket.h:
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::didUpdateBufferedAmount):
* websockets/WebSocketChannel.h:
2011-11-30 John Knottenbelt <jknotten@chromium.org>
Remove unnecessary asserts in HTMLTextAreaElement.
https://bugs.webkit.org/show_bug.cgi?id=73135
http://code.google.com/p/chromium/issues/detail?id=103228 shows
that sometimes we are hitting the following assert in
HTMLTextAreaElement::updateFocusAppearance:
ASSERT(!document()->childNeedsAndNotInStyleRecalc());
This assert was added by https://bugs.webkit.org/show_bug.cgi?id=27474
as part of a fix for a crash when the selection is set immediately
after setting display:none.
All the methods called by updateFocusAppearance already handle the
case of the document having the childNeedsStyleRecalc flag set, so
this assert is unnecessary. The ASSERT(renderer()) is similarly
redundant.
Reviewed by Kent Tamura.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::updateFocusAppearance):
2011-11-30 Adam Roben <aroben@apple.com>
Clang build fix after r101507
* websockets/WebSocketChannelClient.h:
(WebCore::WebSocketChannelClient::didUpdateBufferedAmount): Removed unused parameter.
2011-11-30 Nikita Vasilyev <me@elv1s.ru>
Web Inspector: Preserve an indentation level when inserting a new line
https://bugs.webkit.org/show_bug.cgi?id=71625
Indent one level more when a line ends with either "{", "[" or "(".
Reviewed by Pavel Feldman.
* inspector/front-end/TextEditorModel.js:
(WebInspector.TextRange.prototype.collapseToEnd):
(WebInspector.TextRange.prototype.normalize):
* inspector/front-end/TextViewer.js:
(WebInspector.TextViewer.prototype._registerShortcuts):
(WebInspector.TextViewer.prototype._handleKeyDown):
(WebInspector.TextEditorMainPanel.prototype.handleEnterKey):
(WebInspector.TextEditorMainPanel.prototype._getSelection):
2011-11-30 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Display of data URIs cumbersome in the Elements panel
https://bugs.webkit.org/show_bug.cgi?id=73438
Reviewed by Pavel Feldman.
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
2011-11-28 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: TreeOutline elements should be formatted using margin-left instead of text-indent.
https://bugs.webkit.org/show_bug.cgi?id=73234
Reviewed by Pavel Feldman.
* inspector/front-end/ResourceHeadersView.js:
(WebInspector.ResourceHeadersView.prototype._refreshHeadersText):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.BaseStorageTreeElement.prototype.get searchMatchesCount):
* inspector/front-end/auditsPanel.css:
(.audit-result-tree li):
(.audit-result-tree li.parent):
(.audit-result img):
* inspector/front-end/inspector.css:
(.outline-disclosure li):
(.outline-disclosure li.parent):
* inspector/front-end/networkPanel.css:
* inspector/front-end/resourcesPanel.css:
(.resources.panel .sidebar-resizer-vertical):
(.resources.panel .sidebar li):
* inspector/front-end/treeoutline.js:
(TreeElement.prototype.isEventWithinDisclosureTriangle):
2011-11-30 Kentaro Hara <haraken@chromium.org>
Implement the [NamedConstructor] IDL in CodeGeneratorJS.pm
https://bugs.webkit.org/show_bug.cgi?id=73307
Reviewed by Adam Barth.
This patch implements the [NamedConstructor] IDL for JSC.
The spec: http://www.w3.org/TR/WebIDL/#NamedConstructor
Tests: bindings/scripts/test/JS/JSTestNamedConstructor.idl
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader): Removed unnecessary conditions '$dataNode->extendedAttributes->{"JSCustomConstructor"} || $dataNode->extendedAttributes->{"CustomConstructor"}'.
(GenerateImplementation): Calls GenerateConstructorDefinition() to generate a NamedConstructor.
(GenerateConstructorDeclaration): Generates a header for a NamedConstructor.
(GenerateConstructorDefinition): Generates a NamedConstructor implementation and getConstructData() for the NamedConstructor.
(IsConstructable): Added a NamedConstructor condition.
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Updated a run-bindings-tests result.
(WebCore::JSTestNamedConstructorNamedConstructor::JSTestNamedConstructorNamedConstructor):
(WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
(WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
(WebCore::JSTestNamedConstructorNamedConstructor::getConstructData):
* bindings/scripts/test/JS/JSTestNamedConstructor.h: Ditto.
(WebCore::JSTestNamedConstructorNamedConstructor::create):
(WebCore::JSTestNamedConstructorNamedConstructor::createStructure):
2011-11-30 Takashi Toyoshima <toyoshim@chromium.org>
Add didUpdateBufferedAmount() callback to SocketStreamHandleClient
and WebSocketChannelClient.
https://bugs.webkit.org/show_bug.cgi?id=73290
Reviewed by Kent Tamura.
No new tests because this callback is not used in WebCore.
* platform/network/SocketStreamHandleBase.cpp: Invoke new callback.
(WebCore::SocketStreamHandleBase::send):
(WebCore::SocketStreamHandleBase::sendPendingData):
* platform/network/SocketStreamHandleBase.h: Change returning value type.
(WebCore::SocketStreamHandleBase::bufferedAmount):
* platform/network/SocketStreamHandleClient.h: Add new callback definition.
(WebCore::SocketStreamHandleClient::didUpdateBufferedAmount):
* websockets/ThreadableWebSocketChannelClientWrapper.cpp: Add new callback handling.
(WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
(WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmountCallback):
* websockets/ThreadableWebSocketChannelClientWrapper.h: Add new callback inheritance and its helper method.
* websockets/WebSocket.cpp: Add new callback handling.
(WebCore::WebSocket::didUpdateBufferedAmount):
* websockets/WebSocket.h: Add new callback inheritance.
* websockets/WebSocketChannel.cpp: Add new callback handling.
(WebCore::WebSocketChannel::didUpdateBufferedAmount):
* websockets/WebSocketChannel.h: Add new callback inheritacne.
* websockets/WebSocketChannelClient.h: Add new callback definition.
(WebCore::WebSocketChannelClient::didUpdateBufferedAmount):
* websockets/WorkerThreadableWebSocketChannel.cpp: Add new callback handling.
(WebCore::workerContextDidUpdateBufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
* websockets/WorkerThreadableWebSocketChannel.h: Add new callback inheritance and its helper method.
2011-11-30 Kentaro Hara <haraken@chromium.org>
[Refactoring] In preprocessor.pm, remove double quotations from $defines
https://bugs.webkit.org/show_bug.cgi?id=73160
Reviewed by Adam Barth.
In preprocessor.pm, we need to extract gcc macros from $defines.
$defines can contain unnecessary double quotations.
For example, if $defines is ' "A=1" "B=1" C=1 "" D ',
then it should be converted into four macros, -DA=1, -DB=1, -DC=1 and -DD.
This patch refactors the logic in preprocessor.pm.
No new tests. No change in behavior.
* bindings/scripts/generate-bindings.pl: Removed a code for $defines conversion, since it is now done in preprocessor.pm.
* bindings/scripts/preprocessor.pm:
(applyPreprocessor):
2011-11-30 Kenichi Ishibashi <bashi@chromium.org>
@font-face: unquoted local font names containing spaces don't work
https://bugs.webkit.org/show_bug.cgi?id=64783
Allows local font names with spaces.
Rejects the src descriptor if there is invalid identifiers in local(), as the same as Firefox.
Reviewed by Ryosuke Niwa.
Tests: fast/css/font-face-unquoted-local-expected.html
fast/css/font-face-unquoted-local.html
* css/CSSParser.cpp:
(WebCore::parseFontFaceSrcFunction): Added. Treats multiple identifiers in local() as a font name separated by spaces.
(WebCore::CSSParser::parseFontFaceSrc): Moved the code block which parses local() and format() to parseFontFaceSrcFunction().
2011-11-30 Pavel Feldman <pfeldman@google.com>
Web Inspector: get rid of deferred backend->front-end commands processing.
https://bugs.webkit.org/show_bug.cgi?id=73439
We should issue tests upon InspectorAgent::enable and should not do any deferred command processing.
Reviewed by Yury Semikhatsky.
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
(WebCore::InspectorAgent::setFrontend):
(WebCore::InspectorAgent::clearFrontend):
(WebCore::InspectorAgent::enable):
(WebCore::InspectorAgent::evaluateForTestInFrontend):
* inspector/InspectorAgent.h:
* inspector/front-end/inspector.js:
2011-11-30 Andreas Kling <kling@webkit.org>
REGRESSION(r101172): It made fast/dom/clone-node-style.html assert.
<http://webkit.org/b/73227>
Reviewed by Antti Koivisto.
r101172 inadvertently introduced a default assignment operator for CSSElementStyleDeclaration
which caused StyledElement::copyNonAttributeProperties() to associate the element's inline
style declaration with the element being cloned.
Replace CSSMutableStyleDeclaration::operator= by copyPropertiesAndStrictnessFrom()
that matches the old behavior.
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::copyPropertiesAndStrictnessFrom):
* css/CSSMutableStyleDeclaration.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::copyNonAttributeProperties):
2011-11-30 Mary Wu <mary.wu@torchmobile.com.cn>
remove buildinformation from BlackBerry porting build system
https://bugs.webkit.org/show_bug.cgi?id=73276
Reviewed by Daniel Bates.
* PlatformBlackBerry.cmake: remove generated files BuildInformation.cpp/.h
2011-11-30 Luke Macpherson <macpherson@chromium.org>
Implement Zoom Property in CSSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=72840
Reviewed by Andreas Kling.
Covered by fast/css/*zoom*.html
* css/CSSStyleApplyProperty.cpp:
Add new handler for zoom property (based on existing code from CSSStyleSelector.cpp)
(WebCore::ApplyPropertyZoom::resetEffectiveZoom):
(WebCore::ApplyPropertyZoom::applyInheritValue):
(WebCore::ApplyPropertyZoom::applyInitialValue):
(WebCore::ApplyPropertyZoom::applyValue):
(WebCore::ApplyPropertyZoom::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
Remove existing implementation.
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSStyleSelector.h:
(WebCore::CSSStyleSelector::document):
Add getter for Document.
2011-11-30 David Reveman <reveman@chromium.org>
[Chromium] Re-enable layer anti-aliasing on ChromeOS.
https://bugs.webkit.org/show_bug.cgi?id=73361
Reviewed by James Robinson.
Anti-aliasing should be enabled by default on ChromeOS.
No new tests.
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::drawLayer):
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::CCTiledLayerImpl::draw):
2011-11-30 Michael Nordman <michaeln@google.co>
[chromium] WebSQLDatabase could use some better error reporting.
Instruments the database classes to report errors to a DatabaseObserver.
https://bugs.webkit.org/show_bug.cgi?id=73258
Reviewed by David Levin.
No new tests, no content observable artifacts.
* storage/AbstractDatabase.cpp:
(WebCore::AbstractDatabase::AbstractDatabase):
(WebCore::AbstractDatabase::performOpenAndVerify):
(WebCore::AbstractDatabase::incrementalVacuumIfNeeded):
(WebCore::AbstractDatabase::reportOpenDatabaseResult):
(WebCore::AbstractDatabase::reportChangeVersionResult):
(WebCore::AbstractDatabase::reportStartTransactionResult):
(WebCore::AbstractDatabase::reportCommitTransactionResult):
(WebCore::AbstractDatabase::reportExecuteStatementResult):
(WebCore::AbstractDatabase::reportVacuumDatabaseResult):
* storage/AbstractDatabase.h:
(WebCore::AbstractDatabase::isSyncDatabase):
* storage/ChangeVersionWrapper.cpp:
(WebCore::ChangeVersionWrapper::performPreflight):
(WebCore::ChangeVersionWrapper::performPostflight):
* storage/Database.cpp:
(WebCore::Database::Database):
* storage/DatabaseSync.cpp:
(WebCore::DatabaseSync::DatabaseSync):
(WebCore::DatabaseSync::changeVersion):
* storage/SQLStatement.cpp:
(WebCore::SQLStatement::execute):
(WebCore::SQLStatement::setDatabaseDeletedError):
(WebCore::SQLStatement::setVersionMismatchedError):
(WebCore::SQLStatement::setFailureDueToQuota):
* storage/SQLStatement.h:
* storage/SQLTransaction.cpp:
(WebCore::SQLTransaction::executeSQL):
(WebCore::SQLTransaction::openTransactionAndPreflight):
(WebCore::SQLTransaction::deliverTransactionCallback):
(WebCore::SQLTransaction::runCurrentStatement):
(WebCore::SQLTransaction::handleCurrentStatementError):
(WebCore::SQLTransaction::deliverStatementCallback):
(WebCore::SQLTransaction::postflightAndCommit):
* storage/SQLTransactionSync.cpp:
(WebCore::SQLTransactionSync::begin):
(WebCore::SQLTransactionSync::commit):
* storage/chromium/DatabaseObserver.h:
2011-11-30 Rafael Weinstein <rafaelw@chromium.org>
[MutationObservers] V8 bindings don't properly wrap all calls into JS
https://bugs.webkit.org/show_bug.cgi?id=72063
Reviewed by Adam Barth.
This patch changes cleans up script invocation in V8Proxy. It removes callFunctionWithoutFrame
and changes callers to simply call instrumentedFunctionCall with a null Page. Also, it implements
the non-static callFunction to be implemented in terms of instrumentedFunctionCall.
No new tests.
* bindings/v8/ScriptFunctionCall.cpp:
(WebCore::ScriptCallback::call):
* bindings/v8/V8NodeFilterCondition.cpp:
(WebCore::V8NodeFilterCondition::acceptNode):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::callFunction):
(WebCore::V8Proxy::instrumentedCallFunction):
* bindings/v8/V8Proxy.h:
* bindings/v8/custom/V8CustomXPathNSResolver.cpp:
(WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
2011-11-30 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101440 and r101442.
http://trac.webkit.org/changeset/101440
http://trac.webkit.org/changeset/101442
https://bugs.webkit.org/show_bug.cgi?id=73429
multiple crashes on layout tests (Requested by hayato on
#webkit).
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
* platform/graphics/chromium/WebGLLayerChromium.cpp:
(WebCore::WebGLLayerChromium::layerRendererContext):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::enabled):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::CCLayerTreeHost):
(WebCore::CCLayerTreeHost::initialize):
(WebCore::CCLayerTreeHost::~CCLayerTreeHost):
(WebCore::CCLayerTreeHost::context):
(WebCore::CCLayerTreeHost::setNeedsAnimate):
(WebCore::CCLayerTreeHost::setNeedsCommit):
(WebCore::CCLayerTreeHost::setNeedsRedraw):
(WebCore::CCLayerTreeHost::composite):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
* platform/graphics/chromium/cc/CCProxy.cpp:
(WebCore::CCProxy::isMainThread):
(WebCore::CCProxy::isImplThread):
(WebCore::CCProxy::setImplThread):
* platform/graphics/chromium/cc/CCProxy.h:
* platform/graphics/chromium/cc/CCSingleThreadProxy.h:
(WebCore::DebugScopedSetImplThread::DebugScopedSetImplThread):
(WebCore::DebugScopedSetImplThread::~DebugScopedSetImplThread):
2011-11-30 Alexey Proskuryakov <ap@apple.com>
Download page URL should be set by WebCore
https://bugs.webkit.org/show_bug.cgi?id=73358
Reviewed by Darin Adler.
No change in behavior, just refactoring.
* loader/FrameLoader.h:
* loader/FrameLoader.cpp:
(WebCore::originatingURLFromBackForwardList):
(WebCore::FrameLoader::setOriginalURLForDownloadRequest):
Moved implementations from WebKit, added a bunch of FIXMEs.
* loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy):
Set main document URL (incorrectly renamed to "first party for cookies" in WebCore), so that
CFNetwork would automatically use it.
* loader/PolicyChecker.cpp: (WebCore::PolicyChecker::continueAfterNavigationPolicy): Ditto
for requests that start as downloads (as opposed to being converted after reading first bits
of response).
2011-11-30 Rafael Weinstein <rafaelw@chromium.org>
Remove unused isInlineCode from V8Proxy
https://bugs.webkit.org/show_bug.cgi?id=73341
Reviewed by Adam Barth.
No tests needed. This patch only removes unnecessary code.
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::prepareListenerObject):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::V8Proxy):
(WebCore::V8Proxy::evaluate):
(WebCore::V8Proxy::runScript):
* bindings/v8/V8Proxy.h:
2011-11-30 Andrew Wason <rectalogic@rectalogic.com>
Replace Qt QThread threading back-end with pthread/Win32 threading back-ends
https://bugs.webkit.org/show_bug.cgi?id=72155
Reviewed by Simon Hausmann.
Need to include qglobal.h since ThreadingPrimitives.h no longer does.
* platform/network/NetworkingContext.h:
2011-11-30 Jongseok Yang <js45.yang@samsung.com>
[SOUP][WK2] Implement the functions to manager cookies in CookieJar for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=72353
r79722 inserted the functions to manange cookies from web process.
(getHostnamesWithCookies,deleteCookiesForHostname,deleteAllCookies)
Implement the functions for soup network backend.
Reviewed by Martin Robinson.
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostname):
(WebCore::deleteAllCookies):
2011-11-30 Daniel Sievers <sievers@chromium.org>
[Chromium] Avoid ASSERT_NOT_REACHED() from creating FBO with content texture of size 0
https://bugs.webkit.org/show_bug.cgi?id=73266
Remove render surface layers with no children after clipping to
the parent layer.
Move the check for empty render surfaces after the piece of code
used to apply the parent's clip, as we might end up calling
renderSurface->clearLayerList().
Render surfaces with no children or visible content are unexpected
especially at draw time where we might try to create a content
texture and FBO with a size of zero, which will fail. This fixes
an ASSERT_NOT_REACHED() for checkFramebufferStatus() != COMPLETE
Reviewed by James Robinson.
Added unit test.
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::calculateDrawTransformsAndVisibilityInternal):
2011-11-30 Pavel Feldman <pfeldman@google.com>
Web Inspector: do not report worker-related events unless inspector agent is enabled.
https://bugs.webkit.org/show_bug.cgi?id=73411
Backend should not generate messages until the client requests that they are sent.
Reviewed by Yury Semikhatsky.
* inspector/Inspector.json:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::setFrontend):
(WebCore::InspectorAgent::clearFrontend):
(WebCore::InspectorAgent::enable):
(WebCore::InspectorAgent::disable):
(WebCore::InspectorAgent::postWorkerNotificationToFrontend):
(WebCore::InspectorAgent::didCreateWorker):
(WebCore::InspectorAgent::didDestroyWorker):
(WebCore::InspectorAgent::developerExtrasEnabled):
* inspector/InspectorAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::enabled):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
(WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
(WebCore::InspectorInstrumentation::didUseDOMStorageImpl):
(WebCore::InspectorInstrumentation::didCreateWebSocketImpl):
* inspector/InspectorPageAgent.cpp:
* inspector/PageConsoleAgent.cpp:
(WebCore::PageConsoleAgent::developerExtrasEnabled):
* inspector/front-end/WorkerManager.js:
(WebInspector.WorkerManager.prototype._workerInspectorClosing):
(WebInspector.WorkerManager.prototype._disconnectedFromWorker):
(WebInspector.DedicatedWorkerMessageForwarder.prototype.dispatchMessageFromWorker):
(WebInspector.DedicatedWorkerMessageForwarder.prototype.disconnectedFromWorker):
* inspector/front-end/inspector.js:
2011-11-30 Jacky Jiang <zhajiang@rim.com>
Upstream BlackBerry porting of WebCore/editing.
https://bugs.webkit.org/show_bug.cgi?id=73275
Reviewed by Daniel Bates.
Initial upstream, no new tests.
* editing/blackberry/EditorBlackBerry.cpp: Added.
(WebCore::Editor::newGeneralClipboard):
* editing/blackberry/SmartReplaceBlackBerry.cpp: Added.
(WebCore::isCharacterSmartReplaceExempt):
2011-11-30 Noel Gordon <noel.gordon@gmail.com>
JPEGImageDecoder: Code input color space case entries in numerical order
https://bugs.webkit.org/show_bug.cgi?id=73287
Reviewed by Adam Barth.
No new tests. Covered by existing tests.
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageReader::decode): JCS_YCbCr is one greater than JSC_RGB.
2011-11-30 Alexandru Chiculita <achicu@adobe.com>
FilterOperation* should stay in rendering/style, because it is directly referenced from RenderStyle
https://bugs.webkit.org/show_bug.cgi?id=72539
Reviewed by Dean Jackson.
No new tests, just moving some files.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/style/CustomFilterOperation.h: Renamed from Source/WebCore/platform/graphics/filters/CustomFilterOperation.h.
* rendering/style/FilterOperation.h: Renamed from Source/WebCore/platform/graphics/filters/FilterOperation.h.
* rendering/style/FilterOperations.cpp: Renamed from Source/WebCore/platform/graphics/filters/FilterOperations.cpp.
* rendering/style/FilterOperations.h: Renamed from Source/WebCore/platform/graphics/filters/FilterOperations.h.
2011-11-29 Kentaro Hara <haraken@chromium.org>
StorageEvent.key should not be nullable
https://bugs.webkit.org/show_bug.cgi?id=73125
Reviewed by Adam Barth.
Currently, document.createEvent('StorageEvent').key is evaluated as null.
However, the spec (http://www.whatwg.org/specs/web-apps/current-work/#storageevent)
says that StorageEvent.key is not a nullable type, and thus
document.createEvent('StorageEvent').key should be '' (an empty string).
* storage/StorageEvent.idl: Removed a [ConvertNullStringTo=Null] IDL from StorageEvent.key.
2011-11-29 Philip Rogers <pdr@google.com>
Fix for fill color not being applied inside visited links
https://bugs.webkit.org/show_bug.cgi?id=70434
Reviewed by Antti Koivisto.
Test: svg/custom/visited-link-color.svg
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::setFillPaint):
(WebCore::SVGRenderStyle::setStrokePaint):
2011-11-29 David Levin <levin@chromium.org>
Add a way to revert a variable to its previous value after leaving a scope.
https://bugs.webkit.org/show_bug.cgi?id=73371
Reviewed by Adam Barth.
* ForwardingHeaders/wtf/TemporarilyChange.h: Added.
2011-11-28 Kentaro Hara <haraken@chromium.org>
Implement [Supplemental] IDL and support it in run-bindings-tests
https://bugs.webkit.org/show_bug.cgi?id=73162
Reviewed by Adam Barth.
- Overview:
- Implement the [Supplemental] IDL in resolve-supplemental.pl and generate-bindings.pl.
- Support the [Supplemental] IDL in run-bindings-tests.
- Add TestSupplemental.idl as a binding test and confirm that it works.
- The spec for the [Supplemental] IDL: http://dev.w3.org/2006/webapi/WebIDL/#dfn-supplemental-interface
- This patch affects run-bindings-tests results only and does not affect any real builds
since no [Supplemental] IDL has been written in real WebCore IDL files for now.
- This patch makes a change on CodeGenerator*.pm to support the [Supplemental] IDL
for (custom) getters and setters.
- Added perl scripts implement the [Supplemental] IDL as follows:
Previous build flow:
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl;
generate-bindings.pl reads $idl;
generate-bindings.pl generates .h and .cpp files for $idl;
}
New build flow (See the discussions in bug 72138 for more details):
resolve-supplemental.pl depends on all IDL files;
resolve-supplemental.pl reads all IDL files;
resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
resolve-supplemental.pl outputs supplemental_dependency.tmp;
foreach $idl (all IDL files) {
generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
generate-bindings.pl reads $idl;
generate-bindings.pl reads supplemental_dependency.tmp;
generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files which are implementing $idl;
}
Tests: bindings/scripts/test/TestSupplemental.idl
* bindings/scripts/generate-bindings.pl: The input is an IDL file |x| and the dependency file. generate-bindings.pl generates .h and .cpp files for the IDL file |x|, including all the attributes in the IDL files which are implementing the IDL file |x|. generate-bindings.pl addes the [ImplementedBy] IDL to the attributes with the [Supplemental] IDL in order to indicate what IDL is implementing the attributes.
* bindings/scripts/resolve-supplemental.pl: Added. resolve-supplemental.pl reads all IDL files, resolves [Supplemental=XXX] dependencies, and then outputs the dependency file. See the comment in resolve-supplemental.pl for the format of the dependency file.
* bindings/scripts/CodeGenerator.pm:
(GenerateConditionalStringFromAttributeValue): Avoids duplicated conditions.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader): If an attribute is [ImplementedBy] another IDL, then we omit the declaration of the custom getter and setter.
(GenerateImplementation): If an attribute is [ImplementedBy] another IDL, then we call back the (custom) getter and setter of the IDL.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader): If an attribute is [ImplementedBy] another IDL, then we omit the declaration of the custom getter and setter.
(GenerateNormalAttrGetter): If an attribute is [ImplementedBy] another IDL, then we call back the getter of the IDL.
(GenerateNormalAttrSetter): If an attribute is [ImplementedBy] another IDL, then we call back the setter of the IDL.
(GenerateSingleBatchedAttribute): If an attribute is [ImplementedBy] another IDL, then we call back the custom getter or setter of the IDL.
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateImplementation): If an attribute is [ImplementedBy] another IDL, then we call back the getter and setter of the IDL. CodeGeneratorCPP.pm does not support a custom getter and setter.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateProperty): Ditto.
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation): Ditto.
* bindings/scripts/test/TestSupplemental.idl: Added. A test case for the [Supplemental] IDL.
* bindings/scripts/test/CPP/WebDOMTestInterface.cpp: Updated a run-bindings-tests result.
(WebDOMTestInterface::str1):
(WebDOMTestInterface::str2):
(WebDOMTestInterface::setStr2):
* bindings/scripts/test/CPP/WebDOMTestInterface.h: Ditto.
* bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: Ditto.
(webkit_dom_test_interface_get_str1):
(webkit_dom_test_interface_get_str2):
(webkit_dom_test_interface_set_str2):
(webkit_dom_test_interface_set_property):
(webkit_dom_test_interface_get_property):
(webkit_dom_test_interface_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestInterface.h: Ditto.
* bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
(WebCore::jsTestInterfaceStr1):
(WebCore::jsTestInterfaceStr2):
(WebCore::jsTestInterfaceStr3):
(WebCore::JSTestInterface::put):
(WebCore::setJSTestInterfaceStr2):
(WebCore::setJSTestInterfaceStr3):
* bindings/scripts/test/JS/JSTestInterface.h: Ditto.
* bindings/scripts/test/ObjC/DOMTestInterface.h: Ditto.
* bindings/scripts/test/ObjC/DOMTestInterface.mm: Ditto.
(-[DOMTestInterface str1]):
(-[DOMTestInterface str2]):
(-[DOMTestInterface setStr2:]):
(-[DOMTestInterface str3]):
(-[DOMTestInterface setStr3:]):
* bindings/scripts/test/V8/V8TestInterface.cpp: Ditto.
(WebCore::TestInterfaceInternal::str1AttrGetter):
(WebCore::TestInterfaceInternal::str2AttrGetter):
(WebCore::TestInterfaceInternal::str2AttrSetter):
(WebCore::ConfigureV8TestInterfaceTemplate):
2011-11-29 Leo Yang <leo.yang@torchmobile.com.cn>
Upstream platform/network/blackberry/ProxyServerBlackBerry.cpp
https://bugs.webkit.org/show_bug.cgi?id=73288
Reviewed by Antonio Gomes.
Initial upstream, can't be built yet, no new tests.
* platform/network/blackberry/ProxyServerBlackBerry.cpp: Added.
(WebCore::proxyServersForURL):
2011-11-29 Jessie Berlin <jberlin@apple.com>
WKKeyValueStorageManagerGetKeyValueStorageOrigins may not report the correct list of origins
the first time it is called.
https://bugs.webkit.org/show_bug.cgi?id=73374 (<rdar://problem/10196057>)
Reviewed by Brady Eidson.
Add a callback for when the Storage Tracker is done loading the list of origins with Local
Storage.
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::StorageTracker):
Keep track of whether the import from disk has been completed.
(WebCore::StorageTracker::notifyFinishedImportingOriginIdentifiersOnMainThread):
(WebCore::StorageTracker::finishedImportingOriginIdentifiers):
Set m_finishedImportingOriginIdentifiers to true and tell the client.
(WebCore::StorageTracker::syncImportOriginIdentifiers):
When finished, notify the shared StorageTracker on the main thread.
* storage/StorageTracker.h:
(WebCore::StorageTracker::originsLoaded):
* storage/StorageTrackerClient.h:
Add didFinishLoadingOrigins.
2011-11-18 Nat Duca <nduca@chromium.org>
[chromium] Enable threaded compositing via CCThreadProxy::hasThread only
https://bugs.webkit.org/show_bug.cgi?id=70838
Reviewed by James Robinson.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
* platform/graphics/chromium/WebGLLayerChromium.cpp:
(WebCore::WebGLLayerChromium::layerRendererContext):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::enabled):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::initialize):
(WebCore::CCLayerTreeHost::context):
(WebCore::CCLayerTreeHost::setNeedsAnimate):
(WebCore::CCLayerTreeHost::setNeedsCommit):
(WebCore::CCLayerTreeHost::setNeedsRedraw):
(WebCore::CCLayerTreeHost::composite):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
* platform/graphics/chromium/cc/CCProxy.cpp:
(WebCore::CCProxy::isMainThread):
(WebCore::CCProxy::isImplThread):
(WebCore::CCProxy::setMainThreadIsImplThread):
* platform/graphics/chromium/cc/CCProxy.h:
* platform/graphics/chromium/cc/CCSingleThreadProxy.h:
(WebCore::DebugScopedSetImplThread::DebugScopedSetImplThread):
(WebCore::DebugScopedSetImplThread::~DebugScopedSetImplThread):
2011-11-29 Erik Arvidsson <arv@chromium.org>
WebIDL: Add support for static for JSC and V8
https://bugs.webkit.org/show_bug.cgi?id=72998
Reviewed by Adam Barth.
WebIDL uses "static" for class methods. We used to use "[ClassMethod]". This change makes us use the WebIDL syntax instead.
No new tests: Covered by existing tests.
* bindings/scripts/CodeGeneratorJS.pm:
(GetFunctionName): Use isStatic instead.
(GenerateOverloadedFunction): Ditto.
(GenerateImplementation): Ditto.
(GenerateParametersCheck): Ditto.
(GenerateImplementationFunctionCall): Ditto.
(GenerateConstructorDefinition): Ditto.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateFunctionCallback): Ditto.
(GenerateImplementation): Ditto.
(GenerateFunctionCallString): Ditto.
* bindings/scripts/IDLParser.pm:
(ParseInterface): Set isStatic as needed.
* bindings/scripts/IDLStructure.pm: Update regular expression to parse "static".
* bindings/scripts/test/TestObj.idl: Use static instead of [ClassMethod].
* storage/IDBKeyRange.idl: Ditto.
2011-11-29 Kentaro Hara <haraken@chromium.org>
Unreviewed. Rebaselined a run-bindings-tests result.
* bindings/scripts/test/JS/JSFloat64Array.h:
2011-11-10 Xiaomei Ji <xji@chromium.org>
--webkit-visual-word should be able to reach end of text, instead of end of line
https://bugs.webkit.org/show_bug.cgi?id=72048
Reviewed by Ryosuke Niwa.
Revert r92223 -- webkit-visual-word should reach boundary of line.
When there is no more left or right words in the same editing boundary and
current position is an editable position, return start or end position in this
editable content.
Test: editing/selection/move-by-word-visually-textarea.html
* editing/visible_units.cpp:
(WebCore::collectWordBreaksInBoxInsideBlockWithSameDirectionality):
(WebCore::collectWordBreaksInBoxInsideBlockWithDifferntDirectionality):
(WebCore::leftWordPosition):
(WebCore::rightWordPosition):
2011-11-29 Oliver Hunt <oliver@apple.com>
Allow WebCore to describe typed arrays to JSC
https://bugs.webkit.org/show_bug.cgi?id=73355
Reviewed by Gavin Barraclough.
Update bindings codegen to report the data layout to JSC.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64Array::finishCreation):
* bindings/scripts/test/JS/JSFloat64Array.h:
2011-11-29 Tony Chang <tony@chromium.org>
Rename some flexbox functions to be less confusing
https://bugs.webkit.org/show_bug.cgi?id=73363
Reviewed by Ojan Vafai.
These methods no longer have anything to do with block/inline direction.
No new tests, just renaming some functions.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::RenderFlexibleBox::layoutFlexItems):
(WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithm):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::alignChildren):
* rendering/RenderFlexibleBox.h:
2011-11-29 Erik Arvidsson <arv@chromium.org>
Add support for [ClassMethod] to CodeGeneratorJS.pm
https://bugs.webkit.org/show_bug.cgi?id=73342
Reviewed by Adam Barth.
If a method is annotated with [ClassMethod] it will become a method on the JS constructor object and it will
call a static function on the C++ class.
This was previously only implemented in CodeGeneratorV8.pm so this brings JSC up to par.
No new tests: Covered by bindings/scripts/test/
* bindings/scripts/CodeGeneratorJS.pm:
(GetFunctionName): Refactor to reduce code duplication.
(GenerateHeader): Ditto.
(GenerateOverloadedFunction): This now handles both prototype functions and constructor functions.
(GenerateImplementation): Define class methods too.
(GenerateParametersCheck): Generate the right function access string.
(GenerateImplementationFunctionCall): SVG properties are not static methods.
(GenerateConstructorDefinition): For classes that have static methods we may now return function properties.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::getOwnPropertySlot): Ditto.
(WebCore::JSTestObjConstructor::getOwnPropertyDescriptor): Ditto.
(WebCore::jsTestObjConstructorFunctionClassMethod): Now calls a static function.
(WebCore::jsTestObjConstructorFunctionClassMethodWithOptional): Ditto.
* bindings/scripts/test/JS/JSTestObj.h:
2011-11-29 Sam Weinig <sam@webkit.org>
Remove unused JSDOMWrapperOwner
https://bugs.webkit.org/show_bug.cgi?id=73357
Reviewed by Adam Barth.
* bindings/js/DOMWrapperWorld.cpp:
(WebCore::DOMWrapperWorld::DOMWrapperWorld):
* bindings/js/DOMWrapperWorld.h:
(WebCore::DOMWrapperWorld::globalData):
Remove JSDOMWrapperOwner. It is unused.
2011-11-29 Anders Carlsson <andersca@apple.com>
Use contentsToRootView when converting the mouse coordinates for the context menu key event
https://bugs.webkit.org/show_bug.cgi?id=73352
Reviewed by Adam Roben.
No new tests: Already covered by existing tests.
This is another step towards fixing https://bugs.webkit.org/show_bug.cgi?id=71945, by getting
rid of a call to ScrollView::contentsToWindow.
* page/EventHandler.cpp:
(WebCore::EventHandler::sendContextMenuEventForKey):
2011-11-15 Anders Carlsson <andersca@apple.com>
DragClient::dragSourceActionMaskForPoint should use root view coordinates
https://bugs.webkit.org/show_bug.cgi?id=72409
Reviewed by Sam Weinig.
* page/DragClient.h:
Rename parameter and remove obsolete comment.
* page/DragController.cpp:
(WebCore::DragController::delegateDragSourceAction):
* page/DragController.h:
Rename parameter.
* page/EventHandler.cpp:
(WebCore::EventHandler::updateDragSourceActionsAllowed):
Use contentsToRootView instead of contentsToWindow.
2011-11-15 Anders Carlsson <andersca@apple.com>
EditorClient::showCorrectionPanel should pass the string bounding box in root view coordinates
https://bugs.webkit.org/show_bug.cgi?id=72408
Reviewed by Sam Weinig.
Rename windowRectForRange to rootViewRectForRange and use contentsToRootView instead of contentsToWindow.
* editing/SpellingCorrectionController.cpp:
(WebCore::SpellingCorrectionController::show):
(WebCore::SpellingCorrectionController::correctionPanelTimerFired):
(WebCore::SpellingCorrectionController::rootViewRectForRange):
* editing/SpellingCorrectionController.h:
2011-11-29 Ojan Vafai <ojan@chromium.org>
invalid cast in WebCore::toRenderBox / WebCore::RenderBox::firstChildBox
https://bugs.webkit.org/show_bug.cgi?id=72668
Reviewed by David Hyatt.
For new flexible boxes, we were setting childrenInline to true when
merging anonymous blocks, which we should never do. Do the same thing
we do for the deprecated flexboxes.
Test: css3/flexbox/anonymous-block-merge-crash.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removeChild):
* rendering/RenderObject.h:
(WebCore::RenderObject::setChildrenInline):
The default value of true was never used. Better to keep it explicit.
2011-11-28 Ryosuke Niwa <rniwa@webkit.org>
Crash in IsolateTracker::addFakeRunIfNecessary(), preceded by assertion failure (m_nestedIsolateCount >= 1)
in IsolateTracker::exitIsolate()
https://bugs.webkit.org/show_bug.cgi?id=69275
Reviewed by Eric Seidel.
The crash was caused by our false assumption that at most one isolated container exists between the start
and the root when appending a new run. Fixed the crash by computing the actual number of isolated containers
between the start and the root.
Test: fast/text/nested-bidi-isolate-crash.html
* rendering/InlineIterator.h:
(WebCore::numberOfIsolateAncestors):
(WebCore::IsolateTracker::IsolateTracker):
(WebCore::InlineBidiResolver::appendRun):
2011-11-29 Oliver Hunt <oliver@apple.com>
Revert that last change, apparently it destroys everything in the world.
* bindings/js/DOMWrapperWorld.h:
* bindings/js/JSArrayBufferViewHelper.h:
(WebCore::toJSArrayBufferView):
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::toJS):
* bindings/js/JSDOMBinding.h:
(WebCore::setInlineCachedWrapper):
(WebCore::clearInlineCachedWrapper):
(WebCore::getCachedWrapper):
(WebCore::cacheWrapper):
(WebCore::wrap):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::history):
(WebCore::JSDOMWindow::location):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::location):
(WebCore::toJS):
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::toJS):
* bindings/js/JSImageDataCustom.cpp:
(WebCore::toJS):
* bindings/js/JSSVGPathSegCustom.cpp:
(WebCore::toJS):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::toJS):
* bindings/js/JSTrackCustom.cpp:
(WebCore::toJS):
2011-11-29 Tony Chang <tony@chromium.org>
flex-align:stretch + max-height needs to clamp to max-height and position appropriately
https://bugs.webkit.org/show_bug.cgi?id=70780
Reviewed by David Hyatt.
Test: css3/flexbox/flex-align-max.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::sizesToIntrinsicLogicalWidth): When laying out columns, if the flex item is stretching,
we don't need to shrink wrap.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::isColumnFlow): Switch to RenderStyle helper method.
(WebCore::RenderFlexibleBox::alignChildrenBlockDirection): For columns, we don't need to do anything.
For rows, handle max logical height by setting the height and recomputing (which will take max-height
into consideration).
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::isColumnFlexFlow): Helper method.
2011-11-29 Tony Chang <tony@chromium.org>
[chromium] Remove unused variable (gcc 4.6 complains about this)
https://bugs.webkit.org/show_bug.cgi?id=73335
../../third_party/WebKit/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp:296:19:
error: variable 'oldReplicaMaskRect' set but not used [-Werror=unused-but-set-variable]
* platform/graphics/chromium/cc/CCDamageTracker.cpp:
(WebCore::CCDamageTracker::extendDamageForRenderSurface):
2011-11-29 Oliver Hunt <oliver@apple.com>
DOM wrapper cache doesn't need to use JSDOMWrapper
https://bugs.webkit.org/show_bug.cgi?id=73333
Reviewed by Sam Weinig.
Make JSDOMWrapperCache use JSObject rather than JSDOMWrapper
and propagate the type change out.
* bindings/js/DOMWrapperWorld.h:
* bindings/js/JSArrayBufferViewHelper.h:
(WebCore::toJSArrayBufferView):
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::toJS):
* bindings/js/JSDOMBinding.h:
(WebCore::setInlineCachedWrapper):
(WebCore::clearInlineCachedWrapper):
(WebCore::getCachedWrapper):
(WebCore::cacheWrapper):
(WebCore::wrap):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::history):
(WebCore::JSDOMWindow::location):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::location):
(WebCore::toJS):
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::toJS):
* bindings/js/JSImageDataCustom.cpp:
(WebCore::toJS):
* bindings/js/JSSVGPathSegCustom.cpp:
(WebCore::toJS):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::toJS):
* bindings/js/JSTrackCustom.cpp:
(WebCore::toJS):
2011-11-29 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK build fix after r101392.
* GNUmakefile.am: USE_WEBAUDIO_FFTW was removed, don't use it anymore.
2011-11-28 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: TextPrompt should show suggest above or under so that it has maximal height.
https://bugs.webkit.org/show_bug.cgi?id=73239
Reviewed by Pavel Feldman.
Fixed suggest box vertical position / height calculation.
Added round corners when suggest box is positioned under text prompt.
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.SuggestBox.prototype._updateBoxPosition):
* inspector/front-end/inspector.css:
(.suggest-box.generic-suggest.under-anchor):
2011-11-29 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix the GTK+ port build after r101307.
* GNUmakefile.list.am: Add missing files to compilation.
2011-11-29 Pavel Feldman <pfeldman@google.com>
Web Inspector: split Preferences into Preferences and Capabilities.
https://bugs.webkit.org/show_bug.cgi?id=73321
Part of the Preferences defined in Settings.js are in fact backend capabilities.
Split them into two separate objects for further capabilities refactoring.
Reviewed by Yury Semikhatsky.
* inspector/front-end/DebuggerModel.js:
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel):
(WebInspector.ElementsPanel.prototype.wasShown):
(WebInspector.ElementsPanel.prototype._populateContextMenu):
* inspector/front-end/NetworkItemView.js:
(WebInspector.NetworkItemView):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._createTable):
(WebInspector.NetworkLogView.prototype.switchToDetailedView):
(WebInspector.NetworkLogView.prototype.switchToBriefView):
(WebInspector.NetworkLogView.prototype._contextMenu):
(WebInspector.NetworkDataGridNode.prototype.createCells):
(WebInspector.NetworkDataGridNode.prototype.refreshResource):
* inspector/front-end/ProfileDataGridTree.js:
(WebInspector.ProfileDataGridNode.prototype.get data.formatMilliseconds):
* inspector/front-end/ProfileView.js:
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._enableDetailedHeapProfiles):
* inspector/front-end/Resource.js:
(WebInspector.Resource.prototype.populateImageSource):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.wasShown):
(WebInspector.ScriptsPanel.prototype._clearInterface):
* inspector/front-end/Settings.js:
* inspector/front-end/SettingsScreen.js:
(WebInspector.SettingsScreen):
* inspector/front-end/StylesSidebarPane.js:
* inspector/front-end/inspector.js:
2011-11-29 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Make WebCore compile with Qt 5 and V8
https://bugs.webkit.org/show_bug.cgi?id=73313
Reviewed by Tor Arne Vestbø.
* DerivedSources.pri: Add missing V8 specific IDL files to the build.
* Target.pri: Ditto.
* bindings/v8/ScriptController.h: V8 NPAPI bindings don't really support
building with ENABLE_NETSCAPE_PLUGIN_API=0. These functions are always
defined, so they also need to be declared.
* platform/qt/PlatformSupportQt.cpp:
(WebCore::PlatformSupport::pluginScriptableObject): Don't return a
scriptable object when compiling without npapi.
* storage/StorageAreaImpl.cpp: Add missing Document.h include that is
included implicitly with the Chromium build but not with Qt.
* xml/XSLTProcessorQt.cpp: Ditto.
2011-11-29 Pavel Feldman <pfeldman@google.com>
Not reviewed: fixing clang build.
* inspector/InspectorBaseAgent.h:
(WebCore::InspectorBaseAgentInterface::getAgentCapabilities):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::getAgentCapabilities):
* inspector/InspectorDebuggerAgent.h:
2011-11-29 Pavel Feldman <pfeldman@google.com>
Web Inspector: introduce generic capabilities concept, migrate debugger domain to generic capabilities.
https://bugs.webkit.org/show_bug.cgi?id=73311
This step is necessary for getting rid of the 'capability' aspect in the Preferences. As a result,
single front-end will be applicable to multiple backend configurations.
Reviewed by Yury Semikhatsky.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* inspector/Inspector.json:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
* inspector/InspectorBaseAgent.cpp:
(WebCore::InspectorBaseAgentInterface::InspectorBaseAgentInterface):
(WebCore::InspectorBaseAgentInterface::~InspectorBaseAgentInterface):
* inspector/InspectorBaseAgent.h:
(WebCore::InspectorBaseAgentInterface::getCapabilities):
(WebCore::InspectorBaseAgentInterface::name):
(WebCore::InspectorBaseAgent::InspectorBaseAgent):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::InspectorCSSAgent):
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::InspectorDOMAgent):
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
(WebCore::InspectorDebuggerAgent::getCapabilities):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorFileSystemAgent.cpp:
(WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent):
* inspector/InspectorMetaAgent.cpp: Added.
(WebCore::InspectorMetaAgent::~InspectorMetaAgent):
(WebCore::InspectorMetaAgent::getCapabilities):
(WebCore::InspectorMetaAgent::InspectorMetaAgent):
* inspector/InspectorMetaAgent.h: Added.
(WebCore::InspectorMetaAgent::create):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::InspectorPageAgent):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::InspectorResourceAgent):
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
* inspector/InspectorValues.h:
(WebCore::InspectorArray::begin):
(WebCore::InspectorArray::end):
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype.enableDebugger):
2011-11-29 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Make WebKit/qt build with V8 and Qt 5
https://bugs.webkit.org/show_bug.cgi?id=73315
Reviewed by Kenneth Rohde Christiansen.
For the Qt 5 / V8 build we use QJSEngine/QJSValue instead of
QScriptEngine/QScriptValue.
* bindings/v8/ScriptController.cpp:
* bindings/v8/ScriptController.h:
* bindings/v8/ScriptControllerQt.cpp:
(WebCore::ScriptController::qtScriptEngine):
2011-11-29 Simon Hausmann <simon.hausmann@nokia.com>
[Qt][V8] Add missing ExceptionCode.h include for SVG bindings
https://bugs.webkit.org/show_bug.cgi?id=73314
Reviewed by Kenneth Rohde Christiansen.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrSetter): Similarly to other places where we use DOM
exceptions, make sure we include ExceptionCode.h here. It appears to be
an implicit inclusion in the Chromium build, but it should be explicit
like in the rest of the bindings.
(GenerateFunctionCallback): Ditto.
2011-11-29 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: remove usage of innerHTML from inspector front-end
https://bugs.webkit.org/show_bug.cgi?id=73305
Reviewed by Yury Semikhatsky.
* inspector/front-end/FontView.js:
(WebInspector.FontView.prototype._createContentIfNeeded):
* inspector/front-end/ShortcutsScreen.js:
(WebInspector.ShortcutsSection.prototype.addKey):
(WebInspector.ShortcutsSection.prototype.addRelatedKeys):
(WebInspector.ShortcutsSection.prototype.addAlternateKeys):
(WebInspector.ShortcutsSection.prototype._addLine):
(WebInspector.ShortcutsSection.prototype.renderSection):
(WebInspector.ShortcutsSection.prototype._renderSequence):
(WebInspector.ShortcutsSection.prototype._renderKey):
(WebInspector.ShortcutsSection.prototype.get _height):
(WebInspector.ShortcutsSection.prototype._createSpan):
(WebInspector.ShortcutsSection.prototype._joinNodes):
* inspector/front-end/WelcomeView.js:
(WebInspector.WelcomeView.prototype.addMessage):
2011-11-29 Zoltan Herczeg <zherczeg@webkit.org>
[Qt] Couple of tests have different results on 64 bit and/or in debug mode compared to 32 bit and/or release mode
https://bugs.webkit.org/show_bug.cgi?id=52810
Reviewed by Nikolas Zimmermann.
This avoids precision loss in getCTM, which is used whenever mapping repaint rects to a parent coordinate system
- it affects several DRT results on Mac, all of them are progressions.
* svg/SVGPreserveAspectRatio.cpp:
(WebCore::SVGPreserveAspectRatio::getCTM): Use double-precision internally.
2011-11-25 Pavel Podivilov <podivilov@chromium.org>
Web Inspector: support concatenated source maps.
https://bugs.webkit.org/show_bug.cgi?id=73138
Reviewed by Yury Semikhatsky.
* inspector/front-end/CompilerSourceMapping.js:
(WebInspector.ClosureCompilerSourceMapping):
(WebInspector.ClosureCompilerSourceMapping.prototype.loadSourceCode):
(WebInspector.ClosureCompilerSourceMapping.prototype._parseMappingPayload):
(WebInspector.ClosureCompilerSourceMapping.prototype._parseSections):
(WebInspector.ClosureCompilerSourceMapping.prototype._parseMap):
(WebInspector.ClosureCompilerSourceMapping.prototype._canonicalizeURL):
* inspector/front-end/inspector.js:
(WebInspector.installSourceMappingForTest):
2011-11-29 Mario Sanchez Prada <msanchez@igalia.com>
[Gtk] Regression: text-inserted events lack text inserted and current line
https://bugs.webkit.org/show_bug.cgi?id=72830
Reviewed by Chris Fleizach.
Replace the emission of the old (and now deprecated) AtkObject's
'text-changed:insert' and 'text-changed:remove' signals with the
new 'text-insert' and 'text-remove' ones, which are better and
less fragile since they emit the modified text too, along with the
typical 'offset' and 'count' values associated to the change.
Also, change the signature of the nodeTextChangeNotification() and
nodeTextChangePlatformNotification() to allow specifying the text
being modified from the place we better know about it, that is,
the text editing commands.
* accessibility/gtk/AXObjectCacheAtk.cpp:
(WebCore::emitTextChanged): Emit 'text-insert' and 'text-remove',
instead of the old and now deprecated 'text-changed' signal.
(WebCore::AXObjectCache::nodeTextChangePlatformNotification):
Update this function to receive a String with the text being
modified, instead of just the number of characters.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::nodeTextChangeNotification): Update this
function to receive a String with the text being modified.
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::nodeTextChangeNotification): Ditto.
(WebCore::AXObjectCache::nodeTextChangePlatformNotification): Ditto.
Adapt the text editing commants to pass the whole text string
being modified, instead of just its number of characters.
* editing/AppendNodeCommand.cpp:
(WebCore::sendAXTextChangedIgnoringLineBreaks): Adapt to the new
signature of nodeTextChangeNotification(), so pass the whole text.
* editing/DeleteFromTextNodeCommand.cpp:
(WebCore::DeleteFromTextNodeCommand::doApply): Ditto.
(WebCore::DeleteFromTextNodeCommand::doUnapply): Ditto.
* editing/InsertIntoTextNodeCommand.cpp:
(WebCore::InsertIntoTextNodeCommand::doApply): Ditto.
(WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto.
* editing/InsertNodeBeforeCommand.cpp:
(WebCore::InsertNodeBeforeCommand::doApply): Ditto.
(WebCore::InsertNodeBeforeCommand::doUnapply): Ditto.
Update mac, win and chromium's specific parts of AXObjectCache to
match the new signature for nodeTextChangePlatformNotification(),
which won't affect their behaviour as they were not implementing
that method anyway.
* accessibility/chromium/AXObjectCacheChromium.cpp:
(WebCore::AXObjectCache::nodeTextChangePlatformNotification):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::nodeTextChangePlatformNotification):
* accessibility/win/AXObjectCacheWin.cpp:
(WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2011-11-29 Mario Sanchez Prada <msanchez@igalia.com>
[Gtk] Regression: Push buttons no longer expose their displayed text/name
https://bugs.webkit.org/show_bug.cgi?id=72804
Reviewed by Chris Fleizach.
Use AccessibilityObject::title() as the last fallback in
webkit_accessible_get_name() right before relying on the
stringValue() method, if no better alternative was found.
Test: platform/gtk/accessibility/button-accessible-name.html
* accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
(webkit_accessible_get_name): Use title() as the last fallback
method before using stringValue().
2011-11-29 Hyowon Kim <hw1008.kim@samsung.com>
[Texmap][EFL] Accelerated compositing support using TextureMapper on EFL port
https://bugs.webkit.org/show_bug.cgi?id=73111
This patch adds Texture Mapper related files to PlatformEfl.cmake
and removes Qt-specific types in TextureMapperNode.cpp.
Reviewed by Noam Rosenthal.
* PlatformEfl.cmake:
* platform/graphics/GraphicsLayer.cpp:
* platform/graphics/GraphicsLayer.h:
* platform/graphics/efl/GraphicsLayerEfl.cpp: Removed.
* platform/graphics/efl/GraphicsLayerEfl.h: Removed.
* platform/graphics/texmap/TextureMapperNode.cpp:
(WebCore::solveCubicBezierFunction):
(WebCore::solveStepsFunction):
2011-11-28 Pavel Feldman <pfeldman@google.com>
Web Inspector: put inspector agents into a vector in the InspectorController.
https://bugs.webkit.org/show_bug.cgi?id=73225
Inspector controller should maintain agents in the vector, while accessing
them using the same base agent interface. We should not manually call
base agent methods on their concrete instances.
Reviewed by Yury Semikhatsky.
* inspector/CodeGeneratorInspector.py:
(DomainNameFixes.get_fixed_data.Res):
(DomainNameFixes):
(Generator.go):
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
(WebCore::PostWorkerNotificationToFrontendTask::performTask):
* inspector/InspectorAgent.h:
(WebCore::InspectorAgent::create):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
* inspector/InspectorApplicationCacheAgent.h:
(WebCore::InspectorApplicationCacheAgent::create):
* inspector/InspectorBaseAgent.cpp:
* inspector/InspectorBaseAgent.h:
(WebCore::InspectorBaseAgentInterface::InspectorBaseAgentInterface):
(WebCore::InspectorBaseAgentInterface::~InspectorBaseAgentInterface):
(WebCore::InspectorBaseAgentInterface::setFrontend):
(WebCore::InspectorBaseAgentInterface::clearFrontend):
(WebCore::InspectorBaseAgentInterface::restore):
(WebCore::InspectorBaseAgentInterface::inspectedPageDestroyed):
(WebCore::InspectorBaseAgent::~InspectorBaseAgent):
(WebCore::InspectorBaseAgent::registerDispatcher):
(WebCore::InspectorBaseAgent::InspectorBaseAgent):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::InspectorCSSAgent):
* inspector/InspectorCSSAgent.h:
(WebCore::InspectorCSSAgent::create):
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::inspectedPageDestroyed):
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
(WebCore::InspectorController::restoreInspectorStateFromCookie):
* inspector/InspectorController.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::InspectorDOMAgent):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
* inspector/InspectorDOMDebuggerAgent.h:
(WebCore::InspectorDOMDebuggerAgent::inspectedPageDestroyed):
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
* inspector/InspectorDebuggerAgent.h:
(WebCore::InspectorDebuggerAgent::inspectedPageDestroyed):
* inspector/InspectorFileSystemAgent.cpp:
(WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent):
* inspector/InspectorFileSystemAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::InspectorPageAgent):
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::InspectorResourceAgent):
* inspector/InspectorResourceAgent.h:
(WebCore::InspectorResourceAgent::create):
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
* inspector/InspectorRuntimeAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
* inspector/InspectorWorkerAgent.h:
* inspector/PageConsoleAgent.h:
(WebCore::PageConsoleAgent::create):
* inspector/PageRuntimeAgent.h:
(WebCore::PageRuntimeAgent::create):
* inspector/WorkerConsoleAgent.h:
(WebCore::WorkerConsoleAgent::create):
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::connectFrontend):
* inspector/WorkerRuntimeAgent.h:
(WebCore::WorkerRuntimeAgent::create):
2011-11-25 Philippe Normand <pnormand@igalia.com>
[GTK] Improve FontMetrics accuracy
https://bugs.webkit.org/show_bug.cgi?id=72614
Reviewed by Martin Robinson.
Patch by Nikolas Zimmermann.
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::setCairoFontOptionsFromFontConfigPattern):
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::SimpleFontData::platformInit):
2011-11-29 Nikolas Zimmermann <nzimmermann@rim.com>
SVG <path> DRT dumps have rounding problems across platforms
https://bugs.webkit.org/show_bug.cgi?id=47467
Reviewed by Zoltan Herczeg.
Next step towards fixing rounding differences across 32/64, release/debug builds and various platforms.
Switch TextStream::operator<<(double) and SVGPathStringBuilder to use the newly introduced String::number(double, ConversionMode, precision)
instead of using snprintf/String::format() directly. This uses wtf/dtoas rounding facilities and has proven to be faster & more precise!
In order to make use of these new floating-point dumping facilities following work was done:
- The InlineBox logicalHeight is still integer based, while logicalWidth switched to float recently, continue that work and switch logicalTop/Bottom
to floats as well. This allows us to avoid calling enclosingIntRect() when figuring out the bounds of a RenderSVGText.
Instead DRT can ask for the floating point metrics and round on its own to the desired precision. It's not obviously clear why this makes a difference.
Consider a rect with width 9.99999999, enclosingIntRect() would yield 10 as width, on this machine, but another may store 10.000000003, yielding 11.
That's part of the reason why this is more safe and ultimately should eliminate the rounding error induced by this in the DRT results.
- absoluteClippedOverflowRectForRepaint(): when figuring out the repaint rect we'd retrieve the repaintRectInLocalCoordinates(), and call
enclosingIntRect on it. Instead of doing that, to avoid the error described above, add a computeFloatRectForRepaint() call to RenderObject that's
only used in a SVG subtree, just like its done for nodeAtFloatPoint. Do a single final enclosingIntRect() step when crossing the boundary from
the SVG subtree in RenderSVGRoot to its parent, thus reducing the rounding instabilities.
- The new String::number() implementation enforces a unique zero eliminating the 0.0 vs -0.0 issue for free.
This has been tested on Gtk&Mac - and requires lots of new baseline. The hope is to be able to share a lot more with Mac now, except for obvious
font family differences, that influence RenderSVGInlineText/Text results, and thus all containers that contains such objects.
* platform/text/TextStream.cpp:
(WebCore::TextStream::operator<<):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::logicalHeight):
* rendering/InlineBox.h:
(WebCore::InlineBox::virtualLogicalHeight):
(WebCore::InlineBox::calculateBoundaries):
(WebCore::InlineBox::pixelSnappedLogicalTop):
(WebCore::InlineBox::pixelSnappedLogicalBottom):
(WebCore::InlineBox::logicalTop):
(WebCore::InlineBox::logicalBottom):
(WebCore::InlineBox::setLogicalTop):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
(WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
(WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
(WebCore::InlineFlowBox::addTextBoxVisualOverflow):
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::calculateBoundaries):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::computeFloatRectForRepaint):
* rendering/RenderObject.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::absoluteRectsForRange):
(WebCore::RenderText::absoluteQuads):
(WebCore::RenderText::absoluteQuadsForRange):
* rendering/RenderTreeAsText.cpp:
(WebCore::hasFractions):
(WebCore::formatNumberRespectingIntegers):
(WebCore::operator<<):
(WebCore::write):
* rendering/RenderTreeAsText.h:
* rendering/TrailingFloatsRootInlineBox.h:
(WebCore::TrailingFloatsRootInlineBox::virtualLogicalHeight):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::computeFloatRectForRepaint):
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::computeFloatRectForRepaint):
* rendering/svg/RenderSVGInline.h:
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::floatLinesBoundingBox):
(WebCore::RenderSVGInlineText::linesBoundingBox):
(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
* rendering/svg/RenderSVGInlineText.h:
(WebCore::RenderSVGInlineText::objectBoundingBox):
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::computeFloatRectForRepaint):
* rendering/svg/RenderSVGModelObject.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeFloatRectForRepaint):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::computeRectForRepaint):
(WebCore::RenderSVGText::computeFloatRectForRepaint):
* rendering/svg/RenderSVGText.h:
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::calculateBoundaries):
* rendering/svg/SVGInlineFlowBox.h:
(WebCore::SVGInlineFlowBox::virtualLogicalHeight):
(WebCore::SVGInlineFlowBox::setLogicalHeight):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::calculateBoundaries):
* rendering/svg/SVGInlineTextBox.h:
(WebCore::SVGInlineTextBox::virtualLogicalHeight):
(WebCore::SVGInlineTextBox::setLogicalHeight):
(WebCore::SVGInlineTextBox::selectionHeight):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
(WebCore::SVGRenderSupport::computeFloatRectForRepaint):
* rendering/svg/SVGRenderSupport.h:
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::operator<<):
(WebCore::roundedFloatRect):
(WebCore::writeRenderSVGTextBox):
(WebCore::writeSVGText):
(WebCore::writeSVGInlineText):
* rendering/svg/SVGRenderTreeAsText.h:
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
(WebCore::SVGRootInlineBox::layoutChildBoxes):
(WebCore::SVGRootInlineBox::layoutRootBox):
* rendering/svg/SVGRootInlineBox.h:
(WebCore::SVGRootInlineBox::virtualLogicalHeight):
(WebCore::SVGRootInlineBox::setLogicalHeight):
* svg/SVGPathStringBuilder.cpp:
(WebCore::SVGPathStringBuilder::moveTo):
(WebCore::SVGPathStringBuilder::lineTo):
(WebCore::SVGPathStringBuilder::lineToHorizontal):
(WebCore::SVGPathStringBuilder::lineToVertical):
(WebCore::SVGPathStringBuilder::curveToCubic):
(WebCore::SVGPathStringBuilder::curveToCubicSmooth):
(WebCore::SVGPathStringBuilder::curveToQuadratic):
(WebCore::SVGPathStringBuilder::curveToQuadraticSmooth):
(WebCore::SVGPathStringBuilder::arcTo):
2011-11-28 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: remove WebInspector.linkifyURL and TreeElement.titleHTML
https://bugs.webkit.org/show_bug.cgi?id=73217
Reviewed by Pavel Feldman.
* inspector/front-end/AuditFormatters.js:
(WebInspector.applyFormatters):
* inspector/front-end/AuditResultView.js:
(WebInspector.AuditCategoryResultPane.prototype._appendResult):
* inspector/front-end/AuditRules.js:
(WebInspector.AuditRules.GzipRule.prototype.doRun):
(WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback):
(WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun):
(WebInspector.AuditRules.CssInHeadRule.prototype.doRun):
* inspector/front-end/AuditsPanel.js:
(WebInspector.AuditRuleResult):
(WebInspector.AuditRuleResult.linkifyDisplayName):
(WebInspector.AuditRuleResult.prototype.addSnippet):
(WebInspector.AuditRuleResult.prototype.addFormatted):
(WebInspector.AuditRuleResult.prototype._append):
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype.adjustCollapsedRange):
* inspector/front-end/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertiesSection.prototype.updateProperties):
* inspector/front-end/ResourceHeadersView.js:
(WebInspector.ResourceHeadersView.prototype._formatHeader):
(WebInspector.ResourceHeadersView.prototype._formatParameter):
(WebInspector.ResourceHeadersView.prototype._refreshURL):
(WebInspector.ResourceHeadersView.prototype._refreshUrlFragment):
(WebInspector.ResourceHeadersView.prototype._refreshRequestPayload):
(WebInspector.ResourceHeadersView.prototype._refreshParms):
(WebInspector.ResourceHeadersView.prototype._refreshHTTPInformation):
(WebInspector.ResourceHeadersView.prototype._refreshHeaders):
* inspector/front-end/ResourceUtils.js:
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace):
* inspector/front-end/WorkersSidebarPane.js:
(WebInspector.WorkersSidebarPane.prototype.addWorker):
* inspector/front-end/treeoutline.js:
(TreeElement.prototype._setListItemNodeContent):
2011-11-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101302.
http://trac.webkit.org/changeset/101302
https://bugs.webkit.org/show_bug.cgi?id=73293
massive crashes on gtk/win bots - m_bytes assertion fires
(Requested by WildFox on #webkit).
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageFrame::setSize):
2011-11-29 Sean Wang <Xuewen.Wang@torchmobile.com.cn>
Upstream BlackBerry porting of platform/image-decoders
https://bugs.webkit.org/show_bug.cgi?id=73118
Reviewed by Daniel Bates.
Initial upstream, can't be built yet, no test cases.
The initial author is David Tapuska <dtapuska@rim.com>.
* platform/image-decoders/blackberry/JPEGImageDecoder.cpp: Added.
(WebCore::libInit):
(WebCore::ImageReader::ImageReader):
(WebCore::imgDecodeSetup):
(WebCore::ImageReader::updateData):
(WebCore::ImageReader::setSize):
(WebCore::ImageReader::sizeExtract):
(WebCore::ImageReader::decode):
(WebCore::JPEGImageDecoder::JPEGImageDecoder):
(WebCore::JPEGImageDecoder::setData):
(WebCore::JPEGImageDecoder::isSizeAvailable):
(WebCore::JPEGImageDecoder::frameBufferAtIndex):
* platform/image-decoders/blackberry/JPEGImageDecoder.h: Added.
(WebCore::JPEGImageDecoder::filenameExtension):
(WebCore::JPEGImageDecoder::supportsAlpha):
2011-11-28 David Grogan <dgrogan@chromium.org>
WebWorkerRunLoop wrapper around WorkerRunLoop
https://bugs.webkit.org/show_bug.cgi?id=71757
Reviewed by Darin Fisher.
No new tests - IndexedDB tests forthcoming.
* platform/chromium/PlatformSupport.h: Add two methods that allow
WebCore to notify chromium when workers start and stop.
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread): Call into PlatformSupport when
the worker's runloop is started and stopped.
2011-11-29 Alexandru Chiculita <achicu@adobe.com>
[CSS Filters] Filters do not render correctly when the layer has a transform
https://bugs.webkit.org/show_bug.cgi?id=73077
Reviewed by Dean Jackson.
Corrected the root layer that was used when no transform was applied.
Using PaintLayerAppliedTransform when calling paintLayer again, to avoid
applying the transform inside the filter's graphics context. Now we apply that
on the result image.
Tests: css3/filters/filter-with-transform.html
css3/filters/nested-filter.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer):
2011-11-28 Wei Charles <charles.wei@torchmobile.com.cn>
[blackberry] Upstream BlackBerry porting of plugin framework
https://bugs.webkit.org/show_bug.cgi?id=73185
Reviewed by Daniel Bates.
No new tests for now.
* plugins/blackberry: Added.
* plugins/blackberry/PluginDataBlackBerry.cpp: Added.
* plugins/blackberry/PluginPackageBlackBerry.cpp: Added.
2011-11-28 Noel Gordon <noel.gordon@gmail.com>
[chromium] Remove V8MessagePortCustom.h from the gyp projects
https://bugs.webkit.org/show_bug.cgi?id=73281
Reviewed by David Levin.
V8MessagePortCustom.h was removed in r101118
* WebCore.gypi: remove bindings\v8\custom\V8MessagePortCustom.h
2011-11-28 Leo Yang <leo.yang@torchmobile.com.cn>
Upstream the BlackBerry porting of SocketStream
https://bugs.webkit.org/show_bug.cgi?id=73283
Reviewed by Daniel Bates.
Other main contributors:
Joe Mason <jmason@rim.com>
Lyon Chen <liachen@rim.com>
Initial upstream, can't be built yet, no new tests.
* platform/network/blackberry/SocketStreamError.h: Added.
(WebCore::SocketStreamError::SocketStreamError):
* platform/network/blackberry/SocketStreamHandle.h: Added.
(WebCore::SocketStreamHandle::create):
* platform/network/blackberry/SocketStreamHandleBlackBerry.cpp: Added.
(WebCore::SocketStreamHandle::SocketStreamHandle):
(WebCore::SocketStreamHandle::~SocketStreamHandle):
(WebCore::SocketStreamHandle::platformSend):
(WebCore::SocketStreamHandle::platformClose):
(WebCore::SocketStreamHandle::didReceiveAuthenticationChallenge):
(WebCore::SocketStreamHandle::receivedCredential):
(WebCore::SocketStreamHandle::receivedRequestToContinueWithoutCredential):
(WebCore::SocketStreamHandle::receivedCancellation):
(WebCore::SocketStreamHandle::notifyStatusReceived):
(WebCore::SocketStreamHandle::notifyDataReceived):
(WebCore::SocketStreamHandle::notifyReadyToSendData):
(WebCore::SocketStreamHandle::notifyClose):
2011-11-28 Yongjun Zhang <yongjun_zhang@apple.com>
Size of ResourceRequestBase could be reduced by using bitfields.
https://bugs.webkit.org/show_bug.cgi?id=73271
Reviewed by Alexey Proskuryakov.
Add bitfield for bool members in ResourceRequestBase to reduce its memory size.
* platform/network/ResourceRequestBase.h:
2011-11-28 Yuta Kitamura <yutak@chromium.org>
WebSocket: Split Hixie76 length-prefixed frames aren't handled correctly
https://bugs.webkit.org/show_bug.cgi?id=68522
Reviewed by Kent Tamura.
Test: http/tests/websocket/tests/hixie76/split-binary-frame-header.html
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::processFrameHixie76):
Do not consume the data if the length field is not finished.
2011-11-28 Stephen White <senorblanco@chromium.org>
[chromium] Fix SVG filters when running in accelerated drawing mode.
https://bugs.webkit.org/show_bug.cgi?id=73249
Reviewed by Kenneth Russell.
Test: platform/chromium/compositing/accelerated-drawing/svg-filters.html
* platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
(WebCore::LayerTextureUpdaterSkPicture::prepareToUpdate):
When doing accelerated drawing, mark the PlatformContextSkia as
deferred.
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::drawNeedsCopy):
When doing a cross-context draw, if the destination context is
deferred, copy the image. Also refactor conditions under which the
image is copied into a new function.
(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::drawPattern):
Use the refactored function for conditional copies.
* platform/graphics/skia/PlatformContextSkia.cpp:
(WebCore::PlatformContextSkia::PlatformContextSkia):
* platform/graphics/skia/PlatformContextSkia.h:
(WebCore::PlatformContextSkia::isDeferred):
(WebCore::PlatformContextSkia::setDeferred):
Add m_isDeferred flag, initializer and accessors.
2011-11-29 Roland Steiner <rolandsteiner@chromium.org>
<style scoped>: add ENABLE(STYLE_SCOPED) flag to WebKit
https://bugs.webkit.org/show_bug.cgi?id=72848
Reviewed by Dimitri Glazkov.
No new tests. (no code)
* Configurations/FeatureDefines.xcconfig:
* GNUmakefile.am:
2011-11-28 Vangelis Kokkevis <vangelis@chromium.org>
[chromium] Disable compositing for RTL pages even in forceCompositingMode
https://bugs.webkit.org/show_bug.cgi?id=73195
Reviewed by James Robinson.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
2011-11-29 Roland Steiner <rolandsteiner@chromium.org>
From @keyframes rules with the same name, the last rule should be used
https://bugs.webkit.org/show_bug.cgi?id=73113
Have later rules override previously stored rules.
Reviewed by Simon Fraser.
Test: animations/duplicated-keyframes-name.html
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::addKeyframeStyle):
2011-11-28 Jacky Jiang <zhajiang@rim.com>
Upstream BlackBerry porting of page.
https://bugs.webkit.org/show_bug.cgi?id=73143
Reviewed by Daniel Bates.
Upstream BlackBerry porting of WebCore/page.
Define DragImageRef for BlackBerry platform.
Initial upstream, can't be built yet, no test cases.
* page/blackberry/DragControllerBlackBerry.cpp: Added.
(WebCore::DragController::isCopyKeyDown):
(WebCore::DragController::maxDragImageSize):
(WebCore::DragController::cleanupAfterSystemDrag):
(WebCore::DragController::dragOperation):
* page/blackberry/EventHandlerBlackBerry.cpp: Added.
(WebCore::EventHandler::eventActivatedView):
(WebCore::EventHandler::passMouseMoveEventToSubframe):
(WebCore::EventHandler::passMousePressEventToSubframe):
(WebCore::EventHandler::passMouseReleaseEventToSubframe):
(WebCore::EventHandler::passWheelEventToWidget):
(WebCore::EventHandler::passWidgetMouseDownEventToWidget):
(WebCore::EventHandler::tabsToAllFormControls):
(WebCore::EventHandler::accessKeyModifiers):
(WebCore::EventHandler::focusDocumentView):
(WebCore::EventHandler::createDraggingClipboard):
* page/blackberry/FrameBlackBerry.cpp: Added.
(WebCore::Frame::dragImageForSelection):
* platform/DragImage.h:
2011-11-28 Shawn Singh <shawnsingh@chromium.org>
[chromium] Create CCDamageTracker class to determine regions of change for a surface.
https://bugs.webkit.org/show_bug.cgi?id=72520
Reviewed by James Robinson.
Added CCDamageTrackerTest and updated other tests.
* WebCore.gypi:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawLayersOntoRenderSurfaces):
(WebCore::LayerRendererChromium::drawLayer):
* platform/graphics/chromium/cc/CCDamageTracker.cpp: Added.
(WebCore::CCDamageTracker::create):
(WebCore::CCDamageTracker::CCDamageTracker):
(WebCore::CCDamageTracker::~CCDamageTracker):
(WebCore::CCDamageTracker::updateDamageRectForNextFrame):
(WebCore::CCDamageTracker::removeRectFromCurrentFrame):
(WebCore::CCDamageTracker::saveRectForNextFrame):
(WebCore::CCDamageTracker::computeDamageFromActiveLayers):
(WebCore::CCDamageTracker::computeDamageFromSurfaceMask):
(WebCore::CCDamageTracker::computeDamageFromLeftoverRects):
(WebCore::CCDamageTracker::extendDamageForLayer):
(WebCore::CCDamageTracker::extendDamageForRenderSurface):
* platform/graphics/chromium/cc/CCDamageTracker.h: Added.
(WebCore::CCDamageTracker::currentDamageRect):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::resetAllChangeTrackingForSubtree):
* platform/graphics/chromium/cc/CCLayerImpl.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::paintLayerContents):
(WebCore::CCLayerTreeHost::updateCompositorResources):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
(WebCore::CCLayerTreeHostCommon::renderSurfaceContributesToTarget):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::CCRenderSurface):
(WebCore::CCRenderSurface::dumpSurface):
(WebCore::CCRenderSurface::surfacePropertyChangedOnlyFromDescendant):
* platform/graphics/chromium/cc/CCRenderSurface.h:
(WebCore::CCRenderSurface::damageTracker):
2011-11-28 Luke Macpherson <macpherson@chromium.org>
Implement CSSPropertySize in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=73000
Reviewed by Andreas Kling.
This refactoring moves the implementation of the page size calculation into CSSStyleApplyProperty
and removes the existing code from CSSStyleSelector.
No new tests / refactoring only.
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyPageSize::mmLength):
(WebCore::ApplyPropertyPageSize::inchLength):
(WebCore::ApplyPropertyPageSize::pageSizeFromName):
(WebCore::ApplyPropertyPageSize::applyInheritValue):
(WebCore::ApplyPropertyPageSize::applyInitialValue):
(WebCore::ApplyPropertyPageSize::applyValue):
(WebCore::ApplyPropertyPageSize::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSStyleSelector.h:
2011-11-28 Timothy Hatcher <timothy@apple.com>
Add support for knowing when a TreeElement is added or changed anywhere in a TreeOutline.
Reviewed by Brian Weinstein.
* inspector/front-end/treeoutline.js:
(TreeOutline.prototype.appendChild): Call onadd if it exists.
(TreeOutline.prototype.insertChild): Ditto.
(TreeOutline.prototype._treeElementDidChange): Added. Call onchange if it exists.
(TreeElement.prototype.set title): Call didChange.
(TreeElement.prototype.set titleHTML): Ditto.
(TreeElement.prototype.set tooltip): Ditto.
(TreeElement.prototype.set hasChildren): Ditto.
(TreeElement.prototype._fireDidChange): Added. Call TreeOutline._treeElementDidChange.
(TreeElement.prototype.didChange): Added. Schedule a timeout for _fireDidChange.
(TreeElement.prototype.expand): Move the code that sets the expanded flag to the beginning
which is before onpopulate. Since onpopulate can add elements and call onadd, this makes
sure the expanded flag is true before calling those functions.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Skip selecting TreeElements that are hidden when keyboard navigating.
We already skipped non-selectable tree elements in the common cases, this just makes selectable
take the hidden flag into account.
Reviewed by Brian Weinstein.
* inspector/front-end/treeoutline.js:
(TreeOutline.prototype._treeKeyDown): Skip non-selectable elements when pressing Left or Right,
similar to what we already do when pressing Up and Down.
(TreeElement): Set _selectable to true.
(TreeElement.prototype.get selectable): Added. Return false when hidden.
(TreeElement.prototype.set selectable): Added. Set _selectable.
(TreeElement.prototype.traverseNextTreeElement): Renamed skipHidden to skipUnrevealed to prevent confusion with
the hidden property of TreeElement.
(TreeElement.prototype.traversePreviousTreeElement): Ditto.
2011-11-28 Timothy Hatcher <timothy@apple.com>
Use classList instead of addStyleClass and removeStyleClass in TreeOutline.
https://webkit.org/b/72803
Reviewed by Dan Bernstein.
* inspector/front-end/treeoutline.js:
(TreeOutline.prototype.appendChild):
(TreeOutline.prototype.insertChild):
(TreeElement.prototype.set hasChildren):
(TreeElement.prototype.set hidden):
(TreeElement.prototype._attach):
(TreeElement.prototype.collapse):
(TreeElement.prototype.expand):
(TreeElement.prototype.select):
(TreeElement.prototype.deselect):
2011-11-28 Leo Yang <leo.yang@torchmobile.com.cn>
Upstream platform/network/blackberry/AuthenticationChallenge.h
https://bugs.webkit.org/show_bug.cgi?id=73196
Reviewed by Daniel Bates.
This is the BlackBerry implementation of WebCore::AuthenticationChallenge.
Contributed by Torch Team.
Initial upstream, can't be built yet, no new tests.
* platform/network/blackberry/AuthenticationChallenge.h: Added.
(WebCore::AuthenticationChallenge::AuthenticationChallenge):
(WebCore::AuthenticationChallenge::setStored):
(WebCore::AuthenticationChallenge::isStored):
2011-11-28 Dana Jansens <danakj@chromium.org>
Synchronization problem in Canvas/WebGLRenderingContext when listener asks for image
https://bugs.webkit.org/show_bug.cgi?id=73228
Reviewed by Kenneth Russell.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::markContextChanged):
2011-11-28 Rafael Weinstein <rafaelw@chromium.org>
[MutationObservers] Fix build breakage after CSSInlineDeclaration refactor
https://bugs.webkit.org/show_bug.cgi?id=73243
Reviewed by Ryosuke Niwa.
No tests needed. This patch only contains compile fixes.
* css/CSSMutableStyleDeclaration.cpp:
2011-11-28 Jon Lee <jonlee@apple.com>
Fix Chromium bot build error related to b73253.
* WebCore.gypi: Added missing references to NotificationController.
2011-11-28 Jon Lee <jonlee@apple.com>
Create skeleton framework for notifications support in WK2
https://bugs.webkit.org/show_bug.cgi?id=73253
<rdar://problem/10356943>
Reviewed by Sam Weinig.
Some refactoring was done to make notifications follow a similar pattern to our other clients, like
geolocation and context menu.
* Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.
* WebCore.xcodeproj/project.pbxproj: Adding new NotificationController class, and exposing
Notification and NotificationController as private headers.
* Target.pri: Ditto.
* WebCore.gypi: Ditto.
* notifications/NotificationContents.h: Converted class to struct. Members need to be accessible
in order to do WK2 argument encoding.
(WebCore::NotificationContents::NotificationContents):
* notifications/Notification.cpp: Update style of entire file.
(WebCore::Notification::Notification): Added default constructor (for WK2), and minor refactoring
with NotificationContents.
* notifications/Notification.h: Added set methods for WK2 serialization. Also, update indenting.
(WebCore::Notification::setHTML): Added.
(WebCore::Notification::setURL): Added.
(WebCore::Notification::contents): Added const version for WK2.
* notifications/NotificationCenter.h: Update style.
* notifications/NotificationController.cpp: Added.
(WebCore::NotificationController::NotificationController):
(WebCore::NotificationController::~NotificationController):
* notifications/NotificationController.h: Added.
(WebCore::NotificationController::client):
* notifications/NotificationPresenter.h: This acts like a client, and should probably be renamed as such.
Removed ifdef for exposure to WK2.
(WebCore::NotificationPresenter::~NotificationPresenter): Moved as protected instead of public.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::webkitNotifications): We move the request for the notification client from the chrome
to the controller.
* page/Page.cpp:
(WebCore::Page::Page): The page now owns a notification controller.
(WebCore::Page::PageClients::PageClients): Add notification client as a page client.
* page/Page.h:
(WebCore::Page::notificationController): Retrieve the notification controller.
* page/ChromeClient.h: We move the request for the notification client from the chrome to the controller.
Remove notificationPresenter().
* page/Chrome.cpp: Remove notificationPresenter().
* page/Chrome.h: Remove notificationPresenter().
* loader/EmptyClients.h: Remove notificationPresenter().
2011-11-28 Noel Gordon <noel.gordon@gmail.com>
ImageDecoder setSize() should check for backing store allocation failure
https://bugs.webkit.org/show_bug.cgi?id=72864
Reviewed by Adam Barth.
The backing store of a decoded image is a Vector<PixelData> on the affected
ports. And Vector<> provides a resize capacity member that returns false if
memory allocation fails.
setSize() should be called once only during an image decode - add an ASSERT
for that. Resize the backing store capacity to the requested image size and
return false if memory allocation fails.
ImageDecoder::isOverSize(width, height) is called to check that the decoded
width and height won't overflow 'width x height x sizeof(PixelData)' before
calls to setSize(). Refer to http://webkit.org/b/48634
No new tests. Covered by fast/images/size-failure.html
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageFrame::setSize):
2011-11-28 Oliver Hunt <oliver@apple.com>
Fix V8 bindings codegen and add yet more tests for the typed
array bindings.
* bindings/scripts/CodeGeneratorV8.pm:
(AddIncludesForType):
* bindings/scripts/test/CPP/WebDOMFloat64Array.cpp:
(WebDOMFloat64Array::foo):
* bindings/scripts/test/CPP/WebDOMFloat64Array.h:
* bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
(webkit_dom_float64array_foo):
* bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::jsFloat64ArrayPrototypeFunctionFoo):
* bindings/scripts/test/ObjC/DOMFloat64Array.h:
* bindings/scripts/test/ObjC/DOMFloat64Array.mm:
(-[DOMFloat64Array foo:]):
* bindings/scripts/test/TestTypedArray.idl:
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore::Float64ArrayInternal::fooCallback):
2011-11-28 Dana Jansens <danakj@chromium.org>
FloatQuad::isRectilinear() returns false for 180degree rotations
https://bugs.webkit.org/show_bug.cgi?id=73040
Reviewed by James Robinson.
Added unit test FloatQuadTest.cpp.
* platform/graphics/FloatQuad.cpp:
(WebCore::withinEpsilon): Check two values are as close as can be represented by floats.
(WebCore::FloatQuad::isRectilinear): Use withinEpsilon().
2011-11-28 Beth Dakin <bdakin@apple.com>
Speculative Chromium build-fix.
* platform/chromium/ScrollAnimatorChromiumMac.mm:
(WebCore::ScrollAnimatorChromiumMac::updateScrollerStyle):
2011-11-28 Oliver Hunt <oliver@apple.com>
Move typed array implementations into wtf
https://bugs.webkit.org/show_bug.cgi?id=73248
Reviewed by Sam Weinig.
Removed the typed array implementation files from WebCore and
added forwarding headers.
* CMakeLists.txt:
* ForwardingHeaders/wtf/ArrayBuffer.h: Added.
* ForwardingHeaders/wtf/ArrayBufferView.h: Added.
* ForwardingHeaders/wtf/Float32Array.h: Added.
* ForwardingHeaders/wtf/Float64Array.h: Added.
* ForwardingHeaders/wtf/Int16Array.h: Added.
* ForwardingHeaders/wtf/Int32Array.h: Added.
* ForwardingHeaders/wtf/Int8Array.h: Added.
* ForwardingHeaders/wtf/Uint16Array.h: Added.
* ForwardingHeaders/wtf/Uint32Array.h: Added.
* ForwardingHeaders/wtf/Uint8Array.h: Added.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSArrayBufferCustom.cpp:
* bindings/js/JSArrayBufferViewHelper.h:
* bindings/js/JSAudioContextCustom.cpp:
* bindings/js/JSFileReaderCustom.cpp:
* bindings/js/JSFloat32ArrayCustom.cpp:
* bindings/js/JSFloat64ArrayCustom.cpp:
* bindings/js/JSInt16ArrayCustom.cpp:
* bindings/js/JSInt32ArrayCustom.cpp:
* bindings/js/JSInt8ArrayCustom.cpp:
* bindings/js/JSUint16ArrayCustom.cpp:
* bindings/js/JSUint32ArrayCustom.cpp:
* bindings/js/JSUint8ArrayCustom.cpp:
* bindings/js/JSWaveShaperNodeCustom.cpp:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* bindings/js/JSXMLHttpRequestCustom.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(AddIncludesForType):
(GenerateHeader):
(NativeToJSValue):
* bindings/scripts/test/JS/JSFloat64Array.cpp:
* bindings/scripts/test/JS/JSFloat64Array.h:
* dom/MessageEvent.h:
* fileapi/FileReader.cpp:
* fileapi/FileReaderLoader.cpp:
* fileapi/FileReaderSync.cpp:
* fileapi/WebKitBlobBuilder.cpp:
* html/HTMLMediaElement.cpp:
* html/canvas/ArrayBuffer.h: Removed.
* html/canvas/ArrayBufferView.cpp: Removed.
* html/canvas/DataView.h:
* html/canvas/Float64Array.cpp: Removed.
* html/canvas/Int16Array.h: Removed.
* html/canvas/Int32Array.h: Removed.
* html/canvas/Int8Array.h: Removed.
* html/canvas/Uint16Array.h: Removed.
* html/canvas/Uint32Array.h: Removed.
* html/canvas/Uint8Array.cpp: Removed.
* html/canvas/WebGLBuffer.cpp:
* html/canvas/WebGLBuffer.h:
* html/canvas/WebGLGetInfo.cpp:
* html/canvas/WebGLGetInfo.h:
* html/canvas/WebGLRenderingContext.cpp:
* html/canvas/WebGLRenderingContext.h:
* page/Crypto.cpp:
* platform/graphics/GraphicsContext3D.cpp:
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
* webaudio/AsyncAudioDecoder.cpp:
* webaudio/AudioBuffer.h:
* webaudio/AudioContext.cpp:
* webaudio/AudioParam.h:
* webaudio/AudioParamTimeline.h:
* webaudio/JavaScriptAudioNode.cpp:
* webaudio/RealtimeAnalyser.cpp:
* webaudio/WaveShaperProcessor.h:
* websockets/WebSocketChannel.cpp:
* websockets/WorkerThreadableWebSocketChannel.cpp:
* xml/XMLHttpRequest.cpp:
2011-11-28 Robert Hogan <robert@webkit.org>
Unreviewed, rolling out r101202.
http://trac.webkit.org/changeset/101202
https://bugs.webkit.org/show_bug.cgi?id=71244
Caused performance regressions when painting collapsed borders
* rendering/RenderTableCell.cpp:
(WebCore::compareBorders):
(WebCore::RenderTableCell::collapsedStartBorder):
(WebCore::RenderTableCell::collapsedEndBorder):
(WebCore::RenderTableCell::collapsedBeforeBorder):
(WebCore::RenderTableCell::collapsedAfterBorder):
* rendering/style/CollapsedBorderValue.h:
(WebCore::CollapsedBorderValue::CollapsedBorderValue):
(WebCore::CollapsedBorderValue::operator==):
* rendering/style/RenderStyleConstants.h:
2011-11-28 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=72551
When the recommended scrollbar style changes, WKView's tracking options should
adjust accordingly
-and corresponding-
<rdar://problem/10409328>
Reviewed by Darin Adler.
This new ChromeClient function is called when the recommended scrollbar style
changes. This way, WebKit can respond to the change by adjusting its mouse
tracking.
* page/ChromeClient.h:
(WebCore::ChromeClient::recommendedScrollbarStyleDidChange):
Existing ScrollableArea function scrollbarStyleChanged() now takes an int
indicating the new scrollbar style and a bool indicating whether it is necessary
to force an update. It used to be the case that this function was ONLY used to
force an update (and only called when an updated was needed), but now that it must
also call into the ChromeClient, it is necessary to include a bool tracking
whether we need to force an update. New implementation on FrameView is responsible
for calling ChromeClient, and then that calls into the pre-existing ScrollView
function for the forceUpdate part.
* page/FrameView.cpp:
(WebCore::FrameView::scrollbarStyleChanged):
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView:: scrollbarStyleChanged):
* platform/ScrollView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::scrollbarStyleChanged):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
2011-11-28 Julien Chaffraix <jchaffraix@webkit.org>
Add limited parsing support for grid-columns and grid-rows
https://bugs.webkit.org/show_bug.cgi?id=72531
Reviewed by Tony Chang.
Test: fast/css-grid-layout/grid-columns-rows-get-set.html
Added support for:
<track-list> := <length> | <percentage> | 'none' | 'auto'
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/style/StyleAllInOne.cpp:
Updated our build systems.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridTrackList):
Helper function to convert our RenderStyle information to a proper CSSValue.
It doesn't do much now but it will be expanded as we add more support.
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Call the previous
function.
* css/CSSParser.h:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseGridTrackList):
CSS parsing part of this change. Pretty simple for now.
* css/CSSPropertyNames.in:
Added -webkit-grid-columns and -webkit-grid-rows.
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
Style application plumbing.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):
(WebCore::RenderStyle::diff):
This change is required for later when we add layout for our grid.
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::gridColumns):
(WebCore::InheritedFlags::gridRows):
(WebCore::InheritedFlags::setGridColumns):
(WebCore::InheritedFlags::setGridRows):
(WebCore::InheritedFlags::initialGridColumns):
(WebCore::InheritedFlags::initialGridRows):
Getters / Setters and initial values.
* rendering/style/StyleGridData.cpp: Added.
(WebCore::StyleGridData::StyleGridData):
* rendering/style/StyleGridData.h: Added.
(WebCore::StyleGridData::create):
(WebCore::StyleGridData::copy):
(WebCore::StyleGridData::operator==):
(WebCore::StyleGridData::operator!=):
This class holds the grid element information. For now pretty simple
shell that will be used for the rest of the support.
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
Added StyleGridElementData to StyleRareNonInheritedData.
2011-11-28 Noel Gordon <noel.gordon@gmail.com>
[chromium] Use data decoding swizzle for turbo JPEG image decoding.
https://bugs.webkit.org/show_bug.cgi?id=59670
Reviewed by Kenneth Russell.
Add a BGRX row decode data swizzle for the little-endian ports that use libjpeg-turbo
(Chromium win/linux/mac) to reduce JPEG image decoding time by ~2x.
JPEG images of type JSC_GRAYSCALE are excluded since layout regressions were observed
for grayscale images produced by older tools (XV 3.10a 12/19/94). libjpeg decodes the
images without error; libjpeg-turbo caused visible artifacts (see bug for examples).
This patch is based on the work of Hironori Bono. He provided the original patch, and
the quantitative results confirming the significant performance improvement.
No new tests. Covered by many existing tests.
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(rgbOutputColorSpace): If JCS_EXTENSIONS is defined (libjpeg-turbo), and the port is
little-endian, define a BGRX data swizzle for use when decoding pixel rows.
(turboSwizzled):
(WebCore::JPEGImageReader::decode): Select a possibly swizzled rgbOutputColorSpace()
for JSC_RGB and JCS_YCbCr input color space images. Exclude JSC_GRAYSCALE images.
(WebCore::JPEGImageDecoder::outputScanlines): Swizzle decode, if applicable.
2011-11-28 Fady Samuel <fsamuel@chromium.org>
Fix Aspect Ratio Property Inheritance And Make the Computed Value Equal the Specified Value
https://bugs.webkit.org/show_bug.cgi?id=73038
Reviewed by Ojan Vafai.
hasAspectRatio was not being set if the -webkit-aspect-ratio property was inherited from the parent.
Additionally, the computed value of -webkit-aspect-ratio was returning a number instead of a ratio.
Test: fast/css/aspect-ratio-inheritance.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyAspectRatio::applyInheritValue):
2011-11-28 Ken Buchanan <kenrb@chromium.org>
Crash due to bidi style in isolated run
https://bugs.webkit.org/show_bug.cgi?id=72978
Reviewed by Eric Seidel.
Prevent the UBA from changing the embedding level when inside an isolated run.
* rendering/InlineIterator.h:
(WebCore::notifyObserverEnteredObject):
(WebCore::notifyObserverWillExitObject):
2011-11-28 Martin Robinson <mrobinson@igalia.com>
Fix 'make dist' by adding two missing files to source list.
* GNUmakefile.list.am: Add missing files.
2011-11-25 Ryosuke Niwa <rniwa@webkit.org>
dir=auto should imply unicode-bidi:isolate by default
https://bugs.webkit.org/show_bug.cgi?id=63903
Reviewed by Dan Bernstein.
Fixed WebKit's implementation of bdo, bdi, and output elements to match HTML5 spec section 10.3.5:
http://dev.w3.org/html5/spec/Overview.html#bidirectional-text
Any element with dir=auto other than bdo, textarea, and pre should use unicode-bidi: -webkit-isolate by default.
We still don't use -webkit-isolate for non-phrasing elements by default and unicode-override -webkit-isolate for
bdo[dir=auto] so these two cases are failing in the added test.
Test: fast/css/default-bidi-css-rules.html
* css/html.css:
(bdi, output): bdi and output should both use -webkit-isolate as the default value for unicode-bidi.
(bdo): bdo should use bidi-override as the default value for unicode-bidi.
* dom/MappedAttributeEntry.h: Add eBDI, which is used by bdi and output elements.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::mapToEntry): Don't share the cache for dir attribute between bdi and other elements
just like we don't share the cache for dir attribute between bdo and other elements.
(WebCore::unicodeBidiAttributeForDirAuto): Don't set bidi-override for bdo element since this is done
in the UA stylesheet now. Set unicode-bidi to -webkit-isolate for elements other than pre and textarea now that
this function is called only when dir=auto.
called when dir=auto as the name implies.
(WebCore::HTMLElement::parseMappedAttribute): Don't call unicodeBidiAttributeForDirAuto when dir is not
auto. Also set unicode-bidi to embed when dir is not auto and the element is neither bdi, bdo, nor output.
* html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::mapToEntry): Don't share the cache for dir between output and other elements.
* html/HTMLOutputElement.h:
* html/HTMLTagNames.in:
2011-11-28 Jer Noble <jer.noble@apple.com>
WebAudio: AudioContext::uninitialize() can caused AudioContext deletion before deleting marked nodes.
https://bugs.webkit.org/show_bug.cgi?id=72755
Reviewed by Eric Carlson.
No new tests.
Protect AudioContext from being deleted before uninitialize() returns. Fixes an assertion in ~AudioContext() and
a potential source of leaks.
* webaudio/AudioContext.cpp:
(WebCore::AudioContext::uninitialize):
2011-11-28 Andreas Kling <kling@webkit.org>
InspectorCSSAgent: Remove unused function inlineStyleElement().
<http://webkit.org/b/73221>
Reviewed by Pavel Feldman.
* inspector/InspectorCSSAgent.cpp:
* inspector/InspectorCSSAgent.h:
2011-11-28 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Build system fixes against V8.
Reviewed by Tor Arne Vestbø.
* DerivedSources.pri: Add missing binding files to the build and also added
the regexp table generation needed for Yarr, which is compiled statically into
WebCore to implement WebCore::RegularExpression.
* Target.pri: Adapt to latest v8 binding files.
2011-11-28 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: resource status image is mis-aligned in the network headers view
https://bugs.webkit.org/show_bug.cgi?id=73211
Reviewed by Pavel Feldman.
* inspector/front-end/ResourceHeadersView.js:
(WebInspector.ResourceHeadersView):
2011-11-28 Pavel Feldman <pfeldman@google.com>
Web Inspector: console evaluation doesn't work when navigating from a page with several frames to another one
https://bugs.webkit.org/show_bug.cgi?id=73210
Reviewed by Yury Semikhatsky.
Test: http/tests/inspector/resource-tree/resource-tree-events.html
* inspector/Inspector.json:
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype._frameDetached):
(WebInspector.ResourceTreeFrame.prototype.navigate):
(WebInspector.ResourceTreeFrame.prototype.removeChildFrame):
(WebInspector.ResourceTreeFrame.prototype.removeChildFrames):
2011-11-28 Pavel Feldman <pfeldman@google.com>
Web Inspector: introduce InspectorBaseAgent.
https://bugs.webkit.org/show_bug.cgi?id=73203
Now that inspector controller does not depend on concrete inspector agent
classes, we can collect agent instances using abstract type.
Reviewed by Yury Semikhatsky.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::InspectorAgent):
* inspector/InspectorAgent.h:
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorBaseAgent.cpp: Copied from Source/WebCore/inspector/InspectorFileSystemAgent.h.
(WebCore::InspectorBaseAgent::InspectorBaseAgent):
(WebCore::InspectorBaseAgent::~InspectorBaseAgent):
* inspector/InspectorBaseAgent.h: Copied from Source/WebCore/inspector/InspectorFileSystemAgent.h.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::InspectorCSSAgent):
* inspector/InspectorCSSAgent.h:
(WebCore::InspectorCSSAgent::setFrontend):
(WebCore::InspectorCSSAgent::restore):
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::enable):
(WebCore::InspectorConsoleAgent::disable):
(WebCore::InspectorConsoleAgent::clearMessages):
(WebCore::InspectorConsoleAgent::restore):
(WebCore::InspectorConsoleAgent::clearFrontend):
(WebCore::InspectorConsoleAgent::resourceRetrievedByXMLHttpRequest):
(WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
(WebCore::InspectorConsoleAgent::addConsoleMessage):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::InspectorDOMAgent):
(WebCore::InspectorDOMAgent::clearFrontend):
(WebCore::InspectorDOMAgent::setDocument):
(WebCore::InspectorDOMAgent::getDocument):
(WebCore::InspectorDOMAgent::mainFrameDOMContentLoaded):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
(WebCore::InspectorDOMStorageAgent::restore):
(WebCore::InspectorDOMStorageAgent::enable):
(WebCore::InspectorDOMStorageAgent::disable):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
(WebCore::InspectorDatabaseAgent::enable):
(WebCore::InspectorDatabaseAgent::disable):
(WebCore::InspectorDatabaseAgent::restore):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
(WebCore::InspectorDebuggerAgent::disable):
(WebCore::InspectorDebuggerAgent::enabled):
(WebCore::InspectorDebuggerAgent::enable):
(WebCore::InspectorDebuggerAgent::clearFrontend):
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::removeBreakpoint):
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorFileSystemAgent.cpp:
(WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent):
* inspector/InspectorFileSystemAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::InspectorPageAgent):
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
(WebCore::InspectorProfilerAgent::enable):
(WebCore::InspectorProfilerAgent::disable):
(WebCore::InspectorProfilerAgent::restore):
(WebCore::InspectorProfilerAgent::restoreEnablement):
(WebCore::InspectorProfilerAgent::start):
(WebCore::InspectorProfilerAgent::stop):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::InspectorResourceAgent):
* inspector/InspectorResourceAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
(WebCore::InspectorWorkerAgent::restore):
(WebCore::InspectorWorkerAgent::clearFrontend):
(WebCore::InspectorWorkerAgent::setWorkerInspectionEnabled):
(WebCore::InspectorWorkerAgent::setAutoconnectToWorkers):
(WebCore::InspectorWorkerAgent::shouldPauseDedicatedWorkerOnStart):
(WebCore::InspectorWorkerAgent::didStartWorkerContext):
(WebCore::InspectorWorkerAgent::createWorkerFrontendChannel):
* inspector/InspectorWorkerAgent.h:
2011-11-28 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: chromium: Unreviewed one-line fix for Summary view filter.
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshot.prototype.createNodesProviderForClass):
2011-11-28 Pavel Feldman <pfeldman@google.com>
Not reviewed: disable filesystem instrumentation to unbreak Qt tests.
* inspector/front-end/inspector.js:
2011-11-28 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101249.
http://trac.webkit.org/changeset/101249
https://bugs.webkit.org/show_bug.cgi?id=73205
it broke qt-minimal and wince builds (Requested by loislo on
#webkit).
* inspector/CodeGeneratorInspector.py:
(Capitalizer.upper_camel_case_to_lower):
(RawTypes.get):
(RawTypes.String.get_c_param_type):
(RawTypes.Object.get_c_param_type):
(RawTypes.Object):
(ParamType):
(TypeData.__init__):
(TypeData.get_raw_type):
(TypeMap.__init__):
(InspectorFrontend_h):
(InspectorArray):
(InspectorObject):
(String):
(InspectorBackendDispatcher_h):
(Generator.process_command):
* inspector/InspectorValues.h:
2011-11-28 Andreas Kling <kling@webkit.org>
CSSStyleDeclaration: Remove ability to have style sheet as parent.
<http://webkit.org/b/73199>
Reviewed by Antti Koivisto.
Refactor so we don't have to support style sheets as parents of style declarations.
The users of this mechanism were mapped attributes and inline styles, which instead
now know how to find the relevant style sheet via their document().
* css/CSSMutableStyleDeclaration.h:
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSElementStyleDeclaration::styleSheet):
Added CSSElementStyleDeclaration::styleSheet(). The default implementation
returns the associated element's document()->elementSheet(). It is virtual
because SVGFontFaceElement needs document()->mappedElementSheet() instead.
* css/CSSStyleDeclaration.h:
(WebCore::CSSStyleDeclaration::parentRule):
(WebCore::CSSStyleDeclaration::setParentRule):
* css/CSSStyleDeclaration.cpp:
(WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
Remove m_parentIsRule and m_parentStyleSheet, leaving only m_parentRule.
* css/CSSStyleDeclaration.cpp:
(WebCore::CSSStyleDeclaration::parentStyleSheet):
Out-of-lined so it can return the CSSElementStyleDeclaration::styleSheet() for
declarations with an associated element.
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::WebKitCSSKeyframeRule::~WebKitCSSKeyframeRule):
(WebCore::WebKitCSSKeyframeRule::setDeclaration):
Use setParentRule() instead of setParentStyleSheet() on the internal
CSSMutableStyleDeclaration in keyframe rules.
* dom/StyledElement.h:
Removed StyledElement::didMoveToNewOwnerDocument() since we no longer need to
manually keep the inline style's parent style sheet pointer up-to-date.
* dom/StyledElement.cpp:
(WebCore::StyledElement::createInlineStyleDecl):
(WebCore::StyledElement::destroyInlineStyleDecl):
(WebCore::StyledElement::attributeChanged):
(WebCore::StyledElement::createMappedDecl):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::additionalAttributeStyleDecls):
(WebCore::HTMLTableElement::addSharedCellBordersDecl):
(WebCore::HTMLTableElement::addSharedCellPaddingDecl):
(WebCore::HTMLTableElement::addSharedGroupDecls):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::SVGFontFaceElement):
Remove setParentStyleSheet() calls on mapped attributes and inline styles.
They now find the relevant style sheet by following the associated element ptr.
* svg/SVGFontFaceElement.cpp:
(WebCore::FontFaceStyleDeclaration::FontFaceStyleDeclaration):
(WebCore::FontFaceStyleDeclaration::~FontFaceStyleDeclaration):
(WebCore::FontFaceStyleDeclaration::styleSheet):
Subclass CSSElementStyleDeclaration for SVG's font-face elment in order to
override styleSheet(). This is necessary because they operate on the document's
mappedElementSheet() rather than the elementSheet().
2011-11-28 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: [protocol] generate C++ classes for protocol JSON named types
https://bugs.webkit.org/show_bug.cgi?id=72835
Reviewed by Pavel Feldman.
Extends python generator functionality.
Makes constructor in InspectorObject public.
* inspector/CodeGeneratorInspector.py:
* inspector/InspectorValues.h:
2011-11-28 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] WTF should be built as separate static library
https://bugs.webkit.org/show_bug.cgi?id=73201
Reviewed by Tor Arne Vestbø.
* Target.pri: Require wtf and don't claim to be building it
with BUILDING_WTF in DEFINES (otherwise we won't link it with
debug-shlib builds).
2011-11-28 Taiju TSUIKI <tzik@chromium.org>
Fix build error on Chromium/Windows.
https://bugs.webkit.org/show_bug.cgi?id=73200
Unreviewed build fix.
* inspector/InspectorFileSystemAgent.cpp:
2011-11-28 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck issues.
* GNUmakefile.list.am: Add missing files.
* bindings/gobject/GNUmakefile.am: Only build
WebKitDOMHTMLPropertiesCollection when microdate is enabled.
2011-11-28 Luke Macpherson <macpherson@chromium.org>
Implement CSS border image properties in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=72846
Reviewed by Andreas Kling.
Refactoring that implements CSS border image properties in CSSStyleApplyProperty.
Part of the larger refactoring aimed at removing CSSStyleSelector::applyProperty().
Covered by existing tests in fast/css.
* css/CSSStyleApplyProperty.cpp:
Implement property handlers based on existing code.
(WebCore::ApplyPropertyBorderImage::setValue):
(WebCore::ApplyPropertyBorderImage::applyValue):
(WebCore::ApplyPropertyBorderImage::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
Remove old code.
(WebCore::CSSStyleSelector::applyProperty):
2011-11-28 Luke Macpherson <macpherson@chromium.org>
Implement CSS hyphenate-limit properties in CSSStyleApplyProperty
https://bugs.webkit.org/show_bug.cgi?id=73107
Reviewed by Andreas Kling.
Covered by existing tests under fast/css (parsing-hyphenate-limit-lines.html, parsing-hyphenate-limit.html, text/hyphenate-limit-lines.html)
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyNumber::setValue):
(WebCore::ApplyPropertyNumber::applyValue):
(WebCore::ApplyPropertyNumber::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
2011-11-28 Taiju TSUIKI <tzik@chromium.org>
[Inspector][FileSystem]: Capture DOMFileSystem object.
Adding files for FileSystem support to Inspector.
Adding hooks into DOMFileSystem creation and destruction.
https://bugs.webkit.org/show_bug.cgi?id=72456
Reviewed by Pavel Feldman.
Tests should be added in later CL.
* CMakeLists.txt:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* fileapi/DOMFileSystem.cpp:
(WebCore::DOMFileSystem::create):
* fileapi/DOMFileSystem.h:
* inspector/CodeGeneratorInspector.py:
* inspector/Inspector.json:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
(WebCore::InspectorController::restoreInspectorStateFromCookie):
* inspector/InspectorController.h:
* inspector/InspectorFileSystemAgent.cpp: Added.
* inspector/InspectorFileSystemAgent.h: Added.
* inspector/InspectorFileSystemInstrumentation.h: Added.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didOpenFileSystemImpl):
* inspector/InspectorInstrumentation.h:
* inspector/InstrumentingAgents.h:
(WebCore::InstrumentingAgents::InstrumentingAgents):
(WebCore::InstrumentingAgents::inspectorFileSystemAgent):
(WebCore::InstrumentingAgents::setInspectorFileSystemAgent):
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::connectFrontend):
* inspector/front-end/inspector.js:
2011-11-28 Luke Macpherson <macpherson@chromium.org>
Implement CSSPropertyWebkitFlowInto and CSSPropertyWebkitFlowFrom in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=73110
Reviewed by Andreas Kling.
Covered by existing tests under fast/regions.
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
2011-11-27 Luke Macpherson <macpherson@chromium.org>
Implement vertical-align property in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=72926
Reviewed by Andreas Kling.
Part of the ongoing refactoring of CSSStyleSelector::applyProperty.
Covered by several tests under fast/css.
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isPercent):
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyVerticalAlign::applyValue):
(WebCore::ApplyPropertyVerticalAlign::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::setVerticalAlignLength):
Calling setVerticalAlignLength now automatically sets verticalAlign to LENGTH.
2011-11-27 Luke Macpherson <macpherson@chromium.org>
Implement CSSPropertyTextAlign in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=73102
Reviewed by Andreas Kling.
Covered by fast/css/text-align*.html
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyTextAlign::applyValue):
(WebCore::ApplyPropertyTextAlign::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
2011-11-27 Andreas Kling <kling@webkit.org>
CSSStyleRule: Pack m_sourceLine with CSSRule bits.
<http://webkit.org/b/73168>
Reviewed by Antti Koivisto.
Make CSSStyleRule::m_sourceLine a 27-bit integer and pack it with the rest
of the members in CSSRule. This shrinks CSSStyleRule by one CPU word
and reduces memory consumption by 81 kB on the GMail inbox (on 64-bit.)
* css/CSSRule.h:
(WebCore::CSSRule::CSSRule):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::CSSStyleRule):
* css/CSSStyleRule.h:
2011-11-27 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/72665> Switch to a more modern approach to retrieving the OS marketing version
Reviewed by Dan Bernstein.
* WebCore.exp.in: Expose the necessary symbol.
* platform/mac/WebCoreSystemInterface.h: Ditto.
* platform/mac/WebCoreSystemInterface.mm: Ditto.
2011-11-27 Anna Cavender <annacc@chromium.org>
Move readyState from TextTrack to HTMLTrackElement
https://bugs.webkit.org/show_bug.cgi?id=72553
Fix for r101057 after it was rolled out in r101088
Reviewed by Eric Carlson.
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::HTMLTrackElement):
Set initial readyState to NONE.
(WebCore::HTMLTrackElement::didCompleteLoad):
Set readyState based on load completed status.
(WebCore::HTMLTrackElement::setReadyState):
This replaces textTrackReadyStateChanged() because only LoadableTextTrack
needs to notify HTMLTrackElement of readyState changes (i.e.
textTrackReadyStateChanged() is no longer required of TextTrackClient).
* html/HTMLTrackElement.h:
ReadyState enum and m_readyState member variable moved from TextTrack.
(WebCore::HTMLTrackElement::readyState):
New: readyState() getter.
* html/HTMLTrackElement.idl:
Add readyState attribute and associated constants.
* html/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::loadTimerFired): Set readyState on HTMLTrackElement.
(WebCore::LoadableTextTrack::cueLoadingStarted): Ditto.
(WebCore::LoadableTextTrack::cueLoadingCompleted): Move code to set readyState
to HTMLTrackElement (it can set it based on loading status).
* html/TextTrack.cpp: Remove readyState from TextTrack.
(WebCore::TextTrack::TextTrack): Ditto.
* html/TextTrack.h: Ditto.
* html/TextTrack.idl: Ditto.
2011-11-27 Anna Cavender <annacc@chromium.org>
Don't allow attribute changes on <track> if feature is not enabled.
https://bugs.webkit.org/show_bug.cgi?id=73046
Reviewed by Eric Carlson.
No new tests. This fixes a problem when --enable-video-track is not used,
but the tests use this flag.
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::attributeChanged):
2011-11-27 Andreas Kling <kling@webkit.org>
CSSMutableStyleDeclaration: setCssText() mostly duplicates parseDeclaration().
<http://webkit.org/b/73171>
Reviewed by Antti Koivisto.
Let setCssText() call parseDeclaration() instead of duplicating the functionality.
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::setCssText):
2011-11-27 Andreas Kling <kling@webkit.org>
CSS/XSLStyleSheet: checkLoaded() needn't be virtual.
<http://webkit.org/b/73169>
Reviewed by Antti Koivisto.
Devirtualize checkLoaded() in CSSStyleSheet and XSLStyleSheet as they
are not overriding anything, nor are they ever overridden.
* css/CSSStyleSheet.h:
* xml/XSLStyleSheet.h:
2011-11-27 Andreas Kling <kling@webkit.org>
Add assertions that CSSMappedAttributeDeclarations aren't using strict parsing.
<http://webkit.org/b/73167>
Reviewed by Antti Koivisto.
* dom/StyledElement.cpp:
(WebCore::StyledElement::createMappedDecl):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::additionalAttributeStyleDecls):
(WebCore::HTMLTableElement::addSharedCellBordersDecl):
(WebCore::HTMLTableElement::addSharedCellPaddingDecl):
(WebCore::HTMLTableElement::addSharedGroupDecls):
2011-11-27 Andreas Kling <kling@webkit.org>
CSSStyleSheet: Removed unused create() overload.
<http://webkit.org/b/73170>
Reviewed by Antonio Gomes.
Nobody was using CSSStyleSheet::create(ownerNode, originalURL, finalURL)
so remove it.
* css/CSSStyleSheet.h:
(WebCore::CSSStyleSheet::create):
2011-11-27 Robert Hogan <robert@webkit.org>
CSS 2.1 failure: border-conflict-element-*
https://bugs.webkit.org/show_bug.cgi?id=71244
Reviewed by Julien Chaffraix.
From http://www.w3.org/TR/CSS21/tables.html#border-conflict-resolution :
"When two adjacent cells have the same border-width and the same border-style in a
'border-collapse: collapse' table, then the color of the border from the leftmost cell wins
(if the table's 'direction' is 'ltr'; right, if it is 'rtl') and the color of the border
from the topmost cell wins."
So WebCore::compareBorders needs to account for the position of the cell when
deciding which border wins the comparison. This will ensure that the winning border is
sorted to the appropriate position in the sorted list of borders for painting.
When conflicting collapsed borders are in the same cell, the following order of
precedence is used (where 4 has highest precedence):
__3__
| |
4 | | 1
|_____|
2
This fixes the following failing tests from the border-conflict-element-* set
in the CSS 2.1 test suite:
border-conflict-element-001d.htm
border-conflict-element-0037.htm
One test in the suite is known to be wrong, so a corrected version has been landed outside the
css2.1 folder:
border-conflict-element-002.htm
This change entails rebaselining quite a few tests, see the LayoutTests ChangeLog for a full
explanation of the rebaselines.
* rendering/RenderTableCell.cpp:
(WebCore::compareBorders): Compare the cells' position from the left (in 'ltr') and right (in 'rtl')
of the table and the cells' position from the top of the table when nothing
else in the style, width, or grouping of the borders determines precedence.
If the conflicting borders are in the same cell, apply the same logic to the position of the borders.
(WebCore::RenderTableCell::collapsedStartBorder): Pass the cell's position and its table's direction to CollapsedBorderValue
(WebCore::RenderTableCell::collapsedEndBorder): ditto
(WebCore::RenderTableCell::collapsedBeforeBorder): ditto
(WebCore::RenderTableCell::collapsedAfterBorder): ditto
* rendering/style/CollapsedBorderValue.h:
(WebCore::CollapsedBorderValue::CollapsedBorderValue): Learn the position of the border's cell and the direction of its table
(WebCore::CollapsedBorderValue::columnOffset): the cell's offset from the top of the table
(WebCore::CollapsedBorderValue::rowOffset): the cell's offset from the start of the table
(WebCore::CollapsedBorderValue::edge): which edge of the cell the border is on
(WebCore::CollapsedBorderValue::operator==): cells with the same position in the table are equal
2011-11-26 Pavel Feldman <pfeldman@google.com>
Web Inspector: remove disconnectFromBackend from the protocol.
https://bugs.webkit.org/show_bug.cgi?id=73127
Reviewed by Yury Semikhatsky.
* inspector/Inspector.json:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::inspectedPageDestroyed):
* inspector/InspectorClient.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::close):
* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendHost.cpp:
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/InspectorFrontendHostStub.js:
* inspector/front-end/inspector.js:
(WebInspector.disconnectFromWorker):
* loader/EmptyClients.h:
(WebCore::EmptyInspectorClient::closeInspectorFrontend):
2011-11-26 Kevin Ollivier <kevino@theolliviers.com>
[wx] Unreviewed build fix. Change the order of wx header includes
to avoid a windows.h inclusion order issue, and make sure a stub
method returns a value.
* platform/wx/FileSystemWx.cpp:
(WebCore::openFile):
2011-11-26 Alejandro G. Castro <alex@igalia.com>
Fix compilation after r101157.
Reviewed by Martin Robinson.
* bindings/scripts/preprocessor.pm:
(applyPreprocessor): In case we have a string with
double-quotations (") we replace it with the empty string.
2011-11-26 Igor Oliveira <igor.oliveira@openbossa.org>
[TexMapper][WK2][Qt] Simple opacity animations are not working
https://bugs.webkit.org/show_bug.cgi?id=73157
LayerTreeHostQt needs to know what nodes in the TextureMapper are visible, to associate
a tile to it. It is done using TextureMapperNode::collectVisibleContentsRects.
However TextureMapperNode::collectVisibleContentsRects has an optimization to check if
the current tile has opacity greater than 0.01, otherwise it will not create a tile for
the current node.
For opacity animations from 0 to 1, it is a problem because the tile is never created
and the animation never happens.
This patch fixes opacity animations.
Reviewed by Noam Rosenthal.
* platform/graphics/texmap/TextureMapperNode.cpp:
(WebCore::TextureMapperNode::countDescendantsWithContent):
(WebCore::TextureMapperNode::collectVisibleContentsRects):
2011-11-26 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101193.
http://trac.webkit.org/changeset/101193
https://bugs.webkit.org/show_bug.cgi?id=73158
Breaks Windows and Qt minimal. (Requested by pfeldman on
#webkit).
* inspector/Inspector.json:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::inspectedPageDestroyed):
* inspector/InspectorClient.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::close):
* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::disconnectFromBackend):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.disconnectFromBackend):
* inspector/front-end/inspector.js:
(WebInspector.disconnectFromBackend):
* loader/EmptyClients.h:
2011-11-26 Pavel Feldman <pfeldman@google.com>
Web Inspector: remove disconnectFromBackend from the protocol.
https://bugs.webkit.org/show_bug.cgi?id=73127
Reviewed by Yury Semikhatsky.
* inspector/Inspector.json:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::inspectedPageDestroyed):
* inspector/InspectorClient.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::close):
* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendHost.cpp:
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/InspectorFrontendHostStub.js:
* inspector/front-end/inspector.js:
(WebInspector.disconnectFromWorker):
* loader/EmptyClients.h:
(WebCore::EmptyInspectorClient::closeInspectorFrontend):
2011-11-26 Timothy Hatcher <timothy@apple.com>
Fix a bug in TreeOutline which would cause parent elements to show up as expanded and empty
when removed and added back to the tree.
https://bugs.webkit.org/show_bug.cgi?id=73155
Reviewed by Pavel Feldman.
* inspector/front-end/treeoutline.js:
(TreeElement.prototype.collapse): Set _treeElementsExpandedState to false instead of true.
Only TreeElement.prototype.expand should set it to true, which it does.
2011-11-26 Martin Robinson <mrobinson@igalia.com>
[GTK] Fix some warnings in WebCore GTK+
https://bugs.webkit.org/show_bug.cgi?id=73137
Reviewed by Philippe Normand.
No new tests. This patch just fixes compilation warnings.
* platform/gtk/CursorGtk.cpp:
(WebCore::createNamedCursor): Remove unused variable.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::RenderThemeGtk::paintSliderTrack): ASSERT_UNUSED instead of ASSERT.
* platform/gtk/SharedTimerGtk.cpp: Ditto.
(WebCore::stopSharedTimer):
2011-11-25 Eric Carlson <eric.carlson@apple.com>
Implement addCue and removeCue in TextTrack
https://bugs.webkit.org/show_bug.cgi?id=72554
Reviewed by Darin Adler.
Test: media/track/track-add-remove-cue.html
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::ensureTrack): Go ahead and allocate a Track even if the feature
is disabled, it just won't load anything.
(WebCore::HTMLTrackElement::scheduleLoad): Early return if the featue is disabled.
(WebCore::HTMLTrackElement::canLoadUrl): Ditto.
* html/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::newCuesAvailable): Add new cues one at a time because
cues->add(Vector<TextTrackCue*>&) is gone.
* html/TextTrack.cpp:
(WebCore::TextTrack::addCue): Implement.
(WebCore::TextTrack::removeCue): Ditto.
* html/TextTrack.h:
(WebCore::TextTrackCue::TextTrackCue): Initialize every member variable.
(WebCore::TextTrackCue::track): m_track is now a RefPtr.
(WebCore::TextTrackCue::setTrack): Ditto.
* html/TextTrackCue.h:
* html/TextTrackCueList.cpp:
(WebCore::TextTrackCueList::add): Don't ignore out of order cues, the spec text is not
a conformance requirement. Return bool to indicate success or failure.
(WebCore::TextTrackCueList::remove): Return bool to indicate success or failure.
* html/TextTrackCueList.h:
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::notifyFinished): Don't change m_state once it is set to Failed.
2011-11-25 Kentaro Hara <haraken@chromium.org>
Refactoring CodeGenerator*.pm for bug 72138
https://bugs.webkit.org/show_bug.cgi?id=73115
Reviewed by Adam Barth.
Tests: bindings/scripts/test/TestObj.idl
* bindings/scripts/CodeGeneratorGObject.pm: Added "1;" at the end since this perl script is loaded as a package.
* bindings/scripts/CodeGeneratorV8.pm: Ditto. Removed unnecessary variable names from method declarations in order to supress style check errors when a new run-bindings-tests IDL is added.
(GenerateHeaderCustomCall):
* bindings/scripts/test/V8/V8TestObj.h: Updated a run-bindings-tests result.
2011-11-25 Kentaro Hara <haraken@chromium.org>
Implement the WebGLContextEvent constructor
https://bugs.webkit.org/show_bug.cgi?id=72856
Reviewed by Adam Barth.
This patch makes WebGLContextEvent constructable.
The spec: http://www.khronos.org/registry/webgl/specs/latest/#5.14
Test: fast/events/constructors/webgl-context-event-constructor.html
* html/canvas/WebGLContextEvent.cpp: Added an implementation of the WebGLContextEvent constructor.
(WebCore::WebGLContextEventInit::WebGLContextEventInit):
(WebCore::WebGLContextEvent::WebGLContextEvent):
* html/canvas/WebGLContextEvent.h: Added a definition of WebGLContextEventInit.
(WebCore::WebGLContextEvent::create):
* html/canvas/WebGLContextEvent.idl: Added [ConstructorTemplate=Event] IDL.
2011-11-25 Jeff Timanus <twiz@chromium.org>
[Chromium] The DrawingBuffer::bind method was incorrectly resetting the
GL viewport parameters. This was unnecessary, and resulted in the corruption
of the WebGL context's state.
https://bugs.webkit.org/show_bug.cgi?id=73091
Reviewed by Stephen White.
Tests: fast/canvas/webgl/webgl-viewport-parameters-preserved.html
* platform/graphics/gpu/DrawingBuffer.cpp:
(WebCore::DrawingBuffer::bind):
2011-11-25 Ryosuke Niwa <rniwa@webkit.org>
Crash in BidiRunList<Run>::replaceRunWithRuns with an empty bdi element
https://bugs.webkit.org/show_bug.cgi?id=73116
Reviewed by Eric Seidel.
The assertion failure was caused because isolatedResolver is initialized with
null start object due to the isolated run being empty.
Fixed the failure by skipping empty isolated runs.
Test: fast/text/empty-bdi-crash.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::constructBidiRuns):
2011-11-25 Antti Koivisto <antti@apple.com>
StyleGeneratedImage should ref CSSImageGeneratorValue
https://bugs.webkit.org/show_bug.cgi?id=73074
Reviewed by Andreas Kling and Nikolas Zimmermann.
RenderStyle owns a bunch of StyleImage objects. However StyleGeneratedImage does not ref the
CSSImageGeneratorValue it holds so we currently rely on the stylesheet to keep the CSSImageGeneratorValues
alive as long as RenderStyle stays alive. While this works (RenderStyles are thrown away if stylesheets
change) it is not particularly robust or nice.
- Use RefPtr<CSSImageGeneratorValue> in StyleGeneratedImage
- Remove the RefPtr<StyleGeneratedImage> from CSSImageGeneratorValue.
There is no good reason to cache StyleGeneratedImage as it is a small and
uncommon object. With that the whole back-reference becomes unnecessary.
- Switch more places to use (Pass)RefPtr<StyleImage> for consistency.
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::CSSImageGeneratorValue):
* css/CSSImageGeneratorValue.h:
* css/CSSStyleApplyProperty.cpp:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
(WebCore::CSSStyleSelector::styleImage):
(WebCore::CSSStyleSelector::cachedOrPendingFromValue):
(WebCore::CSSStyleSelector::generatedOrPendingFromValue):
(WebCore::CSSStyleSelector::loadPendingImage):
(WebCore::CSSStyleSelector::loadPendingImages):
* css/CSSStyleSelector.h:
* rendering/style/FillLayer.h:
(WebCore::FillLayer::setImage):
* rendering/style/NinePieceImage.h:
(WebCore::NinePieceImage::NinePieceImage):
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::StyleGeneratedImage):
(WebCore::StyleGeneratedImage::cssValue):
(WebCore::StyleGeneratedImage::imageSize):
(WebCore::StyleGeneratedImage::addClient):
(WebCore::StyleGeneratedImage::removeClient):
(WebCore::StyleGeneratedImage::image):
* rendering/style/StyleGeneratedImage.h:
(WebCore::StyleGeneratedImage::create):
(WebCore::StyleGeneratedImage::data):
2011-11-25 Andreas Kling <kling@webkit.org>
Remove redundant setStrictParsing(false) calls on CSSMappedAttributeDeclarations.
<http://webkit.org/b/73134>
Reviewed by Antti Koivisto.
CSSMappedAttributeDeclarations always use non-strict parsing since they use
the argument-less CSSMutableStyleDeclaration constructor.
* dom/StyledElement.cpp:
(WebCore::StyledElement::createMappedDecl):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::additionalAttributeStyleDecls):
(WebCore::HTMLTableElement::addSharedCellBordersDecl):
(WebCore::HTMLTableElement::addSharedCellPaddingDecl):
(WebCore::HTMLTableElement::addSharedGroupDecls):
2011-11-25 Andreas Kling <kling@webkit.org>
Factor element pointer out of CSSMutableStyleDeclaration.
<http://webkit.org/b/73121>
Reviewed by Antti Koivisto.
Move the StyledElement pointer out of CSSMutableStyleDeclaration and into a subclass
for the cases where it's needed. This reduces the size of vanilla style declarations
by one CPU word (4 or 8 bytes, depending on architecture.)
* css/CSSMutableStyleDeclaration.h:
(WebCore::CSSElementStyleDeclaration::element):
(WebCore::CSSElementStyleDeclaration::setElement):
(WebCore::CSSElementStyleDeclaration::CSSElementStyleDeclaration):
(WebCore::CSSElementStyleDeclaration::~CSSElementStyleDeclaration):
Added CSSElementStyleDeclaration, a common parent class for inline styles
and mapped attributes. It extends CSSMutableStyleDeclaration by adding a backpointer
to the StyledElement that owns it.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSInlineStyleDeclaration.h: Added.
(WebCore::CSSInlineStyleDeclaration::~CSSInlineStyleDeclaration):
(WebCore::CSSInlineStyleDeclaration::create):
(WebCore::CSSInlineStyleDeclaration::CSSInlineStyleDeclaration):
Added CSSInlineStyleDeclaration.
* bindings/js/JSDOMBinding.h:
(WebCore::root):
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::setSelectorText):
Only follow the associated element on CSSElementStyleDeclarations.
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
(WebCore::CSSMutableStyleDeclaration::operator=):
Remove comment about m_element since the field was moved to a subclass.
* css/CSSStyleDeclaration.cpp:
(WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
* css/CSSStyleDeclaration.h:
(WebCore::CSSStyleDeclaration::isElementStyleDeclaration):
(WebCore::CSSStyleDeclaration::isInlineStyleDeclaration):
We no longer need to track whether a style declaration is mutable or not,
so the constructors are slightly simplified.
Added two bits (isElementStyleDeclaration and isInlineStyleDeclaration) for
runtime type checking. These are protected and set by the CSSElementStyleDeclaration
constructor.
* dom/CSSMappedAttributeDeclaration.h:
(WebCore::CSSMappedAttributeDeclaration::create):
(WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration):
Remove pointless CSSRule* argument to constructor since we always passed 0.
* dom/StyledElement.h:
(WebCore::StyledElement::inlineStyleDecl):
* dom/StyledElement.cpp:
(WebCore::StyledElement::createInlineStyleDecl):
(WebCore::StyledElement::getInlineStyleDecl):
(WebCore::StyledElement::addSubresourceAttributeURLs):
Make the inline style on StyledElement a CSSInlineStyleDeclaration.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::inlineStyleElement):
Slightly simplified by having CSSInlineStyleDeclaration.
2011-11-25 Pavel Feldman <pfeldman@google.com>
Web Inspector: unflake timeline-network tests
https://bugs.webkit.org/show_bug.cgi?id=73123
We should capture stack only when it makes sense. Otherwise loading from cache
results in different data sets (stacks) than regular load.
Reviewed by Yury Semikhatsky.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willCallFunction):
(WebCore::InspectorTimelineAgent::willDispatchEvent):
(WebCore::InspectorTimelineAgent::willLayout):
(WebCore::InspectorTimelineAgent::willRecalculateStyle):
(WebCore::InspectorTimelineAgent::willPaint):
(WebCore::InspectorTimelineAgent::willWriteHTML):
(WebCore::InspectorTimelineAgent::didInstallTimer):
(WebCore::InspectorTimelineAgent::didRemoveTimer):
(WebCore::InspectorTimelineAgent::willFireTimer):
(WebCore::InspectorTimelineAgent::willChangeXHRReadyState):
(WebCore::InspectorTimelineAgent::willLoadXHR):
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::InspectorTimelineAgent::didScheduleResourceRequest):
(WebCore::InspectorTimelineAgent::willReceiveResourceData):
(WebCore::InspectorTimelineAgent::willReceiveResourceResponse):
(WebCore::InspectorTimelineAgent::didFinishLoadingResource):
(WebCore::InspectorTimelineAgent::didTimeStamp):
(WebCore::InspectorTimelineAgent::didMarkDOMContentEvent):
(WebCore::InspectorTimelineAgent::didMarkLoadEvent):
(WebCore::InspectorTimelineAgent::didRegisterAnimationFrameCallback):
(WebCore::InspectorTimelineAgent::didCancelAnimationFrameCallback):
(WebCore::InspectorTimelineAgent::willFireAnimationFrameEvent):
(WebCore::InspectorTimelineAgent::appendRecord):
(WebCore::InspectorTimelineAgent::pushCurrentRecord):
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericRecord):
2011-11-25 Yury Semikhatsky <yurys@chromium.org>
[Chromium] Web Inspector: get rid of WebDevToolsFrontendClient::sendFrontendLoaded method
https://bugs.webkit.org/show_bug.cgi?id=73126
Notify embedder that front-end is loadded only when all dispatchers, panels and models
have been created so that it could dispatch messages synchronously in the loaded handler.
Reviewed by Pavel Feldman.
* inspector/front-end/inspector.js:
2011-11-25 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: don't send Console.messagesCleared on front-end connection if console agent is not enabled
https://bugs.webkit.org/show_bug.cgi?id=73122
Console agent should stay silent if it is not enabled.
Reviewed by Pavel Feldman.
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::clearMessages):
(WebCore::InspectorConsoleAgent::addConsoleMessage):
2011-11-25 Wei Charles <charles.wei@torchmobile.com.cn>
Upstream the QNX/RIM specific HistoryItemViewState
https://bugs.webkit.org/show_bug.cgi?id=73114
Reviewed by Daniel Bates.
This patch is to upstream RIM/QNX specific HistoryItemViewState extension
to store some extra view state.
No new tests. It's not built yet.
* history/blackberry: Added.
* history/blackberry/HistoryItemViewState.h: Added.
(WebCore::HistoryItemViewState::HistoryItemViewState):
2011-11-25 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Split scripts panel top status bar into debug toolbar and editor toolbar.
https://bugs.webkit.org/show_bug.cgi?id=73087
Reviewed by Pavel Feldman.
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._reset):
(WebInspector.ScriptsPanel.prototype._createEditorToolbar):
(WebInspector.ScriptsPanel.prototype._createDebugToolbar):
(WebInspector.ScriptsPanel.prototype._createButtonAndRegisterShortcuts):
* inspector/front-end/scriptsPanel.css:
(#scripts-debug-toolbar):
(#scripts-editor-toolbar):
(#scripts-debug-sidebar-resizer-widget):
(.script-view):
2011-11-25 Leo Yang <leo.yang@torchmobile.com.cn>
Upstream BlackBerry porting of platform/text
https://bugs.webkit.org/show_bug.cgi?id=73117
Reviewed by Daniel Bates.
Initial upstream, can't be built yet, no test cases.
* platform/text/blackberry/StringBlackBerry.cpp: Added.
(WTF::String::String):
(WTF::String::operator WebString):
* platform/text/blackberry/TextBreakIteratorInternalICUBlackBerry.cpp: Added.
(WebCore::currentSearchLocaleID):
(WebCore::currentTextBreakLocaleID):
2011-11-25 Kentaro Hara <haraken@chromium.org>
Remove WebCore.gyp/scripts/rule_binding.py
https://bugs.webkit.org/show_bug.cgi?id=73109
Reviewed by Adam Barth.
rule_binding.py is used by WebCore.gyp only. rule_binding.py is just a wrapper
of generate-bindings.pl and thus we can remove it.
No new tests. No change in behavior.
* WebCore.gyp/WebCore.gyp: Replaces rule_binding.py with generate-bindings.pl.
* WebCore.gyp/scripts/rule_binding.py: Removed.
* bindings/scripts/preprocessor.pm: When '"ENABLE_SOMETHING=1" "ENABLE_OTHERS=0"' is passed as a define macro, the string is passed to our perl scripts without the double-quotations (") omitted. We need to omit the double quatations here.
(applyPreprocessor):
2011-11-24 Yury Semikhatsky <yurys@chromium.org>
[Chromium] Web Inspector: remove legacy debugger support
https://bugs.webkit.org/show_bug.cgi?id=73081
Removed classed providing access to V8 debugging protocol. Clients should
use Web Inspector protocol instead.
Reviewed by Pavel Feldman.
* bindings/v8/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::PageScriptDebugServer):
(WebCore::PageScriptDebugServer::addListener):
* bindings/v8/PageScriptDebugServer.h:
2011-11-24 Pavel Feldman <pfeldman@google.com>
Web Inspector: refactor resource tree model and introduce explicit class for ResourceTreeFrame.
https://bugs.webkit.org/show_bug.cgi?id=73078
Otherwise we are managing frames and their resources using too many maps.
Reviewed by Yury Semikhatsky.
* inspector/Inspector.json:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::restore):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didReceiveResponse):
* inspector/front-end/ApplicationCacheModel.js:
(WebInspector.ApplicationCacheModel.prototype._frameNavigated):
(WebInspector.ApplicationCacheModel.prototype._frameDetached):
* inspector/front-end/JavaScriptContextManager.js:
(WebInspector.JavaScriptContextManager.prototype._frameAdded):
(WebInspector.JavaScriptContextManager.prototype._frameNavigated):
(WebInspector.FrameEvaluationContext.prototype.get displayName):
* inspector/front-end/NetworkManager.js:
(WebInspector.NetworkDispatcher.prototype.requestWillBeSent):
(WebInspector.NetworkDispatcher.prototype.responseReceived):
(WebInspector.NetworkDispatcher.prototype.loadingFinished):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._mainFrameNavigated):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel):
(WebInspector.ResourceTreeModel.prototype._fetchResourceTree):
(WebInspector.ResourceTreeModel.prototype._processCachedResources):
(WebInspector.ResourceTreeModel.prototype._addFrame):
(WebInspector.ResourceTreeModel.prototype._frameNavigated):
(WebInspector.ResourceTreeModel.prototype._frontendReused):
(WebInspector.ResourceTreeModel.prototype._frameDetached):
(WebInspector.ResourceTreeModel.prototype._onResourceUpdated):
(WebInspector.ResourceTreeModel.prototype._onResourceUpdateDropped):
(WebInspector.ResourceTreeModel.prototype.frameForId):
(WebInspector.ResourceTreeModel.prototype.forAllResources):
(WebInspector.ResourceTreeModel.prototype.resourceForURL):
(WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
(WebInspector.ResourceTreeModel.prototype._createResourceFromFramePayload):
(WebInspector.ResourceTreeModel.prototype._createResource):
(WebInspector.ResourceTreeFrame):
(WebInspector.ResourceTreeFrame.prototype.get id):
(WebInspector.ResourceTreeFrame.prototype.get name):
(WebInspector.ResourceTreeFrame.prototype.get url):
(WebInspector.ResourceTreeFrame.prototype.get loaderId):
(WebInspector.ResourceTreeFrame.prototype.get parentFrame):
(WebInspector.ResourceTreeFrame.prototype.get childFrames):
(WebInspector.ResourceTreeFrame.prototype.isMainFrame):
(WebInspector.ResourceTreeFrame.prototype.navigate):
(WebInspector.ResourceTreeFrame.prototype.get mainResource):
(WebInspector.ResourceTreeFrame.prototype.addChildFrame):
(WebInspector.ResourceTreeFrame.prototype.removeChildFrame):
(WebInspector.ResourceTreeFrame.prototype._addResource):
(WebInspector.ResourceTreeFrame.prototype.resources):
(WebInspector.ResourceTreeFrame.prototype.resourceForURL.filter):
(WebInspector.ResourceTreeFrame.prototype.resourceForURL):
(WebInspector.ResourceTreeFrame.prototype._callForFrameResources):
(WebInspector.PageDispatcher.prototype.frameNavigated):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel):
(WebInspector.ResourcesPanel.prototype.wasShown):
(WebInspector.ResourcesPanel.prototype._initialize):
(WebInspector.ResourcesPanel.prototype._resetWithFrames):
(WebInspector.ResourcesPanel.prototype._reset):
(WebInspector.ResourcesPanel.prototype._populateResourceTree.populateFrame):
(WebInspector.ResourcesPanel.prototype._populateResourceTree):
(WebInspector.ResourcesPanel.prototype._frameAdded):
(WebInspector.ResourcesPanel.prototype._frameDetached):
(WebInspector.ResourcesPanel.prototype._frameNavigated):
(WebInspector.ResourcesPanel.prototype._cachedResourcesLoaded):
* inspector/front-end/ScriptFormatter.js:
(WebInspector.ScriptFormatter.prototype.formatContent):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
2011-11-24 Kentaro Hara <haraken@chromium.org>
Initialize global variables during IDLParser object creation
https://bugs.webkit.org/show_bug.cgi?id=73108
Reviewed by Adam Barth.
Currently, IDLParser.pm initializes global variables in a global scope,
which means that the global variables are initialized just once at the beginning.
On the other hand, implementing [Supplemental] IDL (bug 72138) requires a change
on generate-bindings.pl that initializes the global variables whenever a new IDLParser
object is created. Thus, this patch initializes the global variables during
the IDLParser object creation.
No new tests. No change in behavior.
* bindings/scripts/IDLParser.pm:
(InitializeGlobalData):
(new):
2011-11-24 Patrick Gansterer <paroga@webkit.org>
[CMake] Build fix for NOT ENABLE_WEB_SOCKETS.
* CMakeLists.txt: Move CloseEvent.idl to the unconditional files.
2011-11-24 Patrick Gansterer <paroga@webkit.org>
Build fix for C++ bindings.
* bindings/cpp/WebDOMEventTarget.cpp: Added #if ENABLE() guards.
2011-11-24 Arko Saha <arko@motorola.com>
Microdata: Support for properties attribute.
https://bugs.webkit.org/show_bug.cgi?id=71050
Reviewed by Adam Barth.
The properties attribute returns an HTMLPropertiesCollection object with all the element's
properties. Otherwise, an empty HTMLPropertiesCollection object.
Tests: fast/dom/MicroData/itemref-refers-first-element-with-given-id.html
fast/dom/MicroData/names-property-must-be-correct.html
fast/dom/MicroData/names-property-test.html
fast/dom/MicroData/properties-collection-add-remove-itemref.html
fast/dom/MicroData/properties-collection-add-remove-property.html
fast/dom/MicroData/properties-collection-behavior-add-remove-itemscope-attr.html
fast/dom/MicroData/properties-collection-must-be-correct.html
fast/dom/MicroData/properties-collection-must-ignore-properties-of-nested-items.html
fast/dom/MicroData/properties-collection-must-see-the-properties-added-in-itemref.html
fast/dom/MicroData/properties-collection-test.html
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/GNUmakefile.am:
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::toJS):
* dom/MicroDataItemList.cpp:
* dom/Node.cpp:
(WebCore::Node::itemProp):
(WebCore::Node::setItemProp):
(WebCore::Node::itemRef):
(WebCore::Node::setItemRef):
(WebCore::Node::itemType):
(WebCore::Node::setItemType):
(WebCore::Node::properties):
* dom/Node.h:
* dom/NodeRareData.h:
(WebCore::NodeRareData::itemProp):
(WebCore::NodeRareData::setItemProp):
(WebCore::NodeRareData::itemRef):
(WebCore::NodeRareData::setItemRef):
(WebCore::NodeRareData::itemType):
(WebCore::NodeRareData::setItemType):
(WebCore::NodeRareData::properties):
* html/CollectionType.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::itemAfter):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setItemValueText):
* html/HTMLElement.h:
* html/HTMLElement.idl:
* html/HTMLPropertiesCollection.cpp: Added.
(WebCore::compareTreeOrder):
(WebCore::HTMLPropertiesCollection::create):
(WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
(WebCore::HTMLPropertiesCollection::~HTMLPropertiesCollection):
(WebCore::HTMLPropertiesCollection::findPropetiesOfAnItem): Finds the properties of an item.
(WebCore::HTMLPropertiesCollection::length): Returns the number of elements in the properties collection.
(WebCore::HTMLPropertiesCollection::item): Returns the element with index 'index' from the collection. The items are sorted in tree order.
(WebCore::HTMLPropertiesCollection::names): Returns a DOMStringList with the property names of the elements in the collection with the order preserved but with duplicates removed.
* html/HTMLPropertiesCollection.h: Added.
* html/HTMLPropertiesCollection.idl: Added.
* page/DOMWindow.idl:
2011-11-24 Joshua Bell <jsbell@chromium.org>
IndexedDB: Indexes should be secondarily sorted on primary key
https://bugs.webkit.org/show_bug.cgi?id=72567
Reviewed by Tony Chang.
Implemented by adding the primary key (i.e. unique key in the
object store) to the IndexDataKey (i.e. the composite key used
in the index. Previously, non-unique entries in the index were
stored with a unique (and hidden) sequenceNumber, so ordering was
not predictable by scripts (or per spec). The sequenceNumber
is now deprecated but still present in the LevelDB backing store
to avoid having to do a data migration.
Test: storage/indexeddb/cursor-primary-key-order.html
* storage/IDBLevelDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
* storage/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::compare):
(WebCore::IDBLevelDBCoding::IndexDataKey::decode):
(WebCore::IDBLevelDBCoding::IndexDataKey::encode):
(WebCore::IDBLevelDBCoding::IndexDataKey::compare):
(WebCore::IDBLevelDBCoding::IndexDataKey::primaryKey):
* storage/IDBLevelDBCoding.h:
2011-11-24 Pavel Feldman <pfeldman@google.com>
Web Inspector: WebInspector.inspectedPageDomain is not calculated for about:blank
https://bugs.webkit.org/show_bug.cgi?id=73082
Reviewed by Timothy Hatcher.
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype._processCachedResources):
(WebInspector.ResourceTreeModel.prototype._frameNavigated):
(WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
* inspector/front-end/inspector.js:
(WebInspector.networkResourceById):
(WebInspector.get inspectedPageDomain):
2011-11-24 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: provide context menu items to open resources using extensions
https://bugs.webkit.org/show_bug.cgi?id=73076
Reviewed by Yury Semikhatsky.
* English.lproj/localizedStrings.js:
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._onSetOpenResourceHandler):
(WebInspector.ExtensionServer.prototype._handleOpenURL):
* inspector/front-end/HandlerRegistry.js:
(get WebInspector.HandlerRegistry.prototype.set dispatch):
(get WebInspector.HandlerRegistry.prototype.dispatchToHandler):
* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype.populateTextAreaContextMenu):
* inspector/front-end/externs.js:
(WebInspector.populateResourceContextMenu):
* inspector/front-end/inspector.js:
(WebInspector.populateResourceContextMenu):
(WebInspector._showAnchorLocation):
2011-10-27 Philippe Normand <pnormand@igalia.com>
[GStreamer] WebAudio AudioDestination
https://bugs.webkit.org/show_bug.cgi?id=69835
Reviewed by Martin Robinson.
New GStreamer source element pulling data from the AudioBus and
outputing audio interleaved GstBuffers suitable for playback.
* GNUmakefile.list.am: Added the new GStreamer WebAudio element
source files to the build.
* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::onGStreamerWavparsePadAddedCallback): Function called
when the playback pipeline successfully parsed the audio source
into a WAV stream.
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
Configure the initial playback pipeline up to the WAV parser. The
audio sink is added only after the WAV parser was configured.
(WebCore::AudioDestinationGStreamer::~AudioDestinationGStreamer):
Reset the playback pipeline and delete it.
(WebCore::AudioDestinationGStreamer::finishBuildingPipelineAfterWavParserPadReady):
Method to add the audio sink to the pipeline and link it to the
WAV parser.
(WebCore::AudioDestinationGStreamer::start): Set pipeline to
PLAYING, at the first run it will trigger the WAV parser and hence
the audio-sink plugging.
(WebCore::AudioDestinationGStreamer::stop): Pause the pipeline.
* platform/audio/gstreamer/AudioDestinationGStreamer.h:
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: Added.
(getGStreamerMonoAudioCaps): Utility function to generate
GStreamer caps representing a single audio channel for a given
sample rate.
(webKitWebAudioGStreamerChannelPosition): Utility function to
convert AudioBus channel representations to GStreamer positional
audio channel values.
(webkit_web_audio_src_class_init): GObject configuration of the
GStreamer source element.
(webkit_web_audio_src_init): Initialization of the private data of
the element.
(webKitWebAudioSourceConstructed): Configure the GstBin elements
depending on the AudioBus layout.
(webKitWebAudioSourceFinalize): Clean up the GstBin and free private
data of the element.
(webKitWebAudioSourceSetProperty): GObject property setter.
(webKitWebAudioSourceGetProperty): GObject property getter.
(webKitWebAudioSourceLoop): GstTask used to pull data from the
AudioBus and push it as GstBuffers to the src pad of the element.
(webKitWebAudioSourceChangeState): Start or stop the above GstTask
depending on the asked state transition.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.h: Added.
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp: GstTask support in GRefPtr.
(WTF::adoptGRef):
(WTF::GstTask):
* platform/graphics/gstreamer/GRefPtrGStreamer.h:
2011-11-24 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Get rid of the buildDirForSource() function in the build system
At some point the plan was to allow for running qmake on sub-trees
of the sources, into the top level build directory, but this is no
longer possible, so no reason to keep the convenience function around.
Reviewed by Simon Hausmann.
* DerivedSources.pri:
2011-11-24 Patrick Gansterer <paroga@webkit.org>
[CMake] Add missing source files
https://bugs.webkit.org/show_bug.cgi?id=73052
Reviewed by Andreas Kling.
* CMakeLists.txt:
2011-11-24 Philippe Normand <pnormand@igalia.com>
Fix ASSERTs added in r101082.
Rubber-Stamped by Martin Robinson.
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef): Check for valid pointer before
GST_OBJECT_IS_FLOATING().
2011-11-23 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: shift focus to the source view when a resource is selected in the Scripts panel
https://bugs.webkit.org/show_bug.cgi?id=69738
Reviewed by Timothy Hatcher.
The source viewer is focused whenever a file name option is clicked, and is NOT focused when the script list
is traversed with the Up/Down keys.
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._filesSelectChanged):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype.focus):
* inspector/front-end/TextViewer.js:
(WebInspector.TextViewer.prototype.focus):
2011-11-23 Pavel Podivilov <podivilov@chromium.org>
Web Inspector: add integration test for compiler source maps.
https://bugs.webkit.org/show_bug.cgi?id=72730
Reviewed by Pavel Feldman.
Test: http/tests/inspector/compiler-source-mapping-debug.html
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype._bindScriptToRawSourceCode):
(WebInspector.DebuggerPresentationModel.prototype.setCompilerSourceMapping):
(WebInspector.DebuggerPresentationModel.prototype.evaluateInSelectedCallFrame):
(WebInspector.DebuggerPresentationModel.prototype.get executionLineLocation):
(WebInspector.DebuggerPresentationModel.DefaultLinkifierFormatter.prototype.formatRawSourceCodeAnchor):
(WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyLocation):
(WebInspector.DebuggerPresentationModel.Linkifier.prototype._updateAnchor):
2011-11-23 Pavel Feldman <pfeldman@google.com>
Web Inspector: get rid of the WebInspector.mainResource, use WebInspector.inspectedPageURL instead.
https://bugs.webkit.org/show_bug.cgi?id=73024
We use it for the URL mostly, no need to create artificial resource for that upon
attaching to the existing page.
Reviewed by Yury Semikhatsky.
* inspector/front-end/AuditsPanel.js:
* inspector/front-end/HAREntry.js:
(WebInspector.HARLog.prototype._buildPages):
(WebInspector.HARLog.prototype._pageEventTime):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype._updateSummaryBar):
(WebInspector.NetworkLogView.prototype._exportAll):
* inspector/front-end/Resource.js:
(WebInspector.Resource.prototype.set url):
(WebInspector.Resource.prototype.get displayName):
(WebInspector.Resource.prototype.get displayDomain):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype._processCachedResources):
(WebInspector.ResourceTreeModel.prototype._dispatchInspectedURLChanged):
(WebInspector.ResourceTreeModel.prototype._frameNavigated):
(WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
* inspector/front-end/ResourceUtils.js:
(WebInspector.displayNameForURL):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype._initDefaultSelection):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._addRecordToTimeline):
* inspector/front-end/utilities.js:
(String.prototype.asParsedURL):
2011-11-23 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: exceptions in shared workers should be logged to web inspector console
https://bugs.webkit.org/show_bug.cgi?id=73022
According to section "4.7 Runtime script errors" of Web Workers spec "For shared
workers, if the error is still not handled afterwards, or if the error occurred
while handling a previous script error, the error may be reported to the user."
This change adds uncaugh exceptions to the shared worker web inspector console.
Reviewed by Pavel Feldman.
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::restore):
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::restore):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerContext):
* inspector/InspectorInstrumentation.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::connectFrontend):
(WebCore::WorkerInspectorController::disconnectFrontend):
(WebCore::WorkerInspectorController::restoreInspectorStateFromCookie):
* inspector/WorkerInspectorController.h:
* inspector/front-end/WorkerManager.js:
(WebInspector.WorkerManager.showWorkerTerminatedScreen):
* inspector/front-end/inspector.js:
* workers/SharedWorkerContext.cpp:
(WebCore::SharedWorkerContext::logExceptionToConsole):
* workers/SharedWorkerContext.h:
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::addMessage): console messages are now added to
the worker console agent.
(WebCore::WorkerContext::addMessageToWorkerConsole):
* workers/WorkerContext.h:
2011-11-23 Jeff Timanus <twiz@chromium.org>
[Chromium] Prevent DrawingBuffer instances from corrupting the active
texture state of the WebGL contexts. The DrawingBuffer now tracks the
state of texture unit 0, and the active texture unit, so that state can
be restored.
https://bugs.webkit.org/show_bug.cgi?id=73033
Reviewed by Kenneth Russell.
Test: fast/canvas/webgl/webgl-texture-binding-preserved.html
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::activeTexture):
(WebCore::WebGLRenderingContext::bindTexture):
* platform/graphics/chromium/DrawingBufferChromium.cpp:
(WebCore::DrawingBuffer::DrawingBuffer):
(WebCore::DrawingBuffer::publishToPlatformLayer):
* platform/graphics/gpu/DrawingBuffer.h:
(WebCore::DrawingBuffer::setTexture2DBinding):
(WebCore::DrawingBuffer::setActiveTextureUnit):
* platform/graphics/gpu/mac/DrawingBufferMac.mm:
(WebCore::DrawingBuffer::DrawingBuffer):
* platform/graphics/gpu/qt/DrawingBufferQt.cpp:
(WebCore::DrawingBuffer::DrawingBuffer):
* platform/graphics/gtk/DrawingBufferGtk.cpp:
(WebCore::DrawingBuffer::DrawingBuffer):
2011-11-23 Luke Macpherson <macpherson@chromium.org>
CSSValue: reorder ClassType enum to allow faster comparisons, add COMPILE_ASSERT on class size.
https://bugs.webkit.org/show_bug.cgi?id=72924
Reviewed by Andreas Kling.
Note that the change from unsigned to unsigned char is to improve bit packing when using MSVC.
Covered by existing CSS tests.
* css/CSSValue.h:
(WebCore::CSSValue::isPrimitiveValue):
(WebCore::CSSValue::isValueList):
(WebCore::CSSValue::isImageGeneratorValue):
(WebCore::CSSValue::isTimingFunctionValue):
(WebCore::CSSValue::CSSValue):
2011-11-23 Dmitry Lomov <dslomov@google.com>
https://bugs.webkit.org/show_bug.cgi?id=73054
[V8][Chromium] Add list of transferred ArrayBuffers to SerializedScriptValue::create.
Reviewed by David Levin.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateParametersCheck):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjInternal::serializedValueCallback):
* bindings/v8/OptionsObject.cpp:
* bindings/v8/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::create):
* bindings/v8/SerializedScriptValue.h:
* bindings/v8/V8Utilities.cpp:
(WebCore::extractTransferables):
(WebCore::getMessagePortArray):
* bindings/v8/V8Utilities.h:
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::handlePostMessageCallback):
* bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
(WebCore::handlePostMessageCallback):
* bindings/v8/custom/V8HistoryCustom.cpp:
(WebCore::V8History::pushStateCallback):
(WebCore::V8History::replaceStateCallback):
* bindings/v8/custom/V8MessageEventCustom.cpp:
* bindings/v8/custom/V8MessagePortCustom.cpp:
(WebCore::handlePostMessageCallback):
* bindings/v8/custom/V8MessagePortCustom.h: Removed.
* bindings/v8/custom/V8WorkerCustom.cpp:
(WebCore::handlePostMessageCallback):
2011-11-23 Rafael Weinstein <rafaelw@chromium.org>
Cleanup #if usage in V8GCController
https://bugs.webkit.org/show_bug.cgi?id=73060
Reviewed by Ojan Vafai.
No tests needed. Just code cleanup
* bindings/v8/V8GCController.cpp:
(WebCore::V8GCController::checkMemoryUsage):
2011-11-23 Rafael Weinstein <rafaelw@chromium.org>
Change CSSMutableStyleDeclaration::m_node to m_element (along with getter/setter)
https://bugs.webkit.org/show_bug.cgi?id=73050
Reviewed by Ojan Vafai.
No tests needed. This is just a refactor.
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
(WebCore::CSSMutableStyleDeclaration::operator=):
(WebCore::CSSMutableStyleDeclaration::isInlineStyleDeclaration):
(WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc):
* css/CSSMutableStyleDeclaration.h:
(WebCore::CSSMutableStyleDeclaration::setElement):
(WebCore::CSSMutableStyleDeclaration::element):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::setSelectorText):
* dom/StyledElement.cpp:
(WebCore::StyledElement::createInlineStyleDecl):
(WebCore::StyledElement::destroyInlineStyleDecl):
(WebCore::StyledElement::attributeChanged):
(WebCore::StyledElement::createMappedDecl):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::additionalAttributeStyleDecls):
(WebCore::HTMLTableElement::addSharedCellBordersDecl):
(WebCore::HTMLTableElement::addSharedCellPaddingDecl):
(WebCore::HTMLTableElement::addSharedGroupDecls):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::inlineStyleElement):
2011-11-23 Ami Fischman <fischman@chromium.org>
Teach VideoLayerChromium how to render native texture (to support HW video decode).
https://bugs.webkit.org/show_bug.cgi?id=73043
Reviewed by Kenneth Russell.
No new tests. (depends on chromium support landing, and supporting HW being available)
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawLayersOntoRenderSurfaces):
(WebCore::LayerRendererChromium::videoLayerNativeTextureProgram):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/VideoFrameChromium.h:
* platform/graphics/chromium/VideoLayerChromium.cpp:
(WebCore::VideoLayerChromium::VideoLayerChromium):
(WebCore::VideoLayerChromium::updateCompositorResources):
(WebCore::VideoLayerChromium::pushPropertiesTo):
(WebCore::VideoLayerChromium::determineTextureFormat):
* platform/graphics/chromium/VideoLayerChromium.h:
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::setNativeTexture):
(WebCore::CCVideoLayerImpl::draw):
(WebCore::CCVideoLayerImpl::drawNativeTexture):
* platform/graphics/chromium/cc/CCVideoLayerImpl.h:
2011-11-23 Vincent Scheib <scheib@chromium.org>
Pointer Lock: Plumb movement coordinates from PlatformMouseEvent to MouseEvents.
https://bugs.webkit.org/show_bug.cgi?id=73031
Reviewed by Dimitri Glazkov.
No tests for now, but this patch gets us closer to being able to write layout tests for pointer lock.
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
(WebCore::MouseEvent::MouseEvent):
(WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
* dom/MouseEvent.h:
(WebCore::MouseEvent::create):
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
* dom/MouseRelatedEvent.h:
* dom/TouchEvent.cpp:
(WebCore::TouchEvent::TouchEvent):
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchDragEvent):
* platform/PlatformMouseEvent.h:
(WebCore::PlatformMouseEvent::movementX):
(WebCore::PlatformMouseEvent::movementY):
2011-11-23 Nico Weber <thakis@chromium.org>
Remove one static initializer (for kTickTime)
https://bugs.webkit.org/show_bug.cgi?id=73049
Reviewed by Adam Barth.
* platform/ScrollAnimatorNone.cpp:
2011-11-23 Jonathan Backer <backer@chromium.org>
[chromium] Drop root layer tiles on platforms that cache the front buffer
https://bugs.webkit.org/show_bug.cgi?id=72956
Reviewed by Kenneth Russell.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::initialize):
(WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
(WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
2011-11-23 Erik Arvidsson <arv@chromium.org>
Binding CodeGenerators don't support Conditional= on constants
https://bugs.webkit.org/show_bug.cgi?id=67666
Reviewed by Adam Barth.
Adds support for [Conditional=LABEL] to const IDL fields.
* bindings/scripts/CodeGenerator.pm:
(GenerateConditionalStringFromAttributeValue): Moved out of CodeGenerator{CPP,JS,V8}.pm.
(GenerateCompileTimeCheckForEnumsIfNeeded): Wrap in conditional #if.
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateConditionalString):
(GenerateHeader): Ditto.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConditionalString):
(GenerateHeader): Ditto.
(GenerateImplementation): Ditto.
(GenerateHashTable):
(WriteData):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateHeader): Ditto.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateConditionalString): Ditto.
(GenerateImplementation):
(WriteData):
* bindings/scripts/test/CPP/WebDOMTestObj.h: Generated code now wraps conditional const in #if.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjCONDITIONAL_CONST): Ditto
* bindings/scripts/test/JS/JSTestObj.h: Ditto
* bindings/scripts/test/ObjC/DOMTestObj.h: Ditto
* bindings/scripts/test/TestObj.idl: Added a conditional const.
* bindings/scripts/test/V8/V8TestObj.cpp: Generated code now wraps conditional const in #if.
2011-11-23 Rafael Weinstein <rafaelw@chromium.org>
[MutationObservers] Modifications to the style property don't dispatch "attributes" Mutation Records
https://bugs.webkit.org/show_bug.cgi?id=70137
Reviewed by Ryosuke Niwa.
This patch adds a private AttributesMutationScope mechanism to CSSMutableStyleDeclaration (which uses
the RAII pattern similar to the public ChildListMutationScope). This manages the (sometimes conditional)
pre-change serialization of the style attribute (if an observer has requested oldValue), creation of
the mutation record, and dispatch if the declaration was actual affected.
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::removeProperty):
(WebCore::CSSMutableStyleDeclaration::setProperty):
(WebCore::CSSMutableStyleDeclaration::setPropertyInternal):
(WebCore::CSSMutableStyleDeclaration::parseDeclaration):
(WebCore::CSSMutableStyleDeclaration::addParsedProperties):
(WebCore::CSSMutableStyleDeclaration::addParsedProperty):
(WebCore::CSSMutableStyleDeclaration::setCssText):
(WebCore::CSSMutableStyleDeclaration::merge):
(WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
* dom/Element.cpp:
(WebCore::Element::setAttribute):
2011-11-23 Dmitry Lomov <dslomov@google.com>
Unreviewed, rebaseline binding tests after http://trac.webkit.org/changeset/101064.
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::toFloat64Array):
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore::V8Float64Array::wrapSlow):
2011-11-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101069.
http://trac.webkit.org/changeset/101069
https://bugs.webkit.org/show_bug.cgi?id=73032
New test always times out (Requested by aklein on #webkit).
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype._bindScriptToRawSourceCode):
(WebInspector.DebuggerPresentationModel.prototype.evaluateInSelectedCallFrame):
(WebInspector.DebuggerPresentationModel.prototype.get executionLineLocation):
(WebInspector.DebuggerPresentationModel.DefaultLinkifierFormatter.prototype.formatRawSourceCodeAnchor):
(WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyLocation):
(WebInspector.DebuggerPresentationModel.Linkifier.prototype._updateAnchor):
2011-11-23 Antti Koivisto <antti@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=72354
Image pointer in FillLayer not cleared correctly
Reviewed by Dan Bernstein.
Test: fast/css/fill-layer-crash.html
We should clear the image pointer too, not just the m_imageSet bit.
* rendering/style/FillLayer.h:
(WebCore::FillLayer::clearImage):
2011-11-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r101057.
http://trac.webkit.org/changeset/101057
https://bugs.webkit.org/show_bug.cgi?id=73027
Broke Chromium Windows build (Requested by aklein on #webkit).
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::HTMLTrackElement):
(WebCore::HTMLTrackElement::didCompleteLoad):
(WebCore::HTMLTrackElement::textTrackReadyStateChanged):
* html/HTMLTrackElement.h:
* html/HTMLTrackElement.idl:
* html/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::loadTimerFired):
(WebCore::LoadableTextTrack::cueLoadingStarted):
(WebCore::LoadableTextTrack::cueLoadingCompleted):
* html/TextTrack.cpp:
(WebCore::TextTrack::TextTrack):
(WebCore::TextTrack::setReadyState):
* html/TextTrack.h:
(WebCore::TextTrack::readyState):
* html/TextTrack.idl:
2011-11-23 Yury Semikhatsky <yurys@chromium.org>
Unreviewed. Build fix. Added missing ENABLE(WORKERS) guards.
* inspector/WorkerConsoleAgent.cpp:
* inspector/WorkerConsoleAgent.h:
* inspector/WorkerRuntimeAgent.cpp:
* inspector/WorkerRuntimeAgent.h:
2011-11-23 Philippe Normand <pnormand@igalia.com>
[GStreamer] improper usage of gst_object_ref_sink
https://bugs.webkit.org/show_bug.cgi?id=73014
Reviewed by Martin Robinson.
No new tests. Existing tests cover this already.
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef): Ensure this is called with non-floating GstObjects.
(WTF::GstElement): Replace gst_object_ref_sink with
gst_object_ref+gst_object_sink like advised in the GstObject documentation.
(WTF::GstPad): Ditto.
* platform/graphics/gstreamer/GRefPtrGStreamer.h:
2011-11-23 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: split console agent into worker and page console agents
https://bugs.webkit.org/show_bug.cgi?id=73019
InspectorConsoleAgent now has two descendants: WorkerConsoleAgent and PageConsoleAgent
which encapsulate functionality specific for the type of inspected instance.
Reviewed by Pavel Feldman.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::~InspectorConsoleAgent):
(WebCore::InspectorConsoleAgent::clearMessages):
(WebCore::InspectorConsoleAgent::addMessageToConsole):
(WebCore::InspectorConsoleAgent::resourceRetrievedByXMLHttpRequest):
(WebCore::InspectorConsoleAgent::didReceiveResponse):
(WebCore::InspectorConsoleAgent::didFailLoading):
(WebCore::InspectorConsoleAgent::addConsoleMessage):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorStyleTextEditor.cpp:
* inspector/InspectorStyleTextEditor.h:
* inspector/PageConsoleAgent.cpp: Copied from Source/WebCore/inspector/PageDebuggerAgent.cpp.
(WebCore::PageConsoleAgent::PageConsoleAgent):
(WebCore::PageConsoleAgent::~PageConsoleAgent):
(WebCore::PageConsoleAgent::clearMessages):
(WebCore::PageConsoleAgent::addInspectedNode):
(WebCore::PageConsoleAgent::developerExtrasEnabled):
* inspector/PageConsoleAgent.h: Copied from Source/WebCore/inspector/PageDebuggerAgent.h.
* inspector/PageDebuggerAgent.cpp:
* inspector/PageDebuggerAgent.h:
* inspector/PageRuntimeAgent.cpp: Copied from Source/WebCore/inspector/PageDebuggerAgent.h.
(WebCore::PageRuntimeAgent::PageRuntimeAgent): PageRuntimeAgent was moved into its own file.
(WebCore::PageRuntimeAgent::~PageRuntimeAgent):
(WebCore::PageRuntimeAgent::scriptStateForFrameId):
(WebCore::PageRuntimeAgent::getDefaultInspectedState):
* inspector/PageRuntimeAgent.h: Copied from Source/WebCore/inspector/PageDebuggerAgent.h.
* inspector/WorkerConsoleAgent.cpp: Copied from Source/WebCore/inspector/PageDebuggerAgent.h.
(WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
(WebCore::WorkerConsoleAgent::~WorkerConsoleAgent):
(WebCore::WorkerConsoleAgent::addInspectedNode):
(WebCore::WorkerConsoleAgent::developerExtrasEnabled):
* inspector/WorkerConsoleAgent.h: Copied from Source/WebCore/inspector/PageDebuggerAgent.h.
* inspector/WorkerDebuggerAgent.cpp:
* inspector/WorkerDebuggerAgent.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
* inspector/WorkerInspectorController.h:
* inspector/WorkerRuntimeAgent.cpp: Copied from Source/WebCore/inspector/PageDebuggerAgent.h.
(WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent): WorkerRuntimeAgent was moved into its own file.
(WebCore::WorkerRuntimeAgent::~WorkerRuntimeAgent):
(WebCore::WorkerRuntimeAgent::scriptStateForFrameId):
(WebCore::WorkerRuntimeAgent::getDefaultInspectedState):
* inspector/WorkerRuntimeAgent.h: Copied from Source/WebCore/inspector/PageDebuggerAgent.h.
2011-11-23 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: warning icon for unrecognized style rule should have tooltip
https://bugs.webkit.org/show_bug.cgi?id=50638
Reviewed by Yury Semikhatsky.
* English.lproj/localizedStrings.js: Add new tooltip strings.
* inspector/front-end/CSSCompletions.js:
(WebInspector.CSSCompletions.prototype.keySet): Added.
* inspector/front-end/StylesSidebarPane.js: Create a separate IMG element for an exclamation mark.
* inspector/front-end/elementsPanel.css:
(.styles-section .properties li.not-parsed-ok img.exclamation-mark):
2011-11-23 Halton Huo <halton.huo@intel.com>
[EFL] Add zlib depend when freetype is used.
https://bugs.webkit.org/show_bug.cgi?id=66365
Unreviewed build fix.
When freetype is enabled, uncompress() function is used by
WOFFFileFormat.cpp. Since zlib is not required by freetype, we need to
add libz as dependency for fix linking issue.
No new test because this change is only to fix linking issue.
* PlatformEfl.cmake: add ZLIB as dependency when using freetype
2011-11-23 Mihnea Ovidenie <mihnea@adobe.com>
CSS Exclusions: parse the shorthand "wrap" property
https://bugs.webkit.org/show_bug.cgi?id=71905
Reviewed by Dean Jackson.
Test: fast/exclusions/wrap-parsing.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::getPropertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyLonghand.cpp:
(WebCore::initShorthandMap):
* css/CSSPropertyNames.in:
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
2011-11-23 Alexandru Chiculita <achicu@adobe.com>
[CSS Filters] WebKit crashes when changing the filter
https://bugs.webkit.org/show_bug.cgi?id=72723
Reviewed by Simon Fraser.
There are three things fixed with this patch:
1. The list of effects wasn't cleared when the FilterOperations were changed.
2. The sourceImage was going to be 0, because the m_sourceGraphicBuffer.release()
was also clearing the reference to m_sourceGraphicBuffer. Next time the build() method
was called m_graphicsBufferAttached was set to false, but the m_sourceGraphicBuffer was
not regenerated, because the size was not invalidated.
3. maxEffectRects were not updated when a new list of effects was built.
Test: css3/filters/crash-filter-change.html
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build):
(WebCore::FilterEffectRenderer::prepare):
* rendering/FilterEffectRenderer.h:
(WebCore::FilterEffectRenderer::setSourceImageRect):
2011-11-23 Elliot Poger <epoger@google.com>
[Skia] fix duplicate symbol __ZN7WebCore11BitmapImage16initPlatformDataEv error
https://bugs.webkit.org/show_bug.cgi?id=72954
Reviewed by Adam Barth.
* WebCore.gyp/WebCore.gyp:
2011-11-18 Pavel Podivilov <podivilov@chromium.org>
Web Inspector: add integration test for compiler source maps.
https://bugs.webkit.org/show_bug.cgi?id=72730
Reviewed by Pavel Feldman.
Test: http/tests/inspector/compiler-source-mapping-debug.html
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype._bindScriptToRawSourceCode):
(WebInspector.DebuggerPresentationModel.prototype.setCompilerSourceMapping):
(WebInspector.DebuggerPresentationModel.prototype.evaluateInSelectedCallFrame):
(WebInspector.DebuggerPresentationModel.prototype.get executionLineLocation):
(WebInspector.DebuggerPresentationModel.DefaultLinkifierFormatter.prototype.formatRawSourceCodeAnchor):
(WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyLocation):
(WebInspector.DebuggerPresentationModel.Linkifier.prototype._updateAnchor):
2011-11-23 Martin Robinson <mrobinson@igalia.com>
Build fix for GTK+.
* platform/graphics/gtk/DrawingBufferGtk.cpp:
(WebCore::DrawingBuffer::DrawingBuffer): Update signature and ASSERT
for the GTK+ port.
2011-11-23 Rafael Weinstein <rafaelw@chromium.org>
Remove notifyChange from the public interface of CSSMutableStyleDeclaration
https://bugs.webkit.org/show_bug.cgi?id=72660
Reviewed by Ojan Vafai.
No tests needed. This is only a refactor.
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
(WebCore::CSSMutableStyleDeclaration::addParsedProperty):
* css/CSSMutableStyleDeclaration.h:
(WebCore::CSSMutableStyleDeclaration::setProperty):
(WebCore::CSSMutableStyleDeclaration::removeProperty):
(WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
* css/CSSStyleSelector.cpp:
(WebCore::leftToRightDeclaration):
(WebCore::rightToLeftDeclaration):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setContentEditable):
2011-11-23 Scott Graham <scottmg@chromium.org>
Adding gamepad support
https://bugs.webkit.org/show_bug.cgi?id=69451
Reviewed by Darin Fisher.
Plumb gamepad data access through platform.
Test: gamepad/gamepad-polling-access.html
* WebCore.gypi:
* page/Navigator.cpp:
(WebCore::Navigator::webkitGamepads):
* page/Navigator.h:
* platform/Gamepads.h: Added.
* platform/chromium/GamepadsChromium.cpp: Added.
(WebCore::sampleGamepads):
* platform/chromium/PlatformSupport.h:
2011-11-23 Dmitry Lomov <dslomov@google.com>
Get rid of WebCore dependencies from TypedArray implementation types
https://bugs.webkit.org/show_bug.cgi?id=72783
Reviewed by David Levin.
Remove WebCore specific logic for neutering Typed Array implementations.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorV8.pm:
* html/canvas/ArrayBuffer.cpp:
(WTF::ArrayBuffer::transfer):
* html/canvas/ArrayBuffer.h:
* html/canvas/ArrayBufferView.cpp:
(WTF::ArrayBufferView::neuter):
* html/canvas/ArrayBufferView.h:
* html/canvas/DataView.cpp:
(WebCore::DataView::neuter):
* html/canvas/DataView.h:
* html/canvas/Float32Array.h:
* html/canvas/Float64Array.h:
* html/canvas/Int16Array.h:
* html/canvas/Int32Array.h:
* html/canvas/Int8Array.h:
* html/canvas/Uint16Array.h:
* html/canvas/Uint32Array.h:
* html/canvas/Uint8Array.h:
2011-11-23 Raul Hudea <rhudea@adobe.com>
First step towards http://webkit.org/b/70025
Allow -webkit-transform to be have effect to SVG elements.
Currently, the CSS transform takes precedence over the SVG transform attribute
Allow SVG elements to be transformed using webkit-transform
https://bugs.webkit.org/show_bug.cgi?id=71309
Reviewed by Nikolas Zimmermann.
Tests: svg/clip-path/clip-path-css-transform-1.svg
svg/clip-path/clip-path-css-transform-2.svg
svg/custom/clip-path-with-css-transform-1.svg
svg/custom/clip-path-with-css-transform-2.svg
svg/custom/pointer-events-image-css-transform.svg
svg/custom/pointer-events-text-css-transform.svg
svg/dom/css-transforms.xhtml
svg/dynamic-updates/SVG-dynamic-css-transform.html
svg/dynamic-updates/SVGClipPathElement-css-transform-influences-hitTesting.html
svg/transforms/svg-css-transforms-clip-path.xhtml
svg/transforms/svg-css-transforms.xhtml
* manual-tests/svg-animation-css-transform.html: Added.
* manual-tests/svg-css-animate-compound.html: Added.
* manual-tests/svg-css-transition-compound.html: Added.
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::styleWillChange):
Set the updateTransform flag on SVG elements whenever a CSS transform is present on the style
* svg/SVGStyledTransformableElement.cpp:
(WebCore::SVGStyledTransformableElement::animatedLocalTransform):
Use the RenderStyle's transform (if it exists) over the SVG's transform
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::animatedLocalTransform):
Use the RenderStyle's transform (if it exists) over the SVG's transform
2011-11-23 Rafael Weinstein <rafaelw@chromium.org>
[MutationObservers] Cleanup duplicated code in Element & CharacterData
https://bugs.webkit.org/show_bug.cgi?id=72986
Reviewed by Ojan Vafai.
This patch creates a MutationObserverInterestGroup which represents the set
of MutationObservers which should receive all mutations of a given type generated
from a specific node.
No tests needed. This patch is only a refactor.
* dom/CharacterData.cpp:
(WebCore::CharacterData::dispatchModifiedEvent):
* dom/ChildListMutationScope.cpp:
(WebCore::MutationAccumulationRouter::ChildListMutationAccumulator::ChildListMutationAccumulator):
(WebCore::MutationAccumulationRouter::ChildListMutationAccumulator::enqueueMutationRecord):
(WebCore::MutationAccumulationRouter::MutationAccumulationRouter::incrementScopingLevel):
* dom/Element.cpp:
(WebCore::enqueueAttributesMutationRecord):
* dom/WebKitMutationObserver.cpp:
(WebCore::MutationObserverInterestGroup::createForChildListMutation):
(WebCore::MutationObserverInterestGroup::createForCharacterDataMutation):
(WebCore::MutationObserverInterestGroup::createForAttributesMutation):
(WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup):
(WebCore::MutationObserverInterestGroup::isOldValueRequested):
(WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
* dom/WebKitMutationObserver.h:
(WebCore::MutationObserverInterestGroup::isEmpty):
(WebCore::MutationObserverInterestGroup::hasOldValue):
2011-11-23 Marc-Andre Decoste <mad@chromium.org>
[chromium] HDC leak in Uniscribe Helper
https://bugs.webkit.org/show_bug.cgi?id=68598
Reviewed by Darin Fisher.
For some reason the Script functions on Windows sometimes return
E_PENDING even with a non-NULL DC, so we must handle that case.
Also, we should not use the screen DC to select font since this
refreshes the whole desktop, so I added a cached compatible DC.
Note that this doesn't reproduce with WebKit alone, it only reproduces
within Chrome, so we can't write a WebKit test for it. A chromium
browser test will be added once this change gets rolled in the
chromium DEPS file.
* platform/graphics/chromium/UniscribeHelper.cpp:
(WebCore::UniscribeHelper::shape):
(WebCore::UniscribeHelper::EnsureCachedDCCreated):
(WebCore::UniscribeHelper::fillShapes):
* platform/graphics/chromium/UniscribeHelper.h:
2011-11-23 Anna Cavender <annacc@chromium.org>
Move readyState from TextTrack to HTMLTrackElement
https://bugs.webkit.org/show_bug.cgi?id=72553
Reviewed by Eric Carlson.
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::HTMLTrackElement):
Set initial readyState to NONE.
(WebCore::HTMLTrackElement::didCompleteLoad):
Set readyState based on load completed status.
(WebCore::HTMLTrackElement::setReadyState):
This replaces textTrackReadyStateChanged() because only LoadableTextTrack
needs to notify HTMLTrackElement of readyState changes (i.e.
textTrackReadyStateChanged() is no longer required of TextTrackClient).
* html/HTMLTrackElement.h:
ReadyState enum and m_readyState member variable moved from TextTrack.
(WebCore::HTMLTrackElement::readyState):
New: readyState() getter.
* html/HTMLTrackElement.idl:
Add readyState attribute and associated constants.
* html/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::loadTimerFired): Set readyState on HTMLTrackElement.
(WebCore::LoadableTextTrack::cueLoadingStarted): Ditto.
(WebCore::LoadableTextTrack::cueLoadingCompleted): Move code to set readyState
to HTMLTrackElement (it can set it based on loading status).
* html/TextTrack.cpp: Remove readyState from TextTrack.
(WebCore::TextTrack::TextTrack): Ditto.
* html/TextTrack.h: Ditto.
* html/TextTrack.idl: Ditto.
2011-11-23 Raphael Kubo da Costa <kubo@profusion.mobi>
[CMake] Move the top-level logic to the top-level directory.
https://bugs.webkit.org/show_bug.cgi?id=72685
Reviewed by Brent Fulgham.
No new tests, this is a buildsystem changes.
* CMakeLists.txt: Adjust the Source/ directory.
* PlatformBlackBerry.cmake: Ditto.
2011-11-23 Mihnea Ovidenie <mihnea@adobe.com>
CSS Exclusions: update the name of the shape CSS properties
https://bugs.webkit.org/show_bug.cgi?id=71898
Instead of a single wrap-shape property, we have wrap-shape-inside and wrap-shape-outside.
Reviewed by Dean Jackson.
Tests: fast/exclusions/parsing-wrap-shape-inside.html
fast/exclusions/parsing-wrap-shape-outside.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseWrapShape):
* css/CSSParser.h:
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::setWrapShapeInside):
(WebCore::InheritedFlags::wrapShapeInside):
(WebCore::InheritedFlags::setWrapShapeOutside):
(WebCore::InheritedFlags::wrapShapeOutside):
(WebCore::InheritedFlags::initialWrapShapeInside):
(WebCore::InheritedFlags::initialWrapShapeOutside):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2011-11-23 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: [Extensions API] avoid exception in initExtensions() if elements panel is not present
https://bugs.webkit.org/show_bug.cgi?id=73007
Reviewed by Yury Semikhatsky.
* inspector/front-end/ExtensionServer.js:
2011-11-23 Brian Salomon <bsalomon@google.com>
Use new name for pixel config field of GrTextureDesc
https://bugs.webkit.org/show_bug.cgi?id=72543
Reviewed by Stephen White.
Tested by every canvas2d layout test.
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::createAcceleratedCanvas):
2011-11-23 Emil A Eklund <eae@chromium.org>
Change remaining scrollTop/Left/Width/Height methods back to int
https://bugs.webkit.org/show_bug.cgi?id=72771
Reviewed by Eric Seidel.
Change remaining scrollTop/Left/Width/Height, setScrollLeft/Top and
verticalScrollbarWidth, horizontalScrollbarHeight methods back to int as
scrolling will remain int based to line up with device pixels.
No new tests.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::scrollWidth):
(WebCore::RenderBox::scrollHeight):
(WebCore::RenderBox::scrollLeft):
(WebCore::RenderBox::scrollTop):
(WebCore::RenderBox::setScrollLeft):
(WebCore::RenderBox::setScrollTop):
(WebCore::RenderBox::verticalScrollbarWidth):
(WebCore::RenderBox::horizontalScrollbarHeight):
* rendering/RenderBox.h:
(WebCore::RenderBox::scrollbarLogicalHeight):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::verticalScrollbarWidth):
(WebCore::RenderListBox::scrollHeight):
(WebCore::RenderListBox::scrollLeft):
(WebCore::RenderListBox::setScrollLeft):
(WebCore::RenderListBox::scrollTop):
(WebCore::RenderListBox::setScrollTop):
* rendering/RenderListBox.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::scrollWidth):
(WebCore::RenderTextControlSingleLine::scrollHeight):
(WebCore::RenderTextControlSingleLine::scrollLeft):
(WebCore::RenderTextControlSingleLine::scrollTop):
(WebCore::RenderTextControlSingleLine::setScrollLeft):
(WebCore::RenderTextControlSingleLine::setScrollTop):
* rendering/RenderTextControlSingleLine.h:
2011-11-22 Kenneth Russell <kbr@google.com>
[chromium] Support Core Animation plugins in compositor
https://bugs.webkit.org/show_bug.cgi?id=72921
Reviewed by Stephen White.
Added support to PluginLayerChromium and CCPluginLayerImpl for
using an IOSurface as the backing store for a plugin. Added minimal
ARB_texture_rectangle support to Extensions3D.h and a Chromium-
specific extension for binding an IOSurface to a texture.
These changes themselves do not have any effect. A follow-on
Chromium CL will make the switch to this new code path.
Tested manually both with and without the Chromium side changes;
Chromium's DumpRenderTree port does not support Core Animation
plugins. Ran video and Stage3D in Flash, and Unity 3D content, to
verify.
* platform/graphics/Extensions3D.h:
* platform/graphics/chromium/Extensions3DChromium.h:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
(WebCore::LayerRendererChromium::pluginLayerTexRectProgram):
(WebCore::LayerRendererChromium::pluginLayerTexRectProgramFlip):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/PluginLayerChromium.cpp:
(WebCore::PluginLayerChromium::PluginLayerChromium):
(WebCore::PluginLayerChromium::setIOSurfaceProperties):
(WebCore::PluginLayerChromium::getIOSurfaceId):
(WebCore::PluginLayerChromium::pushPropertiesTo):
* platform/graphics/chromium/PluginLayerChromium.h:
* platform/graphics/chromium/ShaderChromium.cpp:
(WebCore::FragmentShaderRGBATexRectFlipAlpha::getShaderString):
(WebCore::FragmentShaderRGBATexRectAlpha::getShaderString):
* platform/graphics/chromium/ShaderChromium.h:
* platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
(PluginProgramBinding::TexStretchPluginProgramBinding::set):
(PluginProgramBinding::TexTransformPluginProgramBinding::set):
(WebCore::CCPluginLayerImpl::CCPluginLayerImpl):
(WebCore::CCPluginLayerImpl::~CCPluginLayerImpl):
(WebCore::CCPluginLayerImpl::draw):
(WebCore::CCPluginLayerImpl::setIOSurfaceProperties):
(WebCore::CCPluginLayerImpl::cleanupResources):
* platform/graphics/chromium/cc/CCPluginLayerImpl.h:
2011-11-22 Daniel Cheng <dcheng@chromium.org>
[chromium] Fix plumbing for differentiating between clipboard/selection pastes.
https://bugs.webkit.org/show_bug.cgi?id=72056
Reviewed by Tony Chang.
Add a buffer parameter when retrieving the clipboard sequence number and fix several call
sites that incorrectly assume use of the standard buffer in pastes.
* platform/chromium/ChromiumDataObject.cpp:
(WebCore::ChromiumDataObject::types):
(WebCore::ChromiumDataObject::getData):
(WebCore::ChromiumDataObject::containsFilenames):
* platform/chromium/ChromiumDataObject.h:
* platform/chromium/ClipboardChromium.cpp:
(WebCore::ClipboardChromium::ClipboardChromium):
(WebCore::ClipboardChromium::getData):
(WebCore::ClipboardChromium::platformClipboardChanged):
* platform/chromium/ClipboardUtilitiesChromium.cpp:
(WebCore::currentPasteboardBuffer):
* platform/chromium/ClipboardUtilitiesChromium.h:
* platform/chromium/DataTransferItemChromium.cpp:
(WebCore::DataTransferItemChromium::getAsString):
* platform/chromium/PlatformSupport.h:
2011-11-22 Andrey Kosyakov <caseq@chromium.org>
Layout Test inspector/extensions/extensions-events.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=72966
Reviewed by Pavel Feldman.
- always bind to {add,remove}EventListener() of event target, not WebInspector.Object
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._registerAutosubscriptionHandler):
2011-11-22 Adam Klein <adamk@chromium.org>
Move splitView.css (added in r100991) to the correct target.
* WebCore.gypi:
2011-11-22 Andreas Kling <kling@webkit.org>
CSSProperty: Remove unnecessary operator overloads.
<http://webkit.org/b/72953>
Reviewed by Antti Koivisto.
* css/CSSProperty.cpp:
* css/CSSProperty.h:
Remove operator= and operator== from CSSProperty. They were neither
implemented correctly nor used anywhere.
2011-11-22 Andreas Kling <kling@webkit.org>
CSSStyleDeclaration: Kill FIXME in setProperty().
<http://webkit.org/b/72958>
Reviewed by Antonio Gomes.
Remove FIXME about possibly throwing an exception when setProperty()
is called with an invalid property name. CSSOM specifies that the
method should simply return in this case.
Spec: http://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-setproperty
* css/CSSStyleDeclaration.cpp:
(WebCore::CSSStyleDeclaration::setProperty):
2011-11-22 Shinya Kawanaka <shinyak@google.com>
Spellcheck should be able to run asynchronously.
https://bugs.webkit.org/show_bug.cgi?id=71991
Reviewed by Hajime Morita.
Run asynchronous spell checker if both asynchronous flag and unified text checker flag are ON.
When multiple asynchronous spellchecking are requested, only the first request will be processed.
Test: editing/spelling/spellcheck-async.html
* editing/Editor.cpp:
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
Uses asynchronous spell checker if asynchronous flag is ON.
2011-11-22 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: [SuggestBox] Grayed prompt displayed with non-collapsed selection in place
https://bugs.webkit.org/show_bug.cgi?id=72951
Reviewed by Pavel Feldman.
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt.prototype.complete):
2011-11-22 Pavel Feldman <pfeldman@google.com>
Not reviewed: fix inspector front-end compilation.
* inspector/front-end/externs.js:
(WebInspector.showPanel):
2011-11-22 Adam Bergkvist <adam.bergkvist@ericsson.com>
Add WebCore platform interface needed by updated MediaStream API design
https://bugs.webkit.org/show_bug.cgi?id=70895
Reviewed by Adam Barth.
This is one in a series of patches that update the MediaStream feature
to use WebCore platform interfaces.
Tests will be provided by http://webkit.org/b/56587
* GNUmakefile.list.am:
* WebCore.gypi:
* mediastream/LocalMediaStream.cpp:
(WebCore::LocalMediaStream::stopTimerFired):
* mediastream/MediaStream.h:
* mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::setEnabled):
* mediastream/PeerConnection.cpp:
(WebCore::PeerConnection::didRemoveRemoteStream):
* mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::start):
* mediastream/UserMediaRequest.h:
* platform/mediastream/MediaStreamCenter.cpp: Added.
(WebCore::MediaStreamCenter::instance):
(WebCore::MediaStreamCenter::endLocalMediaStream):
(WebCore::MediaStreamCenter::MediaStreamCenter):
(WebCore::MediaStreamCenter::~MediaStreamCenter):
(WebCore::MediaStreamCenter::queryMediaStreamSources):
(WebCore::MediaStreamCenter::didSetMediaStreamTrackEnabled):
(WebCore::MediaStreamCenter::didStopLocalMediaStream):
* platform/mediastream/MediaStreamCenter.h: Added.
(WebCore::MediaStreamSourcesQueryClient::~MediaStreamSourcesQueryClient):
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptorOwner::~MediaStreamDescriptorOwner):
(WebCore::MediaStreamDescriptor::owner):
(WebCore::MediaStreamDescriptor::setOwner):
2011-11-22 Pavel Feldman <pfeldman@google.com>
Web Inspector: remove Inspector::bringToFront from the protocol.
https://bugs.webkit.org/show_bug.cgi?id=72937
Inspector::bringToFront protocol method is currently used on the backend
in order to reveal the front-end window. We should do that by means of
the inspector client interface instead.
Reviewed by Yury Semikhatsky.
* inspector/Inspector.json:
* inspector/InspectorClient.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::show):
* loader/EmptyClients.h:
(WebCore::EmptyInspectorClient::bringFrontendToFront):
2011-11-21 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: [Extensions API][refactoring] remove dependencies on the ExtensionsServer from most of the insepctor
https://bugs.webkit.org/show_bug.cgi?id=72899
Reviewed by Pavel Feldman.
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype._selectedNodeChanged):
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._notifyResourceContentCommitted):
(WebInspector.ExtensionServer.prototype._notifyElementsSelectionChanged):
* inspector/front-end/Resource.js:
(WebInspector.Resource.prototype.addRevision):
* inspector/front-end/externs.js:
2011-11-22 Zoltan Horvath <zoltan@webkit.org>
[Qt] Build fix for MHTML support
* Target.pri: Add missing includepath.
2011-11-22 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Extract SplitView from Panel.createSidebar() method and reuse in Elements and Scripts panels.
https://bugs.webkit.org/show_bug.cgi?id=72920
Reviewed by Pavel Feldman.
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.sh:
* inspector/front-end/ApplicationCacheModel.js:
* inspector/front-end/AuditsPanel.js:
(WebInspector.AuditsPanel):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel):
(WebInspector.ElementsPanel.prototype.wasShown):
(WebInspector.ElementsPanel.prototype.sidebarResized):
(WebInspector.ElementsPanel.prototype.toggleSearchingForNode):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkPanel.prototype.wasShown):
(WebInspector.NetworkPanel.prototype._showResource):
(WebInspector.NetworkPanel.prototype._closeVisibleResource):
(WebInspector.NetworkPanel.prototype._toggleGridMode):
(WebInspector.NetworkPanel.prototype._toggleViewingResourceMode):
* inspector/front-end/Panel.js:
(WebInspector.Panel.prototype.wasShown):
(WebInspector.Panel.prototype.createSplitView):
(WebInspector.Panel.prototype.createSplitViewWithSidebarTree):
(WebInspector.Panel.prototype.sidebarResized):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._reset):
(WebInspector.ProfilesPanel.prototype.sidebarResized):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.sidebarResized):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.wasShown):
(WebInspector.ScriptsPanel.prototype.sidebarResized):
* inspector/front-end/SplitView.js: Added.
(WebInspector.SplitView):
* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineOverviewPane.prototype.sidebarResized):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel):
(WebInspector.TimelinePanel.prototype.sidebarResized):
(WebInspector.TimelinePanel.prototype._refreshRecords):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/auditsPanel.css:
* inspector/front-end/elementsPanel.css:
* inspector/front-end/inspector.css:
(.sidebar):
* inspector/front-end/inspector.html:
* inspector/front-end/networkLogView.css:
* inspector/front-end/networkPanel.css:
(#network-views):
* inspector/front-end/profilesPanel.css:
(#profile-views):
* inspector/front-end/resourcesPanel.css:
* inspector/front-end/scriptsPanel.css:
(#scripts-split-view):
* inspector/front-end/splitView.css: Added.
* inspector/front-end/timelinePanel.css:
(.timeline .sidebar):
(.timeline-sidebar-background):
(#resources-container-content):
2011-11-22 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100988.
http://trac.webkit.org/changeset/100988
https://bugs.webkit.org/show_bug.cgi?id=72941
"Broke pixel tests on Chromium-Linux" (Requested by kbalazs on
#webkit).
* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::platformApplySoftware):
* platform/graphics/filters/FEConvolveMatrix.h:
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApply):
* platform/graphics/filters/FEGaussianBlur.h:
* platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::platformApplyGeneric):
* platform/graphics/filters/FELighting.h:
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::platformApply):
* platform/graphics/filters/FEMorphology.h:
* platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::platformApplySoftware):
* platform/graphics/filters/FETurbulence.h:
* platform/graphics/filters/arm/FELightingNEON.cpp:
* platform/graphics/filters/arm/FELightingNEON.h:
(WebCore::FELighting::platformApplyNeon):
2011-11-21 Balazs Kelemen <kbalazs@webkit.org>
Enable ParallelJobs by default
https://bugs.webkit.org/show_bug.cgi?id=70032
Reviewed by Zoltan Herczeg.
Covered by existing tests.
According to measurements on Mac and Linux it is a
considerable speedup for SVG on multicore.
Remove the ENABLE(PARALLEL_JOBS) guard. Fix the Windows build
by qualifying ParallelJobs with the WTF namespace (otherwise
MSVC believes it belongs to WebCore which is likely a compiler bug).
* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::setInteriorPixelsWorker):
(WebCore::FEConvolveMatrix::platformApplySoftware):
* platform/graphics/filters/FEConvolveMatrix.h:
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplyWorker):
(WebCore::FEGaussianBlur::platformApply):
* platform/graphics/filters/FEGaussianBlur.h:
* platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::platformApplyGenericWorker):
(WebCore::FELighting::platformApplyGeneric):
* platform/graphics/filters/FELighting.h:
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::platformApplyWorker):
(WebCore::FEMorphology::platformApply):
* platform/graphics/filters/FEMorphology.h:
* platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::fillRegionWorker):
(WebCore::FETurbulence::platformApplySoftware):
* platform/graphics/filters/FETurbulence.h:
* platform/graphics/filters/arm/FELightingNEON.cpp:
(WebCore::FELighting::platformApplyNeonWorker):
* platform/graphics/filters/arm/FELightingNEON.h:
(WebCore::FELighting::platformApplyNeon):
2011-11-22 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: [protocol] actual JSON messages do not conform to Inspector.json in CSS
https://bugs.webkit.org/show_bug.cgi?id=72733
Reviewed by Pavel Feldman.
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::buildArrayForComputedStyle):
* inspector/InspectorStyleSheet.h:
* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSStyleModel.prototype.getComputedStyleAsync):
(WebInspector.CSSStyleDeclaration.parseComputedStylePayload):
2011-11-22 Pavel Feldman <pfeldman@google.com>
Web Inspector: strip unused InspectorController methods.
https://bugs.webkit.org/show_bug.cgi?id=72886
This is a follow up to the https://bugs.webkit.org/show_bug.cgi?id=63009.
I am now able to remove following InspectorController methods:
::startUserInitiatedProfiling,
::isRecordingUserInitiatedProfile,
::stopUserInitiatedProfiling,
::showAndEnableDebugger,
::debuggerEnabled,
::disableDebugger,
::startTimelineProfiler,
::stopTimelineProfiler,
::timelineProfilerEnabled,
::showConsole.
Reviewed by Yury Semikhatsky.
* WebCore.exp.in:
* WebCore.order:
* inspector/Inspector.json:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::setFrontend):
* inspector/InspectorAgent.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::connectFrontend):
* inspector/InspectorController.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::enable):
(WebCore::InspectorDebuggerAgent::disable):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::resetState):
(WebCore::InspectorProfilerAgent::clearFrontend):
(WebCore::InspectorProfilerAgent::restore):
(WebCore::InspectorProfilerAgent::start):
(WebCore::InspectorProfilerAgent::stop):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::start):
(WebCore::InspectorTimelineAgent::stop):
* inspector/InspectorTimelineAgent.h:
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype.enableDebugger):
(WebInspector.DebuggerModel.prototype.disableDebugger):
* inspector/front-end/TimelineManager.js:
(WebInspector.TimelineManager.prototype.start):
(WebInspector.TimelineManager.prototype.stop):
(WebInspector.TimelineManager.prototype._started):
(WebInspector.TimelineManager.prototype._stopped):
* inspector/front-end/inspector.js:
2011-11-17 Nat Duca <nduca@chromium.org>
[chromium] Route willDraw/setNeedsRedraw to CCInputHandler and fix double-drawing issues that result
https://bugs.webkit.org/show_bug.cgi?id=72688
This allows CCInputFilter and CCLayerTreeHostImpl to
perform requestAnimationFrame-style animations. The bulk of
work here is to make the scheduler recover gracefully when you
call setNeedsRedraw inside scheduledActionDraw.
Reviewed by James Robinson.
* WebCore.gypi:
* platform/graphics/chromium/cc/CCInputHandler.h:
(WebCore::CCInputHandlerTarget::CCInputHandlerTarget):
(WebCore::CCInputHandlerTarget::~CCInputHandlerTarget):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::currentTimeMs):
(WebCore::CCLayerTreeHostImpl::setNeedsRedraw):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
* platform/graphics/chromium/cc/CCScheduler.cpp:
(WebCore::CCScheduler::CCScheduler):
(WebCore::CCScheduler::setVisible):
(WebCore::CCScheduler::setNeedsRedraw):
(WebCore::CCScheduler::beginFrame):
(WebCore::CCScheduler::processScheduledActions):
* platform/graphics/chromium/cc/CCScheduler.h:
* platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
(WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine):
(WebCore::CCSchedulerStateMachine::nextAction):
(WebCore::CCSchedulerStateMachine::updateState):
(WebCore::CCSchedulerStateMachine::setInsideVSync):
(WebCore::CCSchedulerStateMachine::setOutsideVSync):
* platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
* platform/graphics/chromium/cc/CCScrollController.h: Removed.
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
2011-11-22 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Design of the autocomplete suggest
https://bugs.webkit.org/show_bug.cgi?id=72798
Reviewed by Pavel Feldman.
Implemented a combination of grayed text for the first/only completion and hid
the suggest box for a single suggestion (the grayed text is displayed instead.)
Drive-by fix for the "trailing spaces in the prompt" issue
(got regressed when the suggest box was introduced for the first time.)
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView): Fix the "trailing spaces" issue
* inspector/front-end/TextPrompt.js:
(WebInspector.TextPrompt):
(WebInspector.TextPrompt.prototype.renderAsBlock): Fix the "trailing spaces" issue
(WebInspector.TextPrompt.prototype._attachInternal):
(WebInspector.TextPrompt.prototype.acceptAutoComplete):
(WebInspector.TextPrompt.prototype._completionsReady):
(WebInspector.TextPrompt.prototype.applySuggestion):
(WebInspector.TextPrompt.prototype.acceptSuggestion):
(WebInspector.TextPrompt.SuggestBox.prototype._completionsReady):
2011-11-21 David Barr <davidbarr@chromium.org>
REGRESSION(r98542): Chromium: CSS text is rendered on page
https://bugs.webkit.org/show_bug.cgi?id=71703
Reviewed by Dimitri Glazkov.
Matched UA declarations uncacheable when using simpleDefaultStyleSheet.
Test: fast/css/style-tag-display-none.html
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::matchUARules):
2011-11-21 Rob Brackett <rob@robbrackett.com>
If an event listener is a function, it should be called and not checked for handleEvent.
This also covers callbacks, which follow the same spec but are implemented separately.
https://bugs.webkit.org/show_bug.cgi?id=62518
Reviewed by Sam Weinig.
Tests: fast/events/dispatch-to-function-with-handle-event.html
fast/js/callback-function-with-handle-event.html
* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
2011-11-21 Rakesh KN <rakesh.kn@motorola.com>
Need support for dirname attribute
https://bugs.webkit.org/show_bug.cgi?id=65542
Reviewed by Eric Seidel.
Implemented 'dirname' form attribute.
Tests: fast/forms/form-dirname-attribute.html
fast/forms/submit-form-with-dirname-attribute-with-ancestor-dir-attribute.html
fast/forms/submit-form-with-dirname-attribute-with-nonhtml-ancestor.html
fast/forms/submit-form-with-dirname-attribute.html
* html/HTMLAttributeNames.in:
Added "dirname" attribute.
* html/HTMLInputElement.idl:
Add "dirName" property to HTMLInputElement interface.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::appendFormData):
Append dirname form data.
* html/HTMLTextAreaElement.idl:
Add "dirName" property to HTMLTextAreaElement interface.
* html/HTMLTextFormControlElement.cpp:
(WebCore::parentHTMLElement):
Helper function which returns only HTML parent element.
(WebCore::HTMLTextFormControlElement::directionForFormData):
Helper function for finding directionality of the Element.
* html/HTMLTextFormControlElement.h:
Helper function for finding directionality of the Element.
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::appendFormData):
Append dirname form data.
* html/TextFieldInputType.h:
Append dirname form data.
2011-11-21 Joshua Bell <jsbell@chromium.org>
IndexedDB: Close database connections, abort transactions, and terminate requests on stop()
https://bugs.webkit.org/show_bug.cgi?id=72066
Reviewed by Tony Chang.
No new tests; addresses race conditions on document navigate/script context stop.
* dom/DocumentEventQueue.cpp:
(WebCore::DocumentEventQueue::enqueueEvent):
* dom/DocumentEventQueue.h:
* dom/EventQueue.h:
* storage/IDBDatabase.cpp:
(WebCore::IDBDatabase::IDBDatabase):
(WebCore::IDBDatabase::~IDBDatabase):
(WebCore::IDBDatabase::transaction):
(WebCore::IDBDatabase::close):
(WebCore::IDBDatabase::onVersionChange):
(WebCore::IDBDatabase::enqueueEvent):
(WebCore::IDBDatabase::stop):
* storage/IDBDatabase.h:
* storage/IDBFactory.cpp:
(WebCore::IDBFactory::IDBFactory):
(WebCore::IDBFactory::getDatabaseNames):
(WebCore::IDBFactory::open):
(WebCore::IDBFactory::deleteDatabase):
* storage/IDBFactory.h:
* storage/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::IDBObjectStore):
(WebCore::IDBObjectStore::name):
(WebCore::IDBObjectStore::keyPath):
(WebCore::IDBObjectStore::indexNames):
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::add):
(WebCore::IDBObjectStore::put):
(WebCore::IDBObjectStore::deleteFunction):
(WebCore::IDBObjectStore::clear):
(WebCore::IDBObjectStore::createIndex):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::deleteIndex):
(WebCore::IDBObjectStore::openCursor):
* storage/IDBObjectStore.h:
* storage/IDBRequest.cpp:
(WebCore::IDBRequest::IDBRequest):
(WebCore::IDBRequest::abort):
(WebCore::IDBRequest::onSuccess):
(WebCore::IDBRequest::onSuccessWithContinuation):
(WebCore::IDBRequest::stop):
(WebCore::IDBRequest::dispatchEvent):
(WebCore::IDBRequest::enqueueEvent):
* storage/IDBRequest.h:
* storage/IDBTransaction.cpp:
(WebCore::IDBTransaction::IDBTransaction):
(WebCore::IDBTransaction::abort):
(WebCore::IDBTransaction::onAbort):
(WebCore::IDBTransaction::onComplete):
(WebCore::IDBTransaction::dispatchEvent):
(WebCore::IDBTransaction::stop):
(WebCore::IDBTransaction::enqueueEvent):
* storage/IDBTransaction.h:
* storage/IDBTransactionBackendImpl.cpp:
(WebCore::IDBTransactionBackendImpl::abort):
(WebCore::IDBTransactionBackendImpl::commit):
* workers/WorkerEventQueue.cpp:
(WebCore::WorkerEventQueue::enqueueEvent):
* workers/WorkerEventQueue.h:
2011-11-21 James Robinson <jamesr@chromium.org>
[chromium] Avoid pushing dirty tiles to the impl layer
https://bugs.webkit.org/show_bug.cgi?id=72765
Reviewed by Kenneth Russell.
If a tile has invalidations at pushPropertiesTo, then we know the contents of that tile are no longer valid even
if they still have valid backing textures. This avoids pushing that texture to the impl side so it is not
displayed to the user. The texture is still kept around (managed by the TextureManager) so that when we later do
decide to update the contents for that tile we can use partial results if they are still valid.
Covered by new unit test in TiledLayerChromiumTest.cpp
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::UpdatableTile::isDirty):
(WebCore::TiledLayerChromium::updateTileSizeAndTilingOption):
(WebCore::TiledLayerChromium::setTileSize):
(WebCore::TiledLayerChromium::setLayerTreeHost):
(WebCore::TiledLayerChromium::createTiler):
(WebCore::TiledLayerChromium::updateCompositorResources):
(WebCore::TiledLayerChromium::pushPropertiesTo):
* platform/graphics/chromium/TiledLayerChromium.h:
(WebCore::TiledLayerChromium::setTextureFormat):
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::CCTiledLayerImpl::hasTileAt):
(WebCore::CCTiledLayerImpl::drawTiles):
* platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2011-11-21 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Speed up debug builds.
https://bugs.webkit.org/show_bug.cgi?id=72882
Reviewed by Tor Arne Vestbø.
* Target.pri: Make BUILDING_WebCore available earlier, so it can be
used by the build system.
2011-11-17 Robert Hogan <robert@webkit.org>
CSS 2.1 failure: empty-inline-003.htm fails
https://bugs.webkit.org/show_bug.cgi?id=72638
Reviewed by Ryosuke Niwa.
Empty inline elements need to share their inline height with siblings.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::inlineFlowRequiresLineBox): In strict mode, add a LineBox for an empty element if it is
going to affect the line-height.
(WebCore::requiresLineBox): Pass LineInfo to inlineFlowRequiresLineBox
(WebCore::RenderBlock::LineBreaker::nextLineBreak): Pass LineInfo to inlineFlowRequiresLineBox
2011-11-21 Adrienne Walker <enne@google.com>
[chromium] Remove incorrect render surface layer list asserts from compositor
https://bugs.webkit.org/show_bug.cgi?id=72744
Reviewed by James Robinson.
These asserts are incorrect, because it's valid for the default render
surface to be created but to have a root layer that doesn't draw. It
won't get added to the single render surface and it'll have an empty
layer list.
Test: compositor_unittests
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawLayersOntoRenderSurfaces):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::paintLayerContents):
(WebCore::CCLayerTreeHost::updateCompositorResources):
2011-11-21 Andreas Kling <kling@webkit.org>
StyleSheet: Move completeURL() to CSSStyleSheet.
<http://webkit.org/b/72888>
Reviewed by Antti Koivisto.
Since completeURL() is only used on CSSStyleSheets, move it there (and make
it non-virtual) to make StyleSheet a little leaner.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::completeURL):
* css/CSSStyleSheet.h:
* css/StyleSheet.cpp:
* css/StyleSheet.h:
2011-11-21 Robin Dunn <robin@alldunn.com>
[wx] Fix image translation calculations.
https://bugs.webkit.org/show_bug.cgi?id=72892
Reviewed by Kevin Ollivier.
* platform/graphics/wx/ImageWx.cpp:
(WebCore::Image::drawPattern):
2011-11-21 Scott Graham <scottmg@chromium.org>
copyright comment style to C from C++ for gamepad module
https://bugs.webkit.org/show_bug.cgi?id=72894
Reviewed by Sam Weinig.
Just changes comment format, no code/test changes.
* Modules/gamepad/Gamepad.cpp:
* Modules/gamepad/Gamepad.h:
* Modules/gamepad/Gamepad.idl:
* Modules/gamepad/GamepadList.cpp:
* Modules/gamepad/GamepadList.h:
* Modules/gamepad/GamepadList.idl:
2011-11-21 Andreas Kling <kling@webkit.org>
JSC/CSSOM: Merge root() for style declaration objects.
<http://webkit.org/b/72881>
Reviewed by Antti Koivisto.
Fold root(CSSMutableStyleDeclaration*) into root(CSSStyleDeclaration*),
removing a duplicated chunk and making it a little easier on the eyes.
* bindings/js/JSDOMBinding.h:
(WebCore::root):
2011-11-21 Igor Oliveira <igor.oliveira@openbossa.org>
[WK2][Qt] Move Accelerated Composite animations to UIProcess
https://bugs.webkit.org/show_bug.cgi?id=72753
Add helper method to synchronize animations in TextureMapper.
Reviewed by Noam Rosenthal.
* platform/graphics/texmap/TextureMapperNode.cpp:
(WebCore::TextureMapperNode::syncAnimationsRecursively):
* platform/graphics/texmap/TextureMapperNode.h:
2011-11-21 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100913.
http://trac.webkit.org/changeset/100913
https://bugs.webkit.org/show_bug.cgi?id=72885
"Break Windows build" (Requested by kbalazs on #webkit).
* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::platformApplySoftware):
* platform/graphics/filters/FEConvolveMatrix.h:
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApply):
* platform/graphics/filters/FEGaussianBlur.h:
* platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::platformApplyGeneric):
* platform/graphics/filters/FELighting.h:
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::platformApply):
* platform/graphics/filters/FEMorphology.h:
* platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::platformApplySoftware):
* platform/graphics/filters/FETurbulence.h:
* platform/graphics/filters/arm/FELightingNEON.cpp:
* platform/graphics/filters/arm/FELightingNEON.h:
(WebCore::FELighting::platformApplyNeon):
2011-11-21 Balazs Kelemen <kbalazs@webkit.org>
Enable ParallelJobs by default
https://bugs.webkit.org/show_bug.cgi?id=70032
Reviewed by Zoltan Herczeg.
Covered by existing tests.
According to measurements on Mac and Linux it is a
considerable speedup for SVG on multicore.
Remove the ENABLE(PARALLEL_JOBS) guard. Fix the Windows build
by qualifying ParallelJobs with the WTF namespace (otherwise
MSVC believes it belongs to WebCore which is likely a compiler bug).
* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::setInteriorPixelsWorker):
(WebCore::FEConvolveMatrix::platformApplySoftware):
* platform/graphics/filters/FEConvolveMatrix.h:
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplyWorker):
(WebCore::FEGaussianBlur::platformApply):
* platform/graphics/filters/FEGaussianBlur.h:
* platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::platformApplyGenericWorker):
(WebCore::FELighting::platformApplyGeneric):
* platform/graphics/filters/FELighting.h:
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::platformApplyWorker):
(WebCore::FEMorphology::platformApply):
* platform/graphics/filters/FEMorphology.h:
* platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::fillRegionWorker):
(WebCore::FETurbulence::platformApplySoftware):
* platform/graphics/filters/FETurbulence.h:
* platform/graphics/filters/arm/FELightingNEON.cpp:
(WebCore::FELighting::platformApplyNeonWorker):
* platform/graphics/filters/arm/FELightingNEON.h:
(WebCore::FELighting::platformApplyNeon):
2011-11-21 Antti Koivisto <antti@apple.com>
Remove CSSStyleSelector::m_additionalAttributeStyleDecls field
https://bugs.webkit.org/show_bug.cgi?id=72876
Reviewed by Andreas Kling.
There is no reason for this temporary to be a field.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::matchAllRules):
* css/CSSStyleSelector.h:
2011-11-21 Pavel Feldman <pfeldman@google.com>
Web Inspector: [REGRESSION] Assertion failed in ScriptsPanel.js
https://bugs.webkit.org/show_bug.cgi?id=72877
Reviewed by Yury Semikhatsky.
* inspector/front-end/ScriptsPanel.js:
2011-11-18 Pavel Feldman <pfeldman@google.com>
Web Inspector: get rid of Panel::reset in the front-end.
https://bugs.webkit.org/show_bug.cgi?id=72587
I'm slowly getting rid of the Inspector protocol domain. It currently
contains methods that did not find their home in the meaningful domains.
This change removes reset protocol method.
Reviewed by Yury Semikhatsky.
* inspector/Inspector.json:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::didCommitLoad):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::didClearMainFrameWindowObject):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
* inspector/front-end/ApplicationCacheModel.js:
(WebInspector.ApplicationCacheModel.prototype._frameNavigated):
(WebInspector.ApplicationCacheModel.prototype._frameDetached):
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel.prototype._globalObjectCleared):
(WebInspector.DebuggerDispatcher.prototype.globalObjectCleared):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel):
(WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer):
(WebInspector.ExtensionServer.prototype._mainFrameNavigated):
* inspector/front-end/JavaScriptContextManager.js:
(WebInspector.JavaScriptContextManager.prototype._frameDetached):
(WebInspector.FrameEvaluationContext.prototype.get frameId):
* inspector/front-end/NetworkLog.js:
(WebInspector.NetworkLog):
(WebInspector.NetworkLog.prototype._mainFrameNavigated):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView):
(WebInspector.NetworkLogView.prototype._mainFrameNavigated):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype._frameNavigated):
(WebInspector.ResourceTreeModel.prototype._frameDetached):
(WebInspector.ResourceTreeModel.prototype._clearChildFramesAndResources):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype._reset):
(WebInspector.ResourcesPanel.prototype._frameDetached):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._debuggerWasDisabled):
(WebInspector.ScriptsPanel.prototype._reset):
* inspector/front-end/WorkerManager.js:
(WebInspector.WorkerManager):
(WebInspector.WorkerManager.prototype._mainFrameNavigated):
* inspector/front-end/inspector.js:
2011-06-20 Pavel Feldman <pfeldman@chromium.org>
Web Inspector: introduce InspectorFrontendAPI for actions initiated from the application menu.
https://bugs.webkit.org/show_bug.cgi?id=62985
Both: inspector protocol and WebCore/InspectorController have a number of unnecessary
methods for plumbing the menu action handlers through the WebKit and WebCore.
I intend to remove this menu support from the protocol and WebCore/InspectorController API.
I am starting with exposing the new front-end API in the WebCore and using it in the WebKit/mac port.
WebKit/win and WebKit2 to follow.
Reviewed by Yury Semikhatsky.
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
(WebCore::InspectorFrontendClientLocal::frontendLoaded):
(WebCore::InspectorFrontendClientLocal::setAttachedWindow):
(WebCore::InspectorFrontendClientLocal::isDebuggingEnabled):
(WebCore::InspectorFrontendClientLocal::setDebuggingEnabled):
(WebCore::InspectorFrontendClientLocal::isJavaScriptProfilingEnabled):
(WebCore::InspectorFrontendClientLocal::setJavaScriptProfilingEnabled):
(WebCore::InspectorFrontendClientLocal::isTimelineProfilingEnabled):
(WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled):
(WebCore::InspectorFrontendClientLocal::isProfilingJavaScript):
(WebCore::InspectorFrontendClientLocal::startProfilingJavaScript):
(WebCore::InspectorFrontendClientLocal::stopProfilingJavaScript):
(WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
(WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
* inspector/InspectorFrontendClientLocal.h:
* inspector/front-end/InspectorFrontendAPI.js: Added.
(InspectorFrontendAPI.isDebuggingEnabled):
(InspectorFrontendAPI.setDebuggingEnabled):
(InspectorFrontendAPI.isJavaScriptProfilingEnabled):
(InspectorFrontendAPI.setJavaScriptProfilingEnabled):
(InspectorFrontendAPI.isTimelineProfilingEnabled):
(InspectorFrontendAPI.setTimelineProfilingEnabled):
(InspectorFrontendAPI.isProfilingJavaScript):
(InspectorFrontendAPI.startProfilingJavaScript):
(InspectorFrontendAPI.stopProfilingJavaScript):
(InspectorFrontendAPI.setAttachedWindow):
* inspector/front-end/ProfileView.js:
(WebInspector.CPUProfileType):
(WebInspector.CPUProfileType.prototype.isRecordingProfile):
(WebInspector.CPUProfileType.prototype.startRecordingProfile):
(WebInspector.CPUProfileType.prototype.stopRecordingProfile):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype.get profilerEnabled):
(WebInspector.ProfilesPanel.prototype.enableProfiler):
(WebInspector.ProfilesPanel.prototype.disableProfiler):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel):
(WebInspector.ScriptsPanel.prototype.get debuggingEnabled):
(WebInspector.ScriptsPanel.prototype.enableDebugging):
(WebInspector.ScriptsPanel.prototype.disableDebugging):
(WebInspector.ScriptsPanel.prototype.toggleDebugging):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._memoryOverviewItemSelected):
(WebInspector.TimelinePanel.prototype.setTimelineProfilingEnabled):
(WebInspector.TimelinePanel.prototype.get timelineProfilingEnabled):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
2011-11-18 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: [Protocol] Retain a single universal method for loading a required combination of element styles
https://bugs.webkit.org/show_bug.cgi?id=72701
Reviewed by Pavel Feldman.
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::getInlineStylesForNode):
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
* inspector/InspectorCSSAgent.h:
* inspector/front-end/AuditRules.js:
(WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun):
(WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles.inlineCallback):
(WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles.matchedCallback):
(WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles):
* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSStyleModel.prototype.getMatchedStylesAsync):
(WebInspector.CSSStyleModel.prototype.getComputedStyleAsync):
(WebInspector.CSSStyleModel.prototype.getInlineStylesAsync):
* inspector/front-end/MetricsSidebarPane.js:
(WebInspector.MetricsSidebarPane.prototype._innerUpdate):
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.prototype.get forcedPseudoClasses):
(WebInspector.StylesSidebarPane.prototype._executeRebuildUpdate):
(WebInspector.StylesSidebarPane.prototype._executeRebuildUpdate.inlineCallback):
(WebInspector.StylesSidebarPane.prototype._executeRebuildUpdate.computedCallback):
(WebInspector.StylesSidebarPane.prototype._innerUpdate):
2011-11-21 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100856.
http://trac.webkit.org/changeset/100856
https://bugs.webkit.org/show_bug.cgi?id=72867
New test fast/css/style-tag-display-none.html fails on
Chromium (Requested by steveblock on #webkit).
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::matchUARules):
2011-11-21 Jochen Eisinger <jochen@chromium.org>
Implement Meta referrer
https://bugs.webkit.org/show_bug.cgi?id=72674
Reviewed by Adam Barth.
http://wiki.whatwg.org/wiki/Meta_referrer
Tests: http/tests/security/referrer-policy-always.html
http/tests/security/referrer-policy-default.html
http/tests/security/referrer-policy-https-always.html
http/tests/security/referrer-policy-https-default.html
http/tests/security/referrer-policy-https-never.html
http/tests/security/referrer-policy-https-origin.html
http/tests/security/referrer-policy-never.html
http/tests/security/referrer-policy-origin.html
http/tests/security/referrer-policy-redirect.html
http/tests/security/referrer-policy-rel-noreferrer.html
* WebCore.exp.in: updated
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::processReferrerPolicy):
* dom/Document.h:
(WebCore::Document::referrerPolicy):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::handleClick):
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::process):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/PingLoader.cpp:
(WebCore::PingLoader::loadImage):
(WebCore::PingLoader::sendPing):
(WebCore::PingLoader::reportContentSecurityPolicyViolation):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadSubframe):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::create):
* page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::generateReferrerHeader):
* page/SecurityPolicy.h:
2011-11-21 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: ApplicationCache view should show navigator.onLine indicator.
https://bugs.webkit.org/show_bug.cgi?id=72618
Reviewed by Pavel Feldman.
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::enable):
* inspector/front-end/ApplicationCacheItemsView.js:
(WebInspector.ApplicationCacheItemsView):
(WebInspector.ApplicationCacheItemsView.prototype.wasShown):
* inspector/front-end/ApplicationCacheModel.js:
(WebInspector.ApplicationCacheModel):
(WebInspector.ApplicationCacheModel.prototype.get onLine):
(WebInspector.ApplicationCacheModel.prototype._networkStateUpdated):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.showApplicationCache):
(WebInspector.ResourcesPanel.prototype._applicationCacheNetworkStateChanged):
2011-11-21 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck build.
* GNUmakefile.list.am:
2011-11-21 Dominic Mazzoni <dmazzoni@google.com>
Accessibility: Multiselect list boxes need to report the active option in addition to which items are selected.
https://bugs.webkit.org/show_bug.cgi?id=72479
Reviewed by Chris Fleizach.
Test: accessibility/multiselect-list-reports-active-option.html
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::isSelectedOptionActive):
* accessibility/AccessibilityListBoxOption.h:
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isSelectedOptionActive):
2011-11-21 Yuta Kitamura <yutak@chromium.org>
[Qt] WebSocket close tests are failing
https://bugs.webkit.org/show_bug.cgi?id=72865
Reviewed by Simon Hausmann.
* platform/network/qt/SocketStreamHandleQt.cpp:
(WebCore::SocketStreamHandlePrivate::close):
Emit didCloseSocketStream() callback even before the connection is established.
Call m_socket->abort() to prevent "connected" signal from firing.
2011-11-21 Shinya Kawanaka <shinyak@google.com>
Refactoring: SpellChecker::requestCheckingFor should take Range instead of Node.
https://bugs.webkit.org/show_bug.cgi?id=72847
Reviewed by Hajime Morita.
Covered by existing test.
* editing/Editor.cpp:
(WebCore::Editor::replaceSelectionWithFragment):
Passes Range to requestCheckingFor instead of Node.
* editing/SpellChecker.cpp:
Changed argument type from Node to Range.
The corresponding changes are also done in dependent methods.
(WebCore::SpellChecker::initRequest):
(WebCore::SpellChecker::clearRequest):
(WebCore::SpellChecker::canCheckAsynchronously):
(WebCore::SpellChecker::isBusy):
(WebCore::SpellChecker::isValid):
(WebCore::SpellChecker::isCheckable):
(WebCore::SpellChecker::requestCheckingFor):
Changed argument type from Node to Range.
(WebCore::SpellChecker::doRequestCheckingFor):
(WebCore::SpellChecker::didCheck):
* editing/SpellChecker.h:
2011-11-20 Kenichi Ishibashi <bashi@chromium.org>
[Chromium] Remove old getFontFamilyForCharacters() and familyForChars() APIs.
https://bugs.webkit.org/show_bug.cgi?id=72844
Respects bold and italic properties that is given by fontconfig.
Reviewed by Darin Fisher.
* platform/graphics/chromium/FontCacheLinux.cpp:
(WebCore::FontCache::getFontDataForCharacters): Removed #if and old logic.
2011-11-20 Noel Gordon <noel.gordon@gmail.com>
[chromium] Remove qt/QtMobileWebStyle from the gyp projects
https://bugs.webkit.org/show_bug.cgi?id=72843
Reviewed by Antonio Gomes.
platform/qt/QtMobileWebStyle.{h,cpp} were removed in r100123
* WebCore.gypi: remove platform/qt/QtMobileWebStyle.{h,cpp}
2011-11-20 Kentaro Hara <haraken@chromium.org>
Unreviewed. Rebaselined run-bindings-tests results.
* bindings/scripts/test/CPP/WebDOMFloat64Array.cpp:
(WebDOMFloat64Array::WebDOMFloat64Array):
(WebDOMFloat64Array::impl):
(toWebCore):
(toWebKit):
* bindings/scripts/test/CPP/WebDOMFloat64Array.h:
2011-11-20 Adam Barth <abarth@webkit.org>
REGRESSION(r100691): Safari error pages and Growl notifications fail to load stylesheets
https://bugs.webkit.org/show_bug.cgi?id=72836
Reviewed by Sam Weinig.
This patch removes a (minor) security mitigation. Previously, we tried
sequester "directory listings" into unique origins to make it more
difficult for an attacker to crawl the user's local file system.
Unfortunately, this mitigation doesn't really buy us much security
because if the attacker has access to local files, we've probably lost
anyway.
The larger problem, however, is that this condition is overly
complicated and has broken in sublte ways several times in its
(relatively short) lifetime. In the cases reported in this bug, we see
that this check affects error pages in Safari and Growl notifications,
even those have nothing to do with directory listings.
If we have our heart set on this directory listing mitigation, we'll
need a more robust way of triggering the behavior than examining URLs
and guess whether they contain directory listings. For example, if we
implement Allow-From or Access-Control-Deny-Origin, then the embedder
can supply those policies along with the directory listings. Those
seem like much better solutions than the in-engine hack this patch
removes.
* page/SecurityOrigin.cpp:
(WebCore::shouldTreatAsUniqueOrigin):
2011-10-17 Antonio Gomes <agomes@rim.com>
Pass a Frame* parameter in EditorClient::respondToChangedSelection
https://bugs.webkit.org/show_bug.cgi?id=70248
Reviewed by Ryosuke Niwa.
Most of the port specific implementations of EditorClient::respondToChangedSelection
(like EditorClient{Qt,Gtk,etc}) are wrongly relying on FocusController::focusedOrMainFrame
method to get the Frame where the selection is happening on.
It is not right, since a selection can be easily triggered in an inner
frame that is not focused.
No new tests since it is a hard thing to test without
to hook into editor client in layout tests. We could
change the "Dumped Delegate" messages, but it would
require a rebasile of +1200 for a minor change.
* editing/Editor.cpp: Pass the Frame on where the selection is changing to the client.
(WebCore::Editor::respondToChangedSelection): Ditto.
(WebCore::Editor::changeSelectionAfterCommand): Ditto.
(WebCore::EmptyEditorClient::respondToChangedSelection):
* page/EditorClient.h: Pass Frame* to indicate where the selection is happening.
* loader/EmptyClients.h: Changed signature as per base class change.
2011-11-17 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/72646> Disable deprecation warnings around code where we cannot easily
switch away from the deprecated APIs.
Reviewed by Sam Weinig.
* platform/mac/WebCoreNSStringExtras.mm:
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::reportErrorToClient):
2011-11-19 Kevin Ollivier <kevino@theolliviers.com>
[wx] C++ bindings build fix for move of array classes to WTF.
* bindings/scripts/CodeGeneratorCPP.pm:
(GetCPPTypeGetter):
(GetNamespaceForClass):
(GenerateHeader):
(GenerateImplementation):
2011-11-19 Scott Graham <scottmg@chromium.org>
Move gamepad to Modules/ (+ some cleanup)
https://bugs.webkit.org/show_bug.cgi?id=72785
Reviewed by Adam Barth.
Move main files from page/ to Modules/gamepad/. #include guard the
gamepad header inclusions in Navigator.cpp to avoid including for
ports that do not enable GAMEPAD.
* Modules/gamepad/Gamepad.cpp: Renamed from Source/WebCore/page/Gamepad.cpp.
(WebCore::Gamepad::Gamepad):
(WebCore::Gamepad::axes):
(WebCore::Gamepad::buttons):
(WebCore::Gamepad::~Gamepad):
* Modules/gamepad/Gamepad.h: Renamed from Source/WebCore/page/Gamepad.h.
* Modules/gamepad/Gamepad.idl: Renamed from Source/WebCore/page/Gamepad.idl.
* Modules/gamepad/GamepadList.cpp: Renamed from Source/WebCore/page/GamepadList.cpp.
(WebCore::GamepadList::~GamepadList):
(WebCore::GamepadList::set):
(WebCore::GamepadList::length):
(WebCore::GamepadList::item):
* Modules/gamepad/GamepadList.h: Renamed from Source/WebCore/page/GamepadList.h.
(WebCore::GamepadList::create):
(WebCore::GamepadList::GamepadList):
* Modules/gamepad/GamepadList.idl: Renamed from Source/WebCore/page/GamepadList.idl.
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* page/Navigator.cpp:
2011-11-19 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100834.
http://trac.webkit.org/changeset/100834
https://bugs.webkit.org/show_bug.cgi?id=72806
this patch makes Qt run-webkit-test exit before finishing
(Requested by igoroliveira on #webkit).
* platform/graphics/texmap/TextureMapperNode.cpp:
* platform/graphics/texmap/TextureMapperNode.h:
2011-11-19 Huang Dongsung <luxtella@company100.net>
Remove WebCore/ForwardingHeaders/runtime/JSObjectWithGlobalObject.h because
JSObjectWithGlobalObject.h has been removed.
https://bugs.webkit.org/show_bug.cgi?id=72794
r94701 removed JSObjectWithGlobalObject.h.
Reviewed by Oliver Hunt.
* ForwardingHeaders/runtime/JSObjectWithGlobalObject.h: Removed.
2011-11-19 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector:[protocol] actual JSON messages do not conform to Inspector.json in InspectorApplicationCacheAgent.cpp
https://bugs.webkit.org/show_bug.cgi?id=72734
Reviewed by Timothy Hatcher.
* inspector/Inspector.json:
2011-11-19 David Barr <davidbarr@chromium.org>
REGRESSION(r98542): Chromium: CSS text is rendered on page
https://bugs.webkit.org/show_bug.cgi?id=71703
Reviewed by Antti Koivisto.
Matched UA declarations uncacheable when using simpleDefaultStyleSheet.
Test: fast/css/style-tag-display-none.html
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::matchUARules):
2011-11-19 Jay Civelli <jcivelli@chromium.org>
When loading a MHTML document, make sure we set the base URL before
we notify the frame was committed (so the document has the right base
URL when the notification happens).
https://bugs.webkit.org/show_bug.cgi?id=72788
Reviewed by Adam Barth.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::receivedFirstData):
2011-11-19 Adam Barth <abarth@webkit.org>
Integrate Source/WTF with the Chromium build system
https://bugs.webkit.org/show_bug.cgi?id=72790
Reviewed by Eric Seidel.
Add a dependency on the new WTF.
* WebCore.gyp/WebCore.gyp:
2011-11-18 Takashi Toyoshima <toyoshim@chromium.org>
[Chromium] [WebSocket] export WebSocketChannel interface for plugins
https://bugs.webkit.org/show_bug.cgi?id=72016
Reviewed by Darin Fisher.
Add a interface to send raw binary data.
This interface is used by WebWebSocketChannel implementation
in WebKit API.
No new tests because just export a interface.
* websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::send):
* websockets/WebSocketChannel.h:
2011-11-18 Vineet Chaudhary <vineet.chaudhary@motorola.com>
https://bugs.webkit.org/show_bug.cgi?id=72591
Remove document.width / document.height
Reviewed by Darin Adler.
Removed document.width/document.height from JS bindings,
but keeping the same for ObjC bindings. Also it should use
document.body.clientWidth and document.body.clientHeight instead.
* html/HTMLDocument.idl:
2011-11-18 Martin Robinson <mrobinson@igalia.com>
Fix the GTK+ build.
* page/Navigator.idl: Properly disable the webkitGamepads API if gamepad
isn't enabled at compile time.
2011-11-18 Daniel Bates <dbates@rim.com>
Add CMake build infrastructure for the BlackBerry port
https://bugs.webkit.org/show_bug.cgi?id=72768
Reviewed by Antonio Gomes.
* CMakeLists.txt: At this time the BlackBerry port doesn't support generating
DOM bindings from the SVG IDLs. See WebKit bug #72773.
* PlatformBlackBerry.cmake: Added.
2011-11-18 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100826.
http://trac.webkit.org/changeset/100826
https://bugs.webkit.org/show_bug.cgi?id=72786
Broke Chromium Mac build (Requested by aklein on #webkit).
* page/ChromeClient.h:
* page/FrameView.cpp:
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::wheelEvent):
* platform/ScrollView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::scrollbarStyleChanged):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
2011-11-18 Alpha Lam <hclam@chromium.org>
[chromium] composited layers are blurry with a zoom-in page scale factor
https://bugs.webkit.org/show_bug.cgi?id=71225
Reviewed by James Robinson.
Pass contents scale factor to the compositor such that it can:
1. Adjust contentBounds() of the compositoer layers with content scale.
2. Apply the content scale in the painter for texture update in better resolution.
3. Apply the content scale to the dirty rect in CanvasLayerTextureUpdater.
This change fixed blurry problem for all tiled layer types and is not limited to
position:fixed layers.
Tests: compositing/geometry/fixed-position-composited-page-scale-down.html
compositing/geometry/fixed-position-composited-page-scale.html
compositing/geometry/fixed-position-iframe-composited-page-scale-down.html
compositing/geometry/fixed-position-iframe-composited-page-scale.html
compositing/geometry/fixed-position-transform-composited-page-scale-down.html
compositing/geometry/fixed-position-transform-composited-page-scale.html
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setTransform):
(WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
(WebCore::GraphicsLayerChromium::updateContentsScale):
(WebCore::GraphicsLayerChromium::contentsScale):
(WebCore::GraphicsLayerChromium::deviceOrPageScaleFactorChanged):
* platform/graphics/chromium/GraphicsLayerChromium.h:
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerTextureUpdater::prepareToUpdate):
(WebCore::ImageLayerChromium::needsContentsScale):
* platform/graphics/chromium/ImageLayerChromium.h:
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
(WebCore::LayerChromium::setContentsScale):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::needsContentsScale):
(WebCore::LayerChromium::contentsScale):
* platform/graphics/chromium/LayerTextureUpdater.h:
* platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp:
(WebCore::LayerTextureUpdaterCanvas::paintContents):
(WebCore::LayerTextureUpdaterBitmap::prepareToUpdate):
(WebCore::LayerTextureUpdaterSkPicture::prepareToUpdate):
* platform/graphics/chromium/LayerTextureUpdaterCanvas.h:
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::needsContentsScale):
(WebCore::TiledLayerChromium::contentBounds):
(WebCore::TiledLayerChromium::prepareToUpdate):
* platform/graphics/chromium/TiledLayerChromium.h:
2011-11-18 Igor Oliveira <igor.oliveira@openbossa.org>
[WK2][Qt] Move Accelerated Composite animations to UIProcess
https://bugs.webkit.org/show_bug.cgi?id=72753
Add helper method to synchronize animations in TextureMapper.
Reviewed by Noam Rosenthal.
* platform/graphics/texmap/TextureMapperNode.cpp:
(WebCore::TextureMapperNode::syncAnimationsRecursively):
* platform/graphics/texmap/TextureMapperNode.h:
2011-11-18 Scott Graham <scottmg@chromium.org>
IDL changes for gamepad support
https://bugs.webkit.org/show_bug.cgi?id=71753
Reviewed by Adam Barth.
IDL changes and associated plumbing to expose list of gamepad objects
on navigator object (per current spec). Full patch is
https://bugs.webkit.org/show_bug.cgi?id=69451. Only basic existence
test until more plumbing in future patches.
Test: gamepad/gamepad-api.html
* WebCore.gypi:
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebkitGamepadsEnabled):
(WebCore::RuntimeEnabledFeatures::webkitGamepadsEnabled):
* page/Gamepad.cpp: Added.
(WebCore::Gamepad::Gamepad):
(WebCore::Gamepad::axes):
(WebCore::Gamepad::buttons):
(WebCore::Gamepad::~Gamepad):
* page/Gamepad.h: Added.
* page/Gamepad.idl: Added.
* page/GamepadList.cpp: Added.
(WebCore::GamepadList::~GamepadList):
(WebCore::GamepadList::set):
(WebCore::GamepadList::length):
(WebCore::GamepadList::item):
* page/GamepadList.h: Added.
(WebCore::GamepadList::create):
(WebCore::GamepadList::GamepadList):
* page/GamepadList.idl: Added.
* page/Navigator.cpp:
(WebCore::Navigator::webkitGamepads):
* page/Navigator.h:
* page/Navigator.idl:
2011-11-18 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100693.
http://trac.webkit.org/changeset/100693
https://bugs.webkit.org/show_bug.cgi?id=72779
This patch caused a rendering regression (see bug 72770)
(Requested by philip__ on #webkit).
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
2011-11-18 Simon Fraser <simon.fraser@apple.com>
Reflection on composited element doesn't update if the element changes to show no content
https://bugs.webkit.org/show_bug.cgi?id=72774
Reviewed by Chris Marrin.
When a style change results in a reflected element losing its backing store,
we need to clear the backing stores on the layer clones as well.
Test: compositing/reflections/become-simple-composited-reflection.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateLayerDrawsContent):
2011-11-18 Daniel Cheng <dcheng@chromium.org>
[chromium] Use correct backing store for ChromiumDataObject in pasteboard writes.
https://bugs.webkit.org/show_bug.cgi?id=72767
Reviewed by Tony Chang.
Covered by existing tests.
* editing/chromium/EditorChromium.cpp:
(WebCore::Editor::newGeneralClipboard):
* page/chromium/EventHandlerChromium.cpp:
(WebCore::EventHandler::createDraggingClipboard):
* platform/chromium/ChromiumDataObject.cpp:
(WebCore::ChromiumDataObject::types):
(WebCore::ChromiumDataObject::getData):
(WebCore::ChromiumDataObject::containsFilenames):
(WebCore::ChromiumDataObject::ChromiumDataObject):
* platform/chromium/ChromiumDataObject.h:
(WebCore::ChromiumDataObject::createFromPasteboard):
(WebCore::ChromiumDataObject::create):
(WebCore::ChromiumDataObject::storageMode):
* platform/chromium/ClipboardChromium.cpp:
(WebCore::ClipboardChromium::hasData):
2011-11-18 Chris Evans <cevans@google.com>
Crash with ranges across a detached, reparented node tree
https://bugs.webkit.org/show_bug.cgi?id=72757
Reviewed by Adam Barth.
Test: fast/dom/move-detached-child-in-range.html
* dom/RangeBoundaryPoint.h:
(WebCore::RangeBoundaryPoint::childBefore): protect the raw child node from getting pulled from under us.
2011-11-18 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=72551
When the recommended scrollbar style changes, WKView's tracking options should
adjust accordingly
-and corresponding-
<rdar://problem/10409328>
Reviewed by Darin Adler.
This new ChromeClient function is called when the recommended scrollbar style
changes. This way, WebKit can respond to the change by adjusting its mouse
tracking.
* page/ChromeClient.h:
(WebCore::ChromeClient::recommendedScrollbarStyleDidChange):
Existing ScrollableArea function scrollbarStyleChanged() now takes an int
indicating the new scrollbar style and a bool indicating whether it is necessary
to force an update. It used to be the case that this function was ONLY used to
force an update (and only called when an updated was needed), but now that it must
also call into the ChromeClient, it is necessary to include a bool tracking
whether we need to force an update. New implementation on FrameView is responsible
for calling ChromeClient, and then that calls into the pre-existing ScrollView
function for the forceUpdate part.
* page/FrameView.cpp:
(WebCore::FrameView::scrollbarStyleChanged):
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView:: scrollbarStyleChanged):
* platform/ScrollView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::scrollbarStyleChanged):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
2011-11-18 Kelly Norton <knorton@google.com>
Fixes several more void functions in RenderObject that return values.
https://bugs.webkit.org/show_bug.cgi?id=72750
Reviewed by Adam Barth.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateBeforeAfterContent):
(WebCore::RenderBlock::addChildToContinuation):
(WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
(WebCore::RenderBlock::addChild):
(WebCore::RenderBlock::addChildIgnoringContinuation):
2011-11-18 Shawn Singh <shawnsingh@chromium.org>
[chromium] Add some useful text to existing debug dump
https://bugs.webkit.org/show_bug.cgi?id=72576
Reviewed by James Robinson.
No new tests needed.
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::dumpLayerProperties):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::dumpSurface):
2011-11-18 Xiaomei Ji <xji@chromium.org>
REGRESSION: rtl horizontal scrollbar / resize bug - Body shifts on resize when scrolled all the way to the left
https://bugs.webkit.org/show_bug.cgi?id=70395
Reviewed by Tony Chang.
This patch fixes the problem in Mac and Chromium Mac.
The existing test fast/dom/rtl-scroll-to-leftmost-and-resize.html seems does not really work in Mac DRT
(the browswer window is not resized). It works in Chromium-Mac. And Chromium-Mac's code
is forked from Mac.
* platform/chromium/ScrollAnimatorChromiumMac.mm:
(WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::immediateScrollToPoint):
2011-11-18 Martin Robinson <mrobinson@igalia.com>
REGRESSION (r99924): broke 2 pasteboard tests on GTK
https://bugs.webkit.org/show_bug.cgi?id=72131
Reviewed by Tony Chang.
* platform/gtk/ClipboardGtk.cpp:
(WebCore::ClipboardGtk::clearData): Call clearAll now.
(WebCore::ClipboardGtk::clearAllData): Call clearAllExceptFilenames now.
* platform/gtk/DataObjectGtk.cpp:
(WebCore::DataObjectGtk::clearAllExceptFilenames): Renamed from clear.
(WebCore::DataObjectGtk::clearAll): Added this method which also clear filenames.
* platform/gtk/DataObjectGtk.h:
* platform/gtk/PasteboardGtk.cpp: Call clear before setting new clipboard data.
(WebCore::Pasteboard::writeSelection): Ditto.
(WebCore::Pasteboard::writePlainText): Ditto.
(WebCore::Pasteboard::writeURL): Ditto.
(WebCore::Pasteboard::writeImage): Ditto.
* platform/gtk/PasteboardHelper.cpp:
(WebCore::clearClipboardContentsCallback): Use the clearAll method now.
2011-11-18 Vineet Chaudhary <vineet.chaudhary@motorola.com>
Access key should work on all elements.
https://bugs.webkit.org/show_bug.cgi?id=71854
Reviewed by Ryosuke Niwa.
All HTML elements can have the accesskey content attribute set.
Specification http://dev.w3.org/html5/spec/Overview.html#the-accesskey-attribute
Adding "accessKey" attribute to HTMLElement.idl file as [Reflect].
Test: fast/forms/access-key-for-all-elements.html
* bindings/objc/PublicDOMInterfaces.h: Moved properties form subclass to base class.
* html/BaseButtonInputType.cpp:
(WebCore::BaseButtonInputType::accessKeyAction): Renamed variable sendToAnyElement to sendMouseEvents.
* html/BaseButtonInputType.h: Ditto
* html/BaseCheckableInputType.cpp:
(WebCore::BaseCheckableInputType::accessKeyAction): Ditto
* html/BaseCheckableInputType.h: Ditto
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::accessKeyAction): Ditto
* html/HTMLAnchorElement.h: Ditto
* html/HTMLAnchorElement.idl: Removed redundant IDL attribute entries.
* html/HTMLAreaElement.idl: Removed redundant IDL attribute entries.
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::accessKeyAction): Renamed variable sendToAnyElement to sendMouseEvents.
* html/HTMLButtonElement.h: Ditto
* html/HTMLButtonElement.idl: Removed redundant IDL attribute entries.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::accessKeyAction): Renamed variable sendToAnyElement to sendMouseEvents.
If the element does not have a defined activation behavior, fire a click event at the element.
* html/HTMLElement.h: Ditto
* html/HTMLElement.idl: Added accessKey IDL attribute.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::accessKeyAction): Renamed variable sendToAnyElement to sendMouseEvents.
* html/HTMLInputElement.h: Ditto
* html/HTMLInputElement.idl: Removed redundant IDL attribute entries.
* html/HTMLLabelElement.cpp:
(WebCore::HTMLLabelElement::accessKeyAction): Renamed variable sendToAnyElement to sendMouseEvents.
* html/HTMLLabelElement.h: Ditto
* html/HTMLLabelElement.idl: Removed redundant IDL attribute entries.
* html/HTMLLegendElement.cpp:
(WebCore::HTMLLegendElement::accessKeyAction): Renamed variable sendToAnyElement to sendMouseEvents.
* html/HTMLLegendElement.h: Ditto
* html/HTMLLegendElement.idl: Removed redundant IDL attribute entries.
* html/HTMLOptGroupElement.h: Renamed variable sendToAnyElement to sendMouseEvents.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::accessKeyAction): Ditto
* html/HTMLSelectElement.h: Ditto
* html/HTMLTextAreaElement.h: Ditto
* html/HTMLTextAreaElement.idl: Removed redundant IDL attribute entries.
* html/HiddenInputType.h: Renamed variable sendToAnyElement to sendMouseEvents.
* html/InputType.h: Ditto
* html/RangeInputType.cpp:
(WebCore::RangeInputType::accessKeyAction): Ditto
* html/RangeInputType.h: Ditto
2011-11-18 Simon Fraser <simon.fraser@apple.com>
Appearance of compound transform animations under apps linked on SnowLeopard is incorrect
https://bugs.webkit.org/show_bug.cgi?id=72641
and
<rdar://problem/10314267>
Reviewed by Dean Jackson.
GraphicsLayerCA contains a "linked on or after" check to account for a bug in
Core Animation on SnowLeopard and earlier, which is that CA would apply the list
of animations in reverse order.
Our previous fix was incorrect, because it only adjusted the 'additive' property
of the animation list based on ordering, rather than flipping the entire list.
This change reverses the list of animations before giving them to CA, which fixes
the bug.
Test: animations/additive-transform-animations.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
* platform/graphics/ca/GraphicsLayerCA.h:
2011-11-18 Tim Horton <timothy_horton@apple.com>
-webkit-cross-fade rendered incorrectly in overflow divs
https://bugs.webkit.org/show_bug.cgi?id=72693
<rdar://problem/10468564>
Reviewed by Simon Fraser.
Respect the desired source rectangle when rendering the cross-fade.
Test: css3/images/cross-fade-overflow-position.html
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::drawCrossfade):
(WebCore::CrossfadeGeneratedImage::draw):
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/CrossfadeGeneratedImage.h:
2011-11-18 Raphael Kubo da Costa <kubo@profusion.mobi>
Unreviewed build fix; r100686 broke the EFL build when Geolocation
support is enabled.
* platform/efl/GeolocationServiceEfl.cpp: Only declare
s_factoryFunction if CLIENT_BASED_GEOLOCATION is off, otherwise it is
also declared in GeolocationService.cpp.
2011-11-18 Igor Oliveira <igor.oliveira@openbossa.org>
[TextureMapper] computePerspectiveTransformIfNeeded is called twice in TextureMapperNode::syncCompositingState
https://bugs.webkit.org/show_bug.cgi?id=72727
TextureMapperNode::computeAllTransforms already has a call to TextureMapperNode::computePerspectiveTransformIfNeeded,
so it does not need to be called again after TextureMapperNode::computeAllTransforms.
Reviewed by Noam Rosenthal.
* platform/graphics/texmap/TextureMapperNode.cpp:
(WebCore::TextureMapperNode::syncCompositingState):
2011-11-18 Mihnea Ovidenie <mihnea@adobe.com>
Fix compilation warning in ComplexTextControllerCoreText.mm
https://bugs.webkit.org/show_bug.cgi?id=72702
Reviewed by Andreas Kling.
No functionality changed, so no new tests.
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
2011-11-18 Pavel Feldman <pfeldman@google.com>
Not reviewed: restore front-end compilability via updating externs and JS generator.
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype.jumpToNextSearchResult):
(WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult):
* inspector/front-end/externs.js:
(WebInspector.showPanelForAnchorNavigation):
* inspector/generate-protocol-externs:
2011-11-17 Pavel Feldman <pfeldman@google.com>
Web Inspector: dispatch messages from the front-end to the backend asynchronously.
https://bugs.webkit.org/show_bug.cgi?id=72621
We should align the way we dispatch messages from the front-end to backend across the environments:
- WebKit has it synchronoulsly
- Chromium has it asynchronously
- Remote debugging has it asynchronously
Making it asynchronous made a number of flaky Qt tests pass.
Tests uncovered console agent problem that was also fixed.
Reviewed by Yury Semikhatsky.
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::clearFrontend):
* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorBackendDispatchTask::InspectorBackendDispatchTask):
(WebCore::InspectorBackendDispatchTask::dispatch):
(WebCore::InspectorBackendDispatchTask::reset):
(WebCore::InspectorBackendDispatchTask::onTimer):
(WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
(WebCore::InspectorFrontendClientLocal::windowObjectCleared):
(WebCore::InspectorFrontendClientLocal::sendMessageToBackend):
* inspector/InspectorFrontendClientLocal.h:
2011-11-18 Iain Merrick <husky@google.com>
[chromium] Pass screen refresh rate into compositor.
https://bugs.webkit.org/show_bug.cgi?id=71040
Reviewed by Tony Gentilcore.
Covered by CCLayerTreeHostTest.
* platform/PlatformScreen.h:
* platform/chromium/PlatformScreenChromium.cpp:
(WebCore::screenRefreshRate):
* platform/chromium/PlatformSupport.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::initializeImplOnImplThread):
2011-11-18 Alexandru Chiculita <achicu@adobe.com>
[CSSShaders] Implement the computed style for mesh parameters of the custom() filter
https://bugs.webkit.org/show_bug.cgi?id=72478
Reviewed by Dean Jackson.
Added parsing and computed style for the mesh rows, columns, mesh box type
(filter-box, border-box, content-box and padding-box) and the detached mode.
Also fixed a case where "custom(none, 10, 10 filter-box)" was incorrectly
treated as "custom(none, 10)".
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::valueForFilter):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseCustomFilter): Fixed a case where invalid syntax was parsed as correct syntax.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator CustomFilterOperation::MeshBoxType):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::createCustomFilterOperation):
* css/CSSValueList.h:
(WebCore::CSSValueListIterator::isPrimitiveValue):
* platform/graphics/filters/CustomFilterOperation.h:
2011-11-18 Adam Barth <abarth@webkit.org>
Remove unneeded include (and ifdef) from V8DOMWindowCustom.cpp
https://bugs.webkit.org/show_bug.cgi?id=72705
Reviewed by Eric Seidel.
Death to ifdefs!
* bindings/v8/custom/V8DOMWindowCustom.cpp:
2011-11-18 Adam Barth <abarth@webkit.org>
Move some mediastream related files into the mediastream directory
https://bugs.webkit.org/show_bug.cgi?id=72695
Reviewed by Eric Seidel.
Just moving the files to the proper directory.
* GNUmakefile.list.am:
* WebCore.gypi:
* mediastream/NavigatorUserMediaError.h: Renamed from Source/WebCore/page/NavigatorUserMediaError.h.
(WebCore::NavigatorUserMediaError::create):
(WebCore::NavigatorUserMediaError::~NavigatorUserMediaError):
(WebCore::NavigatorUserMediaError::code):
(WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
* mediastream/NavigatorUserMediaError.idl: Renamed from Source/WebCore/page/NavigatorUserMediaError.idl.
* mediastream/NavigatorUserMediaErrorCallback.h: Renamed from Source/WebCore/page/NavigatorUserMediaErrorCallback.h.
(WebCore::NavigatorUserMediaErrorCallback::~NavigatorUserMediaErrorCallback):
* mediastream/NavigatorUserMediaErrorCallback.idl: Renamed from Source/WebCore/page/NavigatorUserMediaErrorCallback.idl.
* mediastream/NavigatorUserMediaSuccessCallback.h: Renamed from Source/WebCore/page/NavigatorUserMediaSuccessCallback.h.
(WebCore::NavigatorUserMediaSuccessCallback::~NavigatorUserMediaSuccessCallback):
* mediastream/NavigatorUserMediaSuccessCallback.idl: Renamed from Source/WebCore/page/NavigatorUserMediaSuccessCallback.idl.
2011-11-18 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: [Extensions API] Provide a way for extension to create a status bar icon
https://bugs.webkit.org/show_bug.cgi?id=45955
Reviewed by Pavel Feldman.
* inspector/front-end/ExtensionAPI.js:
(injectedExtensionAPI.ExtensionPanelImpl.prototype.createStatusBarButton):
(injectedExtensionAPI):
(injectedExtensionAPI.ButtonImpl.prototype.update):
* inspector/front-end/ExtensionPanel.js:
(WebInspector.ExtensionPanel):
(WebInspector.ExtensionPanel.prototype.get statusBarItems):
(WebInspector.ExtensionPanel.prototype.addStatusBarItem):
(WebInspector.ExtensionButton):
(WebInspector.ExtensionButton.prototype.update):
(WebInspector.ExtensionButton.prototype._onClicked):
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer):
(WebInspector.ExtensionServer.prototype.notifyButtonClicked):
(WebInspector.ExtensionServer.prototype._onCreateStatusBarButton):
(WebInspector.ExtensionServer.prototype._onUpdateButton):
(WebInspector.ExtensionServer.prototype._onCreateSidebarPane):
* inspector/front-end/inspector.css:
(button.status-bar-item.extension):
2011-11-18 Tommy Widenflycht <tommyw@google.com>
MediaStream API: Merging the PeerConnectionHandler.h files
https://bugs.webkit.org/show_bug.cgi?id=72611
Reviewed by Adam Barth.
No actual code changes.
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* platform/mediastream/PeerConnectionHandler.h: Renamed from Source/WebCore/platform/mediastream/chromium/PeerConnectionHandler.h.
* platform/mediastream/gstreamer/PeerConnectionHandler.h: Removed.
2011-11-17 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Layer violation: ThirdPartyCookiesQt.cpp uses QWebSettings in two places
https://bugs.webkit.org/show_bug.cgi?id=72597
Reviewed by Kenneth Rohde Christiansen.
Moved code that queries the third party cookie policy from QWebSettings
out of WebCore. Instead NetworkingContext has now the interface that allows
delegating the functionality into WebKit/qt.
In order to do that we need to pass the NetworkingContext around, which is used to
retrieve the cookie jar and the originating frame object pointer.
* platform/network/NetworkingContext.h: Add interface.
* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyHandler::QNetworkReplyHandler): Pass NetworkingContext to ResourceRequest::toNetworkRequest.
(WebCore::QNetworkReplyHandler::redirect): Ditto.
* platform/network/qt/ResourceRequest.h: Replaced originatingObject parameter with NetworkingContext, which can
also provide the same plus more (cookie jar, policy callback).
* platform/network/qt/ResourceRequestQt.cpp:
(WebCore::ResourceRequest::toNetworkRequest): Ditto.
* platform/qt/CookieJarQt.cpp: Simplify to use NetworkingContext to get cookie jar and
call new thirdPartyCookiePolicyPermits API that takes the context as parameter.
(WebCore::networkingContext):
(WebCore::setCookies):
(WebCore::cookies):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::cookiesEnabled):
* platform/qt/ThirdPartyCookiesQt.cpp: Replace up-casting to QWebFrame and use of QWebSettings
with useage of NetworkingContext.
(WebCore::thirdPartyCookiePolicyPermits):
* platform/qt/ThirdPartyCookiesQt.h:
2011-11-17 Kenichi Ishibashi <bashi@chromium.org>
crash: WebCore::FontPlatformData::roundsGlyphAdvances on Lion
https://bugs.webkit.org/show_bug.cgi?id=71997
Reviewed by Dan Bernstein.
The cause is a null dereference of a fontData that is stored in
ComplexTextRun. The fontData is initialized by using the
fontCache, but it could be null when the font is in fallback
list. The reason a font from the fallback list might not be in the
font Cache is that it may be a web font. Before looking up the
fontCache, try to see whether the font is in the fallback list.
No new tests. We don't have webfonts that can produce the problem.
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): See fallback list first, then lookup cache.
2011-11-17 Kaustubh Atrawalkar <kaustubh@motorola.com>
Remove initProgressEvent method
https://bugs.webkit.org/show_bug.cgi?id=71340
Reviewed by Adam Barth.
This method has been removed from the spec draft.
http://www.w3.org/TR/progress-events/#interface-progressevent
No new tests. Removed method.
* dom/ProgressEvent.cpp:
* dom/ProgressEvent.h:
* dom/ProgressEvent.idl:
2011-11-17 Eunmi Lee <eunmi15.lee@samsung.com>
[EFL] Move keyIdentifierForEvasKeyName() and windowsKeyCodeForEvasKeyName() to the
EflKeyboardUtilities.cpp to use in the WebKit2
https://bugs.webkit.org/show_bug.cgi?id=62451
Reviewed by Martin Robinson.
The keyIdentifierForEvasKeyName() and windowsKeyCodeForEvasKeyName() were static functions
in the PlatformKeyboardEventEfl.cpp. But they are also needed in the WebKit2 EFL port, so I
moved them to the separated file - EflKeyboardUtilities.cpp.
* PlatformEfl.cmake:
* platform/efl/EflKeyboardUtilities.cpp: Copied from Source/WebCore/platform/efl/PlatformKeyboardEventEfl.cpp.
(WebCore::createKeyMap):
(WebCore::createWindowsKeyMap):
(WebCore::keyIdentifierForEvasKeyName):
(WebCore::windowsKeyCodeForEvasKeyName):
* platform/efl/EflKeyboardUtilities.h: Added.
* platform/efl/PlatformKeyboardEventEfl.cpp:
2011-11-17 Martin Robinson <mrobinson@igalia.com>
[GTK] The process freezes when you right click on windowless Flash
https://bugs.webkit.org/show_bug.cgi?id=69123
Reviewed by Xan Lopez.
No new tests. I tried to create a layout test that exercised this
issue, but it appears that EventSender clicks do not trigger
it. This is covered by the manual tests containing Flash.
* plugins/PluginPackage.cpp:
(WebCore::PluginPackage::determineQuirks): Always activate the
windowless Flash quirk if on x86_64 and X11.
* plugins/gtk/PluginViewGtk.cpp:
(WebCore::PluginView::handleMouseEvent): Avoid sending right-click
events if we have the quirk.
2011-11-17 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: clear fixme in generator script
https://bugs.webkit.org/show_bug.cgi?id=71372
Remove unnecessary field name map and update license year number.
Reviewed by Pavel Feldman.
* inspector/CodeGeneratorInspector.py:
2011-11-17 Raphael Kubo da Costa <kubo@profusion.mobi>
[EFL] Clean up the use of DATA_DIR in the buildsystem
https://bugs.webkit.org/show_bug.cgi?id=72681
Reviewed by Daniel Bates.
Add the -DDATA_DIR definition here instead of defining it globally in
OptionsEfl.cmake, as WebCore is the only place which needs it.
No new tests, this is a buildsystem change.
* PlatformEfl.cmake:
2011-11-17 Adam Klein <adamk@chromium.org>
Move JS recursion counter from V8Proxy to V8BindingPerIsolateData
https://bugs.webkit.org/show_bug.cgi?id=72645
Reviewed by Adam Barth.
With the JS recursion level stored as a member of V8Proxy, it's tied
to a frame. But this is incorrect, as there's no reason that a JS call
stack need be restricted to a single frame (see my new test case for
an example of code going across frames).
In order to get the correct accounting of JS recursion level, per-Isolate
is the right granularity (per dslomov), which is what this patch accomplishes.
Test: storage/indexeddb/transaction-abort-with-js-recursion-cross-frame.html
* bindings/v8/V8Binding.cpp:
(WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
* bindings/v8/V8Binding.h:
(WebCore::V8BindingPerIsolateData::recursionLevel):
(WebCore::V8BindingPerIsolateData::incrementRecursionLevel):
(WebCore::V8BindingPerIsolateData::decrementRecursionLevel):
(WebCore::V8RecursionScope::V8RecursionScope):
(WebCore::V8RecursionScope::~V8RecursionScope):
* bindings/v8/V8Proxy.cpp:
(WebCore::incrementRecursionLevel):
(WebCore::decrementRecursionLevel):
(WebCore::recursionLevel):
(WebCore::V8Proxy::V8Proxy):
(WebCore::V8Proxy::runScript):
(WebCore::V8Proxy::callFunction):
(WebCore::V8Proxy::didLeaveScriptContext):
* bindings/v8/V8Proxy.h:
2011-11-17 Robin Cao <robin.cao@torchmobile.com.cn>
[chromium] Font::drawComplexText can not draw a segment of text run
https://bugs.webkit.org/show_bug.cgi?id=72095
Reviewed by Adam Barth.
drawComplexText() should respect the 'from' and 'to' arguments.
Drawing the whole text run may result in text overlapping.
Test: platform/chromium-linux/fast/text/international/draw-complex-text-from-to.html
* platform/graphics/chromium/ComplexTextControllerLinux.cpp:
(WebCore::ComplexTextController::glyphsForRange):
* platform/graphics/chromium/ComplexTextControllerLinux.h:
* platform/graphics/chromium/FontLinux.cpp:
(WebCore::Font::drawComplexText):
2011-11-17 Adam Barth <abarth@webkit.org>
Unique SecurityOrigins shouldn't remember their old schemes and hosts
https://bugs.webkit.org/show_bug.cgi?id=71745
Reviewed by Darin Adler.
This is the final step in this series of patches.
This patch removes the forceUnique flag from SecurityOrigin::create.
Now, we create unique origins without passing in the document's URL,
preventing information from the document's URL from leaking into the
unique origin.
* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::setIsViewSource):
(WebCore::Document::initSecurityContext):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::getOriginsWithCache):
- Update this callsite to use createFromString, which does exactly
what this code is doing manually.
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::create):
* page/SecurityOrigin.h:
2011-11-17 Vincent Scheib <scheib@chromium.org>
Pointer Lock: Page Settings unecessary
https://bugs.webkit.org/show_bug.cgi?id=72662
Reviewed by Darin Fisher.
No new tests.
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
2011-11-17 James Robinson <jamesr@chromium.org>
[chromium] Disable incremental uploading in threaded compositing path
https://bugs.webkit.org/show_bug.cgi?id=72669
Reviewed by Kenneth Russell.
Since we don't currently support atomic incremental uploads, incremental uploads in the threaded path result in
very strange-looking texture popping as tiles come in on pages that require more than 16 tile uploads per frame.
This disables that logic (by setting the upload limit per frame to 99999) until we handle the incremental
updates in an atomic fashion.
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::scheduledActionUpdateMoreResources):
2011-11-06 Nat Duca <nduca@chromium.org>
[chromium] Fix handling of setNeedsCommit and setNeedsAnimate in threaded mode
https://bugs.webkit.org/show_bug.cgi?id=71638
Reviewed by James Robinson.
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::CCThreadProxy):
(WebCore::CCThreadProxy::setNeedsAnimate):
(WebCore::CCThreadProxy::beginFrameAndCommit):
2011-11-17 Adam Barth <abarth@webkit.org>
Remove bogus ASSERT.
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
2011-11-17 Peter Kasting <pkasting@google.com>
Unreviewed, rolling out r100698.
http://trac.webkit.org/changeset/100698
https://bugs.webkit.org/show_bug.cgi?id=72239
This change wasn't the problem either.
* dom/Document.cpp:
(WebCore::Document::implicitClose):
2011-11-17 David Reveman <reveman@chromium.org>
[Chromium] Calls to paintContentsIfDirty() and updateCompositorResources() should be balanced.
https://bugs.webkit.org/show_bug.cgi?id=72630
Reviewed by James Robinson.
Layer property changes during paintContent() can leave the layer
in an invalid state as paintContentsIfDirty() has been called
without a matching updateCompositorResources() call. Removing
conditionals around these calls ensure they are balanced.
This patch is tested by the following unit test:
- CCLayerTreeHostTestOpacityChange.runMultiThread
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::paintContentsIfDirty):
* platform/graphics/chromium/VideoLayerChromium.cpp:
(WebCore::VideoLayerChromium::updateCompositorResources):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
(WebCore::CCLayerTreeHost::paintLayerContents):
(WebCore::CCLayerTreeHost::updateCompositorResources):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
2011-11-17 Peter Kasting <pkasting@google.com>
Unreviewed, rolling out r100584.
http://trac.webkit.org/changeset/100584
https://bugs.webkit.org/show_bug.cgi?id=72239
See if this change caused Linux dbg crashes.
* dom/Document.cpp:
(WebCore::Document::implicitClose):
2011-11-17 Adam Barth <abarth@webkit.org>
Remove cargo-cult copy/pasting of ScriptExecutionContext namespace
https://bugs.webkit.org/show_bug.cgi?id=72676
Reviewed by Eric Seidel.
It looks like this cargo-cult started with initDNSPrefetch being hacked
into setSecurityOrigin. I've removed this hack along with the
copy/paste code.
* dom/DOMImplementation.cpp:
* dom/Document.cpp:
(WebCore::Document::setIsViewSource):
(WebCore::Document::open):
(WebCore::Document::initSecurityContext):
(WebCore::Document::setSecurityOrigin):
* dom/Document.h:
* xml/XSLTProcessor.cpp:
2011-11-17 Peter Kasting <pkasting@google.com>
Unreviewed, rolling out r100676.
http://trac.webkit.org/changeset/100676
https://bugs.webkit.org/show_bug.cgi?id=72393
Looks like r100572 was not the source of the crashes.
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::canSetScriptSource):
* bindings/js/ScriptDebugServer.h:
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::stepOutOfFunction):
(WebCore::ScriptDebugServer::canSetScriptSource):
* bindings/v8/ScriptDebugServer.h:
* inspector/CodeGeneratorInspector.py:
* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::getCapabilities):
* inspector/InspectorDebuggerAgent.h:
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel):
(WebInspector.DebuggerModel.prototype.enableDebugger):
(WebInspector.DebuggerModel.prototype.disableDebugger):
(WebInspector.DebuggerModel.prototype.canSetScriptSource):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
* inspector/front-end/Settings.js:
2011-11-17 Konstantin Scheglov <scheglov@google.com>
Absolute child is not repainted when parent opacity changes
https://bugs.webkit.org/show_bug.cgi?id=68777
Reviewed by Simon Fraser.
First time when we change opacity for parent we don't have layer, so
diff=StyleDifferenceRepaint is used instead of diff=StyleDifferenceRepaintLayer.
Layer is created later, in styleDidChange().
So, when we recalculate later diff, we now check for diff=StyleDifferenceRepaintLayer and
performs repaintIncludingDescendants().
Test: fast/layers/layer-absolute-parent-opacity.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle): Call repaintIncludingDescendants() instead of repaint().
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff): Add ContextSensitivePropertyOpacity when change opacity.
2011-11-17 Nate Chapin <japhet@chromium.org>
r100311 dropped a RefPtr that is very
helpful. Add it back.
https://bugs.webkit.org/show_bug.cgi?id=72647
Reviewed by Adam Barth.
http/tests/misc/xslt-bad-import.html should
stop crashing in full chromium builds.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::loadDone):
2011-11-17 Adam Barth <abarth@webkit.org>
Refactor SecurityOrigin::create to be easier to understand
https://bugs.webkit.org/show_bug.cgi?id=72342
Reviewed by Eric Seidel.
Over time, the SecurityOrigin constructor has grown a bit out of
control. This patch attempts to separate the different concerns into
free functions. The general approach is to put more logic in the
"create" function and introduce a simple constructor for unique
origins.
This patch shouldn't change any behavior.
* page/SecurityOrigin.cpp:
(WebCore::schemeRequiresAuthority):
(WebCore::shouldUseInnerURL):
(WebCore::extractInnerURL):
(WebCore::isDirectory):
(WebCore::shouldTreatAsUniqueOrigin):
(WebCore::SecurityOrigin::SecurityOrigin):
(WebCore::SecurityOrigin::create):
(WebCore::SecurityOrigin::createUnique):
(WebCore::SecurityOrigin::databaseIdentifier):
* page/SecurityOrigin.h:
2011-11-17 Shawn Singh <shawnsingh@chromium.org>
[chromium] Fix minor style nit in CCLayerImpl
https://bugs.webkit.org/show_bug.cgi?id=71070
Reviewed by James Robinson.
Fixes if-statements on several settors to follow WebKit
conventions. Existing CCLayerImplTest unit tests already cover
this change.
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::setBounds):
(WebCore::CCLayerImpl::setMaskLayer):
(WebCore::CCLayerImpl::setReplicaLayer):
(WebCore::CCLayerImpl::setDrawsContent):
(WebCore::CCLayerImpl::setAnchorPoint):
(WebCore::CCLayerImpl::setAnchorPointZ):
(WebCore::CCLayerImpl::setBackgroundColor):
(WebCore::CCLayerImpl::setMasksToBounds):
(WebCore::CCLayerImpl::setOpaque):
(WebCore::CCLayerImpl::setOpacity):
(WebCore::CCLayerImpl::setPosition):
(WebCore::CCLayerImpl::setPreserves3D):
(WebCore::CCLayerImpl::setZoomAnimatorTransform):
(WebCore::CCLayerImpl::setSublayerTransform):
(WebCore::CCLayerImpl::setTransform):
(WebCore::CCLayerImpl::setDebugBorderColor):
(WebCore::CCLayerImpl::setDebugBorderWidth):
(WebCore::CCLayerImpl::setContentBounds):
(WebCore::CCLayerImpl::setScrollPosition):
(WebCore::CCLayerImpl::setScrollDelta):
(WebCore::CCLayerImpl::setScaleDelta):
(WebCore::CCLayerImpl::setDoubleSided):
2011-11-17 Michael Saboff <msaboff@apple.com>
Leaks seen in MemoryPressureHandlerMac.mm on Leaks bot
https://bugs.webkit.org/show_bug.cgi?id=72416
Added code to release _cache_event_source and _timer_event_source
after they are canceled. Also added defensive code to
clean up the _timer_event_source in uninstall().
Reviewed by Geoffrey Garen.
No new tests, fixing leaks caught by leaks bot.
* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::uninstall):
(WebCore::MemoryPressureHandler::holdOff):
2011-11-17 Ken Buchanan <kenrb@chromium.org>
Crash from positioned generated content under run-in
https://bugs.webkit.org/show_bug.cgi?id=70456
Reviewed by David Hyatt.
Modified handling of run-in children to clear generated children
before removing the parent from the render tree. This caused problems
with absolute positioned children being not properly removed from the
positioned object list of the RenderView.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::handleRunInChild):
2011-11-17 Peter Kasting <pkasting@google.com>
Unreviewed, rolling out r100572.
https://bugs.webkit.org/show_bug.cgi?id=72393
https://bugs.webkit.org/show_bug.cgi?id=72651
May have caused seg faults on Chromium Linux dbg bot.
* bindings/js/ScriptDebugServer.cpp:
* bindings/js/ScriptDebugServer.h:
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::stepOutOfFunction):
* bindings/v8/ScriptDebugServer.h:
* inspector/CodeGeneratorInspector.py:
* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
* inspector/InspectorDebuggerAgent.h:
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel):
(WebInspector.DebuggerModel.prototype.enableDebugger):
(WebInspector.DebuggerModel.prototype.disableDebugger):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
* inspector/front-end/Settings.js:
2011-11-17 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100652.
http://trac.webkit.org/changeset/100652
https://bugs.webkit.org/show_bug.cgi?id=72648
"Caused outline-offset-min-assert.html to assert on debug
builds" (Requested by mwenge2 on #webkit).
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paintOutline):
2011-11-17 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/72637> Stop performing runtime version checks on OS versions where the check can never possibly fail.
Reviewed by Simon Fraser.
* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::haveVImageRoundingErrorFix): When not targeting Snow Leopard we always have the fix.
2011-11-17 Chris Fleizach <cfleizach@apple.com>
AX: The scrollArea is not correctly returning the scrollbars
https://bugs.webkit.org/show_bug.cgi?id=70247
Reviewed by Beth Dakin.
A few bugs that were preventing this from working.
1) In accessibilityAttributeValue: when an element did not have a renderer() we were returning earlier than we should have
2) We were not updating and clearing the scrollbars correctly when children were cleared or when asked for.
Test: platform/mac/accessibility/scrollbars.html
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::scrollBar):
(WebCore::AccessibilityScrollView::clearChildren):
* accessibility/AccessibilityScrollView.h:
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2011-11-14 Adam Barth <abarth@webkit.org>
Unique origins shouldn't remember their scheme, host, or port
https://bugs.webkit.org/show_bug.cgi?id=72308
Reviewed by Eric Seidel.
This patch contains the bulk (all?) of the behavior differences in this
patch series. Unique origins shouldn't remember their schemes. Doing
so causes some privileges (e.g., local access) to leak into unique
origins.
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
- Explicitly clear out the protocol, host, and port for unique
origins. A future patch will refactor all this code to be more
elegant.
* platform/SchemeRegistry.cpp:
(WebCore::schemesWithUniqueOrigins):
- Merge "about" and "javascript" in with the general case now that
we don't have a separate notion of an empty origin.
2011-11-17 Chris Fleizach <cfleizach@apple.com>
AX: cleanup style and naming and code in accessibility search mechanism
https://bugs.webkit.org/show_bug.cgi?id=72570
Reviewed by Beth Dakin.
Cleanup the naming and code style within the element searching mechanism.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
(WebCore::AccessibilityObject::isAccessibilityTextSearchMatch):
(WebCore::AccessibilityObject::firstAccessibleObjectFromNode):
(WebCore::AccessibilityObject::findMatchingObjects):
* accessibility/AccessibilityObject.h:
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2011-11-17 Julien Chaffraix <jchaffraix@webkit.org>
CSS table with 100% width can overflow their containing block
https://bugs.webkit.org/show_bug.cgi?id=72180
Reviewed by David Hyatt.
Tests: fast/table/table-in-table-percent-width-collapsing-border-quirks-mode.html
fast/table/table-in-table-percent-width-collapsing-border.html
fast/table/table-in-table-percent-width-quirks-mode.html
fast/table/table-in-table-percent-width.html
After r97555, we would include the borders in a CSS table's logical width even if the 'width'
property was a percent. This does not match what Firefox and IE are doing. Thus don't apply
this behavior to percent 'width'.
* rendering/RenderTable.cpp:
(WebCore::RenderTable::computeLogicalWidth):
2011-11-17 Adrienne Walker <enne@google.com>
[chromium] Implicitly skip render surfaces that won't be drawn
https://bugs.webkit.org/show_bug.cgi?id=71038
Rather than having redundant checks in three places for how to walk
through a render surface list, instead don't add render surfaces that
don't need to get rendered to the render surface list.
Reviewed by James Robinson.
Covered by existing layout tests and unit tests.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawLayersOntoRenderSurfaces):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::paintLayerContents):
(WebCore::CCLayerTreeHost::updateCompositorResources):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::calculateDrawTransformsAndVisibilityInternal):
2011-11-17 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Layer violation: qt_runtime.cpp accesses QWebElement and QTDRTNode
https://bugs.webkit.org/show_bug.cgi?id=72595
Reviewed by Noam Rosenthal.
Removed QWebElement and QtDRTNode usage that reached from WebCore into
WebKit/qt and replaced it with the ability to register custom JSValue
conversion functions. The old code has been moved to WebKit/qt.
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtInstance::QtInstance): Remove unnecessary meta type registration
(now done in QtWebElementRuntime::initialize in WebKit/qt).
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::registerCustomType):
(JSC::Bindings::convertValueToQVariant):
(JSC::Bindings::convertQVariantToValue):
* bridge/qt/qt_runtime.h:
2011-11-17 Fady Samuel <fsamuel@chromium.org>
Pass Aspect Ratio to RenderStyle
https://bugs.webkit.org/show_bug.cgi?id=72350
Reviewed by Ojan Vafai.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyAspectRatio::applyInheritValue):
(WebCore::ApplyPropertyAspectRatio::applyInitialValue):
(WebCore::ApplyPropertyAspectRatio::applyValue):
(WebCore::ApplyPropertyAspectRatio::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSValue.h:
(WebCore::CSSValue::isAspectRatioValue):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::hasAspectRatio):
(WebCore::InheritedFlags::aspectRatio):
(WebCore::InheritedFlags::aspectRatioDenominator):
(WebCore::InheritedFlags::aspectRatioNumerator):
(WebCore::InheritedFlags::setHasAspectRatio):
(WebCore::InheritedFlags::setAspectRatioDenominator):
(WebCore::InheritedFlags::setAspectRatioNumerator):
(WebCore::InheritedFlags::initialHasAspectRatio):
(WebCore::InheritedFlags::initialAspectRatioDenominator):
(WebCore::InheritedFlags::initialAspectRatioNumerator):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2011-11-09 Robert Hogan <robert@webkit.org>
CSS 2.1 failure: outline-color-* tests fail
https://bugs.webkit.org/show_bug.cgi?id=71931
Reviewed by Julien Chaffraix.
WebKit wasn't displaying the top block in these tests because it did not paint the outline
of divs with zero size.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paintOutline): paint the outline even when the block has zero size
2011-11-17 Sergio Villar Senin <svillar@igalia.com>
[GTK] plugins/get-url-notify-with-url-that-fails-to-load.html on bots after r100466
https://bugs.webkit.org/show_bug.cgi?id=72613
Reviewed by Martin Robinson.
Do not assume that a SoupRequest always exists, it is not
generated for example when the provided URL is
invalid. ResourceHandle::platformSetDefersLoading was crashing
because of that.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::platformSetDefersLoading):
2011-11-17 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Remove onlineDetectionEnabled from Preferences
https://bugs.webkit.org/show_bug.cgi?id=72617
Reviewed by Pavel Feldman.
* inspector/front-end/ApplicationCacheItemsView.js:
(WebInspector.ApplicationCacheItemsView):
(WebInspector.ApplicationCacheItemsView.prototype.get statusBarItems):
* inspector/front-end/Settings.js:
2011-11-17 Ken Buchanan <kenrb@chromium.org>
Crash from nested tables with generated content
https://bugs.webkit.org/show_bug.cgi?id=68811
Reviewed by David Hyatt.
When adding a child to a table that has generated content, this change
ensures that we leave alone any generated content renderers that belong
to descendants in the tree. They don't need to be touched, and doing so
can create confusion about who the content belongs to.
This patch also simplifies some existing code for finding pseudoelement
renderers.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::addChild):
(WebCore::RenderObject::isBeforeAfterContentGeneratedByAncestor): Added
* rendering/RenderObject.h:
(WebCore::RenderObject::findAfterContentRenderer): Deleted
(WebCore::RenderObject::findBeforeContentRenderer): Deleted
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::beforePseudoElementRenderer):
(WebCore::RenderObjectChildList::afterPseudoElementRenderer):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::addChild):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addChild):
2011-11-17 Patrick Gansterer <paroga@webkit.org>
Unreviewed WinCE build fix for r94119.
MSVC throws multiply defined symbols linker error when using local class in inline function.
* bindings/js/JSDictionary.h:
(WebCore::JSDictionary::IdentitySetter::identitySetter):
(WebCore::JSDictionary::tryGetProperty):
2011-11-17 Eric Carlson <eric.carlson@apple.com>
TextTrackList not sorted correctly
https://bugs.webkit.org/show_bug.cgi?id=72545
Reviewed by Darin Adler.
Test: media/track/track-texttracks.html
* WebCore.xcodeproj/project.pbxproj: Add TextTrack.h to WebCore private headers because
it is included by HTMLMediaElement.h.
* html/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::LoadableTextTrack): Pass track type to base class constructor.
(WebCore::LoadableTextTrack::trackElementIndex): New, return the <track> element's tree order
for sorting.
* html/LoadableTextTrack.h:
* html/TextTrack.cpp:
(WebCore::TextTrack::TextTrack): Set track type.
* html/TextTrack.h:
(WebCore::TextTrack::create): Ditto.
(WebCore::TextTrack::trackType): Ditto.
* html/track/TextTrackList.cpp:
(TextTrackList::length): Update to deal with two TextTrack vectors.
(TextTrackList::item): Ditto.
(TextTrackList::append): Ditto.
(TextTrackList::remove): Ditto
* html/track/TextTrackList.h: Store the two types of TextTracks in separate Vectors to make
it simpler to keep them in the correct order.
2011-11-17 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Layer violation: WebCore::dnsPrefetch uses QWebSettings::globalSettings()
https://bugs.webkit.org/show_bug.cgi?id=72596
Reviewed by Kenneth Rohde Christiansen.
We don't need to use QWebSettings here, because we now propagate the DNS prefetch
setting to WebCore::Settings and the rest of WebCore checks the setting before calling
WebCore::prefetchDNS.
* platform/network/qt/DnsPrefetchHelper.cpp:
(WebCore::prefetchDNS): Removed the use of QWebSettings.
* platform/network/qt/DnsPrefetchHelper.h: Remove offending qwebsettings.h inclusion.
2011-11-17 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Layer violation: Image::loadPlatformResource uses QWebSettings::webGraphic
https://bugs.webkit.org/show_bug.cgi?id=72594
Reviewed by Kenneth Rohde Christiansen.
Move the cache for the resource pixmaps into ImageQt.cpp.
* platform/graphics/Image.h: Add Qt specific setter for resource pixmaps.
* platform/graphics/qt/ImageQt.cpp: Moved resource pixmap hash from qwebsettings.
(earlyClearGraphics):
(graphics):
(loadResourcePixmap):
(WebCore::Image::setPlatformResource):
2011-11-17 Zeno Albisser <zeno@webkit.org>
[Qt][WK2] Touch/Mouse events are delivered with wrong coordinates.
https://bugs.webkit.org/show_bug.cgi?id=72604
When using the QtViewportInterationEngine for zooming/panning,
no additional scroll offset should be applied to input events
by the ScrollView.
This patch is based on work by Andreas Kling.
Reviewed by Kenneth Rohde Christiansen.
* platform/ScrollView.cpp:
(WebCore::ScrollView::windowToContents):
(WebCore::ScrollView::contentsToWindow):
2011-11-17 Ben Murdoch <benm@google.com>
Unreviewed build fix.
Fix the Windows builds by adding WorkerEventQueue.cpp|h to the
vcproj. Build break was introduced in
https://bugs.webkit.org/show_bug.cgi?id=72528
* WebCore.vcproj/WebCore.vcproj: Add missing files.
2011-11-17 Mihnea Ovidenie <mihnea@adobe.com>
CSS Exclusions: parse the wrap-margin and wrap-padding properties
https://bugs.webkit.org/show_bug.cgi?id=71900
Reviewed by Dean Jackson.
Tests: fast/exclusions/wrap-margin-parsing.html
fast/exclusions/wrap-padding-parsing.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::isSimpleLengthPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::wrapPadding):
(WebCore::InheritedFlags::setWrapPadding):
(WebCore::InheritedFlags::initialWrapPadding):
(WebCore::InheritedFlags::wrapMargin):
(WebCore::InheritedFlags::setWrapMargin):
(WebCore::InheritedFlags::initialWrapMargin):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2011-11-17 Kenichi Ishibashi <bashi@chromium.org>
[chromium] don't call fontconfig twice in complex text path
https://bugs.webkit.org/show_bug.cgi?id=38701
Adds a new API for getting font family. For now, FontCacheLinux calls the new API, but don't use additional properties for compatibility. The old API will be removed when Chromium is ready to use new API.
Reviewed by Tony Chang.
No new tests. No behavior changes for now.
* platform/chromium/PlatformSupport.h: Added FontFamily struct and changed the declaration of getFontFamilyForCharacters().
* platform/graphics/chromium/FontCacheLinux.cpp:
(WebCore::FontCache::getFontDataForCharacters): Uses new PlatformSupport::getFontFamilyForCharacters().
* platform/graphics/chromium/FontPlatformDataLinux.h:
(WebCore::FontPlatformData::setFakeBold): Added.
(WebCore::FontPlatformData::setFakeItalic): Added.
2011-11-17 Mario Sanchez Prada <msanchez@igalia.com>
[GTK] Consider parent AtkObject in webkit_accessible_get_parent(), if already set
https://bugs.webkit.org/show_bug.cgi?id=72525
Reviewed by Xan Lopez.
* accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
(webkit_accessible_get_parent): Call to the implementation of
atk_object_get_parent in AtkObject class to check whether a parent
AtkObject has been previously set, before trying to find one.
2011-11-17 Pavel Feldman <pfeldman@google.com>
Not reviewed: fix IE user agents strings in the inspector.
* inspector/front-end/SettingsScreen.js:
(WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.get const):
2011-11-16 Kenneth Rohde Christiansen <kenneth@webkit.org>
Make use-fixed-layout work reliable
https://bugs.webkit.org/show_bug.cgi?id=72511
Reviewed by Simon Hausmann.
Always send a viewport update per page load as we depend on that,
to reset all viewport handling before doing layout.
* page/Page.cpp:
(WebCore::Page::updateViewportArguments):
2011-11-16 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: inspector follows javascript: hrefs as relative
https://bugs.webkit.org/show_bug.cgi?id=72373
javascript: hrefs should never be linkified for security.
Reviewed by Yury Semikhatsky.
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
* inspector/front-end/ResourceUtils.js:
(WebInspector.completeURL):
2011-11-17 Nikolas Zimmermann <nzimmermann@rim.com>
Not reviewed. Fix 32bit builds.
* platform/ClockGeneric.cpp:
(ClockGeneric::now): Use narrowPrecisionToFloat.
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build): Use it correctly.
2011-11-17 Dominic Mazzoni <dmazzoni@google.com>
Accessibility: Chromium requires an AX notification when an iframe loads.
https://bugs.webkit.org/show_bug.cgi?id=72239
When a document finishes loading, we were sending an AXLoadComplete if it
was the top document. Now, if it's a document in an iframe, send an
AXLayoutComplete on the iframe.
Reviewed by Chris Fleizach.
Test: accessibility/loading-iframe-sends-notification.html
* dom/Document.cpp:
(WebCore::Document::implicitClose):
2011-11-16 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/72574> Remove unnecessary use of CarbonCore APIs from Audio code
Reviewed by Andy Estes.
* platform/audio/mac/AudioDestinationMac.cpp:
(WebCore::AudioDestinationMac::AudioDestinationMac): Switch from using the Carbon Component Manager
to using AudioUnit's own component interface.
(WebCore::AudioDestinationMac::~AudioDestinationMac): Ditto.
* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::AudioFileReader): Remove an unncessary trip through the Carbon File Manager
when converting a char* path to a CFURLRef representing the same.
2011-11-17 Adam Barth <abarth@webkit.org>
CSP report-only mode doesn't work from an HTTP header
https://bugs.webkit.org/show_bug.cgi?id=71958
Reviewed by Eric Seidel.
"It's tested or it's broken." -- Adam Leventhal
Test: http/tests/security/contentSecurityPolicy/report-only-from-header.php
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didBeginDocument):
2011-11-15 Pavel Feldman <pfeldman@google.com>
Web Inspector: introduce Debugger domain capabilities concept.
https://bugs.webkit.org/show_bug.cgi?id=72393
Many of the Preferences that we have in Settings.js and override in DevTools.js
are really not preferences, but capabilities. Protocol clients should have a way
of figuring out whether some capability is present before using it.
Reviewed by Yury Semikhatsky.
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::canSetScriptSource):
* bindings/js/ScriptDebugServer.h:
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::canSetScriptSource):
* bindings/v8/ScriptDebugServer.h:
* inspector/CodeGeneratorInspector.py:
* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::getCapabilities):
* inspector/InspectorDebuggerAgent.h:
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerModel):
(WebInspector.DebuggerModel.prototype.enableDebugger):
(WebInspector.DebuggerModel.prototype.canSetScriptSource):
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
* inspector/front-end/Settings.js:
2011-11-17 Mihnea Ovidenie <mihnea@adobe.com>
CSS exclusions: parse the wrap-flow and wrap-through properties
https://bugs.webkit.org/show_bug.cgi?id=71904
Reviewed by Dean Jackson.
Tests: fast/exclusions/wrap-flow-parsing.html
fast/exclusions/wrap-through-parsing.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator WrapFlow):
(WebCore::CSSPrimitiveValue::operator WrapThrough):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSValueKeywords.in:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::wrapFlow):
(WebCore::InheritedFlags::wrapThrough):
(WebCore::InheritedFlags::setWrapFlow):
(WebCore::InheritedFlags::setWrapThrough):
(WebCore::InheritedFlags::initialWrapFlow):
(WebCore::InheritedFlags::initialWrapThrough):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2011-11-16 Dean Jackson <dino@apple.com>
Implement filter function shorthands
https://bugs.webkit.org/show_bug.cgi?id=68475
Reviewed by Simon Fraser.
Implement the shorthand functions for filter effects.
This includes grayscale, sepia, invert, hue-rotate, saturate,
opacity, gamma, drop-shadow and blur. At the moment sharpen
and url are not supported.
CSSParser needed to be updated because it was mistakenly
clamping saturation values to [0,1]. Any positive number
is allowed so you can produce super-saturated images.
The biggest change was the API to FilterEffectRenderer. It now
builds a list of effects and applies the filter itself.
Note that the drop-shadow and blur operations don't yet
provide accurate results because they produce an output image
that is larger than the input. See
https://bugs.webkit.org/show_bug.cgi?id=71929
https://bugs.webkit.org/show_bug.cgi?id=71930
While I was there, I fixed a small style issue in
CustomFilterOperation.
Tests: css3/filters/effect-blur.html
css3/filters/effect-combined.html
css3/filters/effect-drop-shadow.html
css3/filters/effect-gamma.html
css3/filters/effect-grayscale.html
css3/filters/effect-hue-rotate.html
css3/filters/effect-invert.html
css3/filters/effect-opacity.html
css3/filters/effect-saturate.html
css3/filters/effect-sepia.html
* WebCore.xcodeproj/project.pbxproj: Add StyleShader.h to
the project (missing from earlier commit).
* css/CSSParser.cpp:
(WebCore::CSSParser::isValidFilterArgument): Don't clamp
saturate to [0,1]
* platform/graphics/filters/CustomFilterOperation.h:
* rendering/FilterEffectRenderer.cpp:
(WebCore::endMatrixRow):
(WebCore::lastMatrixRow):
(WebCore::FilterEffectRenderer::FilterEffectRenderer):
(WebCore::FilterEffectRenderer::inputContext):
(WebCore::FilterEffectRenderer::build):
(WebCore::FilterEffectRenderer::prepare):
(WebCore::FilterEffectRenderer::apply):
* rendering/FilterEffectRenderer.h:
(WebCore::FilterEffectRenderer::setSourceImageRect):
(WebCore::FilterEffectRenderer::output):
(WebCore::FilterEffectRenderer::setMaxEffectRects):
(WebCore::FilterEffectRenderer::lastEffect):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::updateOrRemoveFilterEffect):
(WebCore::RenderLayer::updateFilterBackingStore):
2011-11-16 Kentaro Hara <haraken@chromium.org>
Remove all custom constructors of Events from JSC
https://bugs.webkit.org/show_bug.cgi?id=72577
Reviewed by Adam Barth.
- Makes CodeGeneratorJS.pm generate Event constructors
if [ConstructorTemplate=Event] IDL is specified.
- Removes EventConstructors.h and JSEventConstructors.cpp.
- Replaces all JSC custom constructors of Events
with the generated code by [ConstructorTemplate=Event] IDL.
Tests: fast/events/constructors/before-load-event-constructor.html
fast/events/constructors/close-event-constructor.html
fast/events/constructors/custom-event-constructor.html
fast/events/constructors/error-event-constructor.html
fast/events/constructors/event-constructors.html
fast/events/constructors/hash-change-event-constructor.html
fast/events/constructors/message-event-constructor.html
fast/events/constructors/overflow-event-constructor.html
fast/events/constructors/page-transition-event-constructor.html
fast/events/constructors/pop-state-event-constructor.html
fast/events/constructors/progress-event-constructor.html
fast/events/constructors/track-event-constructor.html
fast/events/constructors/webkit-animation-event-constructor.html
fast/events/constructors/webkit-transition-event-constructor.html
* bindings/generic/EventConstructors.h: Removed. This is what we wanted to do in this patch.
* bindings/js/JSEventConstructors.cpp: Ditto.
* GNUmakefile.list.am: Removed EventConstructors.h and JSEventConstructors.cpp.
* Target.pri: Ditto.
* UseJSC.cmake: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSBindingsAllInOne.cpp: Ditto.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader): Added JSDictionary.h.
(GenerateConstructorDeclaration): Added a header for fillXXXXEventInit(...).
(GenerateConstructorDefinition): Generates an Event constructor. The generated code is the same as the code that had been written in JSEventConstructors.cpp.
(IsConstructable): Judges if a given interface is constructable.
(IsConstructorTemplate): Judges if a given interface has a given template, e.g. judges if an interface has [ConstructorTemplate=Event].
* bindings/scripts/test/TestEventConstructor.idl: Changed 'CustomConstructor=Event' to 'ConstructorTemplate=Event'. We should have changed this in r100108.
* bindings/scripts/test/JS/JSTestEventConstructor.cpp: Updated a run-bindings-tests result.
(WebCore::JSTestEventConstructorConstructor::constructJSTestEventConstructor):
(WebCore::fillTestEventConstructorInit):
* bindings/scripts/test/JS/JSTestEventConstructor.h: Ditto.
* bindings/scripts/test/V8/V8TestEventConstructor.cpp: Ditto.
(WebCore::V8TestEventConstructor::constructorCallback):
(WebCore::fillTestEventConstructorInit):
* bindings/scripts/test/V8/V8TestEventConstructor.h: Ditto.
* dom/BeforeLoadEvent.idl: In essence, replaced [JSCustomConstructor] IDL with [JSConstructorTemplate=Event] IDL.
* dom/CustomEvent.idl: Ditto.
* dom/ErrorEvent.idl: Ditto.
* dom/Event.idl: Ditto.
* dom/HashChangeEvent.idl: Ditto.
* dom/MessageEvent.idl: Ditto.
* dom/OverflowEvent.idl: Ditto.
* dom/PageTransitionEvent.idl: Ditto.
* dom/PopStateEvent.idl: Ditto.
* dom/ProgressEvent.idl: Ditto.
* dom/WebKitAnimationEvent.idl: Ditto.
* dom/WebKitTransitionEvent.idl: Ditto.
* html/track/TrackEvent.idl: Ditto.
* websockets/CloseEvent.idl: Ditto.
2011-11-16 Dean Jackson <dino@apple.com>
Build fix for Apple WebKit due to r100560.
When I removed the violating header file it lost the
reference to Color.
No review.
* platform/graphics/filters/FilterOperation.h:
2011-11-16 Dean Jackson <dino@apple.com>
DropShadowFilterOperation violates platform isolation
https://bugs.webkit.org/show_bug.cgi?id=72544
Reviewed by Simon Fraser.
Move ShadowData properties into the DropShadowFilterOperation
to avoid depending on something outside platform.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::valueForFilter):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::createFilterOperations):
* platform/graphics/filters/FilterOperation.h:
(WebCore::DropShadowFilterOperation::create):
(WebCore::DropShadowFilterOperation::x):
(WebCore::DropShadowFilterOperation::y):
(WebCore::DropShadowFilterOperation::stdDeviation):
(WebCore::DropShadowFilterOperation::color):
(WebCore::DropShadowFilterOperation::operator==):
(WebCore::DropShadowFilterOperation::DropShadowFilterOperation):
2011-11-16 Adam Bergkvist <adam.bergkvist@ericsson.com>
Use a simple page client for user consent in getUserMedia()
https://bugs.webkit.org/show_bug.cgi?id=70897
Reviewed by Adam Barth.
This is one in a series of patches that update the MediaStream feature
to use WebCore platform interfaces.
Covered by existing tests.
* GNUmakefile.list.am:
* WebCore.gypi:
* mediastream/MediaStreamClient.h: Removed.
* mediastream/MediaStreamController.cpp: Removed.
* mediastream/MediaStreamController.h: Removed.
* mediastream/MediaStreamFrameController.cpp: Removed.
* mediastream/MediaStreamFrameController.h: Removed.
* mediastream/UserMediaClient.h: Added.
(WebCore::UserMediaClient::~UserMediaClient):
* mediastream/UserMediaRequest.cpp: Added.
(WebCore::UserMediaRequest::create):
(WebCore::UserMediaRequest::UserMediaRequest):
(WebCore::UserMediaRequest::~UserMediaRequest):
(WebCore::UserMediaRequest::start):
(WebCore::UserMediaRequest::mediaStreamSourcesQueryCompleted):
(WebCore::UserMediaRequest::succeed):
(WebCore::UserMediaRequest::fail):
(WebCore::UserMediaRequest::contextDestroyed):
(WebCore::UserMediaRequest::parseOptions):
* mediastream/UserMediaRequest.h: Added.
(WebCore::UserMediaRequest::audio):
(WebCore::UserMediaRequest::video):
(WebCore::UserMediaRequest::cameraPreferenceUser):
(WebCore::UserMediaRequest::cameraPreferenceEnvironment):
(WebCore::UserMediaRequest::successCallback):
(WebCore::UserMediaRequest::errorCallback):
* page/CallbackTask.h: Removed.
* page/Frame.cpp:
(WebCore::Frame::Frame):
(WebCore::Frame::~Frame):
(WebCore::Frame::pageDestroyed):
(WebCore::Frame::transferChildFrameToNewDocument):
* page/Frame.h:
* page/Navigator.cpp:
(WebCore::Navigator::webkitGetUserMedia):
* page/NavigatorUserMediaErrorCallback.h:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::~Page):
(WebCore::Page::PageClients::PageClients):
* page/Page.h:
(WebCore::Page::userMediaClient):
2011-11-16 David Grogan <dgrogan@chromium.org>
instantiate WorkerEventQueue in WorkerContext
https://bugs.webkit.org/show_bug.cgi?id=72528
Reviewed by David Levin.
No new tests - nothing uses it yet.
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::WorkerContext):
Instantiate WorkerEventQueue in InitializerList
* workers/WorkerEventQueue.h:
Don't inherit from RefCounted, WorkerContext has an OwnPtr to it
2011-11-16 Kentaro Hara <haraken@chromium.org>
Unreviewed. Rebaselined run-bindings-tests results.
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructor::JSTestEventConstructor):
(WebCore::JSTestEventConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::impl):
(WebCore::JSTestEventConstructor::releaseImpl):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::JSTestInterface):
(WebCore::JSTestInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::JSTestInterface::impl):
(WebCore::JSTestInterface::releaseImpl):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
(WebCore::JSTestMediaQueryListListenerOwner::finalize):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::impl):
(WebCore::JSTestMediaQueryListListener::releaseImpl):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructor::JSTestNamedConstructor):
(WebCore::JSTestNamedConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::JSTestNamedConstructor::impl):
(WebCore::JSTestNamedConstructor::releaseImpl):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::JSTestObj):
(WebCore::JSTestObjOwner::finalize):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::impl):
(WebCore::JSTestObj::releaseImpl):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
(WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::impl):
(WebCore::JSTestSerializedScriptValueInterface::releaseImpl):
2011-11-16 Jay Civelli <jcivelli@chromium.org>
Make sure MHTML documents use the domain of the MHTML file.
https://bugs.webkit.org/show_bug.cgi?id=72445
Reviewed by Adam Barth.
* dom/Document.h:
(WebCore::Document::setBaseURL):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::receivedFirstData):
2011-11-16 Julien Chaffraix <jchaffraix@webkit.org>
Update supported display list after -webkit-grid and -webkit-inline-grid addition
https://bugs.webkit.org/show_bug.cgi?id=72559
Reviewed by Tony Chang.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Added the 2 new supported
values (forgotten in the previous change).
2011-11-11 Adrienne Walker <enne@google.com>
[chromium] Expose mock scrollbars to window.internals
https://bugs.webkit.org/show_bug.cgi?id=72195
Reviewed by James Robinson.
* testing/Internals.cpp:
(WebCore::Internals::setMockScrollbarsEnabled):
* testing/Internals.h:
* testing/Internals.idl:
2011-11-16 Michael Nordman <michaeln@google.com>
ApplicationCache manifest should work with any MIME type.
https://bugs.webkit.org/show_bug.cgi?id=72082
Reviewed by Alexey Proskuryakov.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didReceiveManifestResponse): Remove the test for a particular type.
2011-11-16 Daniel Sievers <sievers@chromium.org>
[Chromium] Avoid color mask operations for root layers
https://bugs.webkit.org/show_bug.cgi?id=72452
Instead of relying on the combination of clearing the surface and initializing
the alpha channel to 1.0 followed by disabling alpha in the color mask when
rendering the root layer tiles, add shaders to support writing out opaque layers
(alpha channel values written as 1.0).
Reviewed by James Robinson.
No functional change made that requires new tests.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawLayersInternal):
(WebCore::LayerRendererChromium::initializeSharedObjects):
(WebCore::LayerRendererChromium::tilerProgramOpaque):
(WebCore::LayerRendererChromium::tilerProgramOpaqueAA):
(WebCore::LayerRendererChromium::tilerProgramSwizzleOpaque):
(WebCore::LayerRendererChromium::tilerProgramSwizzleOpaqueAA):
(WebCore::LayerRendererChromium::cleanupSharedObjects):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/ShaderChromium.cpp:
(WebCore::FragmentTexOpaqueBinding::FragmentTexOpaqueBinding):
(WebCore::FragmentTexOpaqueBinding::init):
(WebCore::FragmentShaderRGBATexOpaque::getShaderString):
(WebCore::FragmentShaderRGBATexSwizzleOpaque::getShaderString):
(WebCore::FragmentTexClampOpaqueAABinding::FragmentTexClampOpaqueAABinding):
(WebCore::FragmentTexClampOpaqueAABinding::init):
(WebCore::FragmentShaderRGBATexClampOpaqueAA::getShaderString):
(WebCore::FragmentShaderRGBATexClampSwizzleOpaqueAA::getShaderString):
* platform/graphics/chromium/ShaderChromium.h:
(WebCore::FragmentTexOpaqueBinding::alphaLocation):
(WebCore::FragmentTexOpaqueBinding::samplerLocation):
(WebCore::FragmentTexClampOpaqueAABinding::alphaLocation):
(WebCore::FragmentTexClampOpaqueAABinding::samplerLocation):
(WebCore::FragmentTexClampOpaqueAABinding::fragmentTexTransformLocation):
(WebCore::FragmentTexClampOpaqueAABinding::edgeLocation):
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::CCTiledLayerImpl::draw):
* platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2011-11-16 Tim Horton <timothy_horton@apple.com>
Implement CSS3 Images cross-fade() image function
https://bugs.webkit.org/show_bug.cgi?id=52162
<rdar://problem/10209254>
Reviewed by Simon Fraser.
Render -webkit-cross-fade. Only cross-fades entirely composed of images will render for now,
cross-fades involving generated images are not yet implemented.
Reorganize GeneratedImage to be the base class for GeneratorGeneratedImage and CrossfadeGeneratedImage.
Add a pending state to CSSImageGeneratorValue, which is used to enable the pending-images loading
mechanism for -webkit-cross-fade's sub-images. Rework the logic in CSSStyleSelector to support pending
generated images.
Support parsing fractional values for the cross-fade amount (for example, 0.5 = 50%). Clamp cross-fade
amount to 0-1 range.
Tests: css3/images/cross-fade-invalidation.html
css3/images/cross-fade-simple.html
css3/images/cross-fade-sizing.html
css3/images/cross-fade-tiled.html
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSCanvasValue.h:
(WebCore::CSSCanvasValue::isPending):
(WebCore::CSSCanvasValue::loadSubimages):
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::isPending):
(WebCore::CSSCrossfadeValue::loadSubimages):
(WebCore::subimageIsPending):
(WebCore::loadSubimage):
(WebCore::cachedImageForCSSValue):
(WebCore::CSSCrossfadeValue::image):
(WebCore::CSSCrossfadeValue::crossfadeChanged):
* css/CSSCrossfadeValue.h:
(WebCore::CSSCrossfadeValue::create):
(WebCore::CSSCrossfadeValue::~CSSCrossfadeValue):
(WebCore::CSSCrossfadeValue::fixedSize):
(WebCore::CSSCrossfadeValue::CSSCrossfadeValue):
(WebCore::CSSCrossfadeValue::CrossfadeObserverProxy::CrossfadeObserverProxy):
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::image):
* css/CSSGradientValue.h:
(WebCore::CSSGradientValue::isPending):
(WebCore::CSSGradientValue::loadSubimages):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::generatedOrPendingImage):
(WebCore::CSSImageGeneratorValue::generatedImage):
(WebCore::CSSImageGeneratorValue::isPending):
(WebCore::CSSImageGeneratorValue::loadSubimages):
* css/CSSImageGeneratorValue.h:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseCrossfade):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::styleImage):
(WebCore::CSSStyleSelector::generatedOrPendingFromValue):
(WebCore::CSSStyleSelector::loadPendingImage):
(WebCore::CSSStyleSelector::loadPendingImages):
* css/CSSStyleSelector.h:
* platform/graphics/BitmapImage.h:
* platform/graphics/CrossfadeGeneratedImage.cpp: Added.
(WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
(WebCore::CrossfadeGeneratedImage::~CrossfadeGeneratedImage):
(WebCore::CrossfadeGeneratedImage::drawCrossfade):
(WebCore::CrossfadeGeneratedImage::draw):
(WebCore::CrossfadeGeneratedImage::drawPattern):
(WebCore::CrossfadeGeneratedImage::imageChanged):
* platform/graphics/CrossfadeGeneratedImage.h: Added.
(WebCore::CrossfadeGeneratedImage::create):
(WebCore::CrossfadeSubimageObserverProxy::CrossfadeSubimageObserverProxy):
(WebCore::CrossfadeSubimageObserverProxy::setReady):
* platform/graphics/GeneratedImage.h:
(WebCore::GeneratedImage::GeneratedImage):
* platform/graphics/GeneratorGeneratedImage.cpp: Renamed from Source/WebCore/platform/graphics/GeneratedImage.cpp.
(WebCore::GeneratorGeneratedImage::draw):
(WebCore::GeneratorGeneratedImage::drawPattern):
(WebCore::GeneratedImage::computeIntrinsicDimensions):
* platform/graphics/GeneratorGeneratedImage.h: Copied from Source/WebCore/platform/graphics/GeneratedImage.h.
(WebCore::GeneratorGeneratedImage::create):
(WebCore::GeneratorGeneratedImage::~GeneratorGeneratedImage):
(WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
* platform/graphics/Image.h:
* platform/graphics/ImageBuffer.h:
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::create):
(WebCore::StylePendingImage::data):
(WebCore::StylePendingImage::cssImageValue):
(WebCore::StylePendingImage::cssImageGeneratorValue):
(WebCore::StylePendingImage::StylePendingImage):
2011-11-16 Dan Bernstein <mitz@apple.com>
WebCore part of <rdar://problem/10262242> Add API for paginated display
https://bugs.webkit.org/show_bug.cgi?id=72537
Reviewed by Anders Carlsson.
* WebCore.exp.in: Exported Page::pageCount().
* page/Page.cpp:
(WebCore::Page::pageCount): Added this getter.
* page/Page.h:
2011-11-16 Shawn Singh <shawnsingh@chromium.org>
[chromium] Track property changes for render surfaces.
https://bugs.webkit.org/show_bug.cgi?id=72521
Reviewed by James Robinson.
Created CCRenderSurfaceTest for testing.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawLayersOntoRenderSurfaces):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::resetPropertyChangedFlagForSubtree):
* platform/graphics/chromium/cc/CCLayerImpl.h:
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::CCRenderSurface):
(WebCore::CCRenderSurface::setClipRect):
(WebCore::CCRenderSurface::setContentRect):
(WebCore::CCRenderSurface::surfacePropertyChanged):
* platform/graphics/chromium/cc/CCRenderSurface.h:
(WebCore::CCRenderSurface::resetPropertyChangedFlag):
2011-11-16 Ben Wells <benwells@chromium.org>
Seaming on border corners with mixed colour alpha borders
https://bugs.webkit.org/show_bug.cgi?id=70471
Reviewed by Simon Fraser.
Seaming is fixed by antialiasing mitred corners for edges that have alpha and are joining
a side that is of a different color.
Test: fast/borders/border-mixed-alpha.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::colorNeedsAntiAliasAtCorner):
(WebCore::RenderBoxModelObject::paintOneBorderSide):
2011-11-16 Sam Weinig <sam@webkit.org>
JS wrappers of DOM objects should have no-op constructors
https://bugs.webkit.org/show_bug.cgi?id=72556
Reviewed by Geoffrey Garen.
Stop using a RefPtr to hold DOM objects contained by JavaScript
wrappers and instead use a raw pointer. We were already releasing
the underlying object before the destructor ran (via the finalizer)
so the default behavior of destroying the RefPtr is always unnecessary
busy work.
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::JSCSSValueOwner::finalize):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNodeOwner::finalize):
(WebCore::JSNode::visitChildren):
Call releaseImpl() instead of clearImpl().
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
Stop storing m_impl in a RefPtr and instead use a raw pointer. Switch
clearImpl() to releaseImpl(), which explicitly derefs the pointer and
clear it.
(GenerateImplementation):
Use leakPtr() to explicitly adopt the PassRefPtr into the raw pointer.
Change default finalize to call releaseImpl() instead of clearImpl().
2011-11-16 Michael Saboff <msaboff@apple.com>
Enable 8 Bit Strings in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=71337
This patch turns on 8 bit strings in StringImpl and enables
their use in JavaScriptCore. Some of the changes are to
turn on code that had been staged (Lexer.cpp, Identifier.cpp,
SmallStrings.cpp and some of StringImpl.{h,cpp}).
Other changes are minor fixes to make 8 bit strings work
(UString.h, StringImpl::getData16SlowCase()).
Changed StringBuffer to be a templated class based on character
type. This change riplled into WebCore code as well.
Reviewed by Geoffrey Garen.
No new tests - Changes in response to refactoring StringBuffer to
be a template on character type.
* css/CSSParser.cpp:
(WebCore::quoteCSSString):
* css/CSSPrimitiveValue.cpp:
(WebCore::formatNumber):
* dom/Document.cpp:
(WebCore::canonicalizedTitle):
* platform/Length.cpp:
(WebCore::newCoordsArray):
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::prepare):
* platform/text/TextCodecUTF16.cpp:
(WebCore::TextCodecUTF16::decode):
* platform/text/TextCodecUTF8.cpp:
(WebCore::TextCodecUTF8::decode):
* rendering/RenderText.cpp:
(WebCore::makeCapitalized):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::writeToStringBuilder):
2011-11-16 Alexandre Elias <aelias@google.com>
[chromium] Improvements for page scale delta during commit
https://bugs.webkit.org/show_bug.cgi?id=72471
Reviewed by James Robinson.
Page scale now follows the same commit flow as scroll position:
the delta is folded into m_pageScale at BFAC time, and a "sent" value
is preserved for temporary use until the commit finishes.
I also merged setPageScaleFactor and setPageScaleFactorLimits into one
function on the impl side. The reason is that setPageFactor must
be applied after the limits are updated, but on the other hand setting
the limits first may cause an unnecessary clamp of the scale delta.
Merging the methods avoids this bind.
No new tests. (planning to add later: https://bugs.webkit.org/show_bug.cgi?id=71529)
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::finishCommitOnImplThread):
(WebCore::CCLayerTreeHost::applyScrollAndScale):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
(WebCore::CCLayerTreeHostImpl::setPageScaleFactorAndLimits):
(WebCore::CCLayerTreeHostImpl::adjustScrollsForPageScaleChange):
(WebCore::CCLayerTreeHostImpl::setScaleDelta):
(WebCore::CCLayerTreeHostImpl::applyScaleDeltaToScrollLayer):
(WebCore::CCLayerTreeHostImpl::scrollRootLayer):
(WebCore::CCLayerTreeHostImpl::processScrollDeltas):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2011-11-16 Joshua Bell <jsbell@chromium.org>
IndexedDB: Reduce nested key depth threshold, re-enable flaky test
https://bugs.webkit.org/show_bug.cgi?id=72529
Reviewed by Adam Barth.
Drop maximum array key depth from 20k to 2k.
* bindings/v8/IDBBindingUtilities.cpp:
2011-11-16 Nate Chapin <japhet@chromium.org>
Fix incorrect multipart handling in r100311.
SubresourceLoader::didReceiveData() is getting called
twice, which has unintended side effects.
https://bugs.webkit.org/show_bug.cgi?id=72436
Reviewed by Adam Barth.
http/tests/multipart/invalid-image-data.html should stop
asserting after this.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::didReceiveData):
(WebCore::SubresourceLoader::sendDataToResource):
* loader/SubresourceLoader.h:
2011-11-16 Justin Schuh <jschuh@chromium.org>
Clear SVG filter client when its node is detached
https://bugs.webkit.org/show_bug.cgi?id=71741
Reviewed by Eric Seidel.
Test: svg/filters/reparent-animated-filter-target.html
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::clientDestroyed):
2011-11-16 John Bates <jbates@google.com>
Page/layer flashes after GPU-accelerated CSS transition
https://bugs.webkit.org/show_bug.cgi?id=72343
LayerRendererChromium was resizing the window to 1x1 at initialization.
In some cases, there is no drawLayers before switching back to
software rendering. This left the window resized to 1x1 and the
following software paints would therefore not be visible. This change
moves the reshape call into drawLayers so that it will only be called
if rendering will occur.
Reviewed by James Robinson.
New test: CCLayerTreeHostImplTest.reshapeNotCalledUntilDraw.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::viewportChanged):
(WebCore::LayerRendererChromium::doViewportChanged):
(WebCore::LayerRendererChromium::drawLayersInternal):
* platform/graphics/chromium/LayerRendererChromium.h:
2011-11-16 Alexandre Elias <aelias@google.com>
[chromium] Add null pointer check in setDeviceScaleFactor
https://bugs.webkit.org/show_bug.cgi?id=72464
Reviewed by James Robinson.
No new tests. (Tiny fix.)
* page/Page.cpp:
(WebCore::Page::setDeviceScaleFactor):
2011-11-16 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100438.
http://trac.webkit.org/changeset/100438
https://bugs.webkit.org/show_bug.cgi?id=72536
Broke unit tests (Requested by jamesr_ on #webkit).
* platform/PlatformScreen.h:
* platform/chromium/PlatformScreenChromium.cpp:
* platform/chromium/PlatformSupport.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::initializeImplOnImplThread):
2011-11-16 Andy Estes <aestes@apple.com>
Assertion failure in LayerFlushScheduler::resume() when running some layout tests in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=72535
Reviewed by Anders Carlsson.
LayerFlushScheduler attempted to use a counter strategy for calls to
suspend() and resume(), which allowed us to assert that these calls
were balanced. Unfortunately it is hard to guarantee this in WebKit2,
where we sometimes try to call suspend() before we've entered
compositing mode (hence before we have a LayerTreeHost and a
LayerFlushScheduler). When we later call resume(), this call ends up
being unbalanced and asserts.
For now, remove the assertions and allow unbalanced calls to suspend()
and resume().
* platform/graphics/ca/LayerFlushScheduler.cpp:
(WebCore::LayerFlushScheduler::suspend):
(WebCore::LayerFlushScheduler::resume):
* platform/graphics/ca/LayerFlushScheduler.h:
* platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
(WebCore::LayerFlushScheduler::LayerFlushScheduler):
(WebCore::LayerFlushScheduler::runLoopObserverCallback):
(WebCore::LayerFlushScheduler::schedule):
2011-11-16 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100473.
http://trac.webkit.org/changeset/100473
https://bugs.webkit.org/show_bug.cgi?id=72534
"Broke the Mac Build" (Requested by mwenge2 on #webkit).
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
(WebCore::RenderObject::addChild):
* rendering/RenderObject.h:
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild):
* rendering/RenderTable.h:
* rendering/RenderTableCaption.cpp: Removed.
* rendering/RenderTableCaption.h: Removed.
2011-11-16 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100479.
http://trac.webkit.org/changeset/100479
https://bugs.webkit.org/show_bug.cgi?id=72533
"Broke the Mac Build" (Requested by mwenge2 on #webkit).
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderingAllInOne.cpp:
2011-11-16 Chris Fleizach <cfleizach@apple.com>
WebKitTestRunner needs to support accessibility-related DRT APIs
https://bugs.webkit.org/show_bug.cgi?id=42131
Minor changes needed to support AX testing in WKTestRunner.
Reviewed by Beth Dakin.
* WebCore.exp.in:
Expose focusedUIElementForPage so that the WK2 injected bundle can retrieve it.
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(accessibilitySearchKeyForString):
Remove an unncessary assert that was causing issues with the WK2 test run.
2011-11-16 Sergio Villar Senin <svillar@igalia.com>
[Soup] Somet tests fail with FAIL Unexpected response data received: Wrong method: GET
https://bugs.webkit.org/show_bug.cgi?id=69219
Reviewed by Martin Robinson.
Do not stop appending data to the request body if any of the blob
items to upload is not accesible.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::addEncodedBlobToSoupMessageBody):
2011-11-16 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=72400
Scrollbar uiStateTransitionProgress requires tracking the mouse all the time
-and corresponding-
<rdar://problem/10409328>
Reviewed by Darin Adler.
This patch makes it so we track the mouse all the time when we have legacy
scrollbars (rather than only tracking the mouse when the window is key). When
we're in that mode, we want to do as little work as possible when handling the
mouseMoved event so that this extra tracking has little to no performance impact.
Also, we don't want to change basic behaviors by having normal web content hover
effects start happening when a window is in the background. So this patch also
introduces a way to handle a mouseMoved event that will only affect scrollbars.
EventHandler::mouseMoved() and EventHandler::handleMouseEvent() both now take a
boolean parameter that indicates if we are only updating scrollbars. If that is
the case, then we make our HitTestRequest ReadOnly, and we return early once
updateLastScrollbarUnderMouse() is called.
* WebCore.exp.in:
* page/EventHandler.cpp:
(WebCore::EventHandler::mouseMoved):
(WebCore::EventHandler::handleMouseMoveEvent):
In addition to calling Scrollbar::mouseExited() when appropriate, this function
now calls a new function, Scrollbar::mouseEntered() when appropriate.
(WebCore::EventHandler::updateLastScrollbarUnderMouse):
* page/EventHandler.h:
Scrollbar::mouseMoved() used to be responsible for calling
ScrollAnimator::mouseEnteredScrollbar(), but now Scrollbar::mouseEntered() takes
care of that instead, much like how Scrollbar::mouseExited() takes care of calling
the animator's exit function.
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::mouseMoved):
(WebCore::Scrollbar::mouseEntered):
* platform/Scrollbar.h:
2011-11-16 Andreas Kling <kling@webkit.org>
CSSValue: isInheritedValue() doesn't need a dedicated bit.
<http://webkit.org/b/72514>
Reviewed by Antti Koivisto.
Remove CSSValue::m_isInherited and have isInheritedValue() check the
class type instead. There's no compelling reason for CSSInheritedValue
to have a dedicated bit, since nobody subclasses it anyway.
* css/CSSValue.h:
(WebCore::CSSValue::isInheritedValue):
(WebCore::CSSValue::CSSValue):
2011-11-16 Robert Hogan <robert@webkit.org>
Fix build on Windows and Mac after r100473
Unreviewed, fix build.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderingAllInOne.cpp:
2011-11-16 Philip Rogers <pdr@google.com>
Remove extra GraphicsContextStateSaver restore() call.
https://bugs.webkit.org/show_bug.cgi?id=72497
Reviewed by Andreas Kling.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawTextInternal):
2011-11-08 Robert Hogan <robert@webkit.org>
CSS 2.1 failure: border-collapse-offset-002.htm fails
https://bugs.webkit.org/show_bug.cgi?id=71705
Table captions are implemented as children of the table but have a special
requirement to expand to the full width of the table rather than just the 'available'
width, i.e. the full width minus padding and borders.
To accomodate this create a RenderTableCaption object that reimplements containingBlockLogicalWidthForContent()
to return the full width of the containing block (i.e. the table) rather than the available width.
Reviewed by Antti Koivisto.
* CMakeLists.txt: Add RenderTableCaption.[cpp|h]
* GNUmakefile.list.am: Add RenderTableCaption.[cpp|h]
* Target.pri: Add RenderTableCaption.[cpp|h]
* WebCore.gypi: Add RenderTableCaption.[cpp|h]
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Use RenderTableCaption
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject): Add RenderTableCaption.[cpp|h]
(WebCore::RenderObject::addChild): ditto
* rendering/RenderObject.h:
(WebCore::RenderObject::isTableCaption):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild):
* rendering/RenderTable.h:
* rendering/RenderTableCaption.cpp: Added.
(WebCore::RenderTableCaption::RenderTableCaption): Implement RenderTableCaption
(WebCore::RenderTableCaption::~RenderTableCaption):
(WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Return the containing block's full width rather than it's available width.
* rendering/RenderTableCaption.h: Added.
(WebCore::RenderTableCaption::isTableCaption):
(WebCore::toRenderTableCaption):
2011-11-16 Antaryami Pandia <antaryami.pandia@motorola.com>
[Gtk] display:none has no effect on <option> element.
https://bugs.webkit.org/show_bug.cgi?id=72370
Reviewed by Martin Robinson.
* platform/gtk/GtkPopupMenu.cpp:
(WebCore::GtkPopupMenu::appendItem):
* platform/gtk/PopupMenuGtk.cpp:
(WebCore::PopupMenuGtk::createGtkActionForMenuItem):
2011-11-16 Dan Winship <danw@gnome.org>
[GTK] Fix platformDefersLoading to handle non-http requests, and
to not use broken-ish libsoup APIs.
https://bugs.webkit.org/show_bug.cgi?id=72227
Reviewed by Martin Robinson.
* platform/network/ResourceHandleInternal.h:
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::sendRequestCallback):
(WebCore::startHTTPRequest):
(WebCore::hasBeenSent):
(WebCore::ResourceHandle::platformSetDefersLoading):
(WebCore::readCallback): rather than deferring by using
soup_session_pause_message(), let the read complete, but just don't
process the result until we're no longer deferred.
(WebCore::startNonHTTPRequest): Don't start the request if
it's deferred.
2011-11-16 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Application cache status should be updated after swapCache().
https://bugs.webkit.org/show_bug.cgi?id=72123
Reviewed by Pavel Feldman.
Application cache view resources and status are now updated after swapCache() call.
Refresh button removed from application cache view.
Application cache inspector tests are moved to their own folder.
Tests: http/tests/inspector/appcache/appcache-iframe-manifests.html
http/tests/inspector/appcache/appcache-manifest-with-non-existing-file.html
http/tests/inspector/appcache/appcache-swap.html
* inspector/front-end/ApplicationCacheItemsView.js:
(WebInspector.ApplicationCacheItemsView):
(WebInspector.ApplicationCacheItemsView.prototype.get statusBarItems):
(WebInspector.ApplicationCacheItemsView.prototype.wasShown):
(WebInspector.ApplicationCacheItemsView.prototype._maybeUpdate):
(WebInspector.ApplicationCacheItemsView.prototype._markDirty):
(WebInspector.ApplicationCacheItemsView.prototype.updateStatus):
(WebInspector.ApplicationCacheItemsView.prototype._updateCallback):
(WebInspector.ApplicationCacheItemsView.prototype._deleteCallback):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::setNewestCache):
(WebCore::ApplicationCacheGroup::makeObsolete):
(WebCore::ApplicationCacheGroup::setUpdateStatus):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
(WebCore::ApplicationCacheHost::swapCache):
2011-11-16 Eric Carlson <eric.carlson@apple.com>
addTrack() must throw an exception if 'kind' is unknown
https://bugs.webkit.org/show_bug.cgi?id=71915
Reviewed by Philippe Normand.
Tests: media/track/track-addtrack-kind.html
media/track/track-kind.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::textTrackKindChanged): New. Will be implemented for 62885.
(WebCore::HTMLMediaElement::addTrack): Throw if 'kind' is not a known value.
(WebCore::HTMLMediaElement::addTextTrack): Call textTracks(), it will allocate the track
list object if necessary.
(WebCore::HTMLMediaElement::textTracks): Never return NULL, a TextTrackList with no tracks
is allowed.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::addTrack): Add variants to deal with optional parameters plus
a mandatory ExceptionCode parameter.
* html/HTMLMediaElement.idl: addTrack can generate an exception.
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::attributeChanged): kind, label, and srclang attribute changes should
percolate down the the TextTrack.
(WebCore::HTMLTrackElement::kind): Return the TextTrack kind because it is not necessarily the
same as the attribute value.
(WebCore::HTMLTrackElement::ensureTrack): Only pass legal 'kind' keywords to create a TextTrack.
(WebCore::HTMLTrackElement::textTrackKindChanged): Notify parent element, if any.
* html/HTMLTrackElement.h:
* html/TextTrack.cpp:
(WebCore::TextTrack::subtitlesKeyword): New, return legal kind attribute value.
(WebCore::TextTrack::captionsKeyword): Ditto.
(WebCore::TextTrack::descriptionsKeyword): Ditto.
(WebCore::TextTrack::chaptersKeyword): Ditto.
(WebCore::TextTrack::metadataKeyword): Ditto.
(WebCore::TextTrack::TextTrack): Call setKind to make sure m_kind is always set to legal value.
(WebCore::TextTrack::isValidKindKeyword): New, validate 'kind' value.
(WebCore::TextTrack::setKind): Only allow legal values.
* html/TextTrack.h:
(WebCore::TextTrack::kind):
(WebCore::TextTrack::label):
(WebCore::TextTrack::setLabel):
(WebCore::TextTrack::language):
(WebCore::TextTrack::setLanguage):
(WebCore::TextTrack::readyState):
(WebCore::TextTrack::mode):
2011-11-16 Andreas Kling <kling@webkit.org>
CSSValue: Clean up initial value construction.
<http://webkit.org/b/72502>
Reviewed by Antti Koivisto.
Instead of determining whether a given CSSInitialValue is 'implicit' or not by
querying the CSSValue::ClassType (InitialClass vs. ImplicitInitialClass),
add a protected CSSValue member and set it from the CSSInitialValue constructor.
Also get rid of the CSSValue::m_isInitial bit since we can now replace the
checks by classType() == InitialClass.
No new tests, this is a cleanup.
* css/CSSInitialValue.h:
(WebCore::CSSInitialValue::CSSInitialValue):
Poke 'implicit' constructor argument into CSSValue::m_isImplicit.
* css/CSSValue.cpp:
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
Remove ImplicitInitialClass cases.
* css/CSSValue.h:
(WebCore::CSSValue::isImplicitInitialValue):
(WebCore::CSSValue::isInitialValue):
(WebCore::CSSValue::CSSValue):
2011-11-16 Antaryami Pandia <antaryami.pandia@motorola.com>
Remove unnecessary if check from RenderListBox::paintItemForeground.
https://bugs.webkit.org/show_bug.cgi?id=72488
Reviewed by Andreas Kling.
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItemForeground):
2011-11-15 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Centralize hide_symbols and ensure all libs are built with symbol visibility & bsymbolic_functions
Reviewed by Tor Arne Vestbø.
* Target.pri: Eliminate duplicated symbol stuff that lives now in default_post.prf.
2011-11-16 Iain Merrick <husky@google.com>
[chromium] Pass screen refresh rate into compositor.
https://bugs.webkit.org/show_bug.cgi?id=71040
Reviewed by Tony Gentilcore.
* platform/PlatformScreen.h:
* platform/chromium/PlatformScreenChromium.cpp:
(WebCore::screenRefreshRate):
* platform/chromium/PlatformSupport.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::initializeImplOnImplThread):
2011-11-15 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: [Extensions API] drop ExtensionSidebarPane.onUpdated, use callbacks instead
https://bugs.webkit.org/show_bug.cgi?id=72388
Reviewed by Pavel Feldman.
Tests: inspector/extensions/extensions-panel.html
inspector/extensions/extensions-sidebar.html
- fire ExtensionSidebarPane.on{Hidden,Shown} for non-iframe content (experssions/objects);
- drop ExtensionsSidebarPane.onUpdated, provide callback for setObject()/setExpression() instead;
- fix an exception when a page is replaced with object/expression.
inspector/front-end/ExtensionAPI.js:
(injectedExtensionAPI.ExtensionSidebarPaneImpl):
(injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setExpression):
(injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setObject):
* inspector/front-end/ExtensionPanel.js:
(WebInspector.ExtensionNotifierView):
(WebInspector.ExtensionNotifierView.prototype.wasShown):
(WebInspector.ExtensionNotifierView.prototype.willHide):
(WebInspector.ExtensionSidebarPane.prototype.setObject):
(WebInspector.ExtensionSidebarPane.prototype.setExpression):
(WebInspector.ExtensionSidebarPane.prototype.setPage):
(WebInspector.ExtensionSidebarPane.prototype._onEvaluate):
(WebInspector.ExtensionSidebarPane.prototype._makeObjectPropertiesView):
(WebInspector.ExtensionSidebarPane.prototype._setObject):
* inspector/front-end/ExtensionServer.js:
(WebInspector.ExtensionServer.prototype._onSetSidebarContent.callback):
(WebInspector.ExtensionServer.prototype._onSetSidebarContent):
(WebInspector.ExtensionServer.prototype._dispatchCallback):
* inspector/front-end/View.js:
(WebInspector.View.prototype.detach):
2011-11-16 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed, rolling out r100266.
http://trac.webkit.org/changeset/100266
Broke WTR.
* Target.pri:
2011-11-16 Per-Erik Brodin <per-erik.brodin@ericsson.com>
[GTK] fast/events/event-creation.html fails creating MediaStreamEvent
https://bugs.webkit.org/show_bug.cgi?id=70720
Reviewed by Philippe Normand.
Added missing overriding of Event::interfaceName()
* mediastream/MediaStreamEvent.cpp:
(WebCore::MediaStreamEvent::stream): Changed return value to raw pointer.
(WebCore::MediaStreamEvent::interfaceName): Added back from r98044.
* mediastream/MediaStreamEvent.h:
* mediastream/MediaStreamEvent.idl: Changed module name to "events".
2011-11-16 Mario Sanchez Prada <msanchez@igalia.com>
[GTK] Use GQuark's in the ATK wrapper to get and set arbitrary data
https://bugs.webkit.org/show_bug.cgi?id=72394
Reviewed by Martin Robinson.
No new functionality, no new tests needed.
* accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
(webkit_accessible_class_init): Initialize GQuarks.
(getGailTextUtilForAtk): Use gailTextUtilQuark.
(getPangoLayoutForAtk): Remove unused call to
g_object_set_data_full, since that data is no used anywhere.
(webkitAccessibleHyperlinkImplGetHyperlink): Use hyperlinkObjectQuark.
2011-11-15 Alexandru Chiculita <achicu@adobe.com>
[CSSShaders] Implement the style cached resources and computed style for the shader urls
https://bugs.webkit.org/show_bug.cgi?id=72378
Reviewed by Dean Jackson.
Test: css3/filters/custom-filter-property-computed-style.html
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::valueForFilter):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::CSSStyleSelector):
(WebCore::CSSStyleSelector::styleForKeyframe):
(WebCore::CSSStyleSelector::pseudoStyleForElement):
(WebCore::CSSStyleSelector::styleForPage):
(WebCore::CSSStyleSelector::applyMatchedDeclarations):
(WebCore::CSSStyleSelector::styleShader):
(WebCore::CSSStyleSelector::cachedOrPendingStyleShaderFromValue):
(WebCore::CSSStyleSelector::loadPendingShaders):
(WebCore::CSSStyleSelector::createCustomFilterOperation):
(WebCore::CSSStyleSelector::createFilterOperations):
* css/CSSStyleSelector.h:
* css/WebKitCSSShaderValue.cpp:
(WebCore::WebKitCSSShaderValue::WebKitCSSShaderValue):
(WebCore::WebKitCSSShaderValue::~WebKitCSSShaderValue):
(WebCore::WebKitCSSShaderValue::cachedShader):
(WebCore::WebKitCSSShaderValue::cachedOrPendingShader):
* css/WebKitCSSShaderValue.h:
* loader/cache/CachedResource.cpp:
(WebCore::defaultPriorityForResourceType):
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource):
(WebCore::CachedResourceLoader::requestShader):
(WebCore::CachedResourceLoader::checkInsecureContent):
(WebCore::CachedResourceLoader::canRequest):
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedShader.cpp:
(WebCore::CachedShader::CachedShader):
(WebCore::CachedShader::~CachedShader):
* loader/cache/CachedShader.h:
* platform/graphics/filters/CustomFilterOperation.h:
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::filter):
* rendering/style/StyleCachedShader.cpp:
(WebCore::StyleCachedShader::StyleCachedShader):
(WebCore::StyleCachedShader::cssValue):
* rendering/style/StyleCachedShader.h:
(WebCore::StyleCachedShader::create):
* rendering/style/StylePendingShader.h:
(WebCore::StylePendingShader::create):
(WebCore::StylePendingShader::cssValue):
(WebCore::StylePendingShader::cssShaderValue):
(WebCore::StylePendingShader::StylePendingShader):
* rendering/style/StyleShader.h:
(WebCore::StyleShader::~StyleShader):
(WebCore::StyleShader::isCachedShader):
(WebCore::StyleShader::isPendingShader):
(WebCore::StyleShader::StyleShader):
2011-11-15 Sergio Villar Senin <svillar@igalia.com>
[WK2] [GTK] fast/css/webkit-mask-crash-fieldset-legend.html asserts WebKitWebProcess
https://bugs.webkit.org/show_bug.cgi?id=69510
Reviewed by Simon Fraser.
End the current transparency layer before early returning from
paintMask() when there is a maskBoxImage which is still being
loaded. This will balance the previous call to
beginTransparencyLayer().
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintMask):
2011-11-15 Darin Adler <darin@apple.com>
Incorrect type checks in RenderTheme media code
https://bugs.webkit.org/show_bug.cgi?id=72184
Reviewed by Eric Carlson.
No tests added. Ideally this patch should be revised to add tests!
* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaControl::create): Use mediaControlElementType.
(WebCore::AccessibilityMediaControl::controlType): Ditto.
(WebCore::AccessibilityMediaTimeline::valueDescription): Use early return
rather than an assertion to check type of input element.
* html/shadow/MediaControlElements.cpp:
(WebCore::mediaControlElementType): Added. A type-safe way to get the
media control element type after checking isMediaControlElement but with
no other assumptions.
* html/shadow/MediaControlElements.h: Added mediaControlElementType.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::paintMediaPlayButton): Use mediaControlElementType.
(WebCore::RenderThemeEfl::paintMediaSeekBackButton): Use mediaControlElementType.
(WebCore::RenderThemeEfl::paintMediaSeekForwardButton): Use mediaControlElementType.
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintMediaPlayButton): Check isMediaControlElement and
use mediaControlElementType.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMediaMuteButton): Ditto. Also remove uneeded
redundant null check.
(WebCore::RenderThemeMac::paintMediaPlayButton): Ditto.
(WebCore::RenderThemeMac::paintMediaToggleClosedCaptionsButton): Ditto.
2011-11-15 Jeff Timanus <twiz@chromium.org>
[chromium] During tear down, prevent the WebGLLayerChromium instance from attempting to stop a timer for a NULL context.
https://bugs.webkit.org/show_bug.cgi?id=72423
Reviewed by Kenneth Russell.
* platform/graphics/chromium/WebGLLayerChromium.cpp:
(WebCore::WebGLLayerChromium::setDrawingBuffer):
2011-11-15 Mark Hahnenberg <mhahnenberg@apple.com>
Rebaseline generated WebCore bindings
Unreviewed build fix
No new tests.
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::isObservable):
(WebCore::JSTestEventConstructorOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestEventConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::clearImpl):
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::JSTestInterface::clearImpl):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::isObservable):
(WebCore::JSTestMediaQueryListListenerOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestMediaQueryListListenerOwner::finalize):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::clearImpl):
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::JSTestNamedConstructor::clearImpl):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::isObservable):
(WebCore::JSTestObjOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestObjOwner::finalize):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::clearImpl):
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::isObservable):
(WebCore::JSTestSerializedScriptValueInterfaceOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::clearImpl):
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
2011-11-15 Jeff Timanus <twiz@chromium.org>
Patch removing duplicated code in the setup of the DrawingBuffer used
to host the back-buffer for WebGL contents.
https://bugs.webkit.org/show_bug.cgi?id=72327
Reviewed by Kenneth Russell.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::copyTexImage2D):
(WebCore::WebGLRenderingContext::copyTexSubImage2D):
(WebCore::WebGLRenderingContext::readPixels):
2011-11-15 Mark Hahnenberg <mhahnenberg@apple.com>
JS DOM wrappers depend on destructor to deref impl RefPtrs
https://bugs.webkit.org/show_bug.cgi?id=72341
Reviewed by Sam Weinig.
No new tests.
Added clearing of impl RefPtrs to JS DOM wrapper nodes and removed the default
wrapperOwner function in favor of generating all WeakHandleOwners and wrapperOwner functions.
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::JSCSSValueOwner::finalize):
* bindings/js/JSDOMBinding.h:
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNodeOwner::finalize):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
2011-11-15 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Share Highlight Code for Drawing Outlined Quad
https://bugs.webkit.org/show_bug.cgi?id=72451
Reviewed by Timothy Hatcher.
* inspector/DOMNodeHighlighter.cpp:
2011-11-15 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100308.
http://trac.webkit.org/changeset/100308
https://bugs.webkit.org/show_bug.cgi?id=72450
Introduces WebGL conformance test regressions. (Requested by
twiz on #webkit).
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::copyTexImage2D):
(WebCore::WebGLRenderingContext::copyTexSubImage2D):
(WebCore::WebGLRenderingContext::readPixels):
2011-11-15 James Robinson <jamesr@chromium.org>
Rollout http://trac.webkit.org/changeset/99813, caused some crashes in
TiledLayerChromium::updateCompositorResources()
* WebCore.gypi:
* platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: Removed.
* platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: Removed.
* platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: Removed.
* platform/graphics/chromium/CanvasLayerTextureUpdater.h: Removed.
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::createTextureUpdater):
* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h: Removed.
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerTextureUpdater::prepareToUpdate):
* platform/graphics/chromium/LayerRendererChromium.cpp:
* platform/graphics/chromium/LayerTextureUpdater.h:
* platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: Renamed from Source/WebCore/platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp.
(WebCore::FrameBuffer::FrameBuffer::FrameBuffer):
(WebCore::FrameBuffer::FrameBuffer::~FrameBuffer):
(WebCore::FrameBuffer::FrameBuffer::initialize):
(WebCore::LayerTextureUpdaterCanvas::LayerTextureUpdaterCanvas):
(WebCore::LayerTextureUpdaterCanvas::paintContents):
(WebCore::LayerTextureUpdaterBitmap::create):
(WebCore::LayerTextureUpdaterBitmap::LayerTextureUpdaterBitmap):
(WebCore::LayerTextureUpdaterBitmap::sampledTexelFormat):
(WebCore::LayerTextureUpdaterBitmap::prepareToUpdate):
(WebCore::LayerTextureUpdaterBitmap::updateTextureRect):
(WebCore::LayerTextureUpdaterSkPicture::create):
(WebCore::LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture):
(WebCore::LayerTextureUpdaterSkPicture::~LayerTextureUpdaterSkPicture):
(WebCore::LayerTextureUpdaterSkPicture::sampledTexelFormat):
(WebCore::LayerTextureUpdaterSkPicture::prepareToUpdate):
(WebCore::LayerTextureUpdaterSkPicture::updateTextureRect):
* platform/graphics/chromium/LayerTextureUpdaterCanvas.h: Added.
(WebCore::LayerTextureUpdaterCanvas::contentRect):
(WebCore::LayerTextureUpdaterBitmap::orientation):
(WebCore::LayerTextureUpdaterSkPicture::orientation):
* platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp: Removed.
* platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h: Removed.
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::UpdatableTile::UpdatableTile):
(WebCore::UpdatableTile::texture):
(WebCore::TiledLayerChromium::updateCompositorResources):
(WebCore::TiledLayerChromium::pushPropertiesTo):
(WebCore::TiledLayerChromium::createTile):
(WebCore::TiledLayerChromium::protectTileTextures):
(WebCore::TiledLayerChromium::prepareToUpdate):
* platform/graphics/chromium/cc/CCTextureUpdater.cpp:
(WebCore::CCTextureUpdater::append):
(WebCore::CCTextureUpdater::update):
* platform/graphics/chromium/cc/CCTextureUpdater.h:
2011-11-15 Julien Chaffraix <jchaffraix@webkit.org>
Add the needed plumbing to parse display: -webkit-inline-grid
https://bugs.webkit.org/show_bug.cgi?id=72438
Reviewed by Tony Chang.
Test: fast/css-grid-layout/display-grid-set-get.html
Added the needed constants and plugged everything together.
Again we treat display: -webkit-inline-grid like display: none
for the moment.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSValueKeywords.in:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
* rendering/style/RenderStyleConstants.h:
2011-11-15 W. James MacLean <wjmaclean@chromium.org>
[chromium] Move setVisibleRect() calls into calculateDrawTransformAndVisibility()
https://bugs.webkit.org/show_bug.cgi?id=72162
Reviewed by Kenneth Russell.
Refactoring of existing functionality, so uses existing tests.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawLayer):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::paintContentsIfDirty):
(WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
(WebCore::CCLayerTreeHost::paintLayerContents):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::walkLayersAndCalculateVisibleLayerRects):
(WebCore::CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility):
2011-11-15 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100340.
http://trac.webkit.org/changeset/100340
https://bugs.webkit.org/show_bug.cgi?id=72448
Caused assertion failure in Win dbg canary. (Requested by
pkasting on #webkit).
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::LayerRendererChromium):
(WebCore::LayerRendererChromium::viewportChanged):
(WebCore::LayerRendererChromium::drawLayersInternal):
* platform/graphics/chromium/LayerRendererChromium.h:
2011-11-15 Julien Chaffraix <jchaffraix@webkit.org>
Switch table indexing to unsigned
https://bugs.webkit.org/show_bug.cgi?id=72083
Reviewed by Darin Adler.
No expected change in behavior.
All of the code is now using unsigned for indexing!
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::layout):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::colElement):
(WebCore::RenderTable::cellAbove):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::splitColumn):
Added some ASSERTs to make sure we don't underflow. Looking at how
the different variables are populated, they should not be reached.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::colSpan):
(WebCore::RenderTableCell::rowSpan):
Those 2 functions promotes HTMLTableCellElement's int to unsigned
which should be fine as we make sure their are positive. Also HTML5
makes those 2 fields "unsigned long" which goes in the same direction.
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::nodeAtPoint):
Rewrote a couple of reverse iterating to be able to use unsigned
without overflowing.
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
(WebCore::AutoTableLayout::fullRecalc):
(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
(WebCore::AutoTableLayout::insertSpanCell):
* rendering/AutoTableLayout.h:
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::calcWidthArray):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::splitColumn):
(WebCore::RenderTable::appendColumn):
(WebCore::RenderTable::recalcSections):
* rendering/RenderTable.h:
(WebCore::RenderTable::getColumnPos):
(WebCore::RenderTable::spanOfEffCol):
(WebCore::RenderTable::effColToCol):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::styleOrColLogicalWidth):
(WebCore::CollapsedBorders::nextBorder):
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::updateFromElement):
* rendering/RenderTableCol.h:
(WebCore::RenderTableCol::span):
(WebCore::RenderTableCol::setSpan):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addCell):
(WebCore::RenderTableSection::setCellLogicalWidths):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::calcOuterBorderBefore):
(WebCore::RenderTableSection::calcOuterBorderAfter):
(WebCore::RenderTableSection::calcOuterBorderStart):
(WebCore::RenderTableSection::calcOuterBorderEnd):
(WebCore::RenderTableSection::paintObject):
(WebCore::RenderTableSection::appendColumn):
* rendering/RenderTableSection.h:
(WebCore::RenderTableSection::cellAt):
(WebCore::RenderTableSection::primaryCellAt):
(WebCore::RenderTableSection::getBaseline):
Mechanical change int -> unsigned.
2011-11-15 Andy Estes <aestes@apple.com>
Consolidate the logic that creates run loop observers for flushing layer tree changes to CoreAnimation
https://bugs.webkit.org/show_bug.cgi?id=72106
Reviewed by Anders Carlsson.
Add a class that encapsulates the logic of scheduling, enabling and
invalidating a run loop observer that fires before Core Animation's
commit observer. Clients can subclass LayerFlushSchedulerClient and
implement flushLayers(), which will be called by the observer.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/ca/LayerFlushScheduler.cpp: Added.
(WebCore::LayerFlushScheduler::suspend): Suspend scheduling by
invalidating the run loop observer. Keep a count of calls to suspend()
in m_suspendCount.
(WebCore::LayerFlushScheduler::resume): Decrement m_suspendCount.
Install the run loop observer when it reaches 0.
* platform/graphics/ca/LayerFlushSchedulerClient.h: Added.
(WebCore::LayerFlushSchedulerClient::~LayerFlushSchedulerClient):
* platform/graphics/ca/LayerFlushScheduler.h: Added.
* platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp: Added.
(LayerFlushScheduler::LayerFlushScheduler):
(LayerFlushScheduler::~LayerFlushScheduler):
(LayerFlushScheduler::runLoopObserverCallback): Call flushLayers() on
the LayerFlushSchedulerClient.
(LayerFlushScheduler::schedule): Install the run loop observer.
(LayerFlushScheduler::invalidate): Remove the run loop
observer if it is installed.
2011-11-15 Adam Klein <adamk@chromium.org>
[v8] Use throwError instead of compiling and running script in handleMaxRecursionDepthExceeded
https://bugs.webkit.org/show_bug.cgi?id=72432
Reviewed by Adam Barth.
* bindings/v8/V8Proxy.cpp:
(WebCore::handleMaxRecursionDepthExceeded):
2011-11-15 Vincent Scheib <scheib@chromium.org>
Pointer Lock: Refactoring: PointerLock.idl: Dropping webkit prefix
https://bugs.webkit.org/show_bug.cgi?id=72431
Reviewed by Adam Barth.
* page/PointerLock.cpp:
(WebCore::PointerLock::lock):
(WebCore::PointerLock::unlock):
(WebCore::PointerLock::isLocked):
* page/PointerLock.h:
* page/PointerLock.idl:
2011-11-15 Nat Duca <nduca@chromium.org>
[chromium] Fuse MainThread and CCThread
https://bugs.webkit.org/show_bug.cgi?id=72426
Reviewed by James Robinson.
* WebCore.gypi:
* platform/graphics/chromium/LayerRendererChromium.cpp:
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::CCLayerTreeHost):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
* platform/graphics/chromium/cc/CCMainThread.cpp: Removed.
* platform/graphics/chromium/cc/CCMainThread.h: Removed.
* platform/graphics/chromium/cc/CCMainThreadTask.h: Removed.
* platform/graphics/chromium/cc/CCProxy.cpp:
(WebCore::CCProxy::setMainThread):
(WebCore::CCProxy::mainThread):
(WebCore::CCProxy::setImplThread):
(WebCore::CCProxy::implThread):
(WebCore::CCProxy::isMainThread):
(WebCore::CCProxy::isImplThread):
(WebCore::CCProxy::~CCProxy):
* platform/graphics/chromium/cc/CCProxy.h:
* platform/graphics/chromium/cc/CCScopedThreadProxy.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCScopedMainThreadProxy.h.
(WebCore::CCScopedThreadProxy::create):
(WebCore::CCScopedThreadProxy::postTask):
(WebCore::CCScopedThreadProxy::shutdown):
(WebCore::CCScopedThreadProxy::CCScopedThreadProxy):
(WebCore::CCScopedThreadProxy::runTaskIfNotShutdown):
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::CCThreadProxy):
(WebCore::CCThreadProxy::compositeAndReadback):
(WebCore::CCThreadProxy::finishAllRendering):
(WebCore::CCThreadProxy::initializeLayerRenderer):
(WebCore::CCThreadProxy::setNeedsAnimate):
(WebCore::CCThreadProxy::setNeedsCommit):
(WebCore::CCThreadProxy::onSwapBuffersCompleteOnImplThread):
(WebCore::CCThreadProxy::setNeedsRedraw):
(WebCore::CCThreadProxy::setVisible):
(WebCore::CCThreadProxy::start):
(WebCore::CCThreadProxy::stop):
(WebCore::CCThreadProxy::obtainBeginFrameAndCommitTaskFromCCThread):
(WebCore::CCThreadProxy::createBeginFrameAndCommitTaskOnImplThread):
(WebCore::CCThreadProxy::beginFrameAndCommit):
(WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
(WebCore::CCThreadProxy::initializeImplOnImplThread):
* platform/graphics/chromium/cc/CCThreadProxy.h:
2011-11-15 Vincent Scheib <scheib@chromium.org>
Pointer Lock: Refactor: MouseEvent.idl movementX/Y
https://bugs.webkit.org/show_bug.cgi?id=72427
- [Conditional...] vs #if defined
- Runtime enabled
- .movementX/Y prefixed with 'webkit'
Reviewed by Adam Barth.
No new tests.
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::webkitMovementXEnabled):
(WebCore::RuntimeEnabledFeatures::webkitMovementYEnabled):
* dom/MouseEvent.idl:
* dom/MouseRelatedEvent.h:
(WebCore::MouseRelatedEvent::webkitMovementX):
(WebCore::MouseRelatedEvent::webkitMovementY):
2011-10-28 Ojan Vafai <ojan@chromium.org>
implement flex-align for flex-flow: column
https://bugs.webkit.org/show_bug.cgi?id=70754
Reviewed by David Hyatt.
Tests: css3/flexbox/flex-align-column.html
css3/flexbox/line-wrapping.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::sizesToIntrinsicLogicalWidth):
When flexitems are column, they should size to the intrinsic width unless flex-flow is stretch.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::alignChildrenBlockDirection):
This was just using the wrong, non-flow-aware method.
2011-11-15 Jochen Eisinger <jochen@chromium.org>
Rename ReferrerPolicy to clarify its meaning
https://bugs.webkit.org/show_bug.cgi?id=72420
Reviewed by Nate Chapin.
On the one hand, even if the ReferrerPolicy was set to SendReferrer, the
referrer wasn't necessarily send. On the other hand, I want to use the
name ReferrerPolicy when implementing the meta referrer tag.
No change in behavior expected so no test.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::handleClick):
(WebCore::handleLinkClick):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::changeLocation):
(WebCore::FrameLoader::urlSelected):
(WebCore::FrameLoader::loadFrameRequest):
* loader/FrameLoader.h:
* loader/FrameLoaderTypes.h:
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledHistoryNavigation::fire):
(WebCore::ScheduledFormSubmission::fire):
* page/ContextMenuController.cpp:
(WebCore::openNewWindow):
(WebCore::ContextMenuController::contextMenuItemSelected):
* WebCore.exp.in: updated.
2011-11-15 Adam Klein <adamk@chromium.org>
Factor out V8Proxy's max recursion depth handling code
https://bugs.webkit.org/show_bug.cgi?id=72422
Reviewed by Nate Chapin.
Previously, V8Proxy used slightly different code to handle stack limit
violations depending on whether they occured in runScript or
callFunction. As described in http://webkit.org/b/72063, I intend to
expand the usage of m_recursion when calling into script. This patch
is intended to unify the existing handling code, making it easier to
move elsewhere without causing unintended side-effects.
No tests changed, as the only change in behavior is the string passed
to RangeError in the runScript case, and it's not mentioned anywhere
in the LayoutTests.
* bindings/v8/V8Proxy.cpp:
(WebCore::handleMaxRecursionDepthExceeded):
(WebCore::V8Proxy::runScript): Use callFunction's factored-out code.
(WebCore::V8Proxy::callFunction): Simplify and factor out code into handleMaxRecursionDepthExceeded.
2011-11-15 Jessie Berlin <jberlin@apple.com>
NSURLRequest leak beneath ResourceRequest::setStorageSession seen on Leaks bot.
https://bugs.webkit.org/show_bug.cgi?id=72419
Reviewed by Adam Roben.
Adopt the copied NSURLRequest.
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::setStorageSession):
2011-11-15 John Bates <jbates@google.com>
Page/layer flashes after GPU-accelerated CSS transition
https://bugs.webkit.org/show_bug.cgi?id=72343
LayerRendererChromium was resizing the window to 1x1 at initialization.
In some cases, there is no drawLayers before switching back to
software rendering. This left the window resized to 1x1 and the
following software paints would therefore not be visible. This change
moves the reshape call into drawLayers so that it will only be called
if rendering will occur.
Reviewed by James Robinson.
New test: CCLayerTreeHostImplTest.reshapeNotCalledUntilDraw.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::viewportChanged):
(WebCore::LayerRendererChromium::doViewportChanged):
(WebCore::LayerRendererChromium::drawLayersInternal):
* platform/graphics/chromium/LayerRendererChromium.h:
2011-11-15 Julien Chaffraix <jchaffraix@webkit.org>
Add the needed plumbing to parse display: -webkit-grid
https://bugs.webkit.org/show_bug.cgi?id=72331
Reviewed by Tony Chang.
Test: fast/css-grid-layout/display-grid-set-get.html
Added parsing support for display: -webkit-grid. From a rendering perspective,
the value is equivalent to display: none until we properly implement it.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSValueKeywords.in:
* rendering/style/RenderStyleConstants.h:
Added the new CSS value and plumbed the parsing and style application of
the new value.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator EDisplay):
Added an ASSERT here as I bumped into some non-trivial issues due to bug 72296.
-wap-marquee was offsetting the new value and was wrongly casted by the CSSPrimitiveValueMapping
logic outside the EDisplay range which would lead to crashes.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
Fixed the indentation to follow our coding rules.
2011-11-15 Vincent Scheib <scheib@chromium.org>
Mouse Lock: Renaming to 'Pointer Lock': MouseLockable to PointerLock
https://bugs.webkit.org/show_bug.cgi?id=72315
Reviewed by Dimitri Glazkov.
* WebCore.gypi:
* page/Navigator.cpp:
(WebCore::Navigator::webkitPointer):
* page/Navigator.h:
* page/Navigator.idl:
* page/PointerLock.cpp: Renamed from Source/WebCore/page/MouseLockable.cpp.
(WebCore::PointerLock::PointerLock):
(WebCore::PointerLock::~PointerLock):
(WebCore::PointerLock::webkitLock):
(WebCore::PointerLock::webkitUnlock):
(WebCore::PointerLock::webkitIsLocked):
* page/PointerLock.h: Renamed from Source/WebCore/page/MouseLockable.h.
(WebCore::PointerLock::create):
* page/PointerLock.idl: Renamed from Source/WebCore/page/MouseLockable.idl.
2011-10-28 Ojan Vafai <ojan@chromium.org>
Overflow and relayout are broken in the new flexboxes
https://bugs.webkit.org/show_bug.cgi?id=71161
Reviewed by David Hyatt.
Tests: css3/flexbox/auto-height-dynamic.html
css3/flexbox/flex-item-child-overflow-expected.html
css3/flexbox/flex-item-child-overflow.html
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
-Always set the logical height to 0 to start with to ensure we don't
use the height from the previous layout when we are computing the
intrinsic size of the flexbox.
-Call computeOverflow after computeLogicalHeight so that flex-item's children's
overflow is properly rendered.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection):
-Now that we setLogicalHeight in layoutBlock, we no longer need to do it here.
-Refactor flipping code. The behavior is the same, but the variable names are just
more correct.
2011-10-28 Ojan Vafai <ojan@chromium.org>
Overflow and relayout are broken in the new flexboxes
https://bugs.webkit.org/show_bug.cgi?id=71161
Reviewed by David Hyatt.
Tests: css3/flexbox/auto-height-dynamic.html
css3/flexbox/flex-item-child-overflow-expected.html
css3/flexbox/flex-item-child-overflow.html
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
-Always set the logical height to 0 to start with to ensure we don't
use the height from the previous layout when we are computing the
intrinsic size of the flexbox.
-Call computeOverflow after computeLogicalHeight so that flex-item's children's
overflow is properly rendered.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection):
-Now that we setLogicalHeight in layoutBlock, we no longer need to do it here.
-Refactor flipping code. The behavior is the same, but the variable names are just
more correct.
2011-11-15 Nate Chapin <japhet@chromium.org>
CachedResourceRequest is now the only SubresourceLoaderClient
Merge CachedResourceRequest into SubresourceLoader and delete
the SubresourceLoaderClient interface. A few items were moved
to CachedResource instead of SubresourceLoader.
https://bugs.webkit.org/show_bug.cgi?id=71149
Reviewed by Adam Barth.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* loader/ResourceLoadScheduler.cpp:
* loader/ResourceLoadScheduler.h:
* loader/ResourceLoader.cpp:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::SubresourceLoader):
(WebCore::SubresourceLoader::create):
(WebCore::SubresourceLoader::init): Do work that had previously been
done in SubresourceLoader::create() after the constructor.
(WebCore::SubresourceLoader::willSendRequest):
(WebCore::SubresourceLoader::didSendData):
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::didReceiveData):
(WebCore::SubresourceLoader::didReceiveCachedMetadata):
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::willCancel):
(WebCore::SubresourceLoader::releaseResources): Do the cleanup work that was
duplicated throughout the various terminal CachedResourceRequest callbacks.
* loader/SubresourceLoader.h: Fix indentation style issues.
* loader/SubresourceLoaderClient.h: Removed.
* loader/cache/CachedImage.cpp:
* loader/cache/CachedRawResource.cpp:
* loader/cache/CachedResource.cpp:
(WebCore::cachedResourceTypeToTargetType):
(WebCore::CachedResource::load): Do the work that had been done in
CachedResourceRequest::load().
(WebCore::CachedResource::finish):
(WebCore::CachedResource::setResponse):
(WebCore::CachedResource::stopLoading):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::canDelete):
* loader/cache/CachedResourceLoader.cpp:
* loader/cache/CachedResourceRequest.cpp: Removed.
* loader/cache/CachedResourceRequest.h: Removed.
* loader/cf/SubresourceLoaderCF.cpp:
* loader/chromium/CachedResourceRequestChromium.cpp: Removed.
* loader/chromium/SubresourceLoaderChromium.cpp:
2011-11-15 Anders Carlsson <andersca@apple.com>
HostWindow screenToWindow/windowToScreen should be screenToRootView/rootViewToScreen
https://bugs.webkit.org/show_bug.cgi?id=72397
Reviewed by Dan Bernstein.
screenToWindow and windowToScreen already use root view coordinates everywhere, with the
exception of Mac WebKit1 which doesn't even implement the functions.
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper position]):
* loader/EmptyClients.h:
* page/Chrome.cpp:
(WebCore::Chrome::screenToRootView):
(WebCore::Chrome::rootViewToScreen):
* page/Chrome.h:
* page/ChromeClient.h:
* platform/HostWindow.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::contentsToScreen):
(WebCore::ScrollView::screenToContents):
* platform/chromium/PopupContainer.cpp:
(WebCore::PopupContainer::layoutAndCalculateWidgetRect):
(WebCore::PopupContainer::refresh):
2011-11-15 Jeff Timanus <twiz@chromium.org>
Patch removing duplicated code in the setup of the DrawingBuffer used
to host the back-buffer for WebGL contents.
https://bugs.webkit.org/show_bug.cgi?id=72327
Reviewed by Julien Chaffraix.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::copyTexImage2D):
(WebCore::WebGLRenderingContext::copyTexSubImage2D):
(WebCore::WebGLRenderingContext::readPixels):
2011-11-15 Eugene Nalimov <enal@google.com>
Event listener for active DOM object that is also DOM node can be garbage collected prematurely.
https://bugs.webkit.org/show_bug.cgi?id=70421
Reviewed by Adam Barth.
Problem demonstrated itself when HTMLAudioElement was changed to become active DOM object.
Before that there were no DOM objects that simultaneously were nodes and active objects.
DOM object could be held in one of 3 maps -- node map, active objects map, and all other
objects map, and HTMLAudioElement should be in 2 maps simultaneously. When it was in the
active DOM objects map only, its event listener could be garbage collected, because special
code that groups listeners with wrappers could handle only wrappers for objects in the node
map. If we put HTMLAudioElement into nodes map, it would not be active DOM node, and can be
garbage collected prematurely itself (see https://bugs.webkit.org/show_bug.cgi?id=66878).
Fix is to introduce 4th map -- active nodes map, and change the code accordingly.
Test: media/audio-garbage-collect.html
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNamedConstructorCallback):
(GetDomMapFunction):
* bindings/v8/DOMDataStore.cpp:
(WebCore::DOMDataStore::DOMDataStore):
(WebCore::DOMDataStore::getDOMWrapperMap):
(WebCore::DOMDataStore::weakNodeCallback):
* bindings/v8/DOMDataStore.h:
(WebCore::DOMDataStore::activeDomNodeMap):
* bindings/v8/ScopedDOMDataStore.cpp:
(WebCore::ScopedDOMDataStore::ScopedDOMDataStore):
(WebCore::ScopedDOMDataStore::~ScopedDOMDataStore):
* bindings/v8/StaticDOMDataStore.cpp:
(WebCore::StaticDOMDataStore::StaticDOMDataStore):
* bindings/v8/StaticDOMDataStore.h:
* bindings/v8/V8DOMMap.cpp:
(WebCore::getActiveDOMNodeMap):
(WebCore::removeAllDOMObjects):
(WebCore::visitActiveDOMNodes):
* bindings/v8/V8DOMMap.h:
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
(WebCore::V8DOMWrapper::getWrapperSlow):
* bindings/v8/V8GCController.cpp:
(WebCore::GCPrologueSpecialCase):
(WebCore::void):
(WebCore::Node):
(WebCore::GCPrologueVisitor::visitDOMWrapper):
(WebCore::V8GCController::gcPrologue):
(WebCore::GCEpilogueHelper::GCEpilogueSpecialCase):
(WebCore::GCEpilogueVisitor::visitDOMWrapper):
(WebCore::V8GCController::gcEpilogue):
* dom/Node.h:
(WebCore::Node::isActiveNode):
* html/HTMLAudioElement.h:
(WebCore::HTMLAudioElement::isActiveNode):
2011-11-15 David Kilzer <ddkilzer@apple.com>
Remove useless const modifier from KURL::init
<http://webkit.org/b/72387>
Reviewed by Darin Adler.
* platform/KURL.cpp:
(WebCore::KURL::init): Remove useless const.
2011-11-14 Anders Carlsson <andersca@apple.com>
HostWindow invalidation functions should use root view coordinates
https://bugs.webkit.org/show_bug.cgi?id=72338
Reviewed by Dan Bernstein.
Rename invalidateWindow to invalidateRootView, and invalidateContentsAndWindow
to invalidateContentsAndRootView. Make sure that the rects passed to the renamed functions
are in root view coordinates by changing contentsToWindow calls to contentsToRootView.
In practice this doesn't matter because for all platforms except Mac WebKit1, root view coordinates
and window coordinates are equivalent, and Mac WebKit1 doesn't use these invalidation functions.
* loader/EmptyClients.h:
* page/Chrome.cpp:
(WebCore::Chrome::invalidateRootView):
(WebCore::Chrome::invalidateContentsAndRootView):
* page/Chrome.h:
* page/ChromeClient.h:
* page/Frame.cpp:
(WebCore::Frame::tiledBackingStorePaintEnd):
* page/FrameView.cpp:
(WebCore::FrameView::invalidateRect):
(WebCore::FrameView::scrollContentsFastPath):
* platform/HostWindow.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::rectToCopyOnScroll):
(WebCore::ScrollView::scrollContents):
(WebCore::ScrollView::wheelEvent):
* platform/chromium/FramelessScrollView.cpp:
(WebCore::FramelessScrollView::invalidateRect):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImageChromeClient::invalidateContentsAndRootView):
2011-11-15 Philip Rogers <pdr@google.com>
Implement maxWidth for fillText and strokeText, fixing the canvas/philip/tests/2d.text.draw.fill.maxWidth.fontface.html test.
https://bugs.webkit.org/show_bug.cgi?id=61528
Reviewed by Stephen White.
Tests: fast/canvas/2d.text.draw.fill.maxWidth.gradient.html
fast/canvas/2d.text.draw.fill.maxWidth.negative.html
fast/canvas/2d.text.draw.fill.maxWidth.veryLarge.html
fast/canvas/2d.text.draw.fill.maxWidth.verySmall.html
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawTextInternal):
2011-11-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Implement download support in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=72258
Reviewed by Martin Robinson.
Add common download errors to ErrorsGtk.
* platform/gtk/ErrorsGtk.cpp:
(WebCore::downloadNetworkError):
(WebCore::downloadCancelledByUserError):
(WebCore::downloadDestinationError):
* platform/gtk/ErrorsGtk.h:
2011-11-15 Cary Clark <caryclark@google.com>
[chromium-mac] Enable vertical text using Skia
https://bugs.webkit.org/show_bug.cgi?id=72137
Use Skia to draw vertical text. This is much
faster and has higher fidelity than the old method
of drawing text on a path.
The graphics context passed to Skia has been
rotated 90 degrees but the character advances
have not, so it is necessary to unrotate the canvas,
and re-rotate the positions.
This generates correct output (or, at least,
consistent with Chromium CG on Mac) for all vertical
text tests, one of which is mentioned below.
Reviewed by Stephen White.
Test: fast/writing-mode/text-orientation-basic.html
* platform/graphics/skia/FontSkia.cpp:
(WebCore::setupPaint):
(WebCore::Font::drawGlyphs):
2011-11-15 Philip Rogers <pdr@google.com>
Fix SVG hit testing when padding is present
https://bugs.webkit.org/show_bug.cgi?id=37325
Reviewed by Nikolas Zimmermann.
Test: svg/hittest/svg-padding.xhtml
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::nodeAtPoint):
2011-11-15 Pavel Feldman <pfeldman@google.com>
Web Inspector: move generic code from DevTools.js into the WebCore.
https://bugs.webkit.org/show_bug.cgi?id=72377
re-landing r100269.
Reviewed by Yury Semikhatsky.
* English.lproj/localizedStrings.js:
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.inspectedURLChanged):
* inspector/front-end/ProfilesPanel.js:
* inspector/front-end/Resource.js:
* inspector/front-end/Settings.js:
* inspector/front-end/UIUtils.js:
(WebInspector.setToolbarColors):
(WebInspector.resetToolbarColors):
* inspector/front-end/inspector.js:
2011-11-15 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100269.
http://trac.webkit.org/changeset/100269
https://bugs.webkit.org/show_bug.cgi?id=72383
"Broke dozens of tests due to exception in loadingFinished"
(Requested by tonyg-cr on #webkit).
* English.lproj/localizedStrings.js:
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.inspectedURLChanged):
* inspector/front-end/ProfilesPanel.js:
* inspector/front-end/Resource.js:
* inspector/front-end/Settings.js:
* inspector/front-end/UIUtils.js:
* inspector/front-end/inspector.js:
2011-11-15 Alexander Pavlov <apavlov@chromium.org>
font property does not show up as "shorthand" in inspector
https://bugs.webkit.org/show_bug.cgi?id=15598
Reviewed by Nikolas Zimmermann.
The "font" CSS property is turned into a real shorthand, as its longhands used to float around
in the resulting style declaration without any reference to their underlying "font" property.
Test: fast/css/font-shorthand.html
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::getPropertyValue): Extracted the "font" value building into fontValue().
(WebCore::CSSMutableStyleDeclaration::appendFontLonghandValueIfExplicit): Added
(WebCore::CSSMutableStyleDeclaration::fontValue): Build the "font" value from longhands.
* css/CSSMutableStyleDeclaration.h:
* css/CSSParser.cpp:
(WebCore::CSSParser::addProperty): Added optional "implicit" parameter.
(WebCore::CSSParser::parseFont): Build respective longhands instead of the shorthand "font" property.
* css/CSSParser.h: Added optional "implicit" parameter to addProperty().
* css/CSSPropertyLonghand.cpp:
(WebCore::initShorthandMap): Added "font" shorthand map entry.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyPropertyToStyle): Separated the property application from the instance setup.
(WebCore::CSSStyleSelector::applyPropertyToCurrentStyle): Added.
* css/CSSStyleSelector.h: Made updateFont() public.
* css/FontValue.cpp:
(WebCore::FontValue::customCssText): Made use of StringBuilder.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setFont): Apply "font" longhands rather than the (non-existent) "font" property.
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylesSidebarPane.prototype._markUsedProperties): Removed a workaround for "font" not being a shorthand.
* page/animation/AnimationBase.cpp:
(WebCore::addShorthandProperties): Removed a workaround for "font" not being a shorthand.
2011-11-15 Pierre Rossi <pierre.rossi@gmail.com>
[Qt] Clean up the remaining duplicate code after the RenderThemeQt refactoring.
https://bugs.webkit.org/show_bug.cgi?id=72262
Reviewed by Antonio Gomes.
No new tests needed, this is purely cosmetic.
* platform/qt/RenderThemeQStyle.cpp:
(WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
* platform/qt/RenderThemeQStyle.h:
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::adjustMenuListButtonStyle): remove the call to resetBorderRadius()
since the mobile theme actually didn't do this.
* platform/qt/RenderThemeQtMobile.cpp:
(WebCore::RenderThemeQtMobile::adjustMenuListStyle):
2011-11-15 Pavel Feldman <pfeldman@google.com>
Web Inspector: move generic code from DevTools.js into the WebCore.
https://bugs.webkit.org/show_bug.cgi?id=72377
This includes support for themed toolbar, remote debugging routines,
removes a couple of obsolete overrides from the DevTools.js
Reviewed by Yury Semikhatsky.
* English.lproj/localizedStrings.js:
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.inspectedURLChanged):
* inspector/front-end/ProfilesPanel.js:
* inspector/front-end/Resource.js:
* inspector/front-end/Settings.js:
* inspector/front-end/UIUtils.js:
(WebInspector.setToolbarColors):
(WebInspector.resetToolbarColors):
* inspector/front-end/inspector.js:
2011-11-15 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Centralize hide_symbols and ensure all libs are built with symbol visibility & bsymbolic_functions
Reviewed by Tor Arne Vestbø.
* Target.pri: Eliminate duplicated symbol stuff that lives now in default_post.prf.
2011-11-15 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100213.
http://trac.webkit.org/changeset/100213
https://bugs.webkit.org/show_bug.cgi?id=72371
"Breaks test_shell_tests" (Requested by tonyg-cr on #webkit).
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
* platform/SchemeRegistry.cpp:
(WebCore::schemesWithUniqueOrigins):
2011-11-15 Alpha Lam <hclam@chromium.org>
[chromium] scroll deltas are cleared during commit to the main thread
https://bugs.webkit.org/show_bug.cgi?id=71916
Reviewed by James Robinson.
Patch is covered by unit test.
Add a member m_sentScrollDelta to CCLayerImpl to keep track of the scroll delta being
sent to the main thread during commit. This gives a simpler approach to keep tracking of a
layer's scroll delta in impl thread.
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::sentScrollDelta):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(WebCore::CCLayerImpl::sentScrollDelta):
(WebCore::CCLayerImpl::setSentScrollDelta):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::processScrollDeltas):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2011-11-15 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] REGRESSION(100123): It made inspector tests crash
https://bugs.webkit.org/show_bug.cgi?id=72274
Reviewed by Tor Arne Vestbø.
* platform/qt/RenderThemeQStyle.h: Remove uninitialized and duplicated
m_page member that should really come from RenderThemeQt.
2011-11-15 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed. Fix build breaks when EFL port is built.
* CMakeLists.txt:
* UseJSC.cmake:
2011-11-15 Noel Gordon <noel.gordon@gmail.com>
Make ImageFrame member getAddr() public
https://bugs.webkit.org/show_bug.cgi?id=72321
Reviewed by Adam Barth.
Make ImageFrame member getAddr() public to allow ImageFrame users access to the
underlying frame pixels if needed. Image decoders, for example, could with care
use this service to write decoded pixels direct to the ImageFrame pixel buffer,
avoiding intermeadiate data copies from temporary decoded pixel row buffers and
the decoding performance loss that that entails.
No new tests, refactoring only.
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageFrame::getAddr):
2011-11-14 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: [Crash] Crash when inspecting namespaced SVG styled via element names
https://bugs.webkit.org/show_bug.cgi?id=72261
Reviewed by Pavel Feldman.
Test: inspector/styles/svg-style.xhtml
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::inlineStyleSheetText):
2011-11-15 Kent Tamura <tkent@chromium.org>
[V8] Fix incorrect handling of JavaScript properties in DOMStringMap
https://bugs.webkit.org/show_bug.cgi?id=53578
Reviewed by Adam Barth.
Follows a JSC behavior change by r96893.
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::V8DOMStringMap::namedPropertyGetter):
Propagate to the JavaScript object if the DOMStringMap object
doesn't have the requested item.
(WebCore::V8DOMStringMap::namedPropertyDeleter): ditto.
(WebCore::V8DOMStringMap::namedPropertySetter):
Try to set a property to only a DOMStringMap object.
2011-11-14 Pavel Feldman <pfeldman@google.com>
Web Inspector: Command line $x fails for 3 of 4 types of XPath query
https://bugs.webkit.org/show_bug.cgi?id=72276
Reviewed by Timothy Hatcher.
Test: inspector/console/console-xpath.html
* inspector/InjectedScriptSource.js:
(.):
2011-11-14 Ryosuke Niwa <rniwa@webkit.org>
Fix the change log entry for r59190.
* ChangeLog-2010-05-24:
2011-11-14 Dmitry Lomov <dslomov@google.com>
[V8][Chromium]Serialize dense arrays densly
https://bugs.webkit.org/show_bug.cgi?id=72198
This patch ensures that:
- Dense arrays are serialized densly, and not as name-value pairs
- Sparse arrays are allocated as sparse on deserialization.
The criteria to choose whether to serialize densly or sparsely is the size
of a resulting serialized stream.
Reviewed by David Levin.
Test: fast/dom/Window/window-postmessage-arrays.html
* bindings/v8/SerializedScriptValue.cpp:
(WebCore::V8ObjectMap::Writer::writeDenseArray):
(WebCore::V8ObjectMap::Writer::writeGenerateFreshSparseArray):
(WebCore::V8ObjectMap::Writer::writeGenerateFreshDenseArray):
(WebCore::V8ObjectMap::Serializer::writeDenseArray):
(WebCore::V8ObjectMap::Serializer::AbstractObjectState::execDepth):
(WebCore::V8ObjectMap::Serializer::AbstractObjectState::serializeProperties):
(WebCore::V8ObjectMap::Serializer::ObjectState::advance):
(WebCore::V8ObjectMap::Serializer::DenseArrayState::DenseArrayState):
(WebCore::V8ObjectMap::Serializer::DenseArrayState::advance):
(WebCore::V8ObjectMap::Serializer::DenseArrayState::objectDone):
(WebCore::V8ObjectMap::Serializer::SparseArrayState::SparseArrayState):
(WebCore::V8ObjectMap::Serializer::SparseArrayState::advance):
(WebCore::V8ObjectMap::Serializer::serializeDensely):
(WebCore::V8ObjectMap::Serializer::startArrayState):
(WebCore::V8ObjectMap::Serializer::startObjectState):
(WebCore::V8ObjectMap::Serializer::doSerialize):
(WebCore::V8ObjectMap::Reader::read):
(WebCore::V8ObjectMap::Deserializer::newSparseArray):
(WebCore::V8ObjectMap::Deserializer::completeSparseArray):
(WebCore::V8ObjectMap::Deserializer::completeDenseArray):
2011-11-14 Alexandre Elias <aelias@google.com>
[chromium] Fix scaleDelta zoom-out visibility rect bug
https://bugs.webkit.org/show_bug.cgi?id=72208
Since the scroll is no longer applied at the top layer of the layer
tree, the scaleDelta transformation needs to be moved down to the
same level.
Also fix zoomAnimator to be applied the same way. I removed zoom
animator layout tests, as they aren't testing the actual impl-side
codepath, and are hard to continue supporting -- we should cover zoom
features with unit tests in the future.
Reviewed by James Robinson.
No new tests (planning to add later: https://bugs.webkit.org/show_bug.cgi?id=71529)
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::scaleDelta):
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawLayersInternal):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::CCLayerImpl):
(WebCore::CCLayerImpl::setScaleDelta):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(WebCore::CCLayerImpl::scaleDelta):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::calculateDrawTransformsAndVisibilityInternal):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::setScaleDelta):
(WebCore::CCLayerTreeHostImpl::setZoomAnimatorTransform):
2011-11-14 Chris Fleizach <cfleizach@apple.com>
WebProcess crashes when trying to display your "uploaded videos" page on Facebook
https://bugs.webkit.org/show_bug.cgi?id=72334
Reviewed by Beth Dakin.
Protect against documents without frames.
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
2011-11-14 Oliver Hunt <oliver@apple.com>
More V8 build fixes.
* bindings/v8/custom/V8ArrayBufferViewCustom.h:
(WebCore::setWebGLArrayHelper):
2011-11-14 Oliver Hunt <oliver@apple.com>
Fix V8 build again.
* bindings/scripts/CodeGeneratorV8.pm:
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WTF::Float64Array::neuterBinding):
2011-11-14 Oliver Hunt <oliver@apple.com>
Fix V8 build.
* bindings/scripts/CodeGeneratorV8.pm:
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WTF::Float64Array::neuterBinding):
2011-11-14 Oliver Hunt <oliver@apple.com>
Start migrating typed array impl types to WTF
https://bugs.webkit.org/show_bug.cgi?id=72336
Reviewed by Geoffrey Garen.
Move typed arrays from WebCore namespace to WTF, and
start reducing dependencies on WebCore types.
* bindings/js/JSArrayBufferViewHelper.h:
(WebCore::setWebGLArrayHelper):
* bindings/scripts/CodeGeneratorJS.pm:
(IsTypedArrayType):
(AddClassForwardIfNeeded):
(GenerateImplementation):
* bindings/scripts/CodeGeneratorV8.pm:
(IsTypedArrayType):
* bindings/scripts/test/CPP/WebDOMFloat64Array.cpp: Added.
(WebDOMFloat64Array::WebDOMFloat64Array):
(WebDOMFloat64Array::impl):
(toWebCore):
(toWebKit):
* bindings/scripts/test/CPP/WebDOMFloat64Array.h: Added.
(WebDOMFloat64Array::~WebDOMFloat64Array):
* bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp: Added.
(WebKit::kit):
(WebKit::core):
(webkit_dom_float64array_finalize):
(webkit_dom_float64array_set_property):
(webkit_dom_float64array_get_property):
(webkit_dom_float64array_constructed):
(webkit_dom_float64array_class_init):
(webkit_dom_float64array_init):
(WebKit::wrapFloat64Array):
* bindings/scripts/test/GObject/WebKitDOMFloat64Array.h: Added.
* bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h: Added.
* bindings/scripts/test/JS/JSFloat64Array.cpp: Added.
(WebCore::JSFloat64ArrayConstructor::JSFloat64ArrayConstructor):
(WebCore::JSFloat64ArrayConstructor::finishCreation):
(WebCore::JSFloat64ArrayConstructor::getOwnPropertySlot):
(WebCore::JSFloat64ArrayConstructor::getOwnPropertyDescriptor):
(WebCore::JSFloat64ArrayConstructor::getConstructData):
(WebCore::getJSFloat64ArrayPrototypeTable):
(WebCore::JSFloat64ArrayPrototype::self):
(WebCore::getJSFloat64ArrayTable):
(WebCore::JSFloat64Array::JSFloat64Array):
(WebCore::JSFloat64Array::finishCreation):
(WebCore::JSFloat64Array::createPrototype):
(WebCore::JSFloat64Array::getOwnPropertySlot):
(WebCore::JSFloat64Array::getOwnPropertyDescriptor):
(WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
(WebCore::jsFloat64ArrayConstructor):
(WebCore::JSFloat64Array::put):
(WebCore::JSFloat64Array::putByIndex):
(WebCore::JSFloat64Array::getOwnPropertyNames):
(WebCore::JSFloat64Array::getConstructor):
(WebCore::JSFloat64Array::getByIndex):
(WebCore::toFloat64Array):
(WTF::Float64Array::neuterBinding):
* bindings/scripts/test/JS/JSFloat64Array.h: Added.
(WebCore::JSFloat64Array::create):
(WebCore::JSFloat64Array::createStructure):
(WebCore::JSFloat64Array::impl):
(WebCore::JSFloat64ArrayPrototype::create):
(WebCore::JSFloat64ArrayPrototype::createStructure):
(WebCore::JSFloat64ArrayPrototype::JSFloat64ArrayPrototype):
(WebCore::JSFloat64ArrayConstructor::create):
(WebCore::JSFloat64ArrayConstructor::createStructure):
* bindings/scripts/test/ObjC/DOMFloat64Array.h: Copied from Source/WebCore/html/canvas/Int16Array.cpp.
* bindings/scripts/test/ObjC/DOMFloat64Array.mm: Copied from Source/WebCore/html/canvas/Float32Array.cpp.
(core):
(kit):
* bindings/scripts/test/ObjC/DOMFloat64ArrayInternal.h: Copied from Source/WebCore/html/canvas/Int16Array.cpp.
* bindings/scripts/test/TestTypedArray.idl: Copied from Source/WebCore/html/canvas/Float64Array.cpp.
* bindings/scripts/test/V8/V8Float64Array.cpp: Added.
(WebCore::Float64ArrayInternal::V8_USE):
(WebCore::ConfigureV8Float64ArrayTemplate):
(WebCore::V8Float64Array::GetRawTemplate):
(WebCore::V8Float64Array::GetTemplate):
(WebCore::V8Float64Array::HasInstance):
(WebCore::V8Float64Array::wrapSlow):
(WTF::Float64Array::neuterBinding):
(WebCore::V8Float64Array::derefObject):
* bindings/scripts/test/V8/V8Float64Array.h: Added.
(WebCore::V8Float64Array::toNative):
(WebCore::V8Float64Array::existingWrapper):
(WebCore::V8Float64Array::wrap):
(WebCore::toV8):
* fileapi/FileReader.h:
* fileapi/FileReaderLoader.h:
* fileapi/FileReaderSync.h:
* fileapi/WebKitBlobBuilder.h:
* html/HTMLMediaElement.h:
* html/canvas/ArrayBuffer.cpp:
* html/canvas/ArrayBuffer.h:
* html/canvas/ArrayBufferView.cpp:
(WTF::ArrayBufferView::setImpl):
(WTF::ArrayBufferView::setRangeImpl):
(WTF::ArrayBufferView::zeroRangeImpl):
(WTF::ArrayBufferView::neuter):
* html/canvas/ArrayBufferView.h:
* html/canvas/Float32Array.cpp:
* html/canvas/Float32Array.h:
(WTF::Float32Array::set):
* html/canvas/Float64Array.cpp:
* html/canvas/Float64Array.h:
(WTF::Float64Array::set):
* html/canvas/Int16Array.cpp:
* html/canvas/Int16Array.h:
(WTF::Int16Array::set):
* html/canvas/Int32Array.cpp:
* html/canvas/Int32Array.h:
(WTF::Int32Array::set):
* html/canvas/Int8Array.cpp:
* html/canvas/Int8Array.h:
(WTF::Int8Array::set):
* html/canvas/IntegralTypedArrayBase.h:
* html/canvas/TypedArrayBase.h:
(WTF::TypedArrayBase::set):
(WTF::TypedArrayBase::setRange):
(WTF::TypedArrayBase::zeroRange):
* html/canvas/Uint16Array.cpp:
* html/canvas/Uint16Array.h:
(WTF::Uint16Array::set):
* html/canvas/Uint32Array.cpp:
* html/canvas/Uint32Array.h:
(WTF::Uint32Array::set):
* html/canvas/Uint8Array.cpp:
* html/canvas/Uint8Array.h:
(WTF::Uint8Array::set):
* html/canvas/WebGLBuffer.h:
* page/Crypto.h:
* webaudio/AsyncAudioDecoder.h:
* webaudio/AudioBuffer.cpp:
(WebCore::AudioBuffer::AudioBuffer):
(WebCore::AudioBuffer::zero):
* webaudio/AudioContext.h:
* webaudio/JavaScriptAudioNode.h:
* webaudio/RealtimeAnalyser.h:
* webaudio/RealtimeAnalyserNode.h:
* webaudio/WaveShaperNode.h:
* websockets/ThreadableWebSocketChannel.h:
* websockets/WebSocket.h:
* websockets/WebSocketChannel.h:
* xml/XMLHttpRequest.h:
2011-11-14 Julien Chaffraix <jchaffraix@webkit.org>
Add --css-grid-layout to build-webkit and the build systems
https://bugs.webkit.org/show_bug.cgi?id=72320
Reviewed by Ojan Vafai.
* Configurations/FeatureDefines.xcconfig:
2011-11-14 Daniel Bates <dbates@rim.com>
Remove unnecessary #include SVGResourcesCache.h in SVGDocumentExtensions.h; use forward declaration
https://bugs.webkit.org/show_bug.cgi?id=72335
Reviewed by Eric Seidel.
It's sufficient to forward declare SVGResourcesCache in SVGDocumentExtensions.h and #include SVGResourcesCache.h
in SVGDocumentExtensions.cpp. This will reduce the number of files we need to re-compile after the file
SVGResourcesCache.h has been modified. Currently we #include SVGResourcesCache.h in SVGDocumentExtensions.h.
* rendering/svg/RenderSVGBlock.cpp: Include SVGResourcesCache.h.
* rendering/svg/RenderSVGContainer.cpp: Ditto.
* rendering/svg/RenderSVGForeignObject.cpp: Ditto.
* rendering/svg/RenderSVGImage.cpp: Ditto.
* rendering/svg/RenderSVGInline.cpp: Ditto.
* rendering/svg/RenderSVGModelObject.cpp: Ditto.
* rendering/svg/RenderSVGPath.cpp: Ditto.
* rendering/svg/RenderSVGResource.cpp: Ditto.
* rendering/svg/RenderSVGResourceClipper.cpp: Ditto.
* rendering/svg/RenderSVGResourceContainer.cpp: Ditto.
* rendering/svg/RenderSVGRoot.cpp: Ditto.
* rendering/svg/RenderSVGText.cpp: Ditto.
* rendering/svg/SVGInlineTextBox.cpp: Ditto.
* rendering/svg/SVGRenderSupport.cpp: Ditto.
* svg/SVGDocumentExtensions.cpp: Ditto.
* svg/SVGDocumentExtensions.h: Forward declare SVGResourcesCache.
2011-11-14 Rafael Weinstein <rafaelw@chromium.org>
[MutationObservers] Add histogram collection for usage of DOM Mutation Events
https://bugs.webkit.org/show_bug.cgi?id=72316
Reviewed by Ryosuke Niwa.
This patch adds six calls in ~Document() which simply pipe-out to the embedder
the (already-collected) bits of whether varous DOM Mutation Events were registered
on the document.
No tests needed. No functional changes.
* dom/Document.cpp:
(WebCore::histogramMutationEventUsage):
(WebCore::Document::~Document):
2011-11-14 Simon Fraser <simon.fraser@apple.com>
div with webkit-transform + webkit-box-reflect disappears when switching tabs
https://bugs.webkit.org/show_bug.cgi?id=53355
Reviewed by Dean Jackson.
Tickle Core Animation into updating the layer's content property when
switching back to a tab which has composited reflections. This hack is
needed becuase reflections involve sharing layer contents between layers.
* platform/graphics/mac/WebLayer.mm:
(-[WebLayer actionForKey:]):
2011-11-14 Adam Barth <abarth@webkit.org>
Unique origins shouldn't remember their scheme, host, or port
https://bugs.webkit.org/show_bug.cgi?id=72308
Reviewed by Eric Seidel.
This patch contains the bulk (all?) of the behavior differences in this
patch series. Unique origins shouldn't remember their schemes. Doing
so causes some privileges (e.g., local access) to leak into unique
origins.
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
- Explicitly clear out the protocol, host, and port for unique
origins. A future patch will refactor all this code to be more
elegant.
* platform/SchemeRegistry.cpp:
(WebCore::schemesWithUniqueOrigins):
- Merge "about" and "javascript" in with the general case now that
we don't have a separate notion of an empty origin.
2011-11-14 Adam Barth <abarth@webkit.org>
Don't special-case "data" URLs in drag-and-drop logic
https://bugs.webkit.org/show_bug.cgi?id=72322
Reviewed by Eric Seidel.
See the bug for more details.
Test: editing/pasteboard/drag-drop-to-data-url.html
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::canReceiveDragData):
2011-11-14 Adrienne Walker <enne@google.com>
[chromium] Pipe compositor commit/swap up to WebWidgetClient
https://bugs.webkit.org/show_bug.cgi?id=72041
Reviewed by Darin Fisher.
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCLayerTreeHost::didCommitAndDrawFrame):
(WebCore::CCLayerTreeHost::didCompleteSwapBuffers):
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::doComposite):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::onSwapBuffersCompleteOnImplThread):
(WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
(WebCore::CCThreadProxy::didCommitAndDrawFrame):
(WebCore::CCThreadProxy::didCompleteSwapBuffers):
* platform/graphics/chromium/cc/CCThreadProxy.h:
2011-11-14 Tony Chang <tony@chromium.org>
Remove the CSS3_FLEXBOX compile time flag and enable on all ports
https://bugs.webkit.org/show_bug.cgi?id=72196
Reviewed by Ojan Vafai.
* Configurations/FeatureDefines.xcconfig:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSFlexValue.cpp:
* css/CSSFlexValue.h:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFlex):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyLength::applyValue):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSValue.cpp:
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
* css/CSSValueKeywords.in:
* rendering/RenderFlexibleBox.cpp:
* rendering/RenderFlexibleBox.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
* rendering/RenderObject.h:
(WebCore::RenderObject::isFlexibleBoxIncludingDeprecated):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleFlexibleBoxData.cpp:
* rendering/style/StyleFlexibleBoxData.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2011-11-14 Vincent Scheib <scheib@chromium.org>
Mouse Lock: Renaming to 'Pointer Lock': Runtime Enable Flags
https://bugs.webkit.org/show_bug.cgi?id=72303
Reviewed by Darin Fisher.
* bindings/generic/RuntimeEnabledFeatures.cpp:
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::webkitPointerLockEnabled):
(WebCore::RuntimeEnabledFeatures::setWebkitPointerLockEnabled):
(WebCore::RuntimeEnabledFeatures::webkitPointerEnabled):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setPointerLockEnabled):
(WebCore::Settings::PointerLockEnabled):
2011-11-14 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r100176.
http://trac.webkit.org/changeset/100176
https://bugs.webkit.org/show_bug.cgi?id=72309
it broke the Mac builds (missing symbols) in a non-obvious way
(Requested by jchaffraix on #webkit).
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::toV8Object):
* html/canvas/WebGLExperimentalCompressedTextures.cpp: Removed.
* html/canvas/WebGLExperimentalCompressedTextures.h: Removed.
* html/canvas/WebGLExperimentalCompressedTextures.idl: Removed.
* html/canvas/WebGLExtension.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getParameter):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
* html/canvas/WebGLRenderingContext.h:
* platform/graphics/Extensions3D.h:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
* platform/graphics/qt/GraphicsContext3DQt.cpp:
2011-11-14 Tony Chang <tony@chromium.org>
remove -wap-marquee css propery value
https://bugs.webkit.org/show_bug.cgi?id=72296
Reviewed by Adam Barth.
This css value is no longer used.
* css/CSSValueKeywords.in:
2011-11-14 Julien Chaffraix <jchaffraix@webkit.org>
Crash in RenderTableSection::splitColumn
https://bugs.webkit.org/show_bug.cgi?id=70171
Reviewed by David Hyatt.
Tests: fast/table/crash-splitColumn-2.html
fast/table/crash-splitColumn-3.html
fast/table/crash-splitColumn.html
The old code would not take into account the fact that each RenderTableSection
can set its m_needsCellRecalc flag independently of the rest.
This means that you cannot assume that you can always split or append columns to
all the sections. Our approach is to skip sections needing cell recalc in several
parts of the code as they will be properly reset to the table's representations
during a cell recalc.
* rendering/RenderTable.cpp:
(WebCore::RenderTable::splitColumn):
(WebCore::RenderTable::appendColumn):
Skip sections needing cell recalc as they will be properly updated later.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addCell):
Ignore a section needing cell recalc as addCell will be called after sync'ing
the internal column representation in recalcCells.
(WebCore::RenderTableSection::recalcCells):
Clear the flag at the beginning of the function to activate the previous functions.
Added a comment as to why this is fine.
(WebCore::RenderTableSection::appendColumn):
Added an ASSERT. If we need cell recalc, we should NEVER update m_grid outside
of recalcCells().
2011-11-14 Adam Barth <abarth@webkit.org>
Remove the concept of an empty SecurityOrigin
https://bugs.webkit.org/show_bug.cgi?id=72287
Reviewed by Eric Seidel.
This concept is fragile and doesn't exist in the specs. Previous
patches have removed most of the code relying upon this function. This
patch removes a couple stragglers.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):
- This check should really be about unique origins because it
doesn't make sense to target postMessages at unique origins, as
explained in the comment.
* page/SecurityOrigin.cpp:
* page/SecurityOrigin.h:
2011-11-14 Adam Barth <abarth@webkit.org>
SecurityContext::isSecureTransitionTo should not refer to empty security origins
https://bugs.webkit.org/show_bug.cgi?id=72277
Reviewed by Eric Seidel.
Now that we're tracking the "failed to initialized SecurityOrigin"
state explicitly, we should use that to determine whether we can make a
secure transition.
* dom/SecurityContext.cpp:
(WebCore::SecurityContext::isSecureTransitionTo):
2011-11-14 Vincent Scheib <scheib@chromium.org>
Mouse Lock: Renaming to 'Pointer Lock': ENABLE Flags
https://bugs.webkit.org/show_bug.cgi?id=72286
Reviewed by Adam Barth.
* bindings/generic/RuntimeEnabledFeatures.cpp:
* bindings/generic/RuntimeEnabledFeatures.h:
* dom/MouseEvent.idl:
* dom/MouseRelatedEvent.h:
* page/MouseLockable.cpp:
* page/MouseLockable.h:
* page/MouseLockable.idl:
* page/Navigator.cpp:
* page/Navigator.h:
* page/Navigator.idl:
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
2011-11-14 Anna Cavender <annacc@chromium.org>
Remove TextTrackCueIndex and TextTrackCueSet. No longer needed.
https://bugs.webkit.org/show_bug.cgi?id=72216
Reviewed by Sam Weinig.
No new tests. No new functionality.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* html/TextTrackCueIndex.cpp: Removed.
* html/TextTrackCueIndex.h: Removed.
2011-10-10 Robert Hogan <robert@webkit.org>
CSS 2.1 failure: border-spacing-applies-to-015.htm
https://bugs.webkit.org/show_bug.cgi?id=69773
Reviewed by David Hyatt.
The CSS test suite expects UAs to allow multiple captions per table.
Replace m_caption with a Vector called m_captions.
* rendering/RenderTable.cpp:
(WebCore::RenderTable::RenderTable):
(WebCore::RenderTable::addChild):
(WebCore::RenderTable::removeChild):
(WebCore::RenderTable::adjustLogicalHeightForCaption):
(WebCore::RenderTable::layout):
(WebCore::RenderTable::addOverflowFromChildren):
(WebCore::RenderTable::paintObject):
(WebCore::RenderTable::subtractCaptionRect):
(WebCore::RenderTable::computePreferredLogicalWidths):
(WebCore::RenderTable::nextColElement):
(WebCore::RenderTable::colElement):
(WebCore::RenderTable::recalcCaption):
(WebCore::RenderTable::recalcSections):
(WebCore::RenderTable::overflowClipRect):
(WebCore::RenderTable::nodeAtPoint):
* rendering/RenderTable.h:
2011-11-14 Gregg Tavares <gman@google.com>
Implement WEBGL_EXPERIMENTAL_compressed_textures WebGL extension
https://bugs.webkit.org/show_bug.cgi?id=72086
Reviewed by Kenneth Russell.
No new tests. Will write final test once on hardware.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::toV8Object):
* html/canvas/WebGLExperimentalCompressedTextures.cpp: Added.
(WebCore::WebGLExperimentalCompressedTextures::WebGLExperimentalCompressedTextures):
(WebCore::WebGLExperimentalCompressedTextures::~WebGLExperimentalCompressedTextures):
(WebCore::WebGLExperimentalCompressedTextures::getName):
(WebCore::WebGLExperimentalCompressedTextures::create):
(WebCore::WebGLExperimentalCompressedTextures::supported):
(WebCore::WebGLExperimentalCompressedTextures::validateCompressedTexFormat):
(WebCore::WebGLExperimentalCompressedTextures::validateCompressedTexFuncData):
(WebCore::WebGLExperimentalCompressedTextures::validateCompressedTexSubDimensions):
(WebCore::WebGLExperimentalCompressedTextures::compressedTexImage2D):
(WebCore::WebGLExperimentalCompressedTextures::compressedTexSubImage2D):
(WebCore::WebGLExperimentalCompressedTextures::getCompressedTextureFormats):
* html/canvas/WebGLExperimentalCompressedTextures.h: Added.
* html/canvas/WebGLExperimentalCompressedTextures.idl: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
* html/canvas/WebGLExtension.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getParameter):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
* html/canvas/WebGLRenderingContext.h:
* platform/graphics/Extensions3D.h:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::compressedTexImage2D):
(WebCore::GraphicsContext3D::compressedTexSubImage2D):
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::compressedTexImage2D):
(WebCore::GraphicsContext3D::compressedTexSubImage2D):
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::compressedTexImage2D):
(WebCore::GraphicsContext3D::compressedTexSubImage2D):
2011-11-14 Michael Nordman <michaeln@google.com>
Return more complete error and exception messages when a
WebSQLDatabase function fails. Produce console logging
for openDatabase() errors and vacuum errors. Add a lastErrorMessage
accessor to the DatabaseSync interface.
https://bugs.webkit.org/show_bug.cgi?id=71575
Reviewed by David Levin.
Yes, see LayoutTests/ChangeLog in this patch.
* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::SQLiteDatabase):
(WebCore::SQLiteDatabase::open):
(WebCore::SQLiteDatabase::close):
(WebCore::SQLiteDatabase::lastError):
(WebCore::SQLiteDatabase::lastErrorMsg):
(WebCore::SQLiteDatabase:: runVacuumCommand):
(WebCore::SQLiteDatabase:: runIncrementalVacuumCommand):
Reflect errors in the open() method in lastError() and lastErrorMsg().
Return an error codes for runVacuumCommand() and runIncrementalVacuumCommand().
* platform/sql/SQLiteDatabase.h:
* storage/AbstractDatabase.cpp:
(WebCore::formatErrorMessage):
(WebCore::AbstractDatabase::performOpenAndVerify):
(WebCore::AbstractDatabase::logErrorMessage):
During openAndVerify, produce formatted error messages that include what was being done, the sqlite error code,
and the sqlite error message. Add a helper to log message to the console.
* storage/AbstractDatabase.h:
* storage/ChangeVersionWrapper.cpp:
(WebCore::ChangeVersionWrapper::performPreflight):
(WebCore::ChangeVersionWrapper::performPostflight):
* storage/Database.cpp:
(WebCore::Database::openDatabase):
(WebCore::Database::openAndVerifyVersion):
(WebCore::Database::performOpenAndVerify):
* storage/Database.h:
* storage/DatabaseSync.cpp:
(WebCore::DatabaseSync::openDatabaseSync):
(WebCore::DatabaseSync::changeVersion):
(WebCore::DatabaseSync::runTransaction):
* storage/DatabaseSync.h:
(WebCore::DatabaseSync::lastErrorMessage):
(WebCore::DatabaseSync::setLastErrorMessage):
* storage/DatabaseSync.idl:
Add a lastErrorMessage attribute so javascript callers can
retrieve more detailed information about what went wrong.
* storage/DatabaseTask.cpp:
(WebCore::Database::DatabaseOpenTask::DatabaseOpenTask):
(WebCore::Database::DatabaseOp