blob: de23fb5ec2895dd62bc772774b125a0d4466a657 [file] [log] [blame]
2012-05-31 Erik Arvidsson <arv@chromium.org>
Make DOM Exceptions Errors
https://bugs.webkit.org/show_bug.cgi?id=85078
Reviewed by Oliver Hunt.
WebIDL mandates that exceptions should have Error.prototype on its prototype chain.
For JSC we have access to the Error.prototype from the binding code.
For V8 we set a field in the WrapperTypeInfo and when the constructor function is created we
set the prototype as needed.
Updated test: fast/dom/DOMException/prototype-object.html
* ForwardingHeaders/runtime/ErrorPrototype.h: Added.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNamedConstructorCallback):
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestException::createPrototype):
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestException.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestNode.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore):
(WebCore::V8TestObj::installPerContextProperties):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore):
* bindings/v8/NPV8Object.cpp:
(WebCore::npObjectTypeInfo):
* bindings/v8/V8BindingPerContextData.cpp:
(WebCore):
(WebCore::V8BindingPerContextData::init):
(WebCore::V8BindingPerContextData::createWrapperFromCacheSlowCase):
(WebCore::V8BindingPerContextData::constructorForTypeSlowCase):
* bindings/v8/V8BindingPerContextData.h:
(V8BindingPerContextData):
* bindings/v8/V8HiddenPropertyName.h:
(WebCore):
* bindings/v8/WrapperTypeInfo.h:
(WebCore):
(WrapperTypeInfo):
* bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
(WebCore):
2012-05-31 Ian Vollick <vollick@chromium.org>
[chromium] create WebTransformOperation interface for chromium platform
https://bugs.webkit.org/show_bug.cgi?id=87510
Reviewed by James Robinson.
Unit tests:
WebTransformOperationsTest.transformTypesAreUnique
WebTransformOperationsTest.matchesTypesSameLength
WebTransformOperationsTest.matchesTypesDifferentLength
WebTransformOperationsTest.applyTranslate
WebTransformOperationsTest.applyRotate
WebTransformOperationsTest.applyScale
WebTransformOperationsTest.applySkew
WebTransformOperationsTest.applyPerspective
WebTransformOperationsTest.applyMatrix
WebTransformOperationsTest.applyOrder
WebTransformOperationsTest.blendOrder
WebTransformOperationsTest.blendProgress
WebTransformOperationsTest.blendWhenTypesDoNotMatch
* WebCore.gypi:
* platform/chromium/support/WebTransformOperations.cpp: Added.
(WebKit):
(WebTransformOperationsPrivate):
(WebKit::WebTransformOperations::apply):
(WebKit::WebTransformOperations::blend):
(WebKit::WebTransformOperations::matchesTypes):
(WebKit::WebTransformOperations::appendTranslate):
(WebKit::WebTransformOperations::appendRotate):
(WebKit::WebTransformOperations::appendScale):
(WebKit::WebTransformOperations::appendSkew):
(WebKit::WebTransformOperations::appendPerspective):
(WebKit::WebTransformOperations::appendMatrix):
(WebKit::WebTransformOperations::reset):
(WebKit::WebTransformOperations::initialize):
2012-05-31 Yury Semikhatsky <yurys@chromium.org>
m_totalAllocated should be intialized in RenderArena constructor
https://bugs.webkit.org/show_bug.cgi?id=87967
Reviewed by Ojan Vafai.
* rendering/RenderArena.cpp:
(WebCore::RenderArena::RenderArena): added missing initializer.
2012-05-31 Julien Chaffraix <jchaffraix@webkit.org>
The difference between a column and a column group renderer is badly drawn
https://bugs.webkit.org/show_bug.cgi?id=87556
Reviewed by Abhishek Arya.
No expected change in behavior.
This patch tries to draw a better line between those 3 concepts:
- renderer is a RenderTableCol (RenderObject::isRenderTableCol).
- renderer is a column (RenderTableCol::isTableColumn()).
- renderer is a column group (RenderTableCol::isTableColumnGroup()).
(most of the code that needs to know the difference manipulate a RenderTableCol
so there was no need to move the 2 last helpers into RenderObject)
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
Factored the code to use the column / column group iteration we
set up in the rest of the code. Made the code more self-describing
by using more RenderTableCol functions.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::addChild):
Factored the code to use the isTableColumn() and isTableColumnGroup() to
better underline what we check.
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderTableCol):
(WebCore::RenderObject::isTablePart):
Renamed isTableCol to isRenderTableCol to match the class as this doesn't
imply that the renderer is actually a column.
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::parseAttribute):
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::fullRecalc):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::addChild):
(WebCore::RenderTable::layout):
(WebCore::RenderTable::firstColumn):
Updated after the isRenderTableCol rename.
* dom/Text.cpp:
(WebCore::Text::rendererIsNeeded):
* editing/htmlediting.cpp:
(WebCore::isTableStructureNode):
Ditto and renamed some variables.
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::rendererIsNeeded):
Ditto and added a FIXME as the logic doesn't seem very bullet proof.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeCollapsedStartBorder):
(WebCore::RenderTableCell::computeCollapsedEndBorder):
(WebCore::RenderTableCell::computeCollapsedBeforeBorder):
(WebCore::RenderTableCell::computeCollapsedAfterBorder):
Changed to use the enclosingColumnGroup* helpers.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paintCell):
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::isChildAllowed):
(WebCore::RenderTableCol::canHaveChildren):
(WebCore::RenderTableCol::enclosingColumnGroup):
(WebCore::RenderTableCol::nextColumn):
Updated to use the new functions.
* rendering/RenderTableCol.h:
(WebCore::RenderTableCol::isTableColumn):
(WebCore::RenderTableCol::isTableColumnGroup):
(WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentBefore):
(WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentAfter):
Added the following new helpers.
2012-05-31 Jessie Berlin <jberlin@apple.com>
Fix Lion build after r119073.
* platform/Decimal.cpp:
(WebCore::Decimal::toString):
Do not attempt to assign a unsigned long long to an int.
2012-05-31 Christophe Dumez <christophe.dumez@intel.com>
[EFL] Enable CSS_IMAGE_SET flag
https://bugs.webkit.org/show_bug.cgi?id=87727
Reviewed by Adam Roben.
Fix CMakeLists.txt so that CSSImageSetValue.cpp gets compiled if
CSS_IMAGE_SET flag is enabled.
* CMakeLists.txt:
2012-05-31 Keyar Hood <keyar@chromium.org>
the imageSmoothingEnabled flag needs to be in the state object
https://bugs.webkit.org/show_bug.cgi?id=87853
Reviewed by Darin Adler.
Updated fast/canvas/canvas-imageSmoothingEnabled.html instead of
adding a new test.
The imageSmoothingEnabled flag is saved in the draw state now.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
(WebCore::CanvasRenderingContext2D::State::State):
(WebCore::CanvasRenderingContext2D::State::operator=):
(WebCore::CanvasRenderingContext2D::webkitImageSmoothingEnabled):
(WebCore::CanvasRenderingContext2D::setWebkitImageSmoothingEnabled):
* html/canvas/CanvasRenderingContext2D.h:
(State):
2012-05-31 Eugene Klyuchnikov <eustas.bug@gmail.com>
Web Inspector: Fix checkbox position on Settings screen.
https://bugs.webkit.org/show_bug.cgi?id=87007
Reviewed by Yury Semikhatsky.
Checkbox seems to be improperly aligned.
It is "shifted" up on 1px on Mac and 2px on Linux.
Also, keyboard-shortcuts screen has "wrapped" key descriptions on Mac.
UI changes, no new tests.
* inspector/front-end/helpScreen.css:
(.help-container): Fixed column width.
(.help-block): Ditto.
(.help-key-cell): Ditto.
(body.platform-mac .help-container): Ditto.
(body.platform-mac .help-block): Ditto.
(body.platform-mac .help-key-cell): Ditto.
(.help-content p): Ajdusted spacing between lines
(.help-content input[type=checkbox]): Fixed alignment.
(body.platform-mac .help-content input[type=checkbox]): Ditto.
(.help-content input[type=radio]): Fixed alignment.
(body.platform-mac .help-content input[type=radio]): Ditto.
2012-05-30 Andreas Kling <kling@webkit.org>
Have StylePropertySet constructor take array/length instead of vector.
<http://webkit.org/b/87876>
Reviewed by Antti Koivisto.
Remove the StylePropertyVector typedef and have StylePropertySet constructors
take CSSProperty*/length since we are copying the data into a tightly packed
array anyway. This frees up the call sites to use whatever storage they please
rather than being restricted to a vector with inlineCapacity=4.
Change said call sites to use an arbitrary high inline capacity (256) for their
stack-allocated temporary vectors.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
* css/CSSParser.cpp:
(WebCore::filterProperties):
(WebCore::CSSParser::createStylePropertySet):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::createImmutable):
(WebCore::StylePropertySet::StylePropertySet):
(WebCore::StylePropertySet::removePropertiesInSet):
(WebCore::StylePropertySet::copyPropertiesInSet):
* css/StylePropertySet.h:
(WebCore::StylePropertySet::create):
(StylePropertySet):
2012-05-31 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Simplify QT_VERSION_CHECKS for Qt5 by introducing HAVE(QT5)
https://bugs.webkit.org/show_bug.cgi?id=87955
Reviewed by Simon Hausmann.
* bridge/qt/qt_class.cpp:
* bridge/qt/qt_instance.cpp:
* bridge/qt/qt_runtime.h:
* page/qt/EventHandlerQt.cpp:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/OpenGLShims.cpp:
* platform/graphics/OpenGLShims.h:
* platform/graphics/gstreamer/PlatformVideoWindowPrivate.h:
* platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
* platform/graphics/qt/GraphicsContext3DQt.cpp:
* platform/graphics/qt/SimpleFontDataQt.cpp:
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/texmap/TextureMapperGL.cpp:
* platform/qt/DeviceMotionProviderQt.h:
* platform/qt/DeviceOrientationProviderQt.h:
* platform/qt/KURLQt.cpp:
* platform/qt/PlatformScreenQt.cpp:
* platform/qt/QWebPageClient.h:
* plugins/qt/PluginPackageQt.cpp:
* plugins/qt/PluginViewQt.cpp:
2012-05-30 Andreas Kling <kling@webkit.org>
Have StylePropertySet constructor take array/length instead of vector.
<http://webkit.org/b/87876>
Reviewed by Antti Koivisto.
Remove the StylePropertyVector typedef and have StylePropertySet constructors
take CSSProperty*/length since we are copying the data into a tightly packed
array anyway. This frees up the call sites to use whatever storage they please
rather than being restricted to a vector with inlineCapacity=4.
Change said call sites to use an arbitrary high inline capacity (256) for their
stack-allocated temporary vectors.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
* css/CSSParser.cpp:
(WebCore::filterProperties):
(WebCore::CSSParser::createStylePropertySet):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::createImmutable):
(WebCore::StylePropertySet::StylePropertySet):
(WebCore::StylePropertySet::removePropertiesInSet):
(WebCore::StylePropertySet::copyPropertiesInSet):
* css/StylePropertySet.h:
(WebCore::StylePropertySet::create):
(StylePropertySet):
2012-05-31 Mike West <mkwst@chromium.org>
Fixing compilation with SVG disabled.
https://bugs.webkit.org/show_bug.cgi?id=87944
This patch adds the missing enumeration value
'CSSPropertyWebkitBoxDecorationBreak' into switch statements to make
clang happy.
Reviewed by Alexis Menard.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
2012-05-31 Yoshifumi Inoue <yosin@chromium.org>
[Platform] Implementation of Decimal(int32_t) isn't portable.
https://bugs.webkit.org/show_bug.cgi?id=87941
Reviewed by Kent Tamura.
This patch changes negation of integer to make unsigned integer
in portable way.
No new tests. This patch doesn't change behavior.
* platform/Decimal.cpp:
(WebCore::Decimal::Decimal): Use uint64_t(-int64_t(i32)) instead of uint64_t(-i32)
2012-05-31 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[CMAKE][EFL] Remove unneeded include path
https://bugs.webkit.org/show_bug.cgi?id=87927
Reviewed by Kenneth Rohde Christiansen.
Though *wtf* directory was moved to Source/WTF, PlatformEfl.cmake is still including the previous
path. In addition, files on EFL port are using "<wtf/gobject/XXX>" directly in #include line.
So, EFL port doesn't need to include ${JAVASCRIPTCORE_DIR}/wtf/gobject path anymore.
* PlatformEfl.cmake: Remove '${JAVASCRIPTCORE_DIR}/wtf/gobject' path from include path list.
2012-05-31 Yoshifumi Inoue <yosin@chromium.org>
[Platform] Introduce Decimal class for Number/Range input type.
https://bugs.webkit.org/show_bug.cgi?id=87360
Reviewed by Kent Tamura.
This patch added new class Decimal for decimal arithmatic in two
files: platform/Decimal.cpp and Decimal.h with unit test.
Test: WebKit/chromium/tests/DecimalTest.cpp
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/Decimal.cpp: Added.
(WebCore):
(DecimalPrivate):
(SpecialValueHandler):
(WebCore::DecimalPrivate::SpecialValueHandler::SpecialValueHandler):
(WebCore::DecimalPrivate::SpecialValueHandler::handle):
(WebCore::DecimalPrivate::SpecialValueHandler::value):
(UInt128):
(WebCore::DecimalPrivate::UInt128::UInt128):
(WebCore::DecimalPrivate::UInt128::high):
(WebCore::DecimalPrivate::UInt128::low):
(WebCore::DecimalPrivate::UInt128::multiply):
(WebCore::DecimalPrivate::UInt128::highUInt32):
(WebCore::DecimalPrivate::UInt128::lowUInt32):
(WebCore::DecimalPrivate::UInt128::isZero):
(WebCore::DecimalPrivate::UInt128::makeUInt64):
(WebCore::DecimalPrivate::UInt128::operator/=):
(WebCore::DecimalPrivate::UInt128::multiplyHigh):
(WebCore::DecimalPrivate::countDigits):
(WebCore::DecimalPrivate::scaleDown):
(WebCore::DecimalPrivate::scaleUp):
(WebCore::Decimal::EncodedData::EncodedData):
(WebCore::Decimal::EncodedData::operator==):
(WebCore::Decimal::Decimal):
(WebCore::Decimal::operator=):
(WebCore::Decimal::operator+=):
(WebCore::Decimal::operator-=):
(WebCore::Decimal::operator*=):
(WebCore::Decimal::operator/=):
(WebCore::Decimal::operator-):
(WebCore::Decimal::operator+):
(WebCore::Decimal::operator*):
(WebCore::Decimal::operator/):
(WebCore::Decimal::operator==):
(WebCore::Decimal::operator!=):
(WebCore::Decimal::operator<):
(WebCore::Decimal::operator<=):
(WebCore::Decimal::operator>):
(WebCore::Decimal::operator>=):
(WebCore::Decimal::abs):
(WebCore::Decimal::alignOperands):
(WebCore::Decimal::ceiling):
(WebCore::Decimal::compareTo):
(WebCore::Decimal::floor):
(WebCore::Decimal::fromString):
(WebCore::Decimal::infinity):
(WebCore::Decimal::nan):
(WebCore::Decimal::remainder):
(WebCore::Decimal::round):
(WebCore::Decimal::toString):
(WebCore::Decimal::zero):
* platform/Decimal.h: Added.
(WebCore):
(DecimalPrivate):
(Decimal):
(EncodedData):
(WebCore::Decimal::EncodedData::operator!=):
(WebCore::Decimal::EncodedData::coefficient):
(WebCore::Decimal::EncodedData::exponent):
(WebCore::Decimal::EncodedData::isFinite):
(WebCore::Decimal::EncodedData::isNaN):
(WebCore::Decimal::EncodedData::isSpecial):
(WebCore::Decimal::EncodedData::isZero):
(WebCore::Decimal::EncodedData::sign):
(WebCore::Decimal::EncodedData::setSign):
(WebCore::Decimal::EncodedData::formatClass):
(WebCore::Decimal::isFinite):
(WebCore::Decimal::isNaN):
(WebCore::Decimal::isNegative):
(WebCore::Decimal::isPositive):
(WebCore::Decimal::isSpecial):
(WebCore::Decimal::isZero):
(WebCore::Decimal::value):
(AlignedOperands):
(WebCore::Decimal::invertSign):
(WebCore::Decimal::exponent):
(WebCore::Decimal::sign):
2012-05-31 Kentaro Hara <haraken@chromium.org>
[V8] Pass Isolate to v8String() in custom bindings
https://bugs.webkit.org/show_bug.cgi?id=87825
Reviewed by Adam Barth.
The objective is to pass Isolate around in V8 bindings.
This patch passes Isolate to v8String() in custom bindings.
No tests. No change in behavior.
* bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
(WebCore::installFastSet):
* bindings/v8/custom/V8ArrayBufferViewCustom.h:
(WebCore):
(WebCore::setWebGLArrayHelper):
* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
(WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator):
(WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
* bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
(WebCore::toV8Object):
* bindings/v8/custom/V8ClipboardCustom.cpp:
(WebCore::V8Clipboard::typesAccessorGetter):
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::V8DOMStringMap::namedPropertyGetter):
(WebCore::V8DOMStringMap::namedPropertyEnumerator):
* bindings/v8/custom/V8FileReaderCustom.cpp:
(WebCore::V8FileReader::resultAccessorGetter):
* bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
(WebCore::V8HTMLCanvasElement::toDataURLCallback):
* bindings/v8/custom/V8HTMLElementCustom.cpp:
(WebCore::toV8Object):
* bindings/v8/custom/V8HTMLInputElementCustom.cpp:
(WebCore::V8HTMLInputElement::selectionDirectionAccessorGetter):
* bindings/v8/custom/V8IDBAnyCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8IDBKeyCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::databaseIdCallback):
(WebCore::V8InjectedScriptHost::storageIdCallback):
* bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
(WebCore::V8InspectorFrontendHost::platformCallback):
* bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
(WebCore::V8JavaScriptCallFrame::typeAccessorGetter):
* bindings/v8/custom/V8LocationCustom.cpp:
(WebCore::V8Location::toStringCallback):
* bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
(WebCore::V8SQLResultSetRowList::itemCallback):
* bindings/v8/custom/V8StorageCustom.cpp:
(WebCore::V8Storage::namedPropertyEnumerator):
(WebCore::storageGetter):
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::V8XMLHttpRequest::responseTextAccessorGetter):
* bindings/v8/custom/V8XSLTProcessorCustom.cpp:
(WebCore::V8XSLTProcessor::getParameterCallback):
2012-05-31 Hayato Ito <hayato@chromium.org>
ComposedShadowTreeWalker should support traversing nodes in an orphaned shadow subtree.
https://bugs.webkit.org/show_bug.cgi?id=87493
Reviewed by Dimitri Glazkov.
ComposedShadowTreeWalker assumed that a visited shadow root is
always assigned to a shadow insertion point since it only
traverses nodes which are rendered. But there is an exceptional
use case such as an event dispatching. Some events, such as a
'click' event, may happen in an orphaned shadow subtree. In such
cases, traversal might start with a node in an orphaned shadow
subtree. So ComposedShadowTreeWalker can not assume that visited
shadow root is always assigned to a shadow insertion point.
This patch only fixes ComposedShadowTreeWalker.
ComposedShadowTreeParentWalker will be fixed in another patch with
an event dispatching test.
Test: fast/dom/shadow/composed-shadow-tree-walker.html
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost):
2012-05-30 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: add MemoryUsageSupport::processMemorySizesInBytes
https://bugs.webkit.org/show_bug.cgi?id=87830
Reviewed by James Robinson.
Added a method for getting process memory usage in bytes. It is
used in the inspector memory instrumentation to get process total
memory usage.
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
* platform/MemoryUsageSupport.cpp:
(WebCore::MemoryUsageSupport::processMemorySizesInBytes):
(WebCore):
* platform/MemoryUsageSupport.h:
(MemoryUsageSupport): provided embedders with a way to report WebKit process
memory usage.
* platform/chromium/MemoryUsageSupportChromium.cpp:
(WebCore::MemoryUsageSupport::processMemorySizesInBytes):
(WebCore):
2012-05-31 Kent Tamura <tkent@chromium.org>
Unreviewed, rolling out r119062 and r119064.
http://trac.webkit.org/changeset/119062
http://trac.webkit.org/changeset/119064
https://bugs.webkit.org/show_bug.cgi?id=87360
Broke build on Lion, SnowLoepard, Chromium Windows, and
Chromium Linux 32
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/Decimal.cpp: Removed.
* platform/Decimal.h: Removed.
2012-05-31 Shane Stephens <shanestephens@google.com>
text-decoration should not be propagated through absolutely positioned elements to <a> tags
https://bugs.webkit.org/show_bug.cgi?id=86517
Reviewed by Darin Adler.
Test: fast/css/text-decoration-in-second-order-descendants.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
Remove fix from 18611 as it doesn't work on second order descendants.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
Add floating and positioned checks when deciding whether to avoid propagating text decoration. Move all checks into new method to improve readability.
(WebCore::doesNotInheritTextDecoration): Added
2012-05-30 Yoshifumi Inoue <yosin@chromium.org>
Build fix for Linon/SnowLeopard after r119062
* platform/Decimal.cpp:
(WebCore::Decimal::Decimal):
2012-05-30 Yoshifumi Inoue <yosin@chromium.org>
[Platform] Introduce Decimal class for Number/Range input type.
https://bugs.webkit.org/show_bug.cgi?id=87360
Reviewed by Kent Tamura.
This patch added new class Decimal for decimal arithmatic in two
files: platform/Decimal.cpp and Decimal.h with unit test.
Test: WebKit/chromium/tests/DecimalTest.cpp
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/Decimal.cpp: Added.
(WebCore):
(DecimalPrivate):
(SpecialValueHandler):
(WebCore::DecimalPrivate::SpecialValueHandler::SpecialValueHandler):
(WebCore::DecimalPrivate::SpecialValueHandler::handle):
(WebCore::DecimalPrivate::SpecialValueHandler::value):
(UInt128):
(WebCore::DecimalPrivate::UInt128::UInt128):
(WebCore::DecimalPrivate::UInt128::high):
(WebCore::DecimalPrivate::UInt128::low):
(WebCore::DecimalPrivate::UInt128::multiply):
(WebCore::DecimalPrivate::UInt128::highUInt32):
(WebCore::DecimalPrivate::UInt128::lowUInt32):
(WebCore::DecimalPrivate::UInt128::isZero):
(WebCore::DecimalPrivate::UInt128::makeUInt64):
(WebCore::DecimalPrivate::UInt128::operator/=):
(WebCore::DecimalPrivate::UInt128::multiplyHigh):
(WebCore::DecimalPrivate::countDigits):
(WebCore::DecimalPrivate::scaleDown):
(WebCore::DecimalPrivate::scaleUp):
(WebCore::Decimal::EncodedData::EncodedData):
(WebCore::Decimal::EncodedData::operator==):
(WebCore::Decimal::Decimal):
(WebCore::Decimal::operator=):
(WebCore::Decimal::operator+=):
(WebCore::Decimal::operator-=):
(WebCore::Decimal::operator*=):
(WebCore::Decimal::operator/=):
(WebCore::Decimal::operator-):
(WebCore::Decimal::operator+):
(WebCore::Decimal::operator*):
(WebCore::Decimal::operator/):
(WebCore::Decimal::operator==):
(WebCore::Decimal::operator!=):
(WebCore::Decimal::operator<):
(WebCore::Decimal::operator<=):
(WebCore::Decimal::operator>):
(WebCore::Decimal::operator>=):
(WebCore::Decimal::abs):
(WebCore::Decimal::alignOperands):
(WebCore::Decimal::ceiling):
(WebCore::Decimal::compareTo):
(WebCore::Decimal::floor):
(WebCore::Decimal::fromString):
(WebCore::Decimal::infinity):
(WebCore::Decimal::nan):
(WebCore::Decimal::remainder):
(WebCore::Decimal::round):
(WebCore::Decimal::toString):
(WebCore::Decimal::zero):
* platform/Decimal.h: Added.
(WebCore):
(DecimalPrivate):
(Decimal):
(EncodedData):
(WebCore::Decimal::EncodedData::operator!=):
(WebCore::Decimal::EncodedData::coefficient):
(WebCore::Decimal::EncodedData::exponent):
(WebCore::Decimal::EncodedData::isFinite):
(WebCore::Decimal::EncodedData::isNaN):
(WebCore::Decimal::EncodedData::isSpecial):
(WebCore::Decimal::EncodedData::isZero):
(WebCore::Decimal::EncodedData::sign):
(WebCore::Decimal::EncodedData::setSign):
(WebCore::Decimal::EncodedData::formatClass):
(WebCore::Decimal::isFinite):
(WebCore::Decimal::isNaN):
(WebCore::Decimal::isNegative):
(WebCore::Decimal::isPositive):
(WebCore::Decimal::isSpecial):
(WebCore::Decimal::isZero):
(WebCore::Decimal::value):
(AlignedOperands):
(WebCore::Decimal::invertSign):
(WebCore::Decimal::exponent):
(WebCore::Decimal::sign):
2012-05-30 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r116723.
* platform/graphics/wince/FontWinCE.cpp:
(WebCore::TextRunComponent::TextRunComponent):
2012-05-30 Kentaro Hara <haraken@chromium.org>
Implement CSSParser::determineNameInNamespace() as a helper function for CSSGrammar.y
https://bugs.webkit.org/show_bug.cgi?id=87799
Reviewed by Darin Adler.
As pointed out by darin@ in https://bugs.webkit.org/show_bug.cgi?id=87627#c12,
we should avoid repeating the following code in CSSGrammar.y:
if (p->m_styleSheet)
$$->setTag(QualifiedName(namespacePrefix, $2, p->m_styleSheet->determineNamespace(namespacePrefix)));
else
$$->setTag(QualifiedName(namespacePrefix, $2, p->m_defaultNamespace));
This patch implements CSSParser::determineNameInNamespace() as a helper function
and replaces the above code.
Tests: fast/dom/SelectorAPI/*. No change in test results.
* css/CSSGrammar.y:
* css/CSSParser.cpp:
(WebCore::CSSParser::determineNameInNamespace):
(WebCore):
* css/CSSParser.h:
2012-05-30 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r117697.
* page/wince/FrameWinCE.cpp:
(WebCore::computePageRectsForFrame):
2012-05-30 Shawn Singh <shawnsingh@chromium.org>
[chromium] Fix min/max bounds error in CCMathUtil.cpp
https://bugs.webkit.org/show_bug.cgi?id=87915
Reviewed by James Robinson.
Two unit tests added to CCMathUtilTest:
CCMathUtilTest.verifyEnclosingClippedRectUsesCorrectInitialBounds
CCMathUtilTest.verifyEnclosingRectOfVerticesUsesCorrectInitialBounds
While computing bounds, the initial values for xmax and ymax are
intended to be set to -float_max. It turns out that
std::numeric_limits<float>::min() actually returns the smallest
positive value close to zero, which is not what was intended. This
patch fixes the code to use -float_max instead, which is the
intended value.
* platform/graphics/chromium/cc/CCMathUtil.cpp:
(WebCore::CCMathUtil::mapClippedRect):
(WebCore::CCMathUtil::projectClippedRect):
(WebCore::CCMathUtil::computeEnclosingRectOfVertices):
(WebCore::CCMathUtil::computeEnclosingClippedRect):
(WebCore):
* platform/graphics/chromium/cc/CCMathUtil.h:
(WebCore::HomogeneousCoordinate::HomogeneousCoordinate):
(HomogeneousCoordinate):
(WebCore::HomogeneousCoordinate::shouldBeClipped):
(WebCore::HomogeneousCoordinate::cartesianPoint2d):
(WebCore):
(CCMathUtil):
2012-05-30 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r118568.
* platform/text/wince/TextBreakIteratorWinCE.cpp:
(WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator):
2012-05-30 Abhishek Arya <inferno@chromium.org>
Crash in ContainerNode::parserAddChild.
https://bugs.webkit.org/show_bug.cgi?id=87903
Reviewed by Ryosuke Niwa.
Call the ChildNodeInsertionNotifier.notify call at the end since
it can destroy |this| and some of the local pointers like |last|.
This also matches the order of calls - childrenChanged precedes
ChildNodeInsertionNotifier.notify in updateTreeAfterInsertion and
ContainerNode::parserInsertBefore.
Also remove a FIXME since we use ChildNodeInsertionNotifier.notify
instead of ChildNodeInsertionNotifier.notifyInsertedIntoDocument
(as recommended in the FIXME).
Test: fast/dom/child-insertion-notify-crash.html
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::parserAddChild):
2012-05-30 Rick Byers <rbyers@chromium.org>
[chromium] Implement pointer and hover CSS media features
https://bugs.webkit.org/show_bug.cgi?id=87403
Reviewed by Adam Barth.
Add initial support for the pointer and hover media features as defined
here:
http://dev.w3.org/csswg/css4-mediaqueries/#pointer
http://dev.w3.org/csswg/css4-mediaqueries/#hover
For now this only supports the case where we know a touch screen is
available (currently known only for the chromium port on certain
platforms). All other cases continue to behave exactly as if the media
feature isn't supported.
Tests: fast/media/mq-pointer.html
* css/CSSValueKeywords.in:
* css/MediaFeatureNames.h:
(MediaFeatureNames):
* css/MediaQueryEvaluator.cpp:
(WebCore::getLeastCapablePrimaryPointerDeviceType):
(WebCore):
(WebCore::hoverMediaFeatureEval):
(WebCore::pointerMediaFeatureEval):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::InternalSettings):
(WebCore::InternalSettings::restoreTo):
(WebCore::InternalSettings::setDeviceSupportsTouch):
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:
2012-05-30 Julien Chaffraix <jchaffraix@webkit.org>
Add an helper function to get the style for a cell's flow computation
https://bugs.webkit.org/show_bug.cgi?id=87902
Reviewed by Ojan Vafai.
No expected change in behavior.
This change introduces styleForCellFlow that unify which function we use
to determine a cell's direction and writing mode.
This unification will make it easier to support direction on table row
group (section in WebKit land).
* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::styleForCellFlow):
Added the new function along with a comment as to its purpose.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::clippedOverflowRectForRepaint):
(WebCore::RenderTableCell::computeCollapsedStartBorder):
(WebCore::RenderTableCell::computeCollapsedEndBorder):
(WebCore::RenderTableCell::computeCollapsedBeforeBorder):
(WebCore::RenderTableCell::computeCollapsedAfterBorder):
(WebCore::RenderTableCell::borderHalfLeft):
(WebCore::RenderTableCell::borderHalfRight):
(WebCore::RenderTableCell::borderHalfTop):
(WebCore::RenderTableCell::borderHalfBottom):
(WebCore::RenderTableCell::borderHalfStart):
(WebCore::RenderTableCell::borderHalfEnd):
(WebCore::RenderTableCell::borderHalfBefore):
(WebCore::RenderTableCell::borderHalfAfter):
(WebCore::RenderTableCell::paintCollapsedBorders):
Mostly mechanical replacement.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::cachedCollapsedLeftBorder):
(WebCore::RenderTableCell::cachedCollapsedRightBorder):
(WebCore::RenderTableCell::cachedCollapsedTopBorder):
(WebCore::RenderTableCell::cachedCollapsedBottomBorder):
Made the argument 'const' now.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):
Added a FIXME to unify with the rest.
2012-05-30 Christophe Dumez <christophe.dumez@intel.com>
[JSC] SerializedScriptValue.create() succeeds even if MessagePort object cannot be found in transferred ports
https://bugs.webkit.org/show_bug.cgi?id=87118
Reviewed by Adam Barth.
Make SerializedScriptValue.create() throw an exception if one of the
MessagePort objects cannot be found in the transferred ports. This
matches the behavior of the V8 implementation.
Test: webintents/web-intents-obj-constructor.html
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpIfTerminal):
2012-05-30 Mark Pilgrim <pilgrim@chromium.org>
[Chromium] Call fileUtilities methods directly
https://bugs.webkit.org/show_bug.cgi?id=87852
Reviewed by Adam Barth.
Part of a refactoring series. See tracking bug 82948.
* platform/chromium/DragDataChromium.cpp:
(WebCore::DragData::asURL):
* platform/chromium/FileSystemChromium.cpp:
(WebCore::deleteFile):
(WebCore::deleteEmptyDirectory):
(WebCore::getFileSize):
(WebCore::getFileModificationTime):
(WebCore::getFileMetadata):
(WebCore::directoryName):
(WebCore::pathByAppendingComponent):
(WebCore::makeAllDirectories):
(WebCore::openFile):
(WebCore::closeFile):
(WebCore::seekFile):
(WebCore::truncateFile):
(WebCore::readFromFile):
(WebCore::writeToFile):
* platform/chromium/PlatformSupport.h:
(PlatformSupport):
2012-05-30 Kent Tamura <tkent@chromium.org>
Form controls in <fieldset disabled> should not be focusable.
https://bugs.webkit.org/show_bug.cgi?id=87380
Reviewed by Darin Adler.
Test: fast/forms/fieldset/focus-in-fieldset-disabled.html
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::supportsFocus):
Refer to disabled() instead of m_disabled to take account of wrapping
fieldset elements.
2012-05-30 Robin Dunn <robin@alldunn.com>
[wx] Implement HTML clipboard support.
https://bugs.webkit.org/show_bug.cgi?id=87883
Reviewed by Kevin Ollivier.
* platform/wx/ClipboardWx.cpp:
(WebCore::ClipboardWx::writeRange):
* platform/wx/PasteboardWx.cpp:
(WebCore::Pasteboard::writeSelection):
(WebCore::Pasteboard::documentFragment):
2012-05-30 Garrett Casto <gcasto@chromium.org>
TextFieldDecorationElement should respect style attribute
https://bugs.webkit.org/show_bug.cgi?id=87762
Reviewed by Kent Tamura.
* html/shadow/TextFieldDecorationElement.cpp: Use style set on the
Element when creating rendering style.
(WebCore::TextFieldDecorationElement::customStyleForRenderer):
2012-05-30 Ojan Vafai <ojan@chromium.org>
Avoid second layout for flex-direction:row, flex-basis:auto flex items
https://bugs.webkit.org/show_bug.cgi?id=87901
Reviewed by Tony Chang.
No new tests. This is strictly a performance optimization and has no other
web visible changes.
Also, add FIXMEs for other cases where we could avoid doing layouts.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
2012-05-30 Zhenyao Mo <zmo@google.com>
WebKit incorrectly clears the alpha channel on readPixels, even for Framebuffers
https://bugs.webkit.org/show_bug.cgi?id=87310
Reviewed by Kenneth Russell.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::getParameter): set DEPTH_BITS/STENCIL_BITS to 0 if related channels are not requested.
(WebCore::WebGLRenderingContext::readPixels): don't do the alpha value fix if the current bound is not the internal drawing buffer.
2012-05-30 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r118986.
http://trac.webkit.org/changeset/118986
https://bugs.webkit.org/show_bug.cgi?id=87914
Caused several IndexedDB browser_test failures on Chromium
canary builders (Requested by rafaelw_ on #webkit).
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::advance):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::setVersion):
* Modules/indexeddb/IDBDatabaseError.h:
(WebCore::IDBDatabaseError::create):
(IDBDatabaseError):
(WebCore::IDBDatabaseError::createWithoutOffset):
(WebCore::IDBDatabaseError::code):
(WebCore::IDBDatabaseError::setCode):
(WebCore::IDBDatabaseError::setMessage):
(WebCore::IDBDatabaseError::IDBDatabaseError):
* Modules/indexeddb/IDBDatabaseException.cpp:
(WebCore):
(WebCore::IDBDatabaseException::initializeDescription):
* Modules/indexeddb/IDBDatabaseException.h:
(IDBDatabaseException):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::resetReadyState):
(WebCore::IDBRequest::abort):
(WebCore::IDBRequest::onError):
(WebCore::IDBRequest::onSuccess):
(WebCore::IDBRequest::onSuccessWithContinuation):
(WebCore::IDBRequest::dispatchEvent):
* Modules/indexeddb/IDBRequest.h:
(IDBRequest):
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.cpp:
* Modules/indexeddb/IDBTransaction.h:
(IDBTransaction):
* Modules/indexeddb/IDBTransaction.idl:
2012-05-30 Dominic Mazzoni <dmazzoni@chromium.org>
[Chromium] AX: WebAccessibilityObject should check if an AccessibilityObject is detached
https://bugs.webkit.org/show_bug.cgi?id=87778
Reviewed by Adam Barth.
Chromium was never actually using AccessibilityObjectWrapper, so
this change deletes it. Instead, it's replaced with a simple bool
that keeps track of whether an AccessibilityObject was detached or
not. WebKit/chromium/public/WebAccessibilityObject can then use this
to determine if an object is still valid.
Test: accessibility/accessibility-object-detached.html
* WebCore.gypi:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::AccessibilityObject):
(WebCore::AccessibilityObject::detach):
(WebCore::AccessibilityObject::isDetached):
(WebCore):
* accessibility/AccessibilityObject.h:
(AccessibilityObject):
* accessibility/chromium/AXObjectCacheChromium.cpp:
(WebCore):
(WebCore::AXObjectCache::detachWrapper):
(WebCore::AXObjectCache::attachWrapper):
* accessibility/chromium/AccessibilityObjectWrapper.h: Removed.
2012-05-30 Shawn Singh <shawnsingh@chromium.org>
Simplify TransformationMatrix rotation code to improve precision
https://bugs.webkit.org/show_bug.cgi?id=86666
Reviewed by Adrienne Walker.
Change covered by existing layout tests;
Additional unit tests added.
The original rotation code for WebCore::TransformationMatrix was
using indirect trig identities to compute basic rotation
matrices. As far as I can imagine, this is unnecessary, and brief
informal experiments showed that we can gain a few extra bits of
precision by avoiding that indirection.
Indeed, precision improved such that it revealed a mistake on one
of the unit tests, where the test was actually degenerate so that
the layer was aligned with a viewport boundary. When it was
imprecise, it didnt appear to be aligned. Putting an additional
translation on that test fixes it so it is no longer a degenerate
test.
This patch also revealed a few chinks in the unit testing armor of
this code, an error that should have been caught in unit tests was
luckily caught by SVG layout tests. This chink is fixed by adding
2 extra unit tests.
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::TransformationMatrix::rotate3d):
2012-05-30 Alec Flett <alecflett@chromium.org>
IndexedDB: Remove old get/getKey implementations
https://bugs.webkit.org/show_bug.cgi?id=87879
Reviewed by Ojan Vafai.
Removal of dead code, was scaffolding for a complicated
Chromium landing.
* Modules/indexeddb/IDBIndexBackendImpl.cpp:
(WebCore::IDBIndexBackendImpl::getInternal):
(WebCore::IDBIndexBackendImpl::getKeyInternal):
(WebCore::IDBIndexBackendImpl::get):
(WebCore::IDBIndexBackendImpl::getKey):
* Modules/indexeddb/IDBIndexBackendImpl.h:
(IDBIndexBackendImpl):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::get):
(WebCore::IDBObjectStoreBackendImpl::getInternal):
* Modules/indexeddb/IDBObjectStoreBackendImpl.h:
(IDBObjectStoreBackendImpl):
2012-05-30 Joe Mason <jmason@rim.com>
[BlackBerry] Fix assertion fail on redirect due to multiple jobs per handle
https://bugs.webkit.org/show_bug.cgi?id=87579
Reviewed by George Staikos.
RIM PR #158892:
When we start a redirect, we now call cancelJob instead of just deleting it immediately to make sure
that all cleanup is performed. However, we also reassign the ResourceHandle to the new job, and
since cancelJob is asynchronous it is now assigned to two jobs simultaneously.
Work around this by only returning handles that have not been cancelled from findJobForHandle.
Cancelled jobs still technically exist in the jobs list, but they're invisible to callers. This is
safe because there is literally nothing that can be done with a cancelled job - it is supposed to
merely consume any notifications that are already in progress and then kill itself off - so no
callers of findJobForHandle are expecting a cancelled job. (All existing callers call methods on the
returned job which are no-ops for cancelled jobs, so there is no behaviour change.)
No new tests because there is no behaviour change (fixes a regression).
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::findJobForHandle):
2012-05-30 Kentaro Hara <haraken@chromium.org>
[V8][Performance] Optimize DOM attribute getters that return an empty string
https://bugs.webkit.org/show_bug.cgi?id=87820
Reviewed by Adam Barth.
This patch optimizes the performance of DOM attribute getters that return an
empty string by 65.8% (e.g. div.id, div.className, div.title, div.lang ...etc)
Performance test: Bindings/undefined-id-getter.html
[Without the patch]
RESULT Bindings: undefined-id-getter= 441.984669644 runs/s
median= 445.544554455 runs/s, stdev= 11.8406070959 runs/s, min= 405.063291139 runs/s, max= 447.204968944 runs/s
[With the patch]
RESULT Bindings: undefined-id-getter= 738.840460474 runs/s
median= 738.786279683 runs/s, stdev= 2.00249797161 runs/s, min= 733.944954128 runs/s, max= 741.721854305 runs/s
- This patch passes Isolate to v8::String::Empty(), which removes Isolate
look-up inside v8::String::Empty().
- This patch inlines V8Binding::getElementStringAttr() and
V8Binding::setElementStringAttr().
No tests. No change in behavior.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
(GenerateNormalAttrSetter):
* bindings/v8/V8Binding.cpp:
(WebCore::StringCache::v8ExternalStringSlow):
* bindings/v8/V8Binding.h:
(WebCore::StringCache::v8ExternalString):
(StringCache):
(WebCore::v8ExternalString):
(WebCore):
2012-05-30 Kentaro Hara <haraken@chromium.org>
[V8] Implement V8Binding::v8BooleanWithCheck(isolate)
https://bugs.webkit.org/show_bug.cgi?id=87814
Reviewed by Adam Barth.
The objective is to pass Isolate to v8::True() and v8::False().
Similarly to v8NullWithCheck() (bug 87713), this patch implements
V8Binding::v8BooleanWithCheck(isolate), which calls v8::True()/v8::False()
or v8::True(isolate)/v8::False(isolate) depending on whether the
passed isolate is null or not.
This patch also passes Isolate to v8Boolean() in CodeGeneratorV8.pm.
No tests. No behavior change.
* bindings/scripts/CodeGeneratorV8.pm:
(NativeToJSValue):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore::TestEventTargetV8Internal::dispatchEventCallback):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::createAttrGetter):
(WebCore::TestObjV8Internal::reflectedBooleanAttrAttrGetter):
(WebCore::TestObjV8Internal::reflectedCustomBooleanAttrAttrGetter):
* bindings/v8/V8Binding.h:
(WebCore::v8Boolean):
(WebCore):
(WebCore::v8BooleanWithCheck):
2012-05-30 Kentaro Hara <haraken@chromium.org>
[V8] Replace v8::True() and v8::False() with v8Boolean()
https://bugs.webkit.org/show_bug.cgi?id=87812
Reviewed by Adam Barth.
To avoid implementing all of v8TrueWithCheck(isolate), v8FalseWithCheck(isolate)
and v8BooleanWithCheck(isolate), we can first replace v8::True() and v8::False()
with v8Boolean(). Then we can just implement v8BooleanWithCheck(isolate).
No tests. No change in behavior.
* bindings/v8/SerializedScriptValue.cpp:
* bindings/v8/V8Binding.h:
(WebCore::v8StringOrFalse):
* bindings/v8/V8NPUtils.cpp:
(WebCore::convertNPVariantToV8Object):
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::V8DOMStringMap::namedPropertyDeleter):
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallback):
* bindings/v8/custom/V8StorageCustom.cpp:
(WebCore::storageDeleter):
2012-05-30 Kentaro Hara <haraken@chromium.org>
[V8] Replace v8::Null() with v8NullWithCheck(isolate) in custom bindings where isolate can be 0
https://bugs.webkit.org/show_bug.cgi?id=87807
Reviewed by Adam Barth.
The objective is to pass Isolate around in V8 bindings.
This patch replaces v8::Null() with v8NullWithCheck(isolate)
in custom bindings where isolate can be 0.
'where isolate can be 0' means all the places where we cannot
retrieve Isolate directly from AccessorInfo or Arguments.
No tests. No behavior change.
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CSSRuleCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CSSStyleSheetCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CSSValueCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DOMTokenListCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DataViewCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8EntryCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8EntrySyncCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8EventCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Float32ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Float64ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8HTMLElementCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8IDBAnyCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8IDBKeyCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ImageDataCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Int16ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Int32ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Int8ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8LocationCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8NamedNodeMapCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8NodeCustom.cpp:
(WebCore::toV8Slow):
* bindings/v8/custom/V8SVGDocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8SVGElementCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8SVGPathSegCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ScriptProfileCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8StyleSheetCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Uint16ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Uint32ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Uint8ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8WorkerContextCustom.cpp:
(WebCore::toV8):
2012-05-30 Kentaro Hara <haraken@chromium.org>
[V8] Replace v8::Null() with v8::Null(isolate) or v8NullWithCheck(isolate) in non-custom bindings
https://bugs.webkit.org/show_bug.cgi?id=87810
Reviewed by Adam Barth.
The objective is to pass Isolate around in V8 bindings.
For non-custom bindings, we replace v8::Null() with v8::Null(isolate)
where isolate cannot be 0, and replace v8::Null() with v8NullWithCheck(isolate)
where isolate can be 0.
This will be the final patch for passing Isolate to v8::Null().
No tests. No change in behavior.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
(GenerateFunctionCallback):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::contentDocumentAttrGetter):
(WebCore::TestObjV8Internal::getSVGDocumentCallback):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter):
(WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter):
* bindings/v8/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::deserialize):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::convertEventTargetToV8Object):
2012-05-30 Kentaro Hara <haraken@chromium.org>
[V8] Replace v8::Null() with v8::Null(isolate) in custom bindings where isolate shouldn't be 0
https://bugs.webkit.org/show_bug.cgi?id=87809
Reviewed by Adam Barth.
The objective is to pass Isolate around in V8 bindings.
This patch replaces v8::Null() with v8::Null(isolate) in custom bindings
where isolate shouldn't be 0. 'where isolate shouldn't be 0' is the place
where isolate is retrieved directly from AccessorInfo and Arguments.
This patch includes a couple of refactorings:
- Makes V8DeviceMotionEvent::createAccelerationObject() and
V8DeviceMotionEvent::createRotationRateObject() static
- Moves V8HTMLElement::toV8Object() into the existing ENABLE(MICRODATA) flag.
No tests. No change in behavior.
* bindings/v8/custom/V8ClipboardCustom.cpp:
(WebCore::V8Clipboard::typesAccessorGetter):
* bindings/v8/custom/V8CoordinatesCustom.cpp:
(WebCore::V8Coordinates::altitudeAccessorGetter):
(WebCore::V8Coordinates::altitudeAccuracyAccessorGetter):
(WebCore::V8Coordinates::headingAccessorGetter):
(WebCore::V8Coordinates::speedAccessorGetter):
* bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
(WebCore::V8DeviceMotionEvent::accelerationAccessorGetter):
(WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAccessorGetter):
(WebCore::V8DeviceMotionEvent::rotationRateAccessorGetter):
(WebCore::V8DeviceMotionEvent::intervalAccessorGetter):
* bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
(WebCore::V8DeviceOrientationEvent::alphaAccessorGetter):
(WebCore::V8DeviceOrientationEvent::betaAccessorGetter):
(WebCore::V8DeviceOrientationEvent::gammaAccessorGetter):
(WebCore::V8DeviceOrientationEvent::absoluteAccessorGetter):
* bindings/v8/custom/V8DocumentLocationCustom.cpp:
(WebCore::V8Document::locationAccessorGetter):
* bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
(WebCore::V8HTMLCanvasElement::getContextCallback):
* bindings/v8/custom/V8HTMLElementCustom.cpp:
(WebCore::toV8):
(WebCore):
(WebCore::toV8Object):
* bindings/v8/custom/V8HistoryCustom.cpp:
(WebCore::V8History::stateAccessorGetter):
* bindings/v8/custom/V8MessageEventCustom.cpp:
(WebCore::V8MessageEvent::dataAccessorGetter):
* bindings/v8/custom/V8NodeCustom.cpp:
(WebCore::V8Node::insertBeforeCallback):
(WebCore::V8Node::replaceChildCallback):
(WebCore::V8Node::removeChildCallback):
(WebCore::V8Node::appendChildCallback):
* bindings/v8/custom/V8PopStateEventCustom.cpp:
(WebCore::V8PopStateEvent::stateAccessorGetter):
* bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
(WebCore::V8SQLResultSetRowList::itemCallback):
* bindings/v8/custom/V8TrackEventCustom.cpp:
(WebCore::V8TrackEvent::trackAccessorGetter):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::toV8Object):
(WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
(WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
2012-05-30 Nico Weber <thakis@chromium.org>
Make the files attribute of HTMLInputElement writable
https://bugs.webkit.org/show_bug.cgi?id=87154
Reviewed by Adam Barth.
whatwg thread:
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-May/036140.html
* bindings/objc/PublicDOMInterfaces.h:
Remove readonly on files property.
* html/FileInputType.cpp:
(FileInputType):
Add a NULL check to setFiles().
* html/FileInputType.h:
(FileInputType):
Let setFiles() overwrite the base class's method.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setFiles):
Add setFiles() implementation, delegate to input type.
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/HTMLInputElement.idl:
* html/InputType.cpp:
(WebCore::InputType::setFiles):
setFiles() does nothing by default.
* html/InputType.h:
(InputType):
Add a virtual setFiles() method.
2012-05-30 Joe Mason <jmason@rim.com>
[BlackBerry] Remove useless string->char*->string conversion in NetworkJob.
https://bugs.webkit.org/show_bug.cgi?id=87861
Reviewed by Antonio Gomes.
RIM PR #152383: username is a WTF::String. ResourceHandleInternal::m_user is a string. Yet they're
assigned with "username = m_user.utf8().data()". Pointless: "username = m_user" will do.
No new tests since there is no behaviour change.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::sendRequestWithCredentials):
2012-05-30 Dan Bernstein <mitz@apple.com>
[Qt] REGRESSION(r118568): It broke fast/forms/textarea-maxlength.html on Qt 4.8
https://bugs.webkit.org/show_bug.cgi?id=87740
Reviewed by Darin Adler.
* platform/text/qt/TextBreakIteratorQt.cpp:
(WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Changed to use
the return value of setUpIterator.
2012-05-30 Zeno Albisser <zeno@webkit.org>
GraphicsSurface: allow importing and exporting of textures directly on GPU side.
https://bugs.webkit.org/show_bug.cgi?id=87725
Add copyFromFramebuffer function to copy a texture from an FBO
onto the GraphicsSurface.
Add getTextureID function to export the texture ID.
This allows binding/blitting the texture directly on the GPU.
Reviewed by Noam Rosenthal.
* platform/graphics/surfaces/GraphicsSurface.cpp:
(WebCore::GraphicsSurface::getTextureID):
(WebCore):
(WebCore::GraphicsSurface::copyFromFramebuffer):
* platform/graphics/surfaces/GraphicsSurface.h:
(GraphicsSurface):
* platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
(WebCore::GraphicsSurface::platformGetTextureID):
(WebCore):
(WebCore::GraphicsSurface::platformCopyFromFramebuffer):
2012-05-30 Alec Flett <alecflett@chromium.org>
IndexedDB: Implement IDBTransaction.error and IDBRequest.error
https://bugs.webkit.org/show_bug.cgi?id=87865
Reviewed by Tony Chang.
Added "error" attribute to IDBRequest and IDBTransaction. Update
IDBDatabaseError to honor the IDBDatabaseException behavior
of dealing with IDB-specific throws of DOMException codes,
as per the spec.
Existing tests which previously tested 'errorCode' and
'webkitErrorMessage' have been updated to use the new attribute.
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::advance):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::setVersion):
* Modules/indexeddb/IDBDatabaseError.h:
(WebCore::IDBDatabaseError::create):
(WebCore::IDBDatabaseError::code):
(WebCore::IDBDatabaseError::idbCode):
(WebCore::IDBDatabaseError::name):
(WebCore::IDBDatabaseError::IDBDatabaseError):
(IDBDatabaseError):
* Modules/indexeddb/IDBDatabaseException.cpp:
(WebCore):
(WebCore::getErrorEntry):
(WebCore::IDBDatabaseException::initializeDescription):
(WebCore::IDBDatabaseException::getErrorName):
(WebCore::IDBDatabaseException::getLegacyErrorCode):
* Modules/indexeddb/IDBDatabaseException.h:
(IDBDatabaseException):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::error):
(WebCore):
(WebCore::IDBRequest::resetReadyState):
(WebCore::IDBRequest::abort):
(WebCore::IDBRequest::onError):
(WebCore::IDBRequest::onSuccess):
(WebCore::IDBRequest::onSuccessWithContinuation):
(WebCore::IDBRequest::dispatchEvent):
* Modules/indexeddb/IDBRequest.h:
(IDBRequest):
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::error):
(WebCore):
(WebCore::IDBTransaction::setError):
* Modules/indexeddb/IDBTransaction.h:
(IDBTransaction):
* Modules/indexeddb/IDBTransaction.idl:
2012-05-30 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] ImageDecoderQt doesn't support some decoders.
https://bugs.webkit.org/show_bug.cgi?id=87851
Reviewed by Kenneth Rohde Christiansen.
If forced to decode GIF and JPEG, ImageDecoderQt show several
artifacts. This is caused by mismatched decoded image-formats.
Convert mismatched color spaces into ARGB color space, and perform
manual mem-copy when the image has been decoded into a new buffer.
This patch also add support for down-scaling in the decoder.
* platform/graphics/qt/ImageDecoderQt.cpp:
(WebCore::ImageDecoderQt::internalDecodeSize):
(WebCore::ImageDecoderQt::internalHandleCurrentImage):
2012-05-30 Emil A Eklund <eae@chromium.org>
Floats wraps incorrectly when top edge has subpixel precision
https://bugs.webkit.org/show_bug.cgi?id=87688
Reviewed by Levi Weintraub.
When computing the logical left and right offsets for a float we
incorrectly floored the logical top when passing it to the float search
adapter. This caused it to return incorrect values where the floored and
pixel snapped values are not the same.
Test: fast/sub-pixel/float-wrap-with-subpixel-top.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
2012-05-30 Emil A Eklund <eae@chromium.org>
Inline blocks with margin wrap incorrectly with subpixel layout turned on
https://bugs.webkit.org/show_bug.cgi?id=87897
Reviewed by Levi Weintraub.
Change WebCore::getBorderPaddingMargin and the helper function
getBPMWidth to return a LayoutUnit rather than an int as the padding and
margin values have subpixel precision. This fixes an issue where we would
incorrectly wrap inline blocks with a subpixel padding or margin.
Test: fast/sub-pixel/inline-block-with-margin.html
* rendering/RenderBlock.cpp:
(WebCore::getBPMWidth):
(WebCore::getBorderPaddingMargin):
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2012-05-30 Tony Chang <tony@chromium.org>
rename flexbox css values from justify and distribute to space-between and space-around
https://bugs.webkit.org/show_bug.cgi?id=87867
Reviewed by Ojan Vafai.
This was recently changed in the spec:
http://dev.w3.org/csswg/css3-flexbox/#justify-content
No new tests, updated existing tests and expectations.
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EFlexPack):
(WebCore::CSSPrimitiveValue::operator EFlexLinePack):
* css/CSSValueKeywords.in:
* rendering/RenderFlexibleBox.cpp:
(WebCore::initialPackingOffset):
(WebCore::packingSpaceBetweenChildren):
(WebCore::initialLinePackingOffset):
(WebCore::linePackingSpaceBetweenChildren):
* rendering/style/RenderStyleConstants.h:
2012-05-30 Kevin Ollivier <kevino@theolliviers.com>
[wx] Unreviewed build fix. Make sure we get the file size with the proper native type.
* platform/wx/FileSystemWx.cpp:
(WebCore::getFileMetadata):
2012-05-30 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r118913.
http://trac.webkit.org/changeset/118913
https://bugs.webkit.org/show_bug.cgi?id=87891
patch is incorrect (see comments in
https://bugs.webkit.org/show_bug.cgi?id=87889) (Requested by
thorton on #webkit).
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs):
* css/CSSFontFaceSrcValue.h:
(CSSFontFaceSrcValue):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::addSubresourceStyleURLs):
* css/CSSPrimitiveValue.h:
(CSSPrimitiveValue):
* css/CSSReflectValue.cpp:
(WebCore::CSSReflectValue::addSubresourceStyleURLs):
* css/CSSReflectValue.h:
(CSSReflectValue):
* css/CSSValue.cpp:
(WebCore::CSSValue::addSubresourceStyleURLs):
* css/CSSValue.h:
(CSSValue):
* css/CSSValueList.cpp:
(WebCore::CSSValueList::addSubresourceStyleURLs):
* css/CSSValueList.h:
(CSSValueList):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::addSubresourceStyleURLs):
* css/StylePropertySet.h:
(StylePropertySet):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::addSubresourceStyleURLs):
* css/StyleSheetContents.h:
(StyleSheetContents):
* dom/Element.h:
* dom/Node.cpp:
(WebCore::Node::getSubresourceURLs):
* dom/Node.h:
(WebCore::Node::addSubresourceAttributeURLs):
(WebCore):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::addSubresourceAttributeURLs):
* dom/ProcessingInstruction.h:
(ProcessingInstruction):
* dom/StyledElement.cpp:
(WebCore::StyledElement::addSubresourceAttributeURLs):
* dom/StyledElement.h:
(StyledElement):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::addSubresourceAttributeURLs):
* html/HTMLBodyElement.h:
(HTMLBodyElement):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::addSubresourceAttributeURLs):
* html/HTMLEmbedElement.h:
(HTMLEmbedElement):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::addSubresourceAttributeURLs):
* html/HTMLImageElement.h:
(HTMLImageElement):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::addSubresourceAttributeURLs):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::addSubresourceAttributeURLs):
* html/HTMLLinkElement.h:
(HTMLLinkElement):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::addSubresourceAttributeURLs):
* html/HTMLObjectElement.h:
(HTMLObjectElement):
* html/HTMLParamElement.cpp:
(WebCore::HTMLParamElement::addSubresourceAttributeURLs):
* html/HTMLParamElement.h:
(HTMLParamElement):
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::addSubresourceAttributeURLs):
* html/HTMLScriptElement.h:
(HTMLScriptElement):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::addSubresourceAttributeURLs):
* html/HTMLStyleElement.h:
(HTMLStyleElement):
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::addSubresourceAttributeURLs):
* html/HTMLTableCellElement.h:
(HTMLTableCellElement):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::addSubresourceAttributeURLs):
* html/HTMLTableElement.h:
(HTMLTableElement):
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::addSubresourceAttributeURLs):
* svg/SVGCursorElement.h:
(SVGCursorElement):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::addSubresourceAttributeURLs):
* svg/SVGFEImageElement.h:
(SVGFEImageElement):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::addSubresourceAttributeURLs):
* svg/SVGImageElement.h:
(SVGImageElement):
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::addSubresourceAttributeURLs):
* svg/SVGScriptElement.h:
(SVGScriptElement):
2012-05-30 Shezan Baig <shezbaig.wk@gmail.com>
Rename offsetTopLeft in RenderBoxModelObject to something better
https://bugs.webkit.org/show_bug.cgi?id=85915
Reviewed by Darin Adler.
Renamed offsetTopLeft in RenderBoxModelObject to
adjustedPositionRelativeToOffsetParent, because it returns the given
startPoint after adjusting it to be relative to the top-left corner of
the offsetParent. The definition of offsetParent itself is non-trivial
and is documented within the body of RenderObject::offsetParent,
therefore I decided to reuse this term, as-is, in the name of this
function.
No new tests; no functional or visible changes.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::offsetLeft):
(WebCore::RenderBox::offsetTop):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
(WebCore::RenderBoxModelObject::offsetLeft):
(WebCore::RenderBoxModelObject::offsetTop):
* rendering/RenderBoxModelObject.h:
(RenderBoxModelObject):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::offsetLeft):
(WebCore::RenderInline::offsetTop):
2012-05-29 Adrienne Walker <enne@google.com>
Transformed fixed position layers have an incorrect overlap map entry
https://bugs.webkit.org/show_bug.cgi?id=64201
Reviewed by Darin Adler.
Previously, layers that both had a transform and were fixed position
were not considered as being fixed position in RenderGeometryMap or in
RenderBox::mapLocalToContainer (although this case is not incorrect in
the case of painting, so an external caller likely adjusts for this).
Tests: compositing/layer-creation/fixed-position-and-transform.html
compositing/layer-creation/fixed-position-under-transform.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer):
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::mapToAbsolute):
2012-05-30 Ulan Degenbaev <ulan@chromium.org>
[v8] Crash after redefining setter on typed array to a number
https://bugs.webkit.org/show_bug.cgi?id=87862
Reviewed by Kenneth Russell.
Remove calls to typed array set() method from C++.
Store the copying script as a hidden property of a typed array prototype.
Test: fast/canvas/webgl/array-override-set.html
* bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
(WebCore):
(WebCore::getHiddenCopyMethod):
(WebCore::installHiddenCopyMethod):
(WebCore::copyElements):
* bindings/v8/custom/V8ArrayBufferViewCustom.h:
(WebCore):
(WebCore::constructWebGLArray):
(WebCore::setWebGLArrayHelper):
* bindings/v8/custom/V8ArrayBufferViewCustomScript.js:
2012-05-30 David Hyatt <hyatt@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=87882
[New Multicolumn] Rename layoutColumns to relayoutForPagination and make it
virtual so that it can be implemented by RenderMultiColumnBlock.
Reviewed by Anders Carlsson.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::relayoutForPagination):
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::relayoutForPagination):
(WebCore):
* rendering/RenderMultiColumnBlock.h:
(RenderMultiColumnBlock):
2012-05-30 Daniel Drake <dsd@laptop.org>
Check for GTK2/GTK3 symbol mismatch earlier
https://bugs.webkit.org/show_bug.cgi?id=87687
Reviewed by Martin Robinson.
No new tests. Regressions in core behavior are covered by existing
plugin tests and the fix deals with particular aspects of the system
environment that are difficult to test.
Detect plugins that would mix GTK+ symbols earlier, so that the
WebKit can skip them and choose a more appropriate plugin module.
* plugins/gtk/PluginPackageGtk.cpp: Move this code from PluginViewGtk.
(WebCore::moduleMixesGtkSymbols):
(WebCore::PluginPackage::load):
* plugins/gtk/PluginViewGtk.cpp: Move this code to PluginPackageGtk.
(WebCore::PluginView::platformStart):
2012-05-30 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Support IMAGE_DECODER_DOWN_SAMPLING flag.
https://bugs.webkit.org/show_bug.cgi?id=87840
Based on patches by Qi Zhang and Jussi Lehto.
Reviewed by Kenneth Rohde Christiansen.
* platform/graphics/Image.cpp:
(WebCore::Image::adjustSourceRectForDownSampling):
* platform/graphics/Image.h:
(Image):
* platform/graphics/openvg/ImageOpenVG.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/qt/ImageQt.cpp:
(WebCore::Image::drawPattern):
(WebCore::BitmapImage::draw):
2012-05-30 Shinya Kawanaka <shinyak@chromium.org>
comparePositions in htmlediting should consider nested Shadow DOM.
https://bugs.webkit.org/show_bug.cgi?id=87623
Reviewed by Ryosuke Niwa.
comparePositions in htmlediting.cpp didn't consider nested Shadow DOM.
This patch makes it possible to compare the nodes in nested Shadow DOM.
The algorithm is: we calculate the common tree scope of node A and B, and
adjust the nodes to the treeScope, then compare them. If the adjusted nodes
are the same, we check the shadow descendent of each node.
Test: editing/shadow/compare-positions-in-nested-shadow.html
* dom/TreeScope.cpp:
(WebCore::listTreeScopes):
(WebCore):
(WebCore::commonTreeScope):
* dom/TreeScope.h:
(WebCore):
* editing/htmlediting.cpp:
(WebCore::comparePositions):
2012-05-30 Erik Arvidsson <arv@chromium.org>
[V8] Clean up V8LazyEventListener to use one less function call
https://bugs.webkit.org/show_bug.cgi?id=87785
Reviewed by Kentaro Hara.
Instead of relying on 'arguments' we rely on 'this'. 'this' cannot be intercepted by a
with-statement so it is safe to use that to bind the context objects. This allows us to
remove one layer of function indirection in the generated code.
Covered by existing tests.
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::prepareListenerObject):
2012-05-30 Tim Horton <timothy_horton@apple.com>
Factor DeferrableOneShotTimer out of GraphicsContextCG/GeneratorGeneratedImage
https://bugs.webkit.org/show_bug.cgi?id=87824
Reviewed by Simon Fraser.
DeferrableOneShotTimer is a timer which takes a class and method to call (as Timer does),
and a delay. It exposes restart(), stop(), and isActive(), and none of the rest of
the TimerBase interface. On restart(), the timer is started with the given delay,
unless it's already running, in which case a flag is set to automatically restart
the timer when it fires instead of calling the given method. This provides a
low-overhead way to implement a deferrable timer.
No new tests, refactoring.
* platform/Timer.h:
(DeferrableOneShotTimer):
(WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer): New class.
(WebCore::DeferrableOneShotTimer::restart):
(WebCore::DeferrableOneShotTimer::fired):
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::invalidateCacheTimerFired):
* platform/graphics/GeneratorGeneratedImage.h:
(WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage): Make use of DeferrableOneShotTimer.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer): Make use of DeferrableOneShotTimer.
(WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired):
2012-05-30 Xueqing Huang <huangxueqing@baidu.com>
eventSender.beginDragWithFiles should be implemented in Windows, which blocked drag and drop related tests.
https://bugs.webkit.org/show_bug.cgi?id=86296
Reviewed by Tony Chang.
Test: This change was requirement for eventSender.beginDragWithFiles, update win/Skipped file to remove drag and drop related tests will valiate it.
* platform/win/DragDataWin.cpp:
(WebCore::DragData::numberOfFiles):
2012-05-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
HashTable.h has using directives for std::pair and std::make_pair
https://bugs.webkit.org/show_bug.cgi?id=29919
Reviewed by Darin Adler.
Change code to use std::pair and std::make_pair.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::postNotification):
* html/MediaFragmentURIParser.cpp:
(WebCore::MediaFragmentURIParser::parseFragments):
* html/parser/HTMLMetaCharsetParser.cpp:
(WebCore::HTMLMetaCharsetParser::processMeta):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::brokenImage):
* page/PageSerializer.cpp:
(WebCore::isCharsetSpecifyingNode):
2012-05-30 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: disable ExactlyInt feature in InspectorTypeBuilder since it breaks release Windows 7 WK2
https://bugs.webkit.org/show_bug.cgi?id=87857
Reviewed by Yury Semikhatsky.
Code generator is patched to support old style of int parameter.
* inspector/CodeGeneratorInspector.py:
(TypeModel.init_class):
2012-05-30 Alexei Filippov <alexeif@chromium.org>
Web Inspector: Add trace() method to the WorkerConsole
https://bugs.webkit.org/show_bug.cgi?id=87656
Reviewed by Yury Semikhatsky.
* inspector/front-end/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotRealWorker.prototype._messageReceived):
* inspector/front-end/HeapSnapshotWorker.js:
(WebInspector.WorkerConsole.prototype.trace):
2012-05-30 Kinuko Yasuda <kinuko@chromium.org>
File.lastModifiedDate must return null if the modified time info is not available
https://bugs.webkit.org/show_bug.cgi?id=87709
Reviewed by Kentaro Hara.
Per File API spec, File.lastModifiedDate must return null if the
modified time info is not available.
http://dev.w3.org/2006/webapi/FileAPI/#dfn-lastModifiedDate
Test: http/tests/local/fileapi/file-last-modified-after-delete.html
* fileapi/File.cpp:
(WebCore::File::lastModifiedDateForBinding): Added.
(WebCore):
* fileapi/File.h:
(File):
* fileapi/File.idl: Added ImplementedAs=lastModifiedDateForBinding.
2012-05-30 Jochen Eisinger <jochen@chromium.org>
Match Firefox restrictions to window.blur and window.focus
https://bugs.webkit.org/show_bug.cgi?id=86969
Reviewed by Adam Barth.
Disallow window.blur altogether, and only allow window.focus to be
invoked from the context that created this very window.
There's a new setting (windowFocusRestricted) that defaults to true. If
false, the new restrictions are lifted. This can be used by ports that
would prefer to stick with the old behavior.
For tests, this setting is accessible in window.internals.settings
To temporarily allow window.focus(), an object of type
WindowFocusAllowedIndicator can be created. It is currently used to
enable window.focus() during dispatch of the click event for
notifications.
Tests: fast/dom/Window/mozilla-focus-blur.html
fast/notifications/notifications-click-event-focus.html
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* notifications/Notification.cpp:
(WebCore::Notification::dispatchClickEvent):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::focus):
(WebCore::DOMWindow::blur):
* page/DOMWindow.h:
(DOMWindow):
* page/DOMWindow.idl:
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(Settings):
(WebCore::Settings::setWindowFocusRestricted):
(WebCore::Settings::windowFocusRestricted):
* page/WindowFocusAllowedIndicator.cpp: Added.
(WebCore):
(WebCore::WindowFocusAllowedIndicator::windowFocusAllowed):
(WebCore::WindowFocusAllowedIndicator::WindowFocusAllowedIndicator):
(WebCore::WindowFocusAllowedIndicator::~WindowFocusAllowedIndicator):
* page/WindowFocusAllowedIndicator.h: Added.
(WebCore):
(WindowFocusAllowedIndicator):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::InternalSettings):
(WebCore::InternalSettings::restoreTo):
(WebCore::InternalSettings::setWindowFocusRestricted):
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:
2012-05-30 Mariusz Grzegorczyk <mariusz.g@samsung.com>, Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Fix WebKit2-EFL build
https://bugs.webkit.org/show_bug.cgi?id=83693
Reviewed by Carlos Garcia Campos.
* CMakeLists.txt: Add GestureTapHighlighter.cpp.
2012-05-29 Antti Koivisto <antti@apple.com>
Rename Foo::addSubresourceStyleURLs and Node::addSubresourceAttributeURLs
https://bugs.webkit.org/show_bug.cgi?id=87739
Rubber-stamped by Andreas Kling.
Rename them to collectSubresourceURLs and collectSubresourceURLsFromAttributes to match
the naming conventions.
Move collectSubresourceURLsFromAttributes from Node to Element as only elements have attributes.
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::collectSubresourceURLs):
* css/CSSFontFaceSrcValue.h:
(CSSFontFaceSrcValue):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::collectSubresourceURLs):
* css/CSSPrimitiveValue.h:
(CSSPrimitiveValue):
* css/CSSReflectValue.cpp:
(WebCore::CSSReflectValue::collectSubresourceURLs):
* css/CSSReflectValue.h:
(CSSReflectValue):
* css/CSSValue.cpp:
(WebCore::CSSValue::collectSubresourceURLs):
* css/CSSValue.h:
(CSSValue):
* css/CSSValueList.cpp:
(WebCore::CSSValueList::collectSubresourceURLs):
* css/CSSValueList.h:
(CSSValueList):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::collectSubresourceURLs):
* css/StylePropertySet.h:
(StylePropertySet):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::collectSubresourceURLs):
* css/StyleSheetContents.h:
(StyleSheetContents):
* dom/Element.h:
(WebCore::Element::collectSubresourceURLsFromAttributes):
(Element):
* dom/Node.cpp:
(WebCore::Node::getSubresourceURLs):
* dom/Node.h:
(WebCore):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::collectSubresourceURLsFromAttributes):
* dom/ProcessingInstruction.h:
(ProcessingInstruction):
* dom/StyledElement.cpp:
(WebCore::StyledElement::collectSubresourceURLsFromAttributes):
* dom/StyledElement.h:
(StyledElement):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::collectSubresourceURLsFromAttributes):
* html/HTMLBodyElement.h:
(HTMLBodyElement):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::collectSubresourceURLsFromAttributes):
* html/HTMLEmbedElement.h:
(HTMLEmbedElement):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::collectSubresourceURLsFromAttributes):
* html/HTMLImageElement.h:
(HTMLImageElement):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::collectSubresourceURLsFromAttributes):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::collectSubresourceURLsFromAttributes):
* html/HTMLLinkElement.h:
(HTMLLinkElement):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::collectSubresourceURLsFromAttributes):
* html/HTMLObjectElement.h:
(HTMLObjectElement):
* html/HTMLParamElement.cpp:
(WebCore::HTMLParamElement::collectSubresourceURLsFromAttributes):
* html/HTMLParamElement.h:
(HTMLParamElement):
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::collectSubresourceURLsFromAttributes):
* html/HTMLScriptElement.h:
(HTMLScriptElement):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::collectSubresourceURLsFromAttributes):
* html/HTMLStyleElement.h:
(HTMLStyleElement):
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::collectSubresourceURLsFromAttributes):
* html/HTMLTableCellElement.h:
(HTMLTableCellElement):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::collectSubresourceURLsFromAttributes):
* html/HTMLTableElement.h:
(HTMLTableElement):
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::collectSubresourceURLsFromAttributes):
* svg/SVGCursorElement.h:
(SVGCursorElement):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::collectSubresourceURLsFromAttributes):
* svg/SVGFEImageElement.h:
(SVGFEImageElement):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::collectSubresourceURLsFromAttributes):
* svg/SVGImageElement.h:
(SVGImageElement):
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::collectSubresourceURLsFromAttributes):
* svg/SVGScriptElement.h:
(SVGScriptElement):
2012-05-30 Eugene Klyuchnikov <eustas.bug@gmail.com>
Web Inspector: Fix JS compiler warning
https://bugs.webkit.org/show_bug.cgi?id=87836
Reviewed by Yury Semikhatsky.
* inspector/front-end/SettingsScreen.js: Fix method annotation.
2012-05-30 Zoltan Horvath <zoltan@webkit.org>
[Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder
https://bugs.webkit.org/show_bug.cgi?id=80400
This change modifies the default ImageDecoder for Qt-port from QImageDecoder to WebCore ImageDecoder.
The new behavior is to use QImageDecoder only if WebCoreImageDecoder - and the platform - doesn't support
the requested image type.
The WTF_USE_QT_IMAGE_DECODER macro has been removed, since it is no longer needed.
This change adds build depedency (except Qt-MAC and Qt-WIN platform) for libpng-dev and libjpeg-dev packages,
because PNG and JPEG imagedecoders need not only these libraries, but their headers also. Qmake-config
tests for these libraries were introduced in r110045.
Notice: with using libjpeg-turbo as a system library I measured 10% performance improvement on Methanol benchmark
(collection of popular sites, page-loading benchmark) with this patch.
Reviewed by Simon Hausmann.
No new tests needed.
* Target.pri: Move WebCore ImageDecoder files out of guards. Remove ImageFrameQt.cpp from sources.
* WebCore.pri: Move WebCore ImageDecoder include paths out of guards.
* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes): Add WebCore supported and Qt supported MIME types.
(WebCore::initializeSupportedImageMIMETypesForEncoding): Use Qt supported MIME types.
* platform/graphics/ImageSource.cpp: Remove unnecessary includes.
* platform/graphics/ImageSource.h: Remove unnecessary typedefs.
(WebCore):
* platform/graphics/qt/ImageDecoderQt.cpp: Remove ImageDecoder::create, since it is no longer needed.
(WebCore::ImageDecoderQt::filenameExtension): Remove unnecessary semicolon.
(WebCore::ImageDecoderQt::internalHandleCurrentImage): Use QImage and ImageFrame instead of QPixmap.
(WebCore):
(WebCore::ImageFrame::asNewNativeImage): Moved here from removed ImageFrameQt.cpp.
* platform/image-decoders/ImageDecoder.cpp: Reorganize the includes of the header.
(WebCore::ImageDecoder::create): Add platform macro guarded fallback case for QImageDecoder. Add guards
for JPEG, PNG, ICO decoder for Qt-MAC and Qt-WIN platform.
* platform/image-decoders/ImageDecoder.h: Remove Qt-specific codes.
(WebCore::ImageFrame::getAddr): Remove Qt-specific case, since it is no longer needed.
(ImageFrame):
* platform/image-decoders/qt/ImageFrameQt.cpp: Removed. Dead code, other code has been moved to
ImageDecoderQt.cpp.
2012-05-23 Kinuko Yasuda <kinuko@chromium.org>
REGRESSION: We should allow null modificationTime when snapshot metadata is given
https://bugs.webkit.org/show_bug.cgi?id=86811
Reviewed by Jian Li.
r117432 has introduced a new File constructor which allows the caller
to pass in a snapshot file metadata. In the change we had considered the
given metadata is valid if "metadata.length >= 0 AND metadata.lastModifiedDate != 0",
but we should drop the latter condition (lastModifiedDate != 0) because
1. the value 0 is used to indicate the time information is unavailable in File, and
2. it is valid per spec (http://dev.w3.org/2006/webapi/FileAPI/#dfn-lastModifiedDate says the UA must return null if the information is not available).
(Note: the current js/v8 binding returns Date(0) for the time value 0,
which is still valid as epoch time but would fail to indicate the
unavailability of the information. In this patch I added FIXME in
File.idl and filed a separate issue http://webkit.org/b/87709)
No new tests as this change does not affect regular files/filesystems behavior.
(Tests in Chrome OS port should be able to verify this)
* fileapi/File.cpp:
(WebCore::File::lastModifiedDate):
(WebCore::File::size):
(WebCore::File::captureSnapshot):
* fileapi/File.h:
(File):
2012-05-30 MORITA Hajime <morrita@google.com>
[Shadow DOM] HTMLContentElement and HTMLShadowElement constructors should be visible.
https://bugs.webkit.org/show_bug.cgi?id=87818
Reviewed by Kentaro Hara.
Added them as DOMWindow properties
Tests: fast/dom/shadow/content-element-api.html
fast/dom/shadow/shadow-element.html
* page/DOMWindow.idl:
2012-05-30 Mike Lawther <mikelawther@chromium.org>
CSS3 calc: Implement CSSOM support
https://bugs.webkit.org/show_bug.cgi?id=84551
Reviewed by Ryosuke Niwa.
Adds a pretty printer for the calc expression tree.
Test: css3/calc/cssom.html
* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcValue::customCssText):
(WebCore::CSSCalcPrimitiveValue::customCssText):
(WebCore::CSSCalcBinaryOperation::customCssText):
(CSSCalcBinaryOperation):
* css/CSSCalculationValue.h:
(CSSCalcExpressionNode):
2012-05-29 Li Yin <li.yin@intel.com>
[FileAPI] The result attribute of FileReader shuold use null to replace empty string
https://bugs.webkit.org/show_bug.cgi?id=87578
Reviewed by Jian Li.
Spec: http://www.w3.org/TR/FileAPI/#dfn-result
If the readyState is EMPTY (no read method has been called) or an error
in reading the File or Blob has occurred (using any read method), then the
result attribute MUST return null.
Currently, Firefox11, Opera and IE 10 follows the spec, but Webkit based
browser doesn't.
WebKit should change the returned value empty string into null to keep
conformance with the spec.
Tests: fast/files/read-file-async.html
fast/files/workers/worker-read-file-async.html
* fileapi/FileReader.cpp:
(WebCore::FileReader::arrayBufferResult):
(WebCore::FileReader::stringResult):
2012-05-29 Mark Pilgrim <pilgrim@chromium.org>
[Chromium] Move fileExists to Platform.h
https://bugs.webkit.org/show_bug.cgi?id=87531
Reviewed by Adam Barth.
Call fileExists through fileUtilities(), not directly.
* platform/chromium/FileSystemChromium.cpp:
(WebCore::fileExists):
2012-05-29 Kentaro Hara <haraken@chromium.org>
Remove a dummy style sheet from CSSParser::parseFlowThread()
https://bugs.webkit.org/show_bug.cgi?id=87715
Reviewed by Darin Adler.
r118736 changed CSSGrammar.y so that it works fine with no style sheet.
r118736 removed a dummy style sheet from CSSParser::parserSelector().
Now we can safely remove a dummy style sheet from parserFlowThread().
Tests: fast/regions. No change in test results.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFlowThread):
2012-05-29 Yoshifumi Inoue <yosin@chromium.org>
REGRESSION(r111497): The "option" element doesn't match CSS pseudo class :enabled
https://bugs.webkit.org/show_bug.cgi?id=87719
Reviewed by Kent Tamura.
This patch added checking of "option" element for CSS pseudo class :enabled as same as
:disabled to selector checker. Before r111497, it was done by using isFormControlElement.
After that revision, HTMLOptionElement was no longer derived from HTMLFormControlElement.
Test: fast/form/select/optgroup-rendering.html
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOneSelector): Checking element is option element as same
as PseudoDisabled in PseudoEnabled case.
2012-05-29 Hayato Ito <hayato@chromium.org>
Introduces ComposedShadowTreeParentWalker, extracted from ComposedShadowTreeWalker.
https://bugs.webkit.org/show_bug.cgi?id=87004
Reviewed by Dimitri Glazkov.
Introduces a ComposedShadowTreeParentWalker, which is only used
for traversing a parent node (including shadow roots and insertion
points) and get rid of an equivalent function from
ComposedShadowTreeWalker.
Before this patch, there is an inconsistency inside of
ComposedShadowTreeWalker. The Walker uses 'Policy' to decide
whether it should visit shadow roots or not, but
parentIncludingInsertionPointAndShadowRoot() member function
ignores the policy. We can not add an assertion in its
constructor due to this inconsistency. To resolve it, we could
add yet another special policy, but that makes the implementation
complex and may add some overhead in runtime. So separate the
functionality into another class as ComposedShadowTreeParentWalker.
No new tests, no new functionality except for assertion.
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::ComposedShadowTreeWalker):
(WebCore::ComposedShadowTreeParentWalker::ComposedShadowTreeParentWalker):
(WebCore):
(WebCore::ComposedShadowTreeParentWalker::parentIncludingInsertionPointAndShadowRoot):
(WebCore::ComposedShadowTreeParentWalker::traverseParentIncludingInsertionPointAndShadowRoot):
* dom/ComposedShadowTreeWalker.h:
(ComposedShadowTreeWalker):
(WebCore::ComposedShadowTreeWalker::assertPrecondition):
(WebCore):
(ComposedShadowTreeParentWalker):
(WebCore::ComposedShadowTreeParentWalker::get):
* dom/EventDispatcher.cpp:
(WebCore::EventRelatedTargetAdjuster::adjust):
(WebCore::EventDispatcher::ensureEventAncestors):
* page/EventHandler.cpp:
(WebCore::EventHandler::updateMouseEventTargetNode):
2012-05-29 Hayato Ito <hayato@chromium.org>
Add assertions to make sure that event's target and relatedTarget are accessible.
https://bugs.webkit.org/show_bug.cgi?id=87641
Reviewed by Dimitri Glazkov.
No new tests. No new functionality except for assertions.
* dom/EventContext.cpp:
(WebCore::EventContext::EventContext):
* dom/EventContext.h:
(WebCore):
(EventContext):
(WebCore::EventContext::setRelatedTarget):
(WebCore::EventContext::accessible):
2012-05-29 Kent Tamura <tkent@chromium.org>
Fix inefficient usage of traverseNextNode()
https://bugs.webkit.org/show_bug.cgi?id=87804
Reviewed by Ryosuke Niwa.
foo->traverseNextNode(foo) is equivalent to foo->firstChild(), and
firstChild() is more efficient.
No new tests because of no behavior change.
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
Replace traverseNextNode() with firstChild(), and shorten a variable name.
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::getElementById):
Replace traverseNextNode() with firstChild().
2012-05-29 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
[BlackBerry] Loading media data with http authentication
https://bugs.webkit.org/show_bug.cgi?id=84214
Reviewed by George Staikos.
RIM PR: 117618
Implemented http authentication feature for media by implementing
two interface functions in class MediaPlayerPrivate:
onAuthenticationNeeded(): this function is triggered when MMR
engine requires http authentication. We search the CredentialStorage
to see if we have already stored existing credential information,
or challenge user to provide it.
OnAuthenticationAccepted(): this function is triggered when MMR
engine accepts the credential information, and we need to save
it in CredentialStorage for later use.
Internally reviewed by Max Feil <mfeil@qnx.com>.
Manual test case: blackberry/video-load-with-authentication.html
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::generateProtectionSpaceFromMMRAuthChallenge):
(WebCore):
(WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
(WebCore::MediaPlayerPrivate::onAuthenticationAccepted):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
(MediaPlayerPrivate):
2012-05-29 MORITA Hajime <morrita@google.com>
[Shadow DOM] Node distribution should be orthogonal from node attachment
https://bugs.webkit.org/show_bug.cgi?id=87223
Reviewed by Dimitri Glazkov.
This chagne reorganizes Shadow DOM subtree distribution implementation.
Originally, it was interleaved across attach() of several classes like
InsertionPoint and ShadowRoot. Its invalidation was also mixed as a part of
the style recalculation and detach()-es.
This change extracts these bits of code to a set of ContentDistributor methods, which are
facaded by two ElementShadow API. Following two API are the primary entry points:
- ElementShadow::ensureDistribution()
- ElementShadow::invalidateDistribution()
The actual implementations are ContentDistributor::distribute() and
ContentDistributor::invalidate() respectively.
When clients need to traverse composed tree, before attach() for
example, they should call ensureDistribution() to make sure that
the traversal data structure ("the distribution") is ready. When
there is any DOM mutation which can result a composed tree
mutation, then clients should call invalidateDistribution() to
mark the distribution being dated.
Here are such DOM mutations:
- The children of any ShadowRoots are changed,
- The children of any InsertionPoints are changed,
- The children of any host elements are changed,
- Any insertion point is inserted to or removed from the shadow tree,
- @select attribute of <content> is modified and
- New ShadowRoot is added to the shadow tree.
Note that the validity of the distribution is tracked and
unnecessary distribution requests are ignored.
After the invalidation, that shadow subtrees are detached once and
request their re-attachment through the style recalculation.
Then, on the responding style recalculation and attach(), new
distribution will be computed.
No new tests. Covered by existing tests.
* dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::Element::childrenChanged):
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::~ElementShadow):
(WebCore::ElementShadow::addShadowRoot):
(WebCore::ElementShadow::removeAllShadowRoots):
(WebCore::ElementShadow::attach):
(WebCore::ElementShadow::recalcStyle):
(WebCore::ElementShadow::ensureDistribution):
(WebCore::ElementShadow::invalidateDistribution):
* dom/ElementShadow.h:
(ElementShadow):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
(WebCore::NodeRendererFactory::createRendererIfNeeded):
* dom/NodeRenderingContext.h:
(NodeRenderingContext):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::setApplyAuthorStyles):
(WebCore::ShadowRoot::attach):
(WebCore::ShadowRoot::childrenChanged):
(WebCore):
* dom/ShadowRoot.h:
(ShadowRoot):
* html/HTMLFormControlElement.cpp:
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::buildBubbleTree):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::ContentDistributor):
(WebCore::ContentDistributor::~ContentDistributor):
(WebCore::ContentDistributor::findInsertionPointFor):
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::invalidate):
(WebCore::ContentDistributor::finishInivalidation):
(WebCore::ContentDistributor::distributeSelectionsTo):
(WebCore::ContentDistributor::distributeShadowChildrenTo):
(WebCore::ContentDistributor::invalidateDistributionIn):
* html/shadow/ContentDistributor.h:
(WebCore::ContentDistributor::needsInvalidation):
(ContentDistributor):
(WebCore::ContentDistributor::needsDistribution):
* html/shadow/HTMLContentElement.cpp:
(WebCore::HTMLContentElement::parseAttribute):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::attach):
(WebCore::InsertionPoint::detach):
(WebCore::InsertionPoint::nextTo):
(WebCore::InsertionPoint::previousTo):
(WebCore::InsertionPoint::childrenChanged):
* html/shadow/InsertionPoint.h:
(WebCore::InsertionPoint::setDistribution):
(WebCore::InsertionPoint::clearDistribution):
(InsertionPoint):
2012-05-29 Luke Macpherson <macpherson@chromium.org>
Implement post-landing feedback for WebKitCSSTransformValue::customCSSText().
https://bugs.webkit.org/show_bug.cgi?id=87684
Reviewed by Darin Adler.
Darin provided some style suggesting on https://bugs.webkit.org/show_bug.cgi?id=87462 after it landed.
This patch incorporates those suggestions, namely using 0 instead of empty string for UnknownTransformOperation
and WTF_ARRAY_LENGTH instead of hard coding the array length.
Covered by existing transform tests.
* css/WebKitCSSTransformValue.cpp:
(WebCore):
(WebCore::WebKitCSSTransformValue::customCssText):
2012-05-29 Eric Seidel <eric@webkit.org>
Fix ENABLE_IFRAME_SEAMLESS to actually fully disable <iframe seamless>
https://bugs.webkit.org/show_bug.cgi?id=87646
Reviewed by Adam Barth.
In the process of moving the seamless feature out of github and into bugs.webkit.org
multiple versions of the shouldDisplaySeamlessly function got written
(and moved from HTMLIFrameElement to Document), but only one of them was wrapped
in ENABLE_IFRAME_SEAMLESS. HTMLIFrameElement was checking mayDisplaySeamlessly
directly (as was my original design), which got around the ENABLE_IFRAME_SEAMLESS check.
I've fixed this oversight, and the feature is now off when we tell it to be off.
This is covered by many existing tests. I've verified locally that
all tests fail when ENABLE_IFRAME_SEAMLESS is disabled instead of
only some of them.
* dom/SecurityContext.h:
(SecurityContext):
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::shouldDisplaySeamlessly):
2012-05-29 Scott Graham <scottmg@chromium.org>
Fix warning in preprocessing Source/WebCore/dom/DOMError.idl
https://bugs.webkit.org/show_bug.cgi?id=87763
Reviewed by Adam Barth.
Add newline at end of file to avoid warning:
../dom/DOMError.idl:35:2: warning: no newline at end of file
* dom/DOMError.idl:
2012-05-29 Mark Pilgrim <pilgrim@chromium.org>
[Chromium] Move fileExists to Platform.h
https://bugs.webkit.org/show_bug.cgi?id=87531
Reviewed by Adam Barth.
Part of a refactoring series. See tracking bug 82948.
* platform/chromium/FileSystemChromium.cpp:
(WebCore::fileExists):
* platform/chromium/PlatformSupport.h:
(PlatformSupport):
2012-05-29 Kentaro Hara <haraken@chromium.org>
[V8] Rename v8Null() to v8NullWithCheck()
https://bugs.webkit.org/show_bug.cgi?id=87713
Reviewed by Adam Barth.
In IRC, cmarcelo@ pointed out that v8::Null() and v8Null()
are confusing. This patch renames v8Null() to v8NullWithCheck().
No tests. No behavior change.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
* bindings/scripts/test/V8/V8TestActiveDOMObject.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventConstructor.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventTarget.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestException.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestInterface.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNamedConstructor.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNode.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestObj.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
(WebCore::toV8):
* bindings/v8/V8Binding.h:
(WebCore::v8NullWithCheck):
(WebCore::v8DateOrNull):
2012-05-29 Christophe Dumez <christophe.dumez@intel.com>
Some Content Security Policy console messages are missing line numbers in JSC
https://bugs.webkit.org/show_bug.cgi?id=87558
Reviewed by Adam Barth.
Make ScriptController::eventHandlerPosition() behave the same way on
JSC than V8. This means that TextPosition::minimumPosition() is
returned if parser is null, instead of
TextPosition::belowRangePosition(). The line numbers are now correctly
printed in the output of Content Security Policy tests.
Tests: http/tests/security/contentSecurityPolicy/inline-script-blocked-javascript-url.html
http/tests/security/contentSecurityPolicy/javascript-url-blocked.html
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::eventHandlerPosition):
2012-05-29 Shawn Singh <shawnsingh@chromium.org>
[chromium] make WebTransformationMatrix object usable by non-webkit code
https://bugs.webkit.org/show_bug.cgi?id=87315
Reviewed by James Robinson.
This change is covered by existing tests and by whether it
compiles. There should be no changes in behavior.
* platform/chromium/support/WebTransformationMatrix.cpp:
(WebKit::WebTransformationMatrix::WebTransformationMatrix):
(WebKit::WebTransformationMatrix::operator=):
(WebKit::WebTransformationMatrix::operator==):
(WebKit::WebTransformationMatrix::inverse):
(WebKit::WebTransformationMatrix::to2dTransform):
(WebKit::WebTransformationMatrix::multiply):
(WebKit::WebTransformationMatrix::makeIdentity):
(WebKit::WebTransformationMatrix::translate):
(WebKit::WebTransformationMatrix::translate3d):
(WebKit::WebTransformationMatrix::translateRight3d):
(WebKit::WebTransformationMatrix::scale):
(WebKit::WebTransformationMatrix::scaleNonUniform):
(WebKit::WebTransformationMatrix::scale3d):
(WebKit::WebTransformationMatrix::rotate):
(WebKit::WebTransformationMatrix::rotate3d):
(WebKit::WebTransformationMatrix::skewX):
(WebKit::WebTransformationMatrix::skewY):
(WebKit::WebTransformationMatrix::applyPerspective):
(WebKit::WebTransformationMatrix::blend):
(WebKit::WebTransformationMatrix::hasPerspective):
(WebKit::WebTransformationMatrix::isInvertible):
(WebKit::WebTransformationMatrix::isBackFaceVisible):
(WebKit::WebTransformationMatrix::isIdentity):
(WebKit::WebTransformationMatrix::isIdentityOrTranslation):
(WebKit::WebTransformationMatrix::isIntegerTranslation):
(WebKit::WebTransformationMatrix::m11):
(WebKit::WebTransformationMatrix::setM11):
(WebKit::WebTransformationMatrix::m12):
(WebKit::WebTransformationMatrix::setM12):
(WebKit::WebTransformationMatrix::m13):
(WebKit::WebTransformationMatrix::setM13):
(WebKit::WebTransformationMatrix::m14):
(WebKit::WebTransformationMatrix::setM14):
(WebKit::WebTransformationMatrix::m21):
(WebKit::WebTransformationMatrix::setM21):
(WebKit::WebTransformationMatrix::m22):
(WebKit::WebTransformationMatrix::setM22):
(WebKit::WebTransformationMatrix::m23):
(WebKit::WebTransformationMatrix::setM23):
(WebKit::WebTransformationMatrix::m24):
(WebKit::WebTransformationMatrix::setM24):
(WebKit::WebTransformationMatrix::m31):
(WebKit::WebTransformationMatrix::setM31):
(WebKit::WebTransformationMatrix::m32):
(WebKit::WebTransformationMatrix::setM32):
(WebKit::WebTransformationMatrix::m33):
(WebKit::WebTransformationMatrix::setM33):
(WebKit::WebTransformationMatrix::m34):
(WebKit::WebTransformationMatrix::setM34):
(WebKit::WebTransformationMatrix::m41):
(WebKit::WebTransformationMatrix::setM41):
(WebKit::WebTransformationMatrix::m42):
(WebKit::WebTransformationMatrix::setM42):
(WebKit::WebTransformationMatrix::m43):
(WebKit::WebTransformationMatrix::setM43):
(WebKit::WebTransformationMatrix::m44):
(WebKit::WebTransformationMatrix::setM44):
(WebKit::WebTransformationMatrix::a):
(WebKit::WebTransformationMatrix::setA):
(WebKit::WebTransformationMatrix::b):
(WebKit::WebTransformationMatrix::setB):
(WebKit::WebTransformationMatrix::c):
(WebKit::WebTransformationMatrix::setC):
(WebKit::WebTransformationMatrix::d):
(WebKit::WebTransformationMatrix::setD):
(WebKit::WebTransformationMatrix::e):
(WebKit::WebTransformationMatrix::setE):
(WebKit::WebTransformationMatrix::f):
(WebKit::WebTransformationMatrix::setF):
(WebKit::WebTransformationMatrix::toWebCoreTransform):
(WebKit::WebTransformationMatrix::mapRect):
(WebKit::WebTransformationMatrix::mapPoint):
(WebKit::WebTransformationMatrix::mapQuad):
(WebKit::WebTransformationMatrix::projectPoint):
2012-05-29 Alexis Menard <alexis.menard@openbossa.org>
[CSS3 Backgrounds and Borders] Implement box-decoration-break parsing.
https://bugs.webkit.org/show_bug.cgi?id=87678
Reviewed by Eric Seidel.
Implement the parsing part of box-decoration-break. The specification
is located at http://www.w3.org/TR/css3-background/#box-decoration-break.
So far Opera implements it. This patch only implements the parsing part of
the property. A following patch will implement the rendering part. Despite
the rendering part missing it improves http://css3test.com by 1%.
Test: fast/box-decoration-break/box-decoration-break-parsing.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore):
(WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleBoxData.cpp:
(WebCore::StyleBoxData::StyleBoxData):
(WebCore::StyleBoxData::operator==):
* rendering/style/StyleBoxData.h:
(WebCore::StyleBoxData::boxDecorationBreak):
(StyleBoxData):
2012-05-29 David Barr <davidbarr@chromium.org>
[text-overflow: ellipsis] WebKit should ignore the ellipsis for the purpose of dispatching mouse events
https://bugs.webkit.org/show_bug.cgi?id=63781
Reviewed by Eric Seidel.
"Ellipsing only affects rendering and must not affect layout nor dispatching of pointer events."
http://www.w3.org/TR/2012/WD-css3-ui-20120117/#text-overflow
Test: fast/css/text-overflow-ellipsis-hit-test.html
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::nodeAtPoint): Always return false.
2012-05-29 Gavin Peters <gavinp@chromium.org>
[Chromium] Remove assertions on state in Prerender.cpp
https://bugs.webkit.org/show_bug.cgi?id=87746
Chrome was crashing in the new Prerender API on Google Web Search; this was because the DOM would stop(), setting the
state of the Prerenders in the document to Inactive, but an asyncronous GC would later come come along and trigger the
removedFromDocument behaviour on each element, including the <link> element launching the prerender. This causes an
assertion failure.
I believe the late-deletion of the DOM, and the HTMLElement::removedFromDocument calls are legal, and it was the
overzealous assertions in Prerender that were inappropriate.
Reviewed by Adam Barth.
No new automated tests, working on a Chromium browser test. Manually test by entering many prerender and non-prerendered
queries into Google Web Search.
* platform/chromium/Prerender.cpp:
(WebCore::Prerender::Prerender):
(WebCore::Prerender::add):
(WebCore::Prerender::cancel):
(WebCore::Prerender::abandon):
* platform/chromium/Prerender.h:
(Prerender):
2012-05-29 Victor Carbune <victor@rosedu.org>
Display cues in the controls area
https://bugs.webkit.org/show_bug.cgi?id=87591
Reviewed by Eric Carlson.
Changed the behaviour to implicitly hide the volume slidebar
if the controls are hidden (due mouse moving out of the video
area or controls are toggled through JS).
This seems to be the simplest fix to this issue, otherwise
on toggling the display:none property on the controls the
volume slidebar might appear below the video.
Re-enabled failing tests for this functionality.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::makeTransparent): Re-enabled
timer to set the display:none property on the controls.
* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::hide): Added a call to hide
the volume slider.
(WebCore::MediaControlRootElement::makeTransparent): Same.
* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlRootElementChromium::hide): Same.
(WebCore::MediaControlRootElementChromium::makeTransparent): Same.
2012-05-29 Adrienne Walker <enne@google.com>
Fix transparent iframes with composited contents in WK1 on Mac
https://bugs.webkit.org/show_bug.cgi?id=76478
Reviewed by Simon Fraser.
Test: compositing/iframes/repaint-after-losing-scrollbars.html
* page/FrameView.cpp:
(WebCore::FrameView::useSlowRepaints):
2012-05-29 David Hyatt <hyatt@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=87787
[New Multicolumn] Refactor the region and flow thread code so that it can pick up the correct column widths
and heights when determining the logical width and height of the flow thread itself.
This patch adds new virtual methods to RenderRegion: logicalWidthForFlowThreadContent and logicalHeightForFlowThreadContent.
For normal regions, these methods return the contentWidth and contentHeight of the regions themselves. For column sets,
however, these methods actually return the column widths and heights.
This allows the flow thread to properly lay out according to the column width.
Region invalidation is also done properly by using these new methods.
In some cases the code is actually simplified, since we can get rid of some isHorizontalWritingMode() switching.
With this patch the flow thread now actually lays out and paints at the right width (spilling out of the region set in a single unbroken
column).
Reviewed by Dan Bernstein.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::computeLogicalWidth):
(WebCore::RenderFlowThread::computeLogicalHeight):
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::ensureColumnSets):
* rendering/RenderMultiColumnBlock.h:
(WebCore::RenderMultiColumnBlock::isRenderMultiColumnBlock):
(RenderMultiColumnBlock):
(WebCore::toRenderMultiColumnBlock):
(WebCore):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::computeLogicalWidth):
(WebCore):
(WebCore::RenderMultiColumnSet::computeLogicalHeight):
* rendering/RenderMultiColumnSet.h:
(WebCore::RenderMultiColumnSet::setColumnWidthAndCount):
(RenderMultiColumnSet):
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderMultiColumnBlock):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::logicalWidthForFlowThreadContent):
(WebCore):
(WebCore::RenderRegion::logicalHeightForFlowThreadContent):
(WebCore::RenderRegion::layout):
* rendering/RenderRegion.h:
(RenderRegion):
2012-05-29 Alec Flett <alecflett@chromium.org>
IndexedDB: Align codes and names for IDB-specific and DOM-specific errors/exceptions
https://bugs.webkit.org/show_bug.cgi?id=87276
Reviewed by Tony Chang.
No new tests. Existing tests have been updated to use the new
exception constant values.
The IDB spec has evolved to DOM4-style DOMExceptions, which are
referred to with MixedCase, string-based style names for
exceptions rather than UNDERSCORE_CONSTANT_ERR codes. Change to
use MixedCase error/exception names, and tease out the
IDB-specific exception/error codes/names from the system-level
codes. Make sure that the legacy IDB-masked exception code values
match the DOM exception values. Make sure that
IDBDatabaseException[exception.name] still works.
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::createObjectStore):
(WebCore::IDBDatabase::transaction):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
(WebCore::IDBDatabaseBackendImpl::setVersion):
(WebCore::IDBDatabaseBackendImpl::transaction):
* Modules/indexeddb/IDBDatabaseException.cpp:
(IDBDatabaseExceptionNameDescription):
(WebCore):
(WebCore::IDBDatabaseException::initializeDescription):
* Modules/indexeddb/IDBDatabaseException.h:
* Modules/indexeddb/IDBDatabaseException.idl:
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::index):
(WebCore::IDBObjectStoreBackendImpl::deleteIndex):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::abort):
* Modules/indexeddb/IDBTransactionBackendImpl.cpp:
(WebCore::IDBTransactionBackendImpl::objectStore):
2012-05-29 David Hyatt <hyatt@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=87775
[New Multicolumn] Make sure RenderMultiColumnSets have their own copy of the count, width and height of their columns.
Reviewed by Anders Carlsson.
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
(WebCore::RenderMultiColumnBlock::ensureColumnSets):
* rendering/RenderMultiColumnBlock.h:
(WebCore::RenderMultiColumnBlock::columnWidth):
(WebCore::RenderMultiColumnBlock::columnCount):
(RenderMultiColumnBlock):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
* rendering/RenderMultiColumnSet.h:
(WebCore::RenderMultiColumnSet::columnCount):
(WebCore::RenderMultiColumnSet::columnWidth):
(WebCore::RenderMultiColumnSet::columnHeight):
(RenderMultiColumnSet):
(WebCore::RenderMultiColumnSet::setColumnWidthAndCount):
(WebCore::RenderMultiColumnSet::setColumnHeight):
2012-05-29 Simon Fraser <simon.fraser@apple.com>
Incomplete repaint on twitter.com when replying to a tweet
https://bugs.webkit.org/show_bug.cgi?id=87553
Reviewed by Dean Jackson.
Style changes can cause a compositing layer to change between
requiring its own backing store or not, e.g. with the addition
or removal of a transform.
When that happens, we need to repaint the ancesetor layer that
this layer was, or will be drawing into.
Factored some code out of layerWillBeRemoved() to be able to
also call it from setRequiresOwnBackingStore().
New manual test, ManualTests/compositing/requires-backing-change.html.
I was not able to get an automated pixel test to work.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setRequiresOwnBackingStore):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers): Remove trailing whitespace.
(WebCore::RenderLayerCompositor::repaintInCompositedAncestor):
(WebCore::RenderLayerCompositor::layerWillBeRemoved):
* rendering/RenderLayerCompositor.h:
2012-05-29 David Hyatt <hyatt@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=87771
[New Multicolumn] Make sure we have one column set by default and add it to the flow thread's region list.
Reviewed by Anders Carlsson.
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::ensureColumnSets):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
2012-05-29 John Sullivan <sullivan@apple.com>
Update label for blacklisted plug-in
https://bugs.webkit.org/show_bug.cgi?id=87767
rdar://problem/11550048
Reviewed by Kevin Decker.
* English.lproj/Localizable.strings:
Regenerated.
* platform/LocalizedStrings.cpp:
(WebCore::insecurePluginVersionText):
Changed this string.
2012-05-29 Julien Chaffraix <jchaffraix@webkit.org>
REGRESSION(r111742): box-sizing: border-box doesn't work on fixed table layout
https://bugs.webkit.org/show_bug.cgi?id=87536
Reviewed by Tony Chang.
Tests: fast/table/fixed-table-layout/cell-box-sizing-fixed-table-layout.html
fast/table/fixed-table-layout/column-box-sizing-fixed-table-layout.html
fast/table/fixed-table-layout/column-group-box-sizing-fixed-table-layout.html
fast/table/fixed-table-layout/column-in-column-group-box-sizing-fixed-table-layout.html
The change in r111742 completely ignored border-sizing (following the table's code lead unfortunately).
The issue is that we would count the borders and paddings twice for the border-box case which would lead
to the content-box including them too. From a web-author, this behavior is equivalent to ignoring box-sizing.
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::calcWidthArray):
Reworked the function to properly use computeBorderBoxLogicalWidth() for correctness. This matches
what RenderBox and the rendering code does generally. Also refactored the code to avoid the need
for local variables and make it more readable.
2012-05-25 Ojan Vafai <ojan@chromium.org>
Absolute positioned elements in a relative positioned CSS3 Flexbox fail to display properly
https://bugs.webkit.org/show_bug.cgi?id=58453
Reviewed by Tony Chang.
Test: css3/flexbox/align-absolute-child.html
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::adjustAlignmentForChild):
When adjusting positioned items, adjust their static position, not their location.
(WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
(WebCore::RenderFlexibleBox::flipForWrapReverse):
* rendering/RenderFlexibleBox.h:
2012-05-29 Abhishek Arya <inferno@chromium.org>
Crash due to text fragment destruction when updating first-letter block.
https://bugs.webkit.org/show_bug.cgi?id=87751
Reviewed by Eric Seidel.
Test: fast/text/text-fragment-first-letter-update-crash.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle):
2012-05-29 David Hyatt <hyatt@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=87764
Add implementation of checkForPaginationLogicalHeightChange to RenderMultiColumnBlock.
Also stub out ensureColumnSets() and write a comment describing how it's going to work.
Reviewed by Anders Carlsson.
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
(WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
(WebCore):
(WebCore::RenderMultiColumnBlock::ensureColumnSets):
* rendering/RenderMultiColumnBlock.h:
(WebCore::RenderMultiColumnBlock::columnHeight):
(WebCore::RenderMultiColumnBlock::setColumnHeight):
(RenderMultiColumnBlock):
2012-05-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r118620.
http://trac.webkit.org/changeset/118620
https://bugs.webkit.org/show_bug.cgi?id=87760
This patch causes regression to read an empty file/blob via
FileReader (Requested by jianli on #webkit).
* fileapi/FileReader.cpp:
(WebCore::FileReader::stringResult):
2012-05-29 Andreas Kling <kling@webkit.org>
Make StylePropertySet a variable-sized object to reduce memory use.
<http://webkit.org/b/87506>
Reviewed by Antti Koivisto.
Make immutable StylePropertySet objects variable-sized and allocate exactly
the space needed to hold the CSSProperty objects passed at construction.
This lets us avoid the memory overhead of Vector<CSSProperty, 4>.
Renamed StylePropertySet::adopt* to create and createImmutable since they no
longer adopt the incoming vector. More cleanup will follow in this area.
This reduces memory usage across the board - the more CSS declarations,
the bigger the benefit. As an example, we save around ~0.5MB on wsj.com.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
* css/CSSParser.cpp:
(WebCore::CSSParser::createStylePropertySet):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::createImmutable):
(WebCore::StylePropertySet::StylePropertySet):
(WebCore::StylePropertySet::~StylePropertySet):
(WebCore::StylePropertySet::copyPropertiesFrom):
(WebCore::StylePropertySet::removeProperty):
(WebCore::StylePropertySet::setProperty):
(WebCore::StylePropertySet::parseDeclaration):
(WebCore::StylePropertySet::addParsedProperties):
(WebCore::StylePropertySet::asText):
(WebCore::StylePropertySet::merge):
(WebCore::StylePropertySet::addSubresourceStyleURLs):
(WebCore::StylePropertySet::removePropertiesInSet):
(WebCore::StylePropertySet::findPropertyWithId):
(WebCore::StylePropertySet::removeEquivalentProperties):
(WebCore::StylePropertySet::copyPropertiesInSet):
(WebCore::StylePropertySet::averageSizeInBytes):
(SameSizeAsStylePropertySet):
(WebCore::StylePropertySet::append):
* css/StylePropertySet.h:
(WebCore::StylePropertySet::create):
(StylePropertySet):
(WebCore::StylePropertySet::propertyAt):
(WebCore::StylePropertySet::propertyCount):
(WebCore::StylePropertySet::isEmpty):
(WebCore::StylePropertySet::array):
* dom/StyledElement.cpp:
(WebCore::StyledElement::updateAttributeStyle):
2012-05-29 David Hyatt <hyatt@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=87759
Pull the initial page logical height checking for columns into its own separate function. This
will allow the derived RenderMultiColumnBlock class to do its own setup there. It also has the
effect of cleaning up layoutBlock even for the existing code.
Reviewed by Anders Carlsson.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
(WebCore):
(WebCore::RenderBlock::layoutBlock):
* rendering/RenderBlock.h:
(RenderBlock):
2012-05-29 Victor Carbune <victor@rosedu.org>
Update cue event dispatching for zero and negative duration cues
https://bugs.webkit.org/show_bug.cgi?id=85143
Reviewed by Eric Carlson.
Updated existing test.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Explicitly
treated event dispatching for zero and negative duration cues.
(WebCore::HTMLMediaElement::textTrackAddCue): Interval tree doesn't
handle invalid cues with intervals - negative cues need to be treated
as zero-length cues as they are always missed cues anyway.
(WebCore::HTMLMediaElement::textTrackRemoveCue): Same.
2012-05-29 MORITA Hajime <morrita@google.com>
ShadowRoot.getElementById() returns removed node.
https://bugs.webkit.org/show_bug.cgi?id=62184
Deregitration of m_elementsById map is done at Element::removedFrom()
But the tree scope of the removed node is already reset from a shadow root
to a document.
This change lookup the old shadow root through its parent node and
deregitrater the node against it.
Reviewed by Dimitri Glazkov.
Test: fast/dom/shadow/get-element-by-id-in-shadow-mutation.html
* dom/Element.cpp:
(WebCore::treeScopeOfParent):
(WebCore):
(WebCore::Element::removedFrom):
* dom/Element.h:
(Element):
(WebCore::Element::updateId):
(WebCore):
2012-05-29 Dana Jansens <danakj@chromium.org>
[chromium] Unoccluded area in surfaces should always be clipped to the rootScissorRect
https://bugs.webkit.org/show_bug.cgi?id=87677
Reviewed by Adrienne Walker.
When a contributing surface is visited, and we have not visited another
surface, then we know the surface is completely unoccluded. However, the
root scissor rect should still be applied, and anything outside of it
should be considered occluded.
Unit test: WebKitTests::CCOcclusionTrackerTestTopmostSurfaceIsClippedToScissor
* platform/graphics/chromium/RenderSurfaceChromium.cpp:
(WebCore::RenderSurfaceChromium::targetRenderSurface):
(WebCore):
* platform/graphics/chromium/RenderSurfaceChromium.h:
(RenderSurfaceChromium):
* platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
(WebCore::::unoccludedContributingSurfaceContentRect):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::targetRenderSurface):
(WebCore):
* platform/graphics/chromium/cc/CCRenderSurface.h:
(CCRenderSurface):
2012-05-29 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
[BlackBerry] Refactoring http/proxy authentication to use authcallback mechanism introduced with libcurl
https://bugs.webkit.org/show_bug.cgi?id=87706
Reviewed by Antonio Gomes.
Because we use authentication callback mechanism of libcurl,
which will take care of all the authentication communication
between UA and server, so the only thing we need to do is to
provide credential information when authentication callback
is triggered. By using this we don't need to process
intermediate headers for each http authentication scheme.
Implemented interface function notifyAuthReceived() in
NetworkJob to handle the authentication notification from
networking thread.
When the authentication callback is triggered, we should
cancel the current loading request and restart a new one with
credential information attached which comes from
credentialStorage or user input.
Internally reviewed by Joe Mason <jmason@rim.com>.
No new tests since there is no behavior change.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::notifyAuthReceived):
(WebCore):
(WebCore::NetworkJob::handleNotifyHeaderReceived):
(WebCore::NetworkJob::sendRequestWithCredentials):
* platform/network/blackberry/NetworkJob.h:
(NetworkJob):
2012-05-29 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
[BlackBerry] http authentication challenge issue when loading subresource
https://bugs.webkit.org/show_bug.cgi?id=87660
Reviewed by Rob Buis.
We should try to store the credential information as soon as we
receive http status notification which indicates that the
authentication succeeds, instead of storing credentials when the
main resource receives notify done which is too late for loading
subresource.
Internally reviewed by Joe Mason <jmason@rim.com>
No new tests since there is no change in behavior.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyStatusReceived):
(WebCore::NetworkJob::handleNotifyClose):
2012-05-29 Alexey Proskuryakov <ap@apple.com>
[Mac] Move DefaultFonts.plist to C++ code
https://bugs.webkit.org/show_bug.cgi?id=87560
<rdar://problem/11466119>
Reviewed by Dan Bernstein.
* DerivedSources.make:
* Resources/DefaultFonts.plist.in: Removed.
* WebCore.xcodeproj/project.pbxproj:
* page/mac/SettingsMac.mm: (WebCore::Settings::initializeDefaultFontFamilies):
Instead of having a separate configuration file, just hardcode the settings in C++.
2012-05-29 Alexei Filippov <alexeif@chromium.org>
Web Inspector: Retainers are missing for all objects
https://bugs.webkit.org/show_bug.cgi?id=87655
Reviewed by Yury Semikhatsky.
* inspector/front-end/HeapSnapshotDataGrids.js:
(WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource):
2012-05-29 Philippe Normand <pnormand@igalia.com>
[GStreamer] Video sink doesn't respect WebKit code style
https://bugs.webkit.org/show_bug.cgi?id=87693
Reviewed by Alexis Menard.
No change in behavior of the sink, this patch only adapts the code
style to WebKit's.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(_WebKitVideoSinkPrivate):
(webkitVideoSinkTimeoutCallback):
(webkitVideoSinkRender):
(webkitVideoSinkDispose):
(unlockBufferMutex):
(webkitVideoSinkUnlock):
(webkitVideoSinkUnlockStop):
(webkitVideoSinkStop):
(webkitVideoSinkStart):
(webkitVideoSinkMarshalVoidAndMiniObject):
(webkit_video_sink_class_init):
(webkitVideoSinkNew):
* platform/graphics/gstreamer/VideoSinkGStreamer.h:
(_WebKitVideoSink):
(_WebKitVideoSinkClass):
2012-05-29 Roland Takacs <takacs.roland@stud.u-szeged.hu>
[Qt] Uninitialized shader compiler when GLES is used
https://bugs.webkit.org/show_bug.cgi?id=87712
The '#if !defined(QT_OPENGL_ES_2)' has been removed before the initialization
of shader compiler to compile shader codes for ES-platforms as well.
Reviewed by Noam Rosenthal.
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
2012-05-29 Taiju Tsuiki <tzik@chromium.org>
Add InspectorFileSystemAgent::FrontendProvider
https://bugs.webkit.org/show_bug.cgi?id=87635
InspectorFileSystemAgent needs weak reference to its frontend to perform
asynchronous operation.
Reviewed by Yury Semikhatsky.
* inspector/InspectorFileSystemAgent.cpp:
(InspectorFileSystemAgent::FrontendProvider):
(WebCore):
(WebCore::InspectorFileSystemAgent::~InspectorFileSystemAgent):
(WebCore::InspectorFileSystemAgent::enable):
(WebCore::InspectorFileSystemAgent::disable):
(WebCore::InspectorFileSystemAgent::setFrontend):
(WebCore::InspectorFileSystemAgent::clearFrontend):
(WebCore::InspectorFileSystemAgent::restore):
(WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent):
* inspector/InspectorFileSystemAgent.h:
(InspectorFileSystemAgent):
2012-05-29 Yoshifumi Inoue <yosin@chromium.org>
REGRESSION(r109729): The optgroup element's "disabled" attribute has no effect to rendering and selection
https://bugs.webkit.org/show_bug.cgi?id=87614
Reviewed by Kent Tamura.
This patch adds HTMLOptGroupElement::disabled and isEnabledFormControl
methods which was implemented in HTMLFormControlElement at r109729 and
updates CSS pseudo class checker to check "optgroup" element.
Tests: fast/forms/select/optgroup-clicking.html
fast/forms/select/optgroup-disabled.html
fast/forms/select/optgroup-rendering.html
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOneSelector): On disabled and enabled pseudo class checker.
We checked tag name "optgroup" in addition isFormControlElement.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement): Checks optgroup.disabled.
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::disabled): Added.
* html/HTMLOptGroupElement.h:
(HTMLOptGroupElement): Added isEnabledFormControl.
2012-05-29 Alexander Pavlov <apavlov@chromium.org>
[Chromium] [Regression] SELECT popup misplaced when there is not enough vertical space
https://bugs.webkit.org/show_bug.cgi?id=87735
Reviewed by Kent Tamura.
This change fixes the obsolete WebWidget Y-repositioning code for the insufficient vertical space case, not removed in r113418.
No new tests, as popups are not testable in Chromium.
* platform/chromium/PopupContainer.cpp:
(WebCore::PopupContainer::layoutAndCalculateWidgetRect):
2012-05-29 Andrei Bucur <abucur@adobe.com>
[CSS Regions]Rename NamedFlow::overflow to NamedFlow::overset
https://bugs.webkit.org/show_bug.cgi?id=87491
This patch updates the CSSOM property name overflow to overset. There are no changes in functionality.
Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/
Reviewed by Andreas Kling.
Test: fast/regions/webkit-named-flow-overset.html
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::overset):
* dom/WebKitNamedFlow.h:
(WebKitNamedFlow):
* dom/WebKitNamedFlow.idl:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::computeOverflowStateForRegions):
* rendering/RenderFlowThread.h:
2012-05-29 Andreas Kling <kling@webkit.org>
Give StylePropertySet a proper mutability flag.
<http://webkit.org/b/87675>
Reviewed by Antti Koivisto.
Add a flag to StylePropertySet that determines whether it's mutable or not. Only objects
constructed from the CSS parser (by way of StylePropertySet::adopt()) are made immutable.
This is clean-up and prep work for implementing a more efficient storage scheme for immutable
StylePropertySets (fixed-size array instead of vector) as the vast majority of them are
unlikely to ever mutate during their lifetime.
Sprinkled ASSERT(isMutable()) all over StylePropertySet to catch any attempts to modify
an immutable object.
Also made properties() const on StyleRule and friends, which brought some additional code
churn along with it.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
* css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::style):
(WebCore::CSSFontFaceRule::reattach):
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs):
* css/CSSFontFaceSrcValue.h:
(CSSFontFaceSrcValue):
* css/CSSPageRule.cpp:
(WebCore::CSSPageRule::style):
(WebCore::CSSPageRule::reattach):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::addSubresourceStyleURLs):
* css/CSSPrimitiveValue.h:
(CSSPrimitiveValue):
* css/CSSReflectValue.cpp:
(WebCore::CSSReflectValue::addSubresourceStyleURLs):
* css/CSSReflectValue.h:
(CSSReflectValue):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::style):
(WebCore::CSSStyleRule::reattach):
* css/CSSValue.cpp:
(WebCore::CSSValue::addSubresourceStyleURLs):
* css/CSSValue.h:
(CSSValue):
* css/CSSValueList.cpp:
(WebCore::CSSValueList::addSubresourceStyleURLs):
* css/CSSValueList.h:
(CSSValueList):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::StylePropertySet):
(WebCore::StylePropertySet::setCSSParserMode):
(WebCore):
(WebCore::StylePropertySet::copyPropertiesFrom):
(WebCore::StylePropertySet::removeShorthandProperty):
(WebCore::StylePropertySet::removeProperty):
(WebCore::StylePropertySet::setProperty):
(WebCore::StylePropertySet::parseDeclaration):
(WebCore::StylePropertySet::addParsedProperties):
(WebCore::StylePropertySet::addParsedProperty):
(WebCore::StylePropertySet::merge):
(WebCore::StylePropertySet::addSubresourceStyleURLs):
(WebCore::StylePropertySet::removePropertiesInSet):
(WebCore::StylePropertySet::findPropertyWithId):
(WebCore::StylePropertySet::removeEquivalentProperties):
(WebCore::StylePropertySet::copyPropertiesInSet):
* css/StylePropertySet.h:
(WebCore::StylePropertySet::adopt):
(WebCore::StylePropertySet::adoptMutable):
(StylePropertySet):
(WebCore::StylePropertySet::isMutable):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::addMatchedProperties):
(WebCore::StyleResolver::collectMatchingRulesForList):
* css/StyleResolver.h:
(StyleResolver):
* css/StyleRule.cpp:
(WebCore::StyleRule::mutableProperties):
(WebCore):
(WebCore::StyleRulePage::mutableProperties):
(WebCore::StyleRuleFontFace::mutableProperties):
* css/StyleRule.h:
(WebCore::StyleRule::properties):
(StyleRule):
(WebCore::StyleRuleFontFace::properties):
(StyleRuleFontFace):
(WebCore::StyleRulePage::properties):
(StyleRulePage):
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::ensureInlineStyle):
(WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
* editing/EditingStyle.cpp:
(WebCore::styleFromMatchedRulesForElement):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::parseAttribute):
(WebCore::SVGFontFaceElement::rebuildFontFace):
(WebCore::SVGFontFaceElement::removedFrom):
2012-05-29 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
[EFL] Refactoring. Get rid of unnecessary singleCharacterString() function
https://bugs.webkit.org/show_bug.cgi?id=87654
Reviewed by Csaba Osztrogonác.
Evas key events already provide key string, so no practical need for singleCharacterString()
evaluating the event string from keyname.
Modified code related functionality is already covered with fast/events and fast/forms tests.
* platform/efl/EflKeyboardUtilities.cpp:
* platform/efl/PlatformKeyboardEventEfl.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2012-05-29 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed: Web Inspector: single line fix after r118742.
* inspector/front-end/HeapSnapshotView.js:
(WebInspector.HeapProfileHeader.prototype.saveToFile):
2012-05-29 Kentaro Hara <haraken@chromium.org>
Remove m_rootNode and m_selectorChecker from SelectorQuery.h
https://bugs.webkit.org/show_bug.cgi?id=87650
Reviewed by Antti Koivisto.
To avoid parsing CSS selectors every time, I am planning to cache
SelectorQuery objects into a HashMap, which will be defined in
Node::querySelector(). To make the size of SelectorQuery small,
this patch removes m_rootNode and m_selectorChecker from SelectorQuery.h.
Tests: fast/dom/SelectorAPI/*. No change in test results.
* dom/Node.cpp:
(WebCore::Node::querySelector):
(WebCore::Node::querySelectorAll):
* dom/SelectorQuery.cpp:
(WebCore::SelectorQuery::SelectorQuery):
(WebCore):
(WebCore::SelectorQuery::queryAll):
(WebCore::SelectorQuery::queryFirst):
* dom/SelectorQuery.h:
(SelectorQuery):
2012-05-29 Eugene Klyuchnikov <eustas.bug@gmail.com>
Web Inspector: Tabbed Settings Screen
https://bugs.webkit.org/show_bug.cgi?id=87497
Reviewed by Yury Semikhatsky.
Combine settings screen and shortcuts screen
to a single tabbed settings screen.
This will make shortcuts screen more discoverable.
* inspector/front-end/HelpScreen.js:
(WebInspector.HelpScreen): Make titled tamplate optional.
(WebInspector.HelpScreen.prototype._createCloseButton): Extract method.
* inspector/front-end/SettingsScreen.js:
(WebInspector.SettingsScreen): Split initialization and UI construction.
(WebInspector.SettingsScreen.prototype._createSettingsTabView.appendSection):
(WebInspector.SettingsScreen.prototype._createSettingsTabView):
Extract GUI construction method.
(WebInspector.SettingsScreen.prototype._getOrCreateTabbedPane):
Make GUI construction lazy.
(WebInspector.SettingsScreen.prototype.selectTab):
Add method for external tab swithching.
(WebInspector.SettingsScreen.prototype.wasShown):
Make GUI construction lazy.
(WebInspector.SettingsScreenTabbedPane):
Extend class to access protected member.
(WebInspector.SettingsController.prototype._buttonClicked):
Change "showSettingsScreen" visibility and parameters.
(WebInspector.SettingsController.prototype._onHideSettingsScreen):
Preserve settings screen state.
(WebInspector.SettingsController.prototype.showSettingsScreen):
Change method visibility and parameters.
* inspector/front-end/ShortcutsScreen.js:
(WebInspector.ShortcutsScreen): Remove inheritance from HelpScreen.
(WebInspector.ShortcutsScreen.prototype._createShortcutsTabView):
Refactoring of GUI construction.
(WebInspector.ShortcutsSection.prototype.renderSection):
Ditto.
* inspector/front-end/helpScreen.css:
(.help-window-main ::-webkit-scrollbar): Rebind scrollbar settings.
(.help-window-main ::-webkit-resizer): Ditto.
(.help-window-main ::-webkit-scrollbar-thumb:vertical): Ditto.
(.help-window-main ::-webkit-scrollbar-thumb:vertical:active): Ditto.
(.help-window-main ::-webkit-scrollbar-track:vertical): Ditto.
(body:not(.compact) #settings-screen .tabbed-pane): Fix container height.
(#settings-screen .tabbed-pane-header): Ditto.
(#settings-screen .tabbed-pane-header-tabs): Adjust spacing.
(#settings-screen .tabbed-pane-header-tab): Adjust style.
(#settings-screen .help-close-button): Adjust spacing.
(#settings-screen .tabbed-pane-header-tab.selected):
Erase line below active tab.
(#settings-screen .tabbed-pane-content): Adjust spacing.
(#settings-screen .help-content): Ditto.
* inspector/front-end/inspector.js:
(WebInspector.documentKeyDown): Use Settings screen to show shortcuts.
2012-05-29 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: REGRESSION: load heap snapshot doesn't work.
https://bugs.webkit.org/show_bug.cgi?id=87642
HeapSnapshotReceiver interface was introduced.
It declares the API for HeapSnapshotLoader, HeapSnapshotLoaderProxy and HeapSnapshotSaveToFileReceiver.
The HeapProfileHeader was refactored and tests were added.
Reviewed by Yury Semikhatsky.
* inspector/front-end/HeapSnapshotLoader.js:
(WebInspector.HeapSnapshotLoader):
(WebInspector.HeapSnapshotLoader.prototype.startLoading):
(WebInspector.HeapSnapshotLoader.prototype.dispose):
(WebInspector.HeapSnapshotLoader.prototype._reset):
(WebInspector.HeapSnapshotLoader.prototype.finishLoading):
* inspector/front-end/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotWorker.prototype.startCheckingForLongRunningCalls):
(WebInspector.HeapSnapshotLoaderProxy.prototype.startLoading):
(WebInspector.HeapSnapshotLoaderProxy.prototype.pushJSONChunk):
(WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading):
* inspector/front-end/HeapSnapshotView.js:
(WebInspector.HeapSnapshotReceiver):
(WebInspector.HeapSnapshotReceiver.prototype.startLoading):
(WebInspector.HeapSnapshotReceiver.prototype.pushJSONChunk):
(WebInspector.HeapSnapshotReceiver.prototype.finishLoading):
(WebInspector.HeapSnapshotReceiver.prototype.dispose):
(WebInspector.HeapProfileHeader):
(WebInspector.HeapProfileHeader.prototype.load):
(WebInspector.HeapProfileHeader.prototype._setupWorker):
(WebInspector.HeapProfileHeader.prototype.dispose):
(WebInspector.HeapProfileHeader.prototype._saveStatusUpdate):
(WebInspector.HeapProfileHeader.prototype.pushJSONChunk):
(WebInspector.HeapProfileHeader.prototype._parsed):
(WebInspector.HeapProfileHeader.prototype.finishHeapSnapshot):
(WebInspector.HeapProfileHeader.prototype.saveToFile):
(WebInspector.HeapProfileHeader.prototype.loadFromFile.onLoad):
(WebInspector.HeapProfileHeader.prototype.loadFromFile):
(WebInspector.HeapProfileHeader.prototype._loadNextChunk):
(WebInspector.HeapProfileHeader.prototype._nextChunkLoaded):
(WebInspector.HeapProfileHeader.prototype._createFileReader):
(WebInspector.HeapSnapshotSaveToFileReceiver):
(WebInspector.HeapSnapshotSaveToFileReceiver.prototype.startLoading):
(WebInspector.HeapSnapshotSaveToFileReceiver.prototype.pushJSONChunk):
(WebInspector.HeapSnapshotSaveToFileReceiver.prototype.finishLoading):
(WebInspector.HeapSnapshotSaveToFileReceiver.prototype.dispose):
(WebInspector.HeapSnapshotSaveToFileReceiver.prototype._startSavingSnapshot):
(WebInspector.HeapSnapshotSaveToFileReceiver.prototype._saveStatusUpdate):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._createFileSelectorElement.onChange):
(WebInspector.ProfilesPanel.prototype._createFileSelectorElement):
(WebInspector.ProfilesPanel.prototype._loadFromFile):
2012-05-29 Eric Seidel <eric@webkit.org>
Add HTMLIFrameElement.seamless property accessor now that seamless is enabled and works
https://bugs.webkit.org/show_bug.cgi?id=87708
Reviewed by Adam Barth.
Lots of tests in fast/frames/seamless cover this property.
* html/HTMLIFrameElement.idl:
2012-05-29 Kentaro Hara <haraken@chromium.org>
[Performance] Optimize querySelector() and querySelectorAll() by removing
redundant dummy style sheet creations
https://bugs.webkit.org/show_bug.cgi?id=87627
Reviewed by Antti Koivisto.
This patch improves performance of querySelector("#id") by 4.2% ~ 17.7%
in Safari and Chromium.
Performance tests: https://bugs.webkit.org/attachment.cgi?id=144288
The performance test results in my desktop:
[Safari/Mac]
document.querySelector("#headId") : 13.60 ms => 12.40 ms +9.68%
document.querySelector("#duplicatedId") : 14.80 ms => 14.20 ms +4.23%
document.querySelector("#tailId") : 13.80 ms => 12.20 ms +13.11%
document.querySelectorAll("#headId") : 17.80 ms => 14.60 ms +21.92%
document.querySelectorAll("#duplicatedId") : 513.80 ms => 471.60 ms +8.95%
document.querySelectorAll("#tailId") : 19.20 ms => 16.40 ms +17.07%
document.querySelector("h1") : 14.40 ms => 13.60 ms +5.88%
document.querySelector("h2") : 14.80 ms => 13.80 ms +7.25%
document.querySelector("h3") : 312.00 ms => 306.60 ms +1.76%
document.querySelectorAll("h1") : 322.00 ms => 314.60 ms +2.35%
document.querySelectorAll("h2") : 481.00 ms => 420.60 ms +14.36%
document.querySelectorAll("h3") : 326.80 ms => 315.80 ms +3.48%
document.querySelector(".headClass") : 16.20 ms => 15.40 ms +5.19%
document.querySelector(".duplicatedClass") : 17.00 ms => 15.40 ms +10.39%
document.querySelector(".tailClass") : 369.60 ms => 362.60 ms +1.93%
document.querySelectorAll(".headClass") : 388.20 ms => 377.60 ms +2.81%
document.querySelectorAll(".duplicatedClass") : 605.00 ms => 581.20 ms +4.09%
document.querySelectorAll(".tailClass") : 401.60 ms => 391.40 ms +2.61%
[Chromium/Linux]
ocument.querySelector("#headId") : 16.00 ms => 13.60 ms +17.65%
document.querySelector("#duplicatedId") : 16.80 ms => 15.40 ms +9.09%
document.querySelector("#tailId") : 16.00 ms => 13.60 ms +17.65%
document.querySelectorAll("#headId") : 29.00 ms => 25.00 ms +16.00%
document.querySelectorAll("#duplicatedId") : 561.40 ms => 505.20 ms +11.12%
document.querySelectorAll("#tailId") : 34.00 ms => 26.80 ms +26.87%
document.querySelector("h1") : 18.20 ms => 15.80 ms +15.19%
document.querySelector("h2") : 19.00 ms => 16.60 ms +14.46%
document.querySelector("h3") : 280.40 ms => 274.00 ms +2.34%
document.querySelectorAll("h1") : 300.20 ms => 365.20 ms -17.80%
document.querySelectorAll("h2") : 487.60 ms => 504.20 ms -3.29%
document.querySelectorAll("h3") : 349.40 ms => 324.00 ms +7.84%
document.querySelector(".headClass") : 18.40 ms => 16.00 ms +15.00%
document.querySelector(".duplicatedClass") : 19.40 ms => 16.20 ms +19.75%
document.querySelector(".tailClass") : 349.60 ms => 345.40 ms +1.22%
document.querySelectorAll(".headClass") : 382.80 ms => 378.20 ms +1.22%
document.querySelectorAll(".duplicatedClass") : 550.80 ms => 574.20 ms -4.08%
document.querySelectorAll(".tailClass") : 381.00 ms => 387.00 ms -1.55%
I've found that StyleSheetInternal::create() in CSSParser::parseSelector()
is a bottleneck of querySelector() and querySelectorAll().
void CSSParser::parseSelector(const String& string, CSSSelectorList& selectorList)
{
RefPtr<StyleSheetInternal> dummyStyleSheet = StyleSheetInternal::create();
setStyleSheet(dummyStyleSheet.get());
...;
}
This patch removes a dummy style sheet. Previously the dummy style sheet
was needed to avoid null checks of m_styleSheet in CSSGrammer.y.
This patch fixes CSSGrammer.y so that it works fine with a null m_styleSheet.
Tests: fast/dom/SelectorAPI/*. No change in the test results.
* css/CSSGrammar.y:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseSelector):
2012-05-29 Nikolas Zimmermann <nzimmermann@rim.com>
SVGViewSpec DOM bindings aka SVGSVGElement.currentView is unimplemented
https://bugs.webkit.org/show_bug.cgi?id=15495
Reviewed by Rob Buis.
Finish SVGViewSpec implementation and expose it to the Web. Numerous smaller bugs are fixed:
- SVGViewSpec and all of its contents should be read-only. Enforce that and test it.
Add a new enum to SVGPropertyInfo so that each SVGAnimatedProperty knows if its content is supposed to be read-write or read-only.
- Make the 'transform' attribute of SVGViewSpec exposable by switching to a SVGTransformListProperty - it can now be accessed from JS.
- Assure that following XXXString methods are in sync with the corresponding SVG DOM interfaces
readonly attribute DOMString viewBoxString;
readonly attribute DOMString preserveAspectRatioString;
readonly attribute DOMString transformString;
readonly attribute DOMString viewTargetString;
- Cleanup code in svg/properties that was intended to handle SVGViewSpec. Turns out lot of the complexity was unncessary, and can be removed.
- Move SVGFitToViewBox to the same pattern SVGZoomAndPan uses since two days, that avoids any virtual function calls for attribute parsing.
- Create/expose ObjectiveC/JS bindings for SVGViewSpec.
- Enable SVGViewSpec constructor.
Tests: svg/custom/linking-a-03-b-all-expected.svg
svg/dom/SVGViewSpec-defaults.html
svg/dom/SVGViewSpec.html
svg/dom/complex-svgView-specification.html
svg/dom/viewspec-parser.html
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.order:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSSVGLengthCustom.cpp:
(WebCore::JSSVGLength::setValue):
(WebCore::JSSVGLength::convertToSpecifiedUnits):
* bindings/objc/DOMSVG.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(NativeToJSValue):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
(GenerateNormalAttrSetter):
(GenerateFunctionCallback):
* bindings/v8/custom/V8SVGLengthCustom.cpp:
(WebCore::V8SVGLength::valueAccessorSetter):
(WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
* page/DOMWindow.idl:
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildTileImageTransform):
* svg/SVGFitToViewBox.cpp:
* svg/SVGFitToViewBox.h:
(SVGFitToViewBox):
(WebCore::SVGFitToViewBox::parseAttribute):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::orientTypePropertyInfo):
(WebCore::SVGMarkerElement::parseAttribute):
(WebCore::SVGMarkerElement::synchronizeOrientType):
(WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::dPropertyInfo):
(WebCore::SVGPathElement::svgAttributeChanged):
(WebCore::SVGPathElement::pathByteStream):
(WebCore::SVGPathElement::lookupOrCreateDWrapper):
(WebCore::SVGPathElement::synchronizeD):
* svg/SVGPathSegWithContext.h:
(WebCore::SVGPathSegWithContext::animatedProperty):
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::parseAttribute):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::pointsPropertyInfo):
(WebCore::SVGPolyElement::parseAttribute):
(WebCore::SVGPolyElement::synchronizePoints):
(WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
* svg/SVGRect.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::~SVGSVGElement):
(WebCore::SVGSVGElement::currentView):
(WebCore::SVGSVGElement::parseAttribute):
(WebCore::SVGSVGElement::currentViewBoxRect):
(WebCore::SVGSVGElement::viewBoxToViewTransform):
(WebCore::SVGSVGElement::setupInitialView):
(WebCore::SVGSVGElement::inheritViewAttributes):
* svg/SVGSVGElement.h:
(SVGSVGElement):
* svg/SVGSVGElement.idl:
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::parseAttribute):
* svg/SVGTests.cpp:
(WebCore::SVGTests::requiredFeaturesPropertyInfo):
(WebCore::SVGTests::requiredExtensionsPropertyInfo):
(WebCore::SVGTests::systemLanguagePropertyInfo):
(WebCore::SVGTests::synchronizeRequiredFeatures):
(WebCore::SVGTests::synchronizeRequiredExtensions):
(WebCore::SVGTests::synchronizeSystemLanguage):
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::textLengthPropertyInfo):
(WebCore::SVGTextContentElement::synchronizeTextLength):
(WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
* svg/SVGViewElement.cpp:
(WebCore::SVGViewElement::parseAttribute):
* svg/SVGViewElement.h:
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::viewBoxPropertyInfo):
(WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo):
(WebCore::SVGViewSpec::transformPropertyInfo):
(WebCore::SVGViewSpec::SVGViewSpec):
(WebCore::SVGViewSpec::viewBoxIdentifier):
(WebCore::SVGViewSpec::preserveAspectRatioIdentifier):
(WebCore::SVGViewSpec::transformIdentifier):
(WebCore::SVGViewSpec::setZoomAndPan):
(WebCore::SVGViewSpec::setTransformString):
(WebCore::SVGViewSpec::transformString):
(WebCore::SVGViewSpec::viewBoxString):
(WebCore::SVGViewSpec::preserveAspectRatioString):
(WebCore::SVGViewSpec::viewTarget):
(WebCore::SVGViewSpec::transform):
(WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
(WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
(WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
(WebCore::SVGViewSpec::reset):
(WebCore::SVGViewSpec::parseViewSpec):
* svg/SVGViewSpec.h:
(WebCore::SVGViewSpec::~SVGViewSpec):
(SVGViewSpec):
(WebCore::SVGViewSpec::create):
(WebCore::SVGViewSpec::setViewTargetString):
(WebCore::SVGViewSpec::setZoomAndPan):
(WebCore::SVGViewSpec::contextElement):
(WebCore::SVGViewSpec::resetContextElement):
(WebCore::SVGViewSpec::transformBaseValue):
(WebCore::SVGViewSpec::viewBoxAnimated):
(WebCore::SVGViewSpec::viewBox):
(WebCore::SVGViewSpec::viewBoxBaseValue):
(WebCore::SVGViewSpec::setViewBoxBaseValue):
(WebCore::SVGViewSpec::preserveAspectRatioAnimated):
(WebCore::SVGViewSpec::preserveAspectRatio):
(WebCore::SVGViewSpec::preserveAspectRatioBaseValue):
(WebCore::SVGViewSpec::setPreserveAspectRatioBaseValue):
* svg/SVGViewSpec.idl:
* svg/properties/SVGAnimatedProperty.h:
(WebCore::SVGAnimatedProperty::isReadOnly):
(WebCore::SVGAnimatedProperty::setIsReadOnly):
(SVGAnimatedProperty):
(WebCore::SVGAnimatedProperty::lookupOrCreateWrapper):
(WebCore::SVGAnimatedProperty::lookupWrapper):
(WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
* svg/properties/SVGAnimatedPropertyMacros.h:
(WebCore::SVGSynchronizableAnimatedProperty::synchronize):
(SVGSynchronizableAnimatedProperty):
* svg/properties/SVGAnimatedPropertySynchronizer.h: Removed.
* svg/properties/SVGAttributeToPropertyMap.h:
* svg/properties/SVGListProperty.h:
* svg/properties/SVGListPropertyTearOff.h:
(SVGListPropertyTearOff):
(WebCore::SVGListPropertyTearOff::isReadOnly):
* svg/properties/SVGPathSegListPropertyTearOff.h:
(SVGPathSegListPropertyTearOff):
(WebCore::SVGPathSegListPropertyTearOff::isReadOnly):
* svg/properties/SVGProperty.h:
(SVGProperty):
* svg/properties/SVGPropertyInfo.h:
(WebCore::SVGPropertyInfo::SVGPropertyInfo):
(SVGPropertyInfo):
* svg/properties/SVGPropertyTearOff.h:
(WebCore::SVGPropertyTearOff::isReadOnly):
* svg/properties/SVGStaticListPropertyTearOff.h:
(SVGStaticListPropertyTearOff):
(WebCore::SVGStaticListPropertyTearOff::isReadOnly):
2012-05-29 Kent Tamura <tkent@chromium.org>
REGRESSION (r90971): the cursor is painted “behind” the placeholder text
https://bugs.webkit.org/show_bug.cgi?id=87155
Reviewed by Hajime Morita.
This regression happened only on platforms on which
RenderTheme::shouldShowPlaceholderWhenFocused() returns true.
Because the order of renderers for the editable node and the placeholder
node was:
- A renderer for the editable node
- A renderer for the placeholder node,
The text caret was painted, then the palceholder was painted.
We should not use z-index in the built-in shadow nodes. So the patch
fixes this bug by re-ordering these renderers.
Tests: fast/forms/input-placeholder-paint-order-2.html
fast/forms/input-placeholder-paint-order.html
fast/forms/textarea/textarea-placeholder-paint-order-2.html
fast/forms/textarea/textarea-placeholder-paint-order.html
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::fixPlaceholderRenderer):
Added. Reorder the order of renderers so that the placeholder renderer
precedes the inner text renderer.
* html/HTMLTextFormControlElement.h: Add fixPlaceholderRenderer() declaration.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::attach): Calls fixPlaceholderRenderer().
(WebCore::HTMLTextAreaElement::updatePlaceholderText):
ditto. Also, use innerTextElement() to improvde code readability.
* html/HTMLTextAreaElement.h:
(HTMLTextAreaElement): Overrides attach().
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::updatePlaceholderText):
Calls fixPlaceholderRenderer().
(WebCore::TextFieldInputType::attach): ditto.
* html/TextFieldInputType.h:
(TextFieldInputType): Overrides attach().
2012-05-28 Kentaro Hara <haraken@chromium.org>
[V8] Implement V8Binding::v8Null(isolate) and use it in CodeGeneratorV8.pm
https://bugs.webkit.org/show_bug.cgi?id=87692
Reviewed by Adam Barth.
Since v8::Null(isolate) crashes if we pass a NULL isolate, we are planning
to pass Isolate to v8::Null() in the following steps:
[1] Implement V8Bindings::v8Null(isolate). v8Null(isolate) does the NULL check.
If isolate is NULL, v8Null(isolate) calls v8::Null(). Otherwise,
v8Null(isolate) calls v8::Null(isolate).
[2] In V8 bindings, we replace v8::Null() with v8::Null(isolate) for a non-optional
'isolate' parameter. (e.g. void foo(..., Isolate* isolate) { v8::Null(); } )
[3] In V8 bindings, we replace v8::Null() with v8Null(isolate) for an optional
'isolate' parameter. (e.g. void foo(..., Isolate* isolate = 0) { v8::Null(); } )
This bug fixes [1] by implementing V8Binding::v8Null(isolate). Also this patch uses
V8Binding::v8Null(isolate) in bindings/v8/*.{h,cpp}.
No tests. No behavior change.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
(NativeToJSValue):
* bindings/scripts/test/V8/V8Float64Array.h:
* bindings/scripts/test/V8/V8TestActiveDOMObject.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventConstructor.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventTarget.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestException.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestInterface.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNamedConstructor.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNode.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestObj.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetter):
(WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetter):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
(WebCore::toV8):
* bindings/v8/V8Binding.h:
(WebCore::v8Null):
(WebCore):
(WebCore::v8DateOrNull):
* bindings/v8/V8DOMWrapper.cpp:
* bindings/v8/V8DOMWrapper.h:
(WebCore):
2012-05-28 Kent Tamura <tkent@chromium.org>
Fix a crash in HTMLFormControlElement::disabled().
https://bugs.webkit.org/show_bug.cgi?id=86534
Reviewed by Ryosuke Niwa.
Stop to hold pointers of fildset and legend elements. We can avoid it by
holding ancestor's disabled state.
The ancesotr's disabled state should be invalidated when
- fieldset's disabled value is changed.
- fieldset's children is updated because a legend position might be changed.
- A form control is attached to or detached from a tree.
No new tests. It's almost impossible to make a reliable test.
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
Added. Invalidate disabled state of form controls under the specified node.
(WebCore::HTMLFieldSetElement::disabledAttributeChanged):
Uses invalidateDisabledStateUnder().
(WebCore::HTMLFieldSetElement::childrenChanged):
Added new override function. We need invalidate disabled state of form
controls under legend elements.
* html/HTMLFieldSetElement.h:
(HTMLFieldSetElement): Add invalidateDisabledStateUnder() and childrenChanged().
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::HTMLFormControlElement):
Remove initialization of the removed data members.
Initialize m_ancestorDisabledState.
(WebCore::HTMLFormControlElement::updateAncestorDisabledState):
Update m_ancestorDisabledState. It should be
AncestorDisabledStateDisabled if the control is under a disabled
fieldset and not under the first legend child of the disabled filedset.
(WebCore::HTMLFormControlElement::ancestorDisabledStateWasChanged):
Invalidate m_ancestorDisabledState.
(WebCore::HTMLFormControlElement::insertedInto): ditto.
(WebCore::HTMLFormControlElement::removedFrom): ditto.
(WebCore::HTMLFormControlElement::disabled):
Calls updateAncestorDisabledState() if needed.
(WebCore::HTMLFormControlElement::recalcWillValidate):
Remove unnecessary check for m_legendAncestor.
* html/HTMLFormControlElement.h:
(HTMLFormControlElement):
- Rename updateFieldSetAndLegendAncestor() to updateAncestorDisabledState(), and make it private.
- Remove m_fieldSetAncestor, m_legendAncestor, and m_fieldSetAncestorValid.
- Add m_ancestorDisabledState.
2012-05-28 Takashi Toyoshima <toyoshim@chromium.org>
[WebSocket] Receiving reserved close codes, 1005, 1006, and 1015 must appear as code=1006 and wasClean=false
https://bugs.webkit.org/show_bug.cgi?id=87084
Reviewed by Kent Tamura.
Status codes 1005, 1006, and 1015 are forbidden to be sent in actual close frames.
If a client received these frames, the client should handle them as broken.
Close frames containing invalid body size are the same as these forbidden cases.
Update close-code-and-reason tests to verify this patch.
* Modules/websockets/WebSocket.cpp: Handle AbnormalClosure as wasClean == false
(WebCore::WebSocket::didClose):
* Modules/websockets/WebSocketChannel.cpp: Handle close frames' status code carefully
(WebCore::WebSocketChannel::processFrame):
* Modules/websockets/WebSocketChannel.h: Update on newly defined close event codes
2012-05-28 Kentaro Hara <haraken@chromium.org>
[V8] Avoid passing NULL to an 'isolate' parameter
https://bugs.webkit.org/show_bug.cgi?id=87689
Reviewed by Adam Barth.
v8::Null(isolate) crashes if we pass a NULL isolate.
Thus we are planning to replace v8::Null()s in a following way:
- Implement V8Bindings::v8Null(isolate). v8Null(isolate) does the NULL check.
If isolate is NULL, v8Null(isolate) calls v8::Null(). Otherwise,
v8Null(isolate) calls v8::Null(isolate).
- In V8 bindings, we replace v8::Null() with v8::Null(isolate) for a
non-optional 'isolate' parameter.
(e.g. void foo(..., Isolate* isolate) { v8::Null(); } )
- In V8 bindings, we replace v8::Null() with v8Null(isolate) for an
optional 'isolate' parameter.
(e.g. void foo(..., Isolate* isolate = 0) { v8::Null(); } )
However, currently we cannot do the replacement mechanically, since some code
pass NULL to a non-optional 'isolate' parameter. In other words, currently
"non-optional" does not guarantee that 'isolate' is not NULL.
This patch removes all the code that passes NULL to a non-optional 'isolate'
parameter. This will enable us to achieve the replacement mechanically.
No tests. No behavior change.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateCallbackImplementation):
(NativeToJSValue):
* bindings/scripts/test/V8/V8TestCallback.cpp:
(WebCore::V8TestCallback::callbackWithClass1Param):
(WebCore::V8TestCallback::callbackWithClass2Param):
(WebCore::V8TestCallback::callbackWithStringList):
(WebCore::V8TestCallback::callbackRequiresThisToPass):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::V8TestObj::installPerContextProperties):
* bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
(WebCore::V8SQLStatementErrorCallback::handleEvent):
* bindings/v8/custom/V8MutationCallbackCustom.cpp:
(WebCore::V8MutationCallback::handleEvent):
2012-05-28 Kent Tamura <tkent@chromium.org>
Form controls in <fieldset disabled> should not be validated.
https://bugs.webkit.org/show_bug.cgi?id=87381
Reviewed by Hajime Morita.
We need to use disabeld() instead of m_disabled to calculate
willValidate property. Also, we need to update willValidate if
necessary.
Test: fast/forms/fieldset/validation-in-fieldset.html
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::disabledAttributeChanged):
- Do not traverse this.
- Calls ancestorDisabledStateWasChanged() instead of
setNeedsStyleRecalc() because we'd like to do additional tasks.
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::ancestorDisabledStateWasChanged):
Added. Just calls disabledAttributeChanged().
(WebCore::HTMLFormControlElement::parseAttribute):
Do not call setNeedsWillValidateCheck() whenever an attribute is updated.
It should be called only if disabled or readonly attribute is updated.
(WebCore::HTMLFormControlElement::disabledAttributeChanged):
Add setNeedsWillValidateCheck(). It was moved from parseAttribute().
(WebCore::HTMLFormControlElement::insertedInto):
Invalidate ancestor information.
(WebCore::HTMLFormControlElement::recalcWillValidate):
Use disabled() instead of m_disabled. disabled() takes care of
ancestor's disabled state.
* html/HTMLFormControlElement.h:
(HTMLFormControlElement):
2012-05-28 Rakesh KN <rakesh.kn@motorola.com>
[Forms] HTMLFieldSetElement.idl doesn't have elements attribute.
https://bugs.webkit.org/show_bug.cgi?id=80110
Reviewed by Kent Tamura.
Implemented elements attribute for HTMLFieldSetElement. This is spec'ed at
http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-fieldset-elements
Tests: fast/forms/fieldset/fieldset-elements.html
fast/forms/fieldset/fieldset-form-collection-radionode-list.html
* dom/Node.cpp:
(WebCore::Node::radioNodeList):
Extended ASSERT to assert if not HTMLFieldSetElement or HTMLFormElement.
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::elements):
Elements attribute implementation.
(WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
Update the formcontrol elements collections if dom tree got modified.
(WebCore::HTMLFieldSetElement::associatedElements):
FormControl elements collection accessor.
(WebCore::HTMLFieldSetElement::length):
Number of elements in the fieldset group.
* html/HTMLFieldSetElement.h:
Added elements collection member and form control collection members.
* html/HTMLFieldSetElement.idl:
Added elements attribute.
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::formControlElements):
Added support for HTMLFieldSetElement, based on base element type gets its associated elements.
(WebCore::HTMLFormCollection::numberOfFormControlElements): Ditto
(WebCore::HTMLFormCollection::getNamedFormItem): Process image elements only for form element.
(WebCore::HTMLFormCollection::updateNameCache): Ditto
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::RadioNodeList):
DynamicSubTree root element is decided based on the type whether base element is form or fieldset element.
Renamed m_formElement to m_baseElement.
(WebCore::RadioNodeList::~RadioNodeList):
Renamed m_formElement to m_baseElement.
(WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
Form element specific changes moved under form element check.
* html/RadioNodeList.h:
(WebCore::RadioNodeList::create):
(RadioNodeList):
Renamed m_formElement to m_baseElement.
2012-05-28 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
[BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
https://bugs.webkit.org/show_bug.cgi?id=80135
Reviewed by Rob Buis.
RIM PR: 145660
Fixed a regression introduced by r111810, we should cancel the new
request when user press cancel button in http authentication challenge
dialog, and we should also allow sending empty username and password
with the request.
Also removed redundant codes which checked the existence of the
FrameLoaderClient pointer, as we've already moved authenticationChallenge()
out of class FrameLoaderClient, it is not needed.
Manual test added. Testing http authentication dialog relies on user interaction.
Resubmit the patch reverted by r115104 after the digest infinite loop
issue for BlackBerry porting get identified and fixed.
Internally reviewed by Joe Mason <jmason@rim.com>
* platform/blackberry/PageClientBlackBerry.h:
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::sendRequestWithCredentials):
2012-05-28 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
[BlackBerry] http authentication challenge issue when loading favicon
https://bugs.webkit.org/show_bug.cgi?id=87665
Reviewed by Rob Buis.
Provide the TargetType when generating a favicon loading
request. Loading favicons is triggered after the main resource
has been loaded and parsed, so if we cancel the authentication
challenge when loading main resource, we should also cancel
loading the favicon when it starts to load. If not we will
receive another challenge after we canceled the main resource
loading, which may confuse the user.
Internally reviewed by Joe Mason <jmason@rim.com>
No new tests because of no behavior changes.
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::sendRequestWithCredentials):
2012-05-28 MORITA Hajime <morrita@google.com>
Rename FrameLoaderClient::shadowDOMAllowed() to allowShadowDOM()
https://bugs.webkit.org/show_bug.cgi?id=87101
Reviewed by Kentaro Hara.
No new tests. No behavior change.
* bindings/generic/ContextEnabledFeatures.cpp:
(WebCore::ContextEnabledFeatures::shadowDOMEnabled):
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::allowShadowDOM):
2012-05-28 David Barton <dbarton@mathscribe.com>
mathml/presentation/mo-stretch.html and mroot-pref-width.html tests fail on Mac
https://bugs.webkit.org/show_bug.cgi?id=86786
Reviewed by Darin Adler.
The fix to https://bugs.webkit.org/show_bug.cgi?id=84167 changed inline-table baselines,
including for <mtable>. We therefore have to correct <mtable>'s vertical-align CSS
property.
Tested by existing tests mo-stretch.html, row-alignment.xhtml, and tables.xhtml.
* css/mathml.css:
(mtable):
2012-05-28 Luke Macpherson <macpherson@chromium.org>
Make CSSParser::filteredProperties() O(n) instead of O(n^2) and improve readability.
https://bugs.webkit.org/show_bug.cgi?id=87078
Reviewed by Darin Adler.
This patch implements a number of improvements to filteredProperties:
1) Make the code more linearly readable by separating out handling of important and non-important properties.
2) Eliminate one BitArray instance (reduces hot memory so more cache friendly).
3) Remove O(n^2) behavior caused by scanning for and removing previously encountered definitions of each property.
The key algorithmic change is to add properties in decreasing precedence:
a) Iterating once per (important, !important) so that important properties are visited first.
b) Reverse iteration of m_parsedProperties visits the properties in decreasing precedence.
Covered by loads of existing tests - getting CSS property precedence wrong results in too many errors to list.
In particular fast/css contains test cases for important corner cases like duplicated important properties.
* css/CSSParser.cpp:
(WebCore::CSSParser::createStylePropertySet):
* css/CSSProperty.h:
Add vector traits so that CSSProperty can just be memset by vector without calling constructor.
2012-05-28 MORITA Hajime <morrita@google.com>
Can't edit <input> elements with :first-letter
https://bugs.webkit.org/show_bug.cgi?id=87615
Reviewed by Kent Tamura.
A check using canHaveGeneratedChildren() should cover not only
button and menulist, but also RenderTextControl.
This change pulles canHaveGeneratedChildren() up
from RenderDeprecatedFlexibleBox to RenderObject,
and lets RenderTextControl override it.
Test: fast/forms/input-first-letter-edit.html
* rendering/RenderBlock.cpp:
(WebCore):
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::updateFirstLetter):
* rendering/RenderBlock.h: Removed a static function canHaveGeneratedChildren()
(RenderBlock):
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderObject.cpp:
(WebCore):
(WebCore::RenderObject::canHaveGeneratedChildren): Added.
* rendering/RenderObject.h:
(RenderObject):
* rendering/RenderTextControl.h:
2012-05-28 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Add support for layers with scale invariant size
https://bugs.webkit.org/show_bug.cgi?id=87601
Reviewed by Rob Buis.
To support layers that have a "floating" appearance, i.e. don't change size
when the web page is drawn at a different scale, we add a new layer property
named "sizeIsScaleInvariant".
The anchor position will still be given in document coordinates for these
"floating" layers, so this is well suited for interface elements like selection
handles whose size is always the same but move with the web page contents.
PR #156812
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::setDrawTransform):
(WebCore::LayerCompositingThread::drawTextures):
(WebCore::LayerCompositingThread::drawMissingTextures):
* platform/graphics/blackberry/LayerCompositingThread.h:
(LayerCompositingThread):
* platform/graphics/blackberry/LayerCompositingThreadClient.h:
(LayerCompositingThreadClient):
(WebCore::LayerCompositingThreadClient::drawMissingTextures):
* platform/graphics/blackberry/LayerData.h:
(WebCore::LayerData::LayerData):
(WebCore::LayerData::sizeIsScaleInvariant):
(LayerData):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::LayerRenderer):
(WebCore::LayerRenderer::compositeLayers):
(WebCore::LayerRenderer::updateLayersRecursive):
(WebCore::LayerRenderer::compositeLayersRecursive):
* platform/graphics/blackberry/LayerRenderer.h:
(LayerRenderer):
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::updateTextureContentsIfNeeded):
(WebCore::LayerTiler::drawTextures):
(WebCore::LayerTiler::drawMissingTextures):
(WebCore::LayerTiler::drawTexturesInternal):
* platform/graphics/blackberry/LayerTiler.h:
(LayerTiler):
* platform/graphics/blackberry/LayerWebKitThread.h:
(WebCore::LayerWebKitThread::setSizeIsScaleInvariant):
(LayerWebKitThread):
2012-05-28 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Make it possible to manipulate layers on the compositing thread
https://bugs.webkit.org/show_bug.cgi?id=87602
Reviewed by Rob Buis.
Normally, layers are manipulated on the WebKit thread, and the changes are
synced to the compositing thread during the next accelerated compositing commit
operation.
However, for overlay layers the ability to manipulate layers on the compositing
thread is necessary for adequate user interface responsiveness.
Two mechanisms are added:
1. For a layer with a WebKit-thread counterpart, you can temporarily override
attributes or add animations whose output override attributes.
2. For a layer with no WebKit-thread counterpart, you can now directly set the
compositing thread values for attributes. If you attempt to do this for layers
that do have a WebKit-thread counterpart, the compositing thread values will
be overwritten at the time of the next commit, which makes the override
mechanism more useful there.
PR #156812
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::addSublayer):
(WebCore):
(WebCore::LayerCompositingThread::updateAnimations):
(WebCore::LayerCompositingThread::removeAnimation):
(WebCore::LayerCompositingThread::override):
(WebCore::LayerCompositingThread::clearOverride):
* platform/graphics/blackberry/LayerCompositingThread.h:
(LayerOverride):
(WebCore::LayerOverride::create):
(WebCore::LayerOverride::setPosition):
(WebCore::LayerOverride::setAnchorPoint):
(WebCore::LayerOverride::setBounds):
(WebCore::LayerOverride::setTransform):
(WebCore::LayerOverride::setOpacity):
(WebCore::LayerOverride::addAnimation):
(WebCore::LayerOverride::LayerOverride):
(WebCore):
(LayerCompositingThread):
(WebCore::LayerCompositingThread::setPosition):
(WebCore::LayerCompositingThread::setAnchorPoint):
(WebCore::LayerCompositingThread::setBounds):
(WebCore::LayerCompositingThread::setSizeIsScaleInvariant):
(WebCore::LayerCompositingThread::setTransform):
(WebCore::LayerCompositingThread::setOpacity):
(WebCore::LayerCompositingThread::setNeedsTexture):
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::LayerWebKitThread):
(WebCore::LayerWebKitThread::commitOnCompositingThread):
* platform/graphics/blackberry/LayerWebKitThread.h:
(LayerWebKitThread):
(WebCore::LayerWebKitThread::clearOverride):
2012-05-28 Rob Flack <flackr@chromium.org>
[chromium] Only increase size of Combo Box Options when displayed on touch screen
https://bugs.webkit.org/show_bug.cgi?id=85921
Reviewed by Adam Barth.
Adds a flag to set whether the current device is a touch screen, independent of whether touch events are supported and use this for the combo box sizing.
No new tests as this is a flag change and covered by existing tests: WebKit/chromium/tests/PopupMenuTest.cpp
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setDeviceSupportsTouch):
(WebCore::Settings::deviceSupportsTouch):
(Settings):
* platform/chromium/PopupListBox.cpp:
(WebCore::PopupListBox::getRowHeight):
* platform/chromium/PopupListBox.h:
(PopupContainerSettings):
* platform/chromium/PopupMenuChromium.cpp:
(WebCore::PopupMenuChromium::show):
2012-05-28 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Make custom compositing thread layers more flexible
https://bugs.webkit.org/show_bug.cgi?id=87600
Reviewed by Rob Buis.
Introduce a LayerCompositingThreadClient that's used to fine tune the
behaviour of custom layers. Let the LayerTiler be a
LayerCompositingThreadClient and thus decouple it from
LayerCompositingThread. Adjust method signatures to allow a one-to-many
relationship between Client and Layer.
Remove the old LayerCompositingThread::drawCustom() in favour of this new
Client interface.
PR #156812
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::create):
(WebCore::LayerCompositingThread::LayerCompositingThread):
(WebCore::LayerCompositingThread::~LayerCompositingThread):
(WebCore::LayerCompositingThread::deleteTextures):
(WebCore::LayerCompositingThread::drawTextures):
(WebCore::LayerCompositingThread::hasMissingTextures):
(WebCore::LayerCompositingThread::drawMissingTextures):
(WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
(WebCore::LayerCompositingThread::bindContentsTexture):
(WebCore::LayerCompositingThread::setVisible):
(WebCore::LayerCompositingThread::scheduleCommit):
* platform/graphics/blackberry/LayerCompositingThread.h:
(WebCore):
(LayerCompositingThread):
* platform/graphics/blackberry/LayerCompositingThreadClient.h: Added.
(WebCore):
(LayerCompositingThreadClient):
(WebCore::LayerCompositingThreadClient::~LayerCompositingThreadClient):
(WebCore::LayerCompositingThreadClient::bindContentsTexture):
(WebCore::LayerCompositingThreadClient::hasMissingTextures):
(WebCore::LayerCompositingThreadClient::drawMissingTextures):
(WebCore::LayerCompositingThreadClient::scheduleCommit):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::drawDebugBorder):
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::LayerTiler):
(WebCore::LayerTiler::layerCompositingThreadDestroyed):
(WebCore::LayerTiler::layerVisibilityChanged):
(WebCore::LayerTiler::uploadTexturesIfNeeded):
(WebCore::LayerTiler::deleteTextures):
(WebCore::LayerTiler::scheduleCommit):
(WebCore):
(WebCore::LayerTiler::bindContentsTexture):
* platform/graphics/blackberry/LayerTiler.h:
(LayerTiler):
(WebCore::LayerTiler::hasMissingTextures):
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::LayerWebKitThread):
* platform/graphics/blackberry/LayerWebKitThread.h:
(LayerWebKitThread):
2012-05-25 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
WebKitTestRunner needs to support layoutTestController.setJavaScriptProfilingEnabled
https://bugs.webkit.org/show_bug.cgi?id=42328
Reviewed by Eric Seidel.
Add setJavaScriptProfilingEnabled() to window.internals.settings. No new tests, but this
change will allow more tests to run in WebKitTestRunner and DRT for ports that weren't
implementing this function before.
This patch also refactors InspectorController::enableProfiler() and
InspectorController::disableProfiler() to InspectorController::setProfilerEnabled(bool).
* WebCore.exp.in:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::profilerEnabled):
(WebCore::InspectorController::setProfilerEnabled):
* inspector/InspectorController.h:
(InspectorController):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::InternalSettings):
(WebCore::InternalSettings::restoreTo):
(WebCore::InternalSettings::setJavaScriptProfilingEnabled):
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:
2012-05-28 Yong Li <yoli@rim.com>
Crash on incomplete :not().
https://bugs.webkit.org/show_bug.cgi?id=86673
Reviewed by Antti Koivisto.
Add back null-checks for incomplete :not() class
which were dropped by r81845.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificityForOneSelector):
(WebCore::CSSSelector::selectorText):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOneSelector):
(WebCore::SelectorChecker::determineLinkMatchType):
2012-05-28 Leo Yang <leo.yang@torchmobile.com.cn>
FileWriterSync binding should have no static table
https://bugs.webkit.org/show_bug.cgi?id=87645
Reviewed by George Staikos.
FileWriterSync could be used in filesystem FileWriter in worker thread, so we should add ProgressEvent in idl file.
Covered by existing test: fast/filesystem/workers/sync-operations.html.
* Modules/filesystem/FileWriterSync.idl:
2012-05-28 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Add an overlay layer
https://bugs.webkit.org/show_bug.cgi?id=87567
Reviewed by Antonio Gomes.
The overlay layer allows us to have compositing layers even though the
web page is not currently using accelerated compositing.
These layers can be used to implement tap highlight, inspector overlay
and more.
The WebCore changes support the overlay layer functionality in WebKit
by making it possible to add animations from the compositing thread
without them being instantly overwritten during the next commit.
Also a new custom layer type is added, which allow an overlay layer to
draw itself using raw OpenGL calls. An instance of a custom subclass of
LayerCompositingThread must be provided when creating the
LayerWebKitThread. Then, the custom layer can be used as the content
layer of a GraphicsLayer, or by itself.
Reviewed internally by Filip Spacek.
PR #154335
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::~LayerCompositingThread):
(WebCore::LayerCompositingThread::deleteTextures):
(WebCore::LayerCompositingThread::drawTextures):
(WebCore::LayerCompositingThread::drawMissingTextures):
(WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
(WebCore::LayerCompositingThread::setVisible):
(WebCore::LayerCompositingThread::scheduleCommit):
* platform/graphics/blackberry/LayerCompositingThread.h:
(WebCore::LayerCompositingThread::addAnimation):
(WebCore::LayerCompositingThread::setRunningAnimations):
(WebCore::LayerCompositingThread::setSuspendedAnimations):
(LayerCompositingThread):
(WebCore::LayerCompositingThread::drawCustom):
* platform/graphics/blackberry/LayerData.h:
(LayerData):
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::LayerWebKitThread):
(WebCore):
(WebCore::LayerWebKitThread::~LayerWebKitThread):
(WebCore::LayerWebKitThread::updateTextureContentsIfNeeded):
(WebCore::LayerWebKitThread::startAnimations):
(WebCore::LayerWebKitThread::commitOnCompositingThread):
(WebCore::LayerWebKitThread::setNeedsDisplayInRect):
(WebCore::LayerWebKitThread::setNeedsDisplay):
(WebCore::LayerWebKitThread::setIsMask):
(WebCore::LayerWebKitThread::setRunningAnimations):
(WebCore::LayerWebKitThread::setSuspendedAnimations):
* platform/graphics/blackberry/LayerWebKitThread.h:
(LayerWebKitThread):
2012-05-28 Leo Yang <leo.yang@torchmobile.com.cn>
ProgressEvent JSC binding should have no static table
https://bugs.webkit.org/show_bug.cgi?id=87365
Reviewed by George Staikos.
ProgressEvent could be used in filesystem FileWriter in worker thread, so we should add ProgressEvent in idl file.
Covered by existing test: fast/filesystem/workers/file-writer-events.html.
* dom/ProgressEvent.idl:
2012-05-28 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Update WebPageCompositor::render() API
https://bugs.webkit.org/show_bug.cgi?id=87565
Reviewed by Rob Buis.
The new API allows the embedder to specify the root transform and many
OpenGL related parameters.
Also refactor the code to allow several sets of layers to be rendered,
and to allow interleaving the rendering of layers with rendering of
buffers and checkerboard.
Reviewed internally by Filip Spacek.
PR #154334
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::drawTextures):
(WebCore::LayerCompositingThread::drawSurface):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::orthoMatrix):
(WebCore::LayerRenderer::LayerRenderer):
(WebCore::LayerRenderer::prepareFrame):
(WebCore):
(WebCore::LayerRenderer::setViewport):
(WebCore::LayerRenderer::compositeLayers):
(WebCore::LayerRenderer::compositeBuffer):
(WebCore::LayerRenderer::drawCheckerboardPattern):
(WebCore::LayerRenderer::drawLayersOnSurfaces):
(WebCore::LayerRenderer::prepareFrameRecursive):
(WebCore::LayerRenderer::updateLayersRecursive):
(WebCore::LayerRenderer::compositeLayersRecursive):
(WebCore::LayerRenderer::updateScissorIfNeeded):
(WebCore::LayerRenderingResults::addHolePunchRect):
* platform/graphics/blackberry/LayerRenderer.h:
(LayerRenderer):
2012-05-28 Antti Koivisto <antti@apple.com>
REGRESSION(r96517): Attribute selector fails to match dynamically modified style attribute
https://bugs.webkit.org/show_bug.cgi?id=87349
Reviewed by Andreas Kling.
Selector fast path does not trigger lazy style attribute generation. Since attribute selectors matching
style attribute are rare, disallow them from the fast path rather than making it more branchy.
Test: fast/css/dynamic-style-attribute-query.html
* css/SelectorChecker.cpp:
(WebCore::isFastCheckableMatch):
2012-05-28 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: Expose function (closure) scopes in remote protocol
https://bugs.webkit.org/show_bug.cgi?id=86861
Reviewed by Yury Semikhatsky.
A data transfer from V8's FunctionMirror via DebuggerScript.js via InjectedScriptHost is built.
Scope field is added to protocol declaration similar to scopes of stack call frame.
Test for function details is extended.
JSC code binging got fixme for implemting the corresponding feature.
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::functionDetails):
* bindings/v8/DebuggerScript.js:
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::functionScopes):
(WebCore):
* bindings/v8/ScriptDebugServer.h:
(ScriptDebugServer):
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::functionDetailsCallback):
* inspector/InjectedScriptHost.cpp:
(WebCore):
(WebCore::InjectedScriptHost::scriptDebugServer):
* inspector/InjectedScriptHost.h:
(WebCore):
(WebCore::InjectedScriptHost::init):
(InjectedScriptHost):
* inspector/InjectedScriptSource.js:
(.):
* inspector/Inspector.json:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
2012-05-28 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Add a constructor to create a Path from an SkPath
https://bugs.webkit.org/show_bug.cgi?id=87566
Reviewed by Antonio Gomes.
Skia allows the creation of more complex paths than WebCore would
allow. This will be used in the BlackBerry port to implement a default
tap highlight appearance.
Reviewed internally by Mike Lattanzio.
PR #154329
* platform/graphics/Path.h:
(Path):
* platform/graphics/skia/PathSkia.cpp:
(WebCore):
(WebCore::Path::Path):
2012-05-28 Alexis Menard <alexis.menard@openbossa.org>
Unreviewed build fix for Mac on Lion.
* inspector/CodeGeneratorInspector.py:
2012-05-28 Keishi Hattori <keishi@webkit.org>
Expose value localization function of HTMLInputElement
https://bugs.webkit.org/show_bug.cgi?id=84356
Reviewed by Kent Tamura.
No new tests.
We want to localize the values that are defined in the datalist element.
This adds HTMLInputElement::localizeValue() which will localize a given
value.
* html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::localizeValue):
(WebCore):
(WebCore::BaseDateAndTimeInputType::visibleValue):
* html/BaseDateAndTimeInputType.h:
(BaseDateAndTimeInputType):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::localizeValue):
(WebCore):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/InputType.cpp:
(WebCore::InputType::localizeValue):
(WebCore):
* html/InputType.h:
(InputType):
* html/NumberInputType.cpp:
(WebCore::NumberInputType::localizeValue):
(WebCore):
(WebCore::NumberInputType::visibleValue):
* html/NumberInputType.h:
(NumberInputType):
2012-05-28 Yury Semikhatsky <yurys@chromium.org>
Unreviewed. Test fix after r118670: saved timeline data may
not have DOM counters data and MemoryStatistics object should
take this into account.
* inspector/front-end/MemoryStatistics.js:
(WebInspector.MemoryStatistics.prototype._onRecordAdded):
2012-05-28 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r118580.
http://trac.webkit.org/changeset/118580
https://bugs.webkit.org/show_bug.cgi?id=87647
Caused webkit_unit_tests to crash on chromium. (Requested by
bulach on #webkit).
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerPainter::create):
(WebCore::ContentLayerPainter::paint):
(WebCore::ContentLayerPainter::ContentLayerPainter):
(ContentLayerPainter):
(WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(UpdatableTile):
(WebCore::UpdatableTile::UpdatableTile):
(WebCore::TiledLayerChromium::updateTiles):
* platform/graphics/chromium/TiledLayerChromium.h:
(TiledLayerChromium):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
(CCSettings):
2012-05-28 Peter Beverloo <peter@chromium.org>
&AElig doesn't get rendered as U+00C6
https://bugs.webkit.org/show_bug.cgi?id=87465
Reviewed by Adam Barth.
The if-statement to check whether the first entry of a certain letter
already exists in the index used .get(). The very first alphabetical
entry is in position "0", which evaluates to false, causing the first
entry to be ignored. Instead, use a "x not in y" check here.
Also update WebCore.gyp to list the create-html-entity-table script as
an input for the action, to make sure the table will be recreated.
Test: html5lib/resources/entities02.dat
* WebCore.gyp/WebCore.gyp:
* html/parser/create-html-entity-table:
2012-05-28 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: dom counters graphs vanish on switching between timeline views
https://bugs.webkit.org/show_bug.cgi?id=87628
Reviewed by Vsevolod Vlasov.
MemoryStatistics object now listens to the TimelineModel events instead of being
populated by timeline panel. This behavior mathes that of the overview pane.
* inspector/front-end/MemoryStatistics.js:
(WebInspector.MemoryStatistics.prototype.addTimlineEvent):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._onTimelineEventRecorded):
(WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
2012-05-28 Marcus Bulach <bulach@chromium.org>
[chromium] Buildfix: remove obsolete file from gypi.
https://bugs.webkit.org/show_bug.cgi?id=87643
Reviewed by no-reviewer.
Following http://trac.webkit.org/changeset/118610.
Removes reference to platform/graphics/gstreamer/ImageGStreamerCG.mm
* WebCore.gypi:
2012-05-28 MORITA Hajime <morrita@google.com>
HTMLFormControlElement::m_validationMessage shouldn't be cleared on detach()
https://bugs.webkit.org/show_bug.cgi?id=87608
Reviewed by Kent Tamura.
Moved m_validationMessage clearance from detach() to removedFrom() and
remove detach().
No new tests. This change has no visible difference. Upcoming changes rely on this though.
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::removedFrom):
2012-05-28 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: "Record CPU profile" button doesn't change its state after finishing profiling
https://bugs.webkit.org/show_bug.cgi?id=87624
Reviewed by Vsevolod Vlasov.
Keep record button state in sync with the current profiling state.
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype.toggleRecordButton):
2012-05-28 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r118650.
http://trac.webkit.org/changeset/118650
https://bugs.webkit.org/show_bug.cgi?id=87639
Patch caused massive failures throughout the builders
(Requested by zdobersek on #webkit).
* css/MediaQuery.cpp:
(WebCore):
(WebCore::MediaQuery::serialize):
(WebCore::MediaQuery::MediaQuery):
(WebCore::MediaQuery::cssText):
* css/MediaQuery.h:
(WebCore::MediaQuery::expressions):
(WebCore::MediaQuery::mediaType):
(MediaQuery):
(WebCore::MediaQuery::copy):
* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
(WebCore::MediaQueryEvaluator):
(WebCore::MediaQueryEvaluator::eval):
(WebCore::aspect_ratioMediaFeatureEval):
(WebCore::device_aspect_ratioMediaFeatureEval):
(WebCore::transform_3dMediaFeatureEval):
(WebCore::view_modeMediaFeatureEval):
(WebCore::createFunctionMap):
* css/MediaQueryEvaluator.h:
(WebCore):
(MediaQueryEvaluator):
* css/StyleResolver.cpp:
(WebCore):
(WebCore::StyleResolver::collectMatchingRulesForList):
* css/StyleResolver.h:
(MediaQueryResult):
(WebCore::MediaQueryResult::MediaQueryResult):
(WebCore):
(StyleResolver):
2012-05-28 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move allowRoundingHacks to Internals interface
https://bugs.webkit.org/show_bug.cgi?id=87328
Reviewed by Hajime Morita.
Add allowRoundingHacks function, because it is able to work in the
cross-port way by means of the Internals interface.
In addition, a function is added in order to restore default setting values.
No new tests, since we are improving here the infra-structure for testing
a specific method.
* testing/Internals.cpp:
(WebCore::Internals::reset):
(WebCore):
(WebCore::Internals::resetDefaultsToConsistentValues):
(WebCore::Internals::allowRoundingHacks):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:
2012-05-28 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
[BlackBerry] http authentication crash the browser when user commit or cancel the http authentication dialog
https://bugs.webkit.org/show_bug.cgi?id=87579
Reviewed by George Staikos.
In function NetworkJob::startNewJobWithRequest, We should cancel the
NetworkJob first before we start a new NetworkJob which reuses the
resource handle of the old one. If we only set the m_handle = 0 of the
old NetworkJob without cancelling itself, it will still receives data
notification from network thread and handles the received data with
the released resource handler, which will cause the crash.
No new tests because no behavior has changed.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::startNewJobWithRequest):
2012-05-27 MORITA Hajime <morrita@google.com>
[Refactoring][ShadowDOM] Some ElementShadow methods can be inlined.
https://bugs.webkit.org/show_bug.cgi?id=87617
Reviewed by Kentaro Hara.
Inlined ElementShadow::attachHost(), ElementShadow::detachHost() and
ElementShadow::reattach()
No new tests. No behavior change.
* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::detach):
* dom/ElementShadow.cpp:
(WebCore::ElememtnShadow::reattachHostChildrenAndShadow):
* dom/ElementShadow.h:
(ElementShadow):
2012-05-28 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: CodeGeneratorInspector.py: protect typed API from C++ implicit float to int cast
https://bugs.webkit.org/show_bug.cgi?id=87183
Reviewed by Yury Semikhatsky.
An intermediate C++ class is introduced that uses C++ template technique to control actual type
of its constructor argument.
All input parameters of type "int" now have type ExactlyInt.
All usage sites are fixed accordingly.
* inspector/CodeGeneratorInspector.py:
(TypeModel.RefPtrBased):
(TypeModel.Enum):
(TypeModel.ValueType):
(TypeModel.ValueType.get_opt_output_type_):
(TypeModel.ValueType.ValueOptional.get_command_return_pass_model):
(TypeModel.ExactlyInt):
(TypeModel.ExactlyInt.__init__):
(TypeModel.ExactlyInt.get_input_param_type_text):
(TypeModel.ExactlyInt.get_opt_output_type_):
(TypeModel.init_class):
(ExactlyInt):
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::enable):
(WebCore::InspectorAgent::didCreateWorker):
(WebCore::InspectorAgent::didDestroyWorker):
(WebCore::InspectorAgent::evaluateForTestInFrontend):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForNode):
* inspector/InspectorMemoryAgent.cpp:
(WebCore::jsHeapInfo):
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::notifyContextCreated):
2012-05-28 Kentaro Hara <haraken@chromium.org>
Unreviewed. Rebaselined run-binding-tests results.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObjectOwner::finalize):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetterOwner::finalize):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTargetOwner::finalize):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestExceptionOwner::finalize):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListenerOwner::finalize):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjOwner::finalize):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::V8TestObj::installPerContextProperties):
2012-05-28 Darin Adler <darin@apple.com>
StyleResolver need not allocate each MediaQueryResult on the heap
https://bugs.webkit.org/show_bug.cgi?id=75223
Reviewed by Daniel Bates.
* css/MediaQuery.cpp: Removed some comments that pointed to CSS documents.
There is no guarantee these links will be valid over time.
(WebCore::MediaQuery::MediaQuery): Rewrote for clarity, conventional WebKit coding
style, and simplicity.
(WebCore::MediaQuery::copy): Moved out of line; not performance critical, and this
allows us to cut down header dependencies.
(WebCore::MediaQuery::cssText): Updated for change to data member name.
* css/MediaQuery.h: Removed unneeded includes. Removed non-helpful argument name
"exprs". Changed expressions function to return a reference instead of
a pointer. Changed mediaType and cssText functions to return a reference. Renamed
m_serializationCache to m_serializedQuery. Moved copy function out of header.
* css/MediaQueryEvaluator.cpp: Renamed EvalFunc to MediaFeatureEvaluationFunction.
Broke a FIXME into three and reworded for clarity.
(WebCore::MediaQueryEvaluator): Updated for name changes.
(WebCore::MediaQueryEvaluator::eval): Rewrote this for clarity and to regularize
the logic a bit.
(WebCore::aspect_ratioMediaFeatureEval): Got rid of a != 0 that is contrary to the
normal WebKit style.
(WebCore::device_aspect_ratioMediaFeatureEval): Ditto.
(WebCore::transform_3dMediaFeatureEval): Fixed mangled #if that was here.
(WebCore::view_modeMediaFeatureEval): Replaced UNUSED_PARAM usage with ASSERT_UNUSED.
(WebCore::createFunctionMap): Changed this so it returns the map so we can use a
cleaner style in the caller.
(WebCore::MediaQueryEvaluator::eval): Updated to take a reference and improved the
comments and coding style a bit.
* css/MediaQueryEvaluator.h: Updated comment style. Removed unused constructor.
Removed unneeded destructor declaration. Renamed m_expResult to m_mediaFeatureResult.
* css/StyleResolver.cpp: Moved the MediaQueryResult class into this file
and made it a structure rather than a class.
(WebCore::StyleResolver::addViewportDependentMediaQueryResult): Updated to take
a reference argument instead of a pointer and for the new vector type.
(WebCore::StyleResolver::affectedByViewportChange): Updated for above changes.
* css/StyleResolver.h: Removed many unneeded includes and forward declarations of
classes, including now-unneeded include of MediaQueryExp.h. Replaced MediaQueryResult
definition with a forward declaration. Changed addViewportDependentMediaQueryResult
to take a reference instead of a pointer. Changed m_viewportDependentMediaQueryResults
to be a vector of values rather than of pointers.
2012-05-27 Shinya Kawanaka <shinyak@chromium.org>
cut, copy or paste event won't be fired in Shadow DOM.
https://bugs.webkit.org/show_bug.cgi?id=87352
Reviewed by Dimitri Glazkov.
cut, copy or paste event was not fired in Shadow DOM.
Since event re-targeting has been implemented, it should be safe to fire them in Shadow DOM now.
Tests: fast/dom/shadow/cppevent-in-shadow.html
fast/dom/shadow/cppevent-input-in-shadow.html
* editing/Editor.cpp:
(WebCore::Editor::findEventTargetFrom):
2012-05-27 Hayato Ito <hayato@chromium.org>
Support multiple shadow roots in event dispatching.
https://bugs.webkit.org/show_bug.cgi?id=87470
Reviewed by Dimitri Glazkov.
The current implementation does not set event's target correctly
if an event happens on DOM tree with multiple shadow roots. So
this patch updates an event re-targeting algorithm so that it
works even if it is applied to multiple shadow roots.
Tests: fast/dom/shadow/shadow-dom-event-dispatching.html
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseParentIncludingInsertionPointAndShadowRoot):
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::ensureEventAncestors):
2012-05-27 Benjamin Poulain <benjamin@webkit.org>
Minor code cleaning for the interface of MainResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=87607
Reviewed by Darin Adler.
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::MainResourceLoader):
(WebCore::MainResourceLoader::handleSubstituteDataLoadNow):
(WebCore::MainResourceLoader::handleSubstituteDataLoadSoon):
* loader/MainResourceLoader.h:
(MainResourceLoader):
-Add the OVERRIDE keyword for the methods inherited from ResourceLoader.
-Remove the useless declaration of handleDataLoad(ResourceRequest&), this method does not exist.
-Rename handleDataLoadNow() to handleSubstituteDataLoadNow() and make the method private. This should
only be used by handleSubstituteDataLoadSoon() and indirectly through the timer.
2012-05-27 Yoshifumi Inoue <yosin@chromium.org>
[WTF] Introduce UINT64_C to MathExtras.h
https://bugs.webkit.org/show_bug.cgi?id=87485
Reviewed by Kent Tamura.
This patch introduces UINT64_C for all platforms to avoid using
conditional compilation.
No new tests. This patch doesn't change behavior.
* Modules/websockets/WebSocketFrame.cpp:
(WebCore::WebSocketFrame::parseFrame): Replace conditional compilation with UINT64_C.
2012-05-27 Luke Macpherson <macpherson@chromium.org>
Use StringBuilder in WebKitCSSTransformValue::customCssText() to allow code reuse with CSS Variables.
https://bugs.webkit.org/show_bug.cgi?id=87462
Reviewed by Dimitri Glazkov.
Factor out strings into a const char* array, and use a StringBuilder instead of String concatenation.
This will allow future code to re-use the array of transform names, and StringBuilder is generally faster.
Covered by existing CSS transform tests.
* css/WebKitCSSTransformValue.cpp:
(WebCore):
(WebCore::WebKitCSSTransformValue::customCssText):
2012-05-27 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Update color for tap highlight and selection
https://bugs.webkit.org/show_bug.cgi?id=87606
Reviewed by Antonio Gomes.
PR #154813
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::platformTapHighlightColor):
(WebCore::RenderThemeBlackBerry::platformActiveSelectionBackgroundColor):
2012-05-27 Benjamin Poulain <bpoulain@apple.com>
When pages are loaded from AppCache with DeferredLoading, willSendRequest() is never called
https://bugs.webkit.org/show_bug.cgi?id=87582
Reviewed by Darin Adler.
Previously, there was a shortcut when a deferred MainResourceLoader is resumed: If the data
was coming from AppCache we could jump directly to startDataLoadTimer().
The problem with the shortcut is willSendRequest() is never called in that particular case
(substituteData + deferred-resume). The imbalance between willSendRequest() and didReceiveResponse()
causes problems.
This patch removes the shortcut so that MainResourceLoader::loadNow() is used regardless of
the deferred loading. The method MainResourceLoader::loadNow() handle the substituteData as if the loading
was not deferred.
Test: http/tests/appcache/load-from-appcache-defer-resume-crash.html
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::continueAfterNavigationPolicy):
(WebCore::MainResourceLoader::handleSubstituteDataLoadSoon):
Rename the method to be consistent with the attribute it uses, making the naming more explicit.
(WebCore::MainResourceLoader::loadNow):
(WebCore::MainResourceLoader::setDefersLoading):
* loader/MainResourceLoader.h:
(MainResourceLoader):
2012-05-27 David Kilzer <ddkilzer@apple.com>
Use xcrun to find gperf path on platforms that use Xcode
<http://webkit.org/b/87587>
Reviewed by Dan Bernstein.
* WebCore.xcodeproj/project.pbxproj:
(Generate Derived Sources): Set GPERF environment variable using
xcrun.
* css/makeprop.pl: Use GPERF environment variable if set, else
"gperf".
* css/makevalues.pl: Ditto.
* make-hash-tools.pl: Ditto.
2012-05-27 Li Yin <li.yin@intel.com>
[FileAPI] FileReader should fire progress event when blob has been completely read into memory
https://bugs.webkit.org/show_bug.cgi?id=87585
Reviewed by Kentaro Hara.
From Spec: http://www.w3.org/TR/FileAPI/#dfn-progress-event
One progress event will fire when blob has been completely read into memory.
Firefox, Opera and IE follows the spec.
Webkit based browser doesn't do that, it only fires progress event at interval of 50ms.
WebKit should add the behavior to make the conformance with the spec.
Tests: fast/files/file-reader-event-listener.html
* fileapi/FileReader.cpp:
(WebCore::FileReader::didFinishLoading):
2012-05-26 Li Yin <li.yin@intel.com>
[FileAPI] The result attribute of FileReader shuold use null to replace empty string
https://bugs.webkit.org/show_bug.cgi?id=87578
Reviewed by Kentaro Hara.
From Spec: http://www.w3.org/TR/FileAPI/#filedata-attr
Before read method has been called or an error in reading has occurred,
the result attribute should be null, not empty string.
Currently, Firefox, Opera and IE 10 follows the spec, but Webkit based
browser don't.
WebKit should change the returned value empty string into null to keep
conformance with the spec.
Tests: fast/files/read-file-async.html
fast/files/blob-slice-test.html
fast/files/read-blob-async.html
fast/files/workers/worker-read-blob-async.html
fast/files/workers/worker-read-file-async.html
* fileapi/FileReader.cpp:
(WebCore::FileReader::stringResult):
2012-05-26 Andy Estes <aestes@apple.com>
Fix the build when NETSCAPE_PLUGIN_API is disabled by marking a
parameter as unused.
* plugins/PluginData.cpp:
(WebCore::PluginData::initPlugins):
2012-05-26 Nate Chapin <japhet@chromium.org>
Cancel CachedResource loads when the last client is removed.
https://bugs.webkit.org/show_bug.cgi?id=35377
Reviewed by Darin Adler.
Test: http/tests/cache/cancel-in-progress-load.html
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::errorLoadingResource):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::allClientsRemoved):
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::allClientsRemoved):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::allClientsRemoved):
* loader/cache/CachedRawResource.cpp:
(WebCore):
* loader/cache/CachedRawResource.h:
(WebCore::CachedRawResource::shouldIgnoreHTTPStatusCodeErrors):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::allClientsRemoved):
(WebCore):
* loader/cache/CachedResource.h:
(CachedResource):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::allClientsRemoved):
2012-05-26 Simon Fraser <simon.fraser@apple.com>
fast/block/inline-children-root-linebox-crash.html asserts after r118567
https://bugs.webkit.org/show_bug.cgi?id=87544
Reviewed by Darin Adler.
RenderInline::offsetFromContainer() set offsetDependsOnPoint to true based
on the container's flipped writing mode. However, offsetFromContainer() would
then overwrite that, since it only checked for columns.
Fix by having RenderInline::offsetFromContainer() check for flipping on
the container. This fixes the assertion.
The new testcase exercises fixes another issue; unlike mapLocalToAbsolute(),
RenderGeometryMap::absoluteRect() didn't pass the rect center point through
the mapping, which resulted in a different result in some flipping cases.
Test: compositing/geometry/flipped-blocks-inline-mapping.html
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::absoluteRect):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::offsetFromContainer):
(WebCore::RenderInline::pushMappingToContainer):
2012-05-26 Geoffrey Garen <ggaren@apple.com>
WebKit should be lazy-finalization-safe (esp. the DOM) v2
https://bugs.webkit.org/show_bug.cgi?id=87581
Reviewed by Oliver Hunt.
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::destroy):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::destroy):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::destroy):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNodeOwner::finalize):
* bindings/js/JSWorkerContextBase.cpp:
(WebCore::JSWorkerContextBase::destroy):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObject::destroy):
(WebCore::JSTestActiveDOMObjectOwner::finalize):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetter::destroy):
(WebCore::JSTestCustomNamedGetterOwner::finalize):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructor::destroy):
(WebCore::JSTestEventConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::destroy):
(WebCore::JSTestEventTargetOwner::finalize):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestException::destroy):
(WebCore::JSTestExceptionOwner::finalize):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::destroy):
(WebCore::JSTestInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListener::destroy):
(WebCore::JSTestMediaQueryListListenerOwner::finalize):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructor::destroy):
(WebCore::JSTestNamedConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::destroy):
(WebCore::JSTestObjOwner::finalize):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterface::destroy):
(WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcFallbackObjectImp::destroy):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeMethod::destroy):
* bridge/qt/qt_runtime_qt4.cpp:
(JSC::Bindings::QtRuntimeMethod::destroy):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::destroy):
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::destroy):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::destroy):
* bridge/runtime_root.cpp:
(JSC::Bindings::RootObject::finalize): Use static_cast instead of jsCast because
jsCast does Structure-based validation, and our Structure is not guaranteed
to be alive when we get finalized.
2012-05-26 Simon Fraser <simon.fraser@apple.com>
Clip rects assertion when hovering div with transform
https://bugs.webkit.org/show_bug.cgi?id=87580
Reviewed by Eric Seidel.
Hit testing used to use temporary clip rects in composited documents,
until r118562. Now that we cache clip rects for hit testing, we need
to clear the cache on descendant layers when a layer gains or loses
a transform.
Test: fast/layers/clip-rects-assertion.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateTransform):
2012-05-25 Dan Bernstein <mitz@apple.com>
<rdar://problem/11439771> WebProcess sends many synchronous messages to the UI process while scrolling beneath ScrollView::contentsToScreen()
https://bugs.webkit.org/show_bug.cgi?id=87571
Reviewed by Anders Carlsson.
fakeMouseEventTimerFired() uses the last known mouse position for the fake mouse event, but
calls contentsToScreen() to compute a corresponding position in screen coordinates. Avoid
this by also recording the last known mouse position in screen coordinates, and using that
value.
* page/EventHandler.cpp:
(WebCore::EventHandler::clear): Added resetting m_currentMouseGlobalPosition.
(WebCore::EventHandler::handleMousePressEvent): Added updating m_currentMouseGlobalPosition
when updating m_currentMousePosition.
(WebCore::EventHandler::handleMouseDoubleClickEvent): Ditto.
(WebCore::EventHandler::handleMouseMoveEvent): Ditto.
(WebCore::EventHandler::handleMouseReleaseEvent): Ditto.
(WebCore::EventHandler::fakeMouseMoveEventTimerFired): Changed to use m_currentMouseGlobalPosition
in the fake event instead of calling contentsToScreen().
* page/EventHandler.h: Added m_currentMouseGlobalPosition data member.
2012-05-25 Philippe Normand <pnormand@igalia.com>
[GStreamer] Remove ImageGStreamerCG implementation
https://bugs.webkit.org/show_bug.cgi?id=87559
The ImageGStreamerCG abstraction is being removed until I manage to
port my gst-mac WebKit branch over to the WebKit2 mac port. No
need to update the XCode project because this file is not
referenced there anyway.
Reviewed by Martin Robinson.
* platform/graphics/gstreamer/ImageGStreamer.h:
(ImageGStreamer):
* platform/graphics/gstreamer/ImageGStreamerCG.mm: Removed.
2012-05-26 Rob Buis <rwlbuis@webkit.org>
Bug 15799: textPath element does not re-render when referenced path changes
https://bugs.webkit.org/show_bug.cgi?id=15799
Reviewed by Nikolas Zimmermann.
Support textPath updating to changes on the referenced path. To make this possible
use the target reference functionality also used by SVGFEImageElement.
Tests: svg/custom/textPath-change-id-expected.svg
svg/custom/textPath-change-id-pattern-expected.svg
svg/custom/textPath-change-id-pattern.svg
svg/custom/textPath-change-id.svg
svg/custom/textPath-change-id2-expected.svg
svg/custom/textPath-change-id2-pattern-expected.svg
svg/custom/textPath-change-id2-pattern.svg
svg/custom/textPath-change-id2.svg
svg/custom/textPath-change-reference-expected.svg
svg/custom/textPath-change-reference-pattern-expected.svg
svg/custom/textPath-change-reference-pattern.svg
svg/custom/textPath-change-reference-using-baseval-expected.svg
svg/custom/textPath-change-reference-using-baseval-pattern-expected.svg
svg/custom/textPath-change-reference-using-baseval-pattern.svg
svg/custom/textPath-change-reference-using-baseval.svg
svg/custom/textPath-change-reference.svg
svg/custom/textPath-change-reference2-expected.svg
svg/custom/textPath-change-reference2-pattern-expected.svg
svg/custom/textPath-change-reference2-pattern.svg
svg/custom/textPath-change-reference2-using-baseval-expected.svg
svg/custom/textPath-change-reference2-using-baseval-pattern-expected.svg
svg/custom/textPath-change-reference2-using-baseval-pattern.svg
svg/custom/textPath-change-reference2-using-baseval.svg
svg/custom/textPath-change-reference2.svg
svg/custom/textPath-insert-path-expected.svg
svg/custom/textPath-insert-path-pattern-expected.svg
svg/custom/textPath-insert-path-pattern.svg
svg/custom/textPath-insert-path.svg
svg/custom/textPath-modify-child-expected.svg
svg/custom/textPath-modify-child-pattern-expected.svg
svg/custom/textPath-modify-child-pattern.svg
svg/custom/textPath-modify-child.svg
svg/custom/textPath-path-change-expected.svg
svg/custom/textPath-path-change-pattern-expected.svg
svg/custom/textPath-path-change-pattern.svg
svg/custom/textPath-path-change-using-svg-dom-expected.svg
svg/custom/textPath-path-change-using-svg-dom-pattern-expected.svg
svg/custom/textPath-path-change-using-svg-dom-pattern.svg
svg/custom/textPath-path-change-using-svg-dom.svg
svg/custom/textPath-path-change.svg
svg/custom/textPath-path-change2-expected.svg
svg/custom/textPath-path-change2-pattern-expected.svg
svg/custom/textPath-path-change2-pattern.svg
svg/custom/textPath-path-change2.svg
svg/custom/textPath-remove-path-expected.svg
svg/custom/textPath-remove-path-pattern-expected.svg
svg/custom/textPath-remove-path-pattern.svg
svg/custom/textPath-remove-path.svg
svg/custom/textPath-set-id-expected.svg
svg/custom/textPath-set-id.svg
svg/custom/textPath-startoffset-expected.svg
svg/custom/textPath-startoffset-pattern-expected.svg
svg/custom/textPath-startoffset-pattern.svg
svg/custom/textPath-startoffset.svg
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::~SVGTextPathElement):
(WebCore):
(WebCore::SVGTextPathElement::clearResourceReferences):
(WebCore::SVGTextPathElement::svgAttributeChanged):
(WebCore::SVGTextPathElement::buildPendingResource):
(WebCore::SVGTextPathElement::insertedInto):
(WebCore::SVGTextPathElement::removedFrom):
* svg/SVGTextPathElement.h:
2012-05-26 Nikolas Zimmermann <nzimmermann@rim.com>
Avoid updateFromElement() usage in SVG
https://bugs.webkit.org/show_bug.cgi?id=87573
Stop relying on updateFromElement() - instead rely on addChild/removeChild, which
allows us to optimize the resources re-fetching. When a child is added to the tree
we don't need to remove existing resources from the SVGResourcesCache - the renderer
can't be in the cache yet. Similary, remove the entry from the cache earlier: as soon
as the renderer is removed from the tree, instead of waiting for willBeDestroyed().
No new tests, refactoring only.
* rendering/svg/RenderSVGBlock.cpp:
* rendering/svg/RenderSVGBlock.h:
(RenderSVGBlock):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::addChild):
(WebCore):
(WebCore::RenderSVGContainer::removeChild):
* rendering/svg/RenderSVGContainer.h:
(RenderSVGContainer):
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::addChild):
(WebCore::RenderSVGInline::removeChild):
* rendering/svg/RenderSVGInline.h:
(RenderSVGInline):
* rendering/svg/RenderSVGModelObject.cpp:
* rendering/svg/RenderSVGModelObject.h:
(RenderSVGModelObject):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::registerResource):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::addChild):
(WebCore):
(WebCore::RenderSVGRoot::removeChild):
* rendering/svg/RenderSVGRoot.h:
(RenderSVGRoot):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::addChild):
(WebCore::RenderSVGText::removeChild):
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::clientStyleChanged):
(WebCore::rendererCanHaveResources):
(WebCore):
(WebCore::SVGResourcesCache::clientWasAddedToTree):
(WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
* rendering/svg/SVGResourcesCache.h:
(SVGResourcesCache):
* svg/SVGStyledElement.cpp:
* svg/SVGStyledElement.h:
(SVGStyledElement):
2012-05-25 Nat Duca <nduca@chromium.org>
[chromium] Instrument V8 GC with TraceEvent
https://bugs.webkit.org/show_bug.cgi?id=87530
Reviewed by Kentaro Hara.
We sometimes get performance issues where performance stalls can
be attributed to badly timed GC operations, especially ones that
happen just before a frame running. This adds tracing calls around
GC so that we can better understand these kinds of hangs.
* bindings/v8/V8GCController.cpp:
(WebCore::V8GCController::gcPrologue):
(WebCore::V8GCController::gcEpilogue):
2012-05-25 Garrett Casto <gcasto@chromium.org>
Allow WebTextFieldDecoratorClient to see applied decorations.
https://bugs.webkit.org/show_bug.cgi?id=86557
Reviewed by Kent Tamura.
* html/shadow/TextFieldDecorationElement.cpp:
(WebCore::TextFieldDecorationElement::fromShadowRoot): A function
that will extract a TextFielDecorationElement from a ShadowRoot, if
there is one.
* html/shadow/TextFieldDecorationElement.h:
(WebCore):
(TextFieldDecorator):
2012-05-25 Tony Chang <tony@chromium.org>
implement new negative flexing algorithm
https://bugs.webkit.org/show_bug.cgi?id=86528
Reviewed by Ojan Vafai.
Rather than just scale by the negative flexibility, we also take the
flex-basis (preferred size) into consideration. That means items with
a larger preferred size will shrink faster.
Test: css3/flexbox/flex-algorithm.html (new test cases added)
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): Handle overflow.
(WebCore::RenderFlexibleBox::layoutFlexItems):
(WebCore::RenderFlexibleBox::computeNextFlexLine): Sum weighted negative flex.
(WebCore::RenderFlexibleBox::freezeViolations):
(WebCore::RenderFlexibleBox::resolveFlexibleLengths): Shrink by weighted amount.
Also handle large values by making sure the flex values are finite.
* rendering/RenderFlexibleBox.h:
2012-05-25 Mihai Parparita <mihaip@chromium.org>
Allow synchronous XHRs to be disabled in documents
https://bugs.webkit.org/show_bug.cgi?id=87540
Reviewed by Eric Seidel.
Test: fast/xmlhttprequest/xmlhttprequest-sync-disabled.html
Synchronous XMLHttpRequests are a problematic API, since they result
in blocked UI threads. Some clients may wish to always disable them;
give them a setting to do so (see also r103629 for other cases where
synchronous XHRs are disabled).
* page/Settings.cpp:
(WebCore):
(WebCore::Settings::Settings):
* page/Settings.h:
(Settings):
(WebCore::Settings::setSyncXHRInDocumentsEnabled):
(WebCore::Settings::syncXHRInDocumentsEnabled):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::InternalSettings):
(WebCore::InternalSettings::restoreTo):
(WebCore::InternalSettings::setSyncXHRInDocumentsEnabled):
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::open):
2012-05-25 Kinuko Yasuda <kinuko@chromium.org>
[chromium] Deprecate FileUtilities::getFileSize and getFileModifiedTime in favor of getFileMetadata
https://bugs.webkit.org/show_bug.cgi?id=87492
Reviewed by Adam Barth.
No new tests: existing tests (http/tests/local/fileapi/* and fast/files/*) should pass.
* platform/chromium/FileSystemChromium.cpp:
(WebCore::getFileSize):
(WebCore::getFileModificationTime):
(WebCore::getFileMetadata):
* platform/chromium/PlatformSupport.h:
(PlatformSupport):
2012-05-25 Abhishek Arya <inferno@chromium.org>
Crash in RenderTableSection::paintCell.
https://bugs.webkit.org/show_bug.cgi?id=87445
Reviewed by Eric Seidel and Julien Chaffraix.
Fix the crash by preventing table parts from being set
as layout root. This prevents us from accessing removed
table cells which can happen if RenderTableSection::layout
is called directly without calling RenderTable::layout first
(in case of cell recalc).
Add ASSERTs to RenderTableSection::layout to prevent
layout to happen when we are already pending cell recalc
or our table is pending section recalc. In those cases,
RenderTable::layout should be called first to relayout
the entire table.
Test: tables/table-section-overflow-clip-crash.html
* rendering/RenderObject.cpp:
(WebCore::objectIsRelayoutBoundary):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):
2012-05-25 Philip Rogers <pdr@google.com>
Fix for self-closing <use> tags
https://bugs.webkit.org/show_bug.cgi?id=87504
Reviewed by Adam Barth.
This change causes self-closing non-html tags to behave the same
as tags immediately followed by the closing tag.
Test: svg/custom/svg-self-closing-use.html
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::attachLater):
(WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
(WebCore::HTMLConstructionSite::insertForeignElement):
* html/parser/HTMLConstructionSite.h:
(HTMLConstructionSite):
2012-05-25 Dan Bernstein <mitz@apple.com>
Make the ICU-based implementation of NonSharedCharacterBreakIterator work in configurations
that do not have COMPARE_AND_SWAP enabled.
Reviewed by Jessie Berlin.
* platform/text/TextBreakIteratorICU.cpp:
(WebCore::compareAndSwapNonSharedCharacterBreakIterator): Added this helper. It uses
weakCompareAndSwap when COMPARE_AND_SWAP is enabled, and uses a mutex to do the atomic
compare and swap otherwise.
(WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Changed to use
compareAndSwapNonSharedCharacterBreakIterator().
(WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Ditto.
2012-05-25 Tommy Widenflycht <tommyw@google.com>
MediaStream API: Make sure IceCallback is valid for PeerConnection00
https://bugs.webkit.org/show_bug.cgi?id=87480
Reviewed by Adam Barth.
Existing tests have been extended to cover this change.
* Modules/mediastream/PeerConnection00.cpp:
(WebCore::PeerConnection00::create):
* Modules/mediastream/PeerConnection00.h:
* Modules/mediastream/PeerConnection00.idl:
2012-05-25 Mike West <mkwst@chromium.org>
Inline script and style blocked by Content Security Policy should provide more detailed console errors.
https://bugs.webkit.org/show_bug.cgi?id=86848
Reviewed by Adam Barth.
This change adds a URL and line number for context to each call to
`ContentSecurityPolicy::allowInline*`, and pipes it through to the
console message generation in `CSPDirectiveList::reportViolation`.
Line numbers are not added for injected scripts (`document.write(...)`,
`document.body.appendChild`, and etc.).
Tests: http/tests/security/contentSecurityPolicy/injected-inline-script-allowed.html
http/tests/security/contentSecurityPolicy/injected-inline-script-blocked.html
http/tests/security/contentSecurityPolicy/injected-inline-style-allowed.html
http/tests/security/contentSecurityPolicy/injected-inline-style-blocked.html
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::executeIfJavaScriptURL):
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction):
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::prepareListenerObject):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::executeScript):
* dom/ScriptElement.h:
(ScriptElement):
* dom/StyleElement.cpp:
(WebCore::StyleElement::StyleElement):
(WebCore::StyleElement::createSheet):
* dom/StyleElement.h:
(StyleElement):
* dom/StyledElement.cpp:
(WebCore::StyledElement::StyledElement):
(WebCore):
(WebCore::StyledElement::style):
(WebCore::StyledElement::styleAttributeChanged):
* dom/StyledElement.h:
(StyledElement):
* page/ContentSecurityPolicy.cpp:
(CSPDirectiveList):
(WebCore::CSPDirectiveList::reportViolation):
(WebCore::CSPDirectiveList::checkInlineAndReportViolation):
(WebCore::CSPDirectiveList::checkEvalAndReportViolation):
(WebCore::CSPDirectiveList::allowJavaScriptURLs):
(WebCore::CSPDirectiveList::allowInlineEventHandlers):
(WebCore::CSPDirectiveList::allowInlineScript):
(WebCore::CSPDirectiveList::allowInlineStyle):
(WebCore::CSPDirectiveList::allowEval):
(WebCore):
(WebCore::isAllowedByAllWithCallStack):
(WebCore::isAllowedByAllWithContext):
(WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
(WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
(WebCore::ContentSecurityPolicy::allowInlineScript):
(WebCore::ContentSecurityPolicy::allowInlineStyle):
* page/ContentSecurityPolicy.h:
(WTF):
2012-05-25 Tim Horton <timothy_horton@apple.com>
ENABLE_CSS3_FLEXBOX is insufficient to disable all web-facing bits of the feature
https://bugs.webkit.org/show_bug.cgi?id=87537
<rdar://problem/11524921>
Reviewed by Simon Fraser.
Allow the feature flag to disable more web-facing parts of the CSS3 flexbox
implementation (primarily fallout from hiding it from computed style).
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyValue):
(WebCore::StylePropertySet::asText):
* css/StylePropertyShorthand.cpp:
(WebCore::shorthandForProperty):
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimation::ensurePropertyMap):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
* rendering/style/RenderStyleConstants.h:
2012-05-25 Adrienne Walker <enne@google.com>
[chromium] Add setting for painting debug info onto tiles
https://bugs.webkit.org/show_bug.cgi?id=75763
Reviewed by James Robinson.
Add a compile-time CCSetting to paint debug information onto tiles. This
can help to understand paint counts and layer indices. This setting is
off by default.
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerPainter::create):
(WebCore::ContentLayerPainter::paint):
(WebCore::ContentLayerPainter::ContentLayerPainter):
(WebCore::ContentLayerChromium::createTextureUpdater):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::UpdatableTile::UpdatableTile):
(WebCore::UpdatableTile::setUpdateFrame):
(WebCore::UpdatableTile::incrementPaintCount):
(WebCore::UpdatableTile::updateFrame):
(WebCore::UpdatableTile::paintCount):
(WebCore::TiledLayerChromium::TiledLayerChromium):
(WebCore::TiledLayerChromium::prepareToUpdateTiles):
(WebCore::TiledLayerChromium::paintDebugTileInfo):
* platform/graphics/chromium/TiledLayerChromium.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
2012-05-25 Ami Fischman <fischman@chromium.org>
[chromium] Default media controls should render only the currentTime-containing buffered range
https://bugs.webkit.org/show_bug.cgi?id=85925
Reviewed by Eric Carlson.
Test: http/tests/media/video-buffered-range-contains-currentTime.html
* rendering/RenderMediaControlsChromium.cpp:
(WebCore::paintMediaSlider):
2012-05-25 Simon Fraser <simon.fraser@apple.com>
Build fix: add TransformationMatrix ctor from an AffineTransform.
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::TransformationMatrix::TransformationMatrix):
(WebCore):
* platform/graphics/transforms/TransformationMatrix.h:
(TransformationMatrix):
2012-05-24 Ryosuke Niwa <rniwa@webkit.org>
createContextualFragment and insertAdjacentHTML should throw syntax error
https://bugs.webkit.org/show_bug.cgi?id=87454
Reviewed by Darin Adler.
Before this patch, createContextualFragment threw NOT_SUPPORTED_ERR and insertAdjacentHTML didn't throw any errors.
Make them throw SYNTAX_ERR to be consistent with the spec and Firefox:
http://html5.org/specs/dom-parsing.html#parsing
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#xml-fragment-parsing-algorithm
Also reduced the code duplication.
Test: fast/dom/xhtml-fragment-parsing-exceptions.xhtml
* dom/Range.cpp:
(WebCore::Range::createContextualFragment):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::setInnerHTML): Explicitly pass AllowScriptingContent.
* editing/markup.cpp:
(WebCore::createFragmentFromMarkup):
(WebCore::createFragmentForInnerOuterHTML): Takes ExceptionCode now.
(WebCore::createContextualFragment): Share code with createFragmentForInnerOuterHTML
and propagate the exception code.
* editing/markup.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setInnerHTML): Explicitly pass AllowScriptingContent.
(WebCore::HTMLElement::setOuterHTML): Ditto.
(WebCore::HTMLElement::insertAdjacentHTML): Ditto; also rename ignoredEc to ignoredEC
per Darin's comment on the bug 87339.
2012-05-25 John Knottenbelt <jknotten@chromium.org>
Body scrollWidth() and scrollHeight() should be page scale-invariant
https://bugs.webkit.org/show_bug.cgi?id=87494
RenderView::documentRect() is calculating the "scaled" document rect by applying
the current transformation matrix to the unscaledDocumentRect() and then
returning the rounded-out IntRect result.
This rounding out is incorrect because it allows the scaled rectangle to
represent an area that is not actually covered by the document.
We fix this by applying the current transform to the document rect
as a FloatRect and then explicitly converting to IntRect, which
takes the floor of the resulting rectangle coordinates instead of
rounding them out.
This is evidenced by the document.body.scrollWidth() and
document.body.scrollHeight() changing under page scale factor when
they are expected to remain invariant.
Reviewed by James Robinson.
Test: fast/dom/window-scroll-scaling.html
* rendering/RenderView.cpp:
(WebCore::RenderView::documentRect):
2012-05-25 Dan Bernstein <mitz@apple.com>
characterBreakIterator() is not safe to use reentrantly or from multiple threads
https://bugs.webkit.org/show_bug.cgi?id=87521
Reviewed by Darin Adler.
Replaced characterBreakIterator() with a NonSharedCharacterBreakIterator class, which
obtains a unique TextBreakIterator. Replaced the global shared instance with a single-entry
cache.
* dom/CharacterData.cpp:
(WebCore::CharacterData::parserAppendData): Changed to use NonSharedCharacterBreakIterator.
* platform/graphics/StringTruncator.cpp:
(WebCore::centerTruncateToBuffer): Ditto.
(WebCore::rightTruncateToBuffer): Ditto.
* platform/text/String.cpp:
(WebCore::numGraphemeClusters): Ditto.
(WebCore::numCharactersInGraphemeClusters): Ditto.
* platform/text/TextBreakIterator.h: Removed the declaration of characterBreakIterator().
(NonSharedCharacterBreakIterator): Added. An instance of this class has a character break
iterator instance that is unique to it for the lifetime of the instance.
(WebCore::NonSharedCharacterBreakIterator::operator TextBreakIterator*): Added.
* platform/text/TextBreakIteratorICU.cpp:
(WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Added. Tries
to swap the m_iterator member variable with the cached instance. If that fails, initializes
m_iterator to a new character break iterator.
(WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Added. Tries
to put the m_iterator member variable back in the cache. If that fails, meaning there is
already something in the cache, destroys m_iterator.
* platform/text/gtk/TextBreakIteratorGtk.cpp:
(WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Same as in
TextBreakIteratorICU.cpp.
(WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Ditto.
(WebCore::cursorMovementIterator): Moved the old implementation of characterBreakIterator()
here.
* platform/text/qt/TextBreakIteratorQt.cpp:
(WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Same as in
TextBreakIteratorICU.cpp.
(WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Ditto.
(WebCore::cursorMovementIterator): Moved the old implementation of characterBreakIterator()
here.
* platform/text/wince/TextBreakIteratorWinCE.cpp:
(WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Same as in
TextBreakIteratorICU.cpp.
(WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Ditto.
(WebCore::cursorMovementIterator): Moved the old implementation of characterBreakIterator()
here.
2012-05-25 Simon Fraser <simon.fraser@apple.com>
Terrible performance on http://alliances.commandandconquer.com/ and http://www.lordofultima.com/
https://bugs.webkit.org/show_bug.cgi?id=84410
Reviewed by Dave Hyatt.
First part of fixing O(N^2) issues when walking the RenderLayer tree
for computeCompositingRequirements().
For each layer that goes into the OverlapMap, we were computing an absolute
layer bounds, which requires walking back to the root of the tree.
Optimize this when possible by storing a stack of offsets as we walk
the tree, and using this stack to do the mapping.
The stack of offsets and transforms is managed by RenderGeometryMap.
When visiting a RenderLayer, RenderLayerCompositor pushes onto
the geometry map stack data about offsets and transforms between
the current layer and its stacking-parent. RenderGeometryMap handles
the case where the previous renderer pushed is between the current
renderer and its container. RenderGeometryMap can also handle callers
pushing renderers with multiple containers between them.
RenderGeometryMap stores some flags about whether the set of mapping
steps in the stack involve transforms, fixed position, or special non-uniform
mappings like CSS columns. In some cases, it falls back to mapping via
renderers.
Once constructed, the RenderGeometryMap stack can be used to map multiple
rects or points efficiently. Stacks consisting of simple offsets are
collapsed to a single offset.
Mappings between renderers and their containers are pushed by pushMappingToContainer()
methods, which are similar to mapLocalToContainer() methods. Having this code
in RenderObjects was deemed preferable to handling columns, transforms etc. all in
RenderLayer code.
Tested by assertions in RenderGeometryMap code that its mapping matches
mapping via localToAbsolute() calls.
RenderLayerCompositor::updateCompositingLayers() creates a RenderGeometryMap,
and pushes and pops layer renderers as it visits them. The geometry map is used
by RenderLayerCompositor::addToOverlapMap() when computing absolute layer bounds.
Futher optimizations in RenderGeometryMap are possible, especially with stacks that
have many offsets and a few transforms.
Tests: compositing/geometry/composited-in-columns.html
compositing/geometry/flipped-writing-mode.html
* CMakeLists.txt: Add RenderGeometryMap
* GNUmakefile.list.am: Ditt
* Target.pri: Ditto
* WebCore.gypi: Ditto
* WebCore.vcproj/WebCore.vcproj: Ditto
* WebCore.xcodeproj/project.pbxproj: Ditto
* rendering/RenderBox.cpp:
(WebCore::RenderBox::absoluteContentBox):
(WebCore::RenderBox::pushMappingToContainer):
(WebCore::RenderBox::offsetFromContainer):
* rendering/RenderBox.h:
* rendering/RenderGeometryMap.cpp: Added.
(RenderGeometryMapStep):
(WebCore::RenderGeometryMapStep::RenderGeometryMapStep):
(WebCore::RenderGeometryMapStep::mapPoint):
(WebCore::RenderGeometryMapStep::mapQuad):
(WebCore::RenderGeometryMap::RenderGeometryMap):
(WebCore::RenderGeometryMap::~RenderGeometryMap):
(WebCore::RenderGeometryMap::absolutePoint):
(WebCore::RenderGeometryMap::absoluteRect):
(WebCore::RenderGeometryMap::mapToAbsolute):
(WebCore::RenderGeometryMap::pushMappingsToAncestor):
(WebCore::RenderGeometryMap::push):
(WebCore::RenderGeometryMap::pushView):
(WebCore::RenderGeometryMap::popMappingsToAncestor):
(WebCore::RenderGeometryMap::stepInserted):
(WebCore::RenderGeometryMap::stepRemoved):
* rendering/RenderGeometryMap.h: Added.
(RenderGeometryMap):
(WebCore::RenderGeometryMap::hasNonUniformStep):
(WebCore::RenderGeometryMap::hasTransformStep):
(WebCore::RenderGeometryMap::hasFixedPositionStep):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::offsetFromContainer):
(WebCore::RenderInline::pushMappingToContainer):
* rendering/RenderInline.h:
(RenderInline):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::addToOverlapMap):
(WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::mapLocalToContainer):
(WebCore::RenderObject::pushMappingToContainer):
(WebCore::RenderObject::offsetFromContainer):
(WebCore::RenderObject::container):
* rendering/RenderObject.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::offsetFromContainer):
* rendering/RenderTableCell.h:
(RenderTableCell):
* rendering/RenderView.cpp:
(WebCore::RenderView::pushMappingToContainer):
* rendering/RenderView.h:
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::pushMappingToContainer):
* rendering/svg/RenderSVGForeignObject.h:
(RenderSVGForeignObject):
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::pushMappingToContainer):
* rendering/svg/RenderSVGInline.h:
(RenderSVGInline):
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::pushMappingToContainer):
* rendering/svg/RenderSVGModelObject.h:
(RenderSVGModelObject):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::pushMappingToContainer):
* rendering/svg/RenderSVGRoot.h:
(RenderSVGRoot):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::pushMappingToContainer):
* rendering/svg/RenderSVGText.h:
(RenderSVGText):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::pushMappingToContainer):
* rendering/svg/SVGRenderSupport.h:
(SVGRenderSupport):
2012-05-25 Simon Fraser <simon.fraser@apple.com>
Cache absolute clip rects on RenderLayer for compositing overlap testing
https://bugs.webkit.org/show_bug.cgi?id=87212
Reviewed by Dave Hyatt.
Enhance the cache of ClipRects on RenderLayers to store three
different types of ClipRects, rather than just one.
We need to compute clip rects relative to different layers
for different purposes. For painting, we compute relative to
the compositing layer which is acting as a painting root.
For hit testing, we compute relative to the root, except
for transformed layers. For composting overlap testing, we
compute relative to the root ("absolute"). At other times, we do one-off
computation which we never want to cache ("temporary clip rects").
This change allows us to cache rects for hit testing, and for
compositing overlap testing. This has huge performance benefits
on some pages (bug 84410).
This change also makes ClipRects not arena-allocated, so we
can use RefPtr<ClipRect>.
No testable behavior change.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::willBeDestroyed): No need for the
explicit clipRects teardown, since clipRects don't need a live
RenderObject for arena-based destruction.
* rendering/RenderLayer.cpp: Remove arena-related new and delete.
(WebCore::RenderLayer::RenderLayer): No need to explicitly initialize m_clipRects,
since it's an OwnPtr now.
(WebCore::RenderLayer::~RenderLayer): No explicit clipRect teardown required.
(WebCore::RenderLayer::clippingRootForPainting): Renamed to make its purpose
more obvious.
(WebCore::RenderLayer::paintLayer): Use the TemporaryClipRects type when necessary.
(WebCore::RenderLayer::paintLayerContents): Ditto
(WebCore::RenderLayer::hitTestLayer): No longer need to use temporary clipRects when
hit testing since we cache clip rects for hit testing.
(WebCore::RenderLayer::updateClipRects): Take a ClipRectsType and pass it through.
(WebCore::RenderLayer::calculateClipRects): Ditto
(WebCore::RenderLayer::parentClipRects): Ditto
(WebCore::RenderLayer::backgroundClipRect): Ditto
(WebCore::RenderLayer::calculateRects): Take ClipRectsType, which obviates temporaryClipRects.
(WebCore::RenderLayer::childrenClipRect): Use clippingRootForPainting().
(WebCore::RenderLayer::selfClipRect): Ditto
(WebCore::RenderLayer::localClipRect): Ditto
(WebCore::RenderLayer::clearClipRectsIncludingDescendants): Take a type of clip rect to clear
(include all). Allows us to just clear painting clip rects.
(WebCore::RenderLayer::clearClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRects::create): We don't use RefCounted<> in order to use a bit in
the refCount for a flag. Add create() method.
(WebCore::ClipRects::deref): No longer arena-allocated.
(WebCore::ClipRectsCache::ClipRectsCache): Struct that holds a small
array of the 3 types of clipRects (and, in debug, the layer relative
to which they were computed).
(WebCore::RenderLayer::clipRects):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds): Use AbsoluteClipRects; rootLayer
is always the RenderView's layer here.
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Use TemporaryClipRects.
(WebCore::RenderLayerBacking::setRequiresOwnBackingStore): When this variable changes,
we need to invalidate painting clipRects, since it affects the ancestor relative to which
those rects are computed.
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking): When the composited state
of a layer changes, we have to clear all descendant clip rects, since this
can affect the layers relative to which clip rects are computed.
(WebCore::RenderLayerCompositor::addToOverlapMap): Use AbsoluteClipRects.
(WebCore::RenderLayerCompositor::computeCompositingRequirements): No need
to call updateLayerPosition(), since that should have always happened after
layout. That call cleared clip rects, so removing it is very beneficial.
(WebCore::RenderLayerCompositor::clippedByAncestor): Use TemporaryClipRects.
* rendering/RenderTreeAsText.cpp:
(WebCore::writeLayers): Use TemporaryClipRects.
2012-05-25 Dean Jackson <dino@apple.com>
Unreviewed, rolling out r112155.
http://trac.webkit.org/changeset/112155
https://bugs.webkit.org/show_bug.cgi?id=79389
Hitch (due to style recalc?) when starting CSS3 animation
This caused a number of issues, including:
https://bugs.webkit.org/show_bug.cgi?id=87146
https://bugs.webkit.org/show_bug.cgi?id=84194
<rdar://problem/11506629>
<rdar://problem/11267408>
<rdar://problem/11531859>
* dom/Element.cpp:
(WebCore::Element::recalcStyle):
2012-05-25 David Hyatt <hyatt@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=87525
For the new multi-column layout, create a flow thread and make sure the children get put inside it.
Reviewed by Eric Seidel.
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
(WebCore::RenderMultiColumnBlock::addChild):
(WebCore):
* rendering/RenderMultiColumnBlock.h:
(WebCore):
(RenderMultiColumnBlock):
(WebCore::RenderMultiColumnBlock::flowThread):
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::~RenderMultiColumnFlowThread):
(WebCore):
* rendering/RenderMultiColumnFlowThread.h:
(RenderMultiColumnFlowThread):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderObject.h:
(RenderObject):
(WebCore::RenderObject::isRenderMultiColumnSet):
2012-05-25 Emil A Eklund <eae@chromium.org>
Change RenderBoxModelObject to compute relativePositionOffset as size
https://bugs.webkit.org/show_bug.cgi?id=87447
Reviewed by Eric Seidel.
Compute relativePositionOffset as size instead of doing one axis at a
time as all call sites uses the size version of the method. This avoids
having to walk the DOM twice to accumulate the offsets.
Also remove the relativePositionOffsetX and Y methods as they are no
longer used.
No new tests, covered by existing tests.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderBoxModelObject.cpp:
(WebCore::accumulateRelativePositionOffsets):
(WebCore::RenderBoxModelObject::relativePositionOffset):
* rendering/RenderBoxModelObject.h:
(RenderBoxModelObject):
2012-05-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r118395.
http://trac.webkit.org/changeset/118395
https://bugs.webkit.org/show_bug.cgi?id=87526
Breaking sites including GMail and Yahoo mail (Requested by
jsbell on #webkit).
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::collapseMargins):
2012-05-25 Ken Buchanan <kenrb@chromium.org>
Layout root not getting cleared for anonymous renderers geting destroyed
https://bugs.webkit.org/show_bug.cgi?id=84002
Reviewed by Abhishek Arya.
This is a follow-up to r109406, which added a check to clear layout
roots when they point to a renderer that is being destroyed. The
thinking was that layout roots would never be anonymous renderers,
but there are some cases where this is not true (in particular,
generated content containers with overflow clips can be layout roots).
As in r109406, this patch has no layout test. This is because any test
that exercises this behavior is caused by an existing layout bug where
a child is not properly getting layout (or a renderer is getting dirtied
out of order during layout) and will fail multiple ASSERTs:
in particular, ASSERT(!m_layoutRoot->container() || !m_layoutRoot->
container()->needsLayout()) in FrameView::scheduleRelayoutOfSubtree(),
and ASSERT_NOT_REACHED() in RenderObject::clearLayoutRootIfNeeded().
We are preventing those bugs from manifesting as security issues with
this patch.
This also removes an ASSERT from the RenderObject destructor. This is
redundant with the condition in RenderObject::clearLayoutRootIfNeeded()
which is always called in RenderObject::willBeDestroyed(), so the check
is not needed. It had to be removed because it fails when I try to
adjust the ASSERT condition by removing the !node()
check, due to RenderWidget clearing its node() during destruction.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::~RenderObject):
(WebCore::RenderObject::willBeDestroyed):
2012-05-25 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Hangup when continuously changing a css width value in Inspector
https://bugs.webkit.org/show_bug.cgi?id=85802
Reviewed by Vsevolod Vlasov.
An error in the property whitespace prefix detection algorithm would append the previous line trailing whitespace,
thereby enormously increasing the actual prefix during multiple incremental property changes.
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::newLineAndWhitespaceDelimiters):
2012-05-25 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Clean up Inspector.json after r118367
https://bugs.webkit.org/show_bug.cgi?id=87499
Reviewed by Yury Semikhatsky.
This cleans up the semantic inconsistencies introduced into type/field names r118367.
No new tests, as this is a refactoring.
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::asInspectorStyleSheet):
(WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
(WebCore::InspectorCSSAgent::detectOrigin):
* inspector/InspectorCSSAgent.h:
(InspectorCSSAgent):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::create):
(WebCore::InspectorStyleSheet::InspectorStyleSheet):
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::InspectorStyleSheet::resourceStyleSheetText):
(WebCore::InspectorStyleSheetForInlineStyle::create):
(WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
* inspector/InspectorStyleSheet.h:
(InspectorStyleSheet):
(WebCore::InspectorStyleSheet::canBind):
(InspectorStyleSheetForInlineStyle):
2012-05-25 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: speed-up HeapSnapshot._bfs method.
https://bugs.webkit.org/show_bug.cgi?id=87502
It had containmentEdges.length call in the loop that forced deoptimization.
Reviewed by Yury Semikhatsky.
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance):
(WebInspector.HeapSnapshot.prototype._bfs):
2012-05-25 Alexei Filippov <alexeif@chromium.org>
Web Inspector: Speed up edges iteration in heap profiler
https://bugs.webkit.org/show_bug.cgi?id=87286
Add an extra node to nodes array that points to the end of edges array.
It allows to eliminate a check for the last node in iteration code.
Reviewed by Yury Semikhatsky.
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotNode.prototype._edgeIndexesStart):
(WebInspector.HeapSnapshotNode.prototype._edgeIndexesEnd):
(WebInspector.HeapSnapshotNodeIterator):
(WebInspector.HeapSnapshot.prototype._buildRetainers):
(WebInspector.HeapSnapshot.prototype._bfs):
(WebInspector.HeapSnapshot.prototype._buildAggregates):
(WebInspector.HeapSnapshot.prototype._buildPostOrderIndex):
(WebInspector.HeapSnapshot.prototype._buildDominatorTree):
(WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
2012-05-25 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: put paint and compositing timeline events in a new category of their own
https://bugs.webkit.org/show_bug.cgi?id=86852
Reviewed by Pavel Feldman.
- add forth timeline category, "Painting"; make it light-purple;
- assign paint and compositing events to Painting category;
* WebCore.gypi: added timelineBarLightPurple.png;
* inspector/front-end/Images/timelineBarLightPurple.png: Added.
* inspector/front-end/Images/timelineCheckmarks.png: added light-purple icon;
* inspector/front-end/Images/timelineDots.png: ditto.
* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineCategoryStrips.prototype.update.appendRecord): do not merge bars in same raw if these are from different categories;
(WebInspector.TimelineCategoryStrips.prototype.update):
* inspector/front-end/TimelinePresentationModel.js:
(WebInspector.TimelinePresentationModel.categories):
(WebInspector.TimelinePresentationModel.recordStyle):
* inspector/front-end/WebKit.qrc: added timelineBarLightPurple.png;
* inspector/front-end/timelinePanel.css: added styles for painting category;
(.timeline-category-statusbar-item.timeline-category-painting .timeline-category-checkbox):
(.timeline-category-painting .timeline-graph-bar):
(.popover .timeline-painting):
(.timeline-category-scripting .timeline-tree-icon):
(.timeline-category-rendering .timeline-tree-icon):
(.timeline-category-painting .timeline-tree-icon):
2012-05-25 W. James MacLean <wjmaclean@chromium.org>
[chromium] LayerChromium should recognise existing layer active animations when the layer is added.
https://bugs.webkit.org/show_bug.cgi?id=87166
Reviewed by Adrienne Walker.
Unit test added.
LayerChromium needs to correctly recognize if a newly added layer has an existing
active animation.
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setLayerTreeHost):
(WebCore::LayerChromium::notifyAnimationFinished):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(CCLayerTreeHost):
2012-05-25 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: HeapSnapshot: introduce performance counter for HeapSnapshotConstructorsDataGrid._aggregatesReceived method.
https://bugs.webkit.org/show_bug.cgi?id=87393
Reviewed by Yury Semikhatsky.
* inspector/front-end/HeapSnapshotDataGrids.js:
(WebInspector.HeapSnapshotConstructorsDataGrid.prototype._aggregatesReceived):
(WebInspector.HeapSnapshotConstructorsDataGrid.prototype._populateChildren):
2012-05-25 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: drop obsolete WebInspector.Uint32Array and adjust snapshot chunk size for better transfer-snapshot metric.
https://bugs.webkit.org/show_bug.cgi?id=87490
Originally WebInspector.Uint32Array was used for dynamic array
reallocation because we had no information about expected arrays sizes.
Now we have these sizes and allocates array precisely.
Reviewed by Yury Semikhatsky.
* bindings/v8/ScriptHeapSnapshot.cpp:
(WebCore):
* inspector/front-end/HeapSnapshot.js:
* inspector/front-end/HeapSnapshotLoader.js:
(WebInspector.HeapSnapshotLoader.prototype._parseUintArray):
(WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk):
2012-05-25 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: drop obsolete WebInspector.Uint32Array and adjust snapshot chunk size for better transfer-snapshot metric.
https://bugs.webkit.org/show_bug.cgi?id=87490
Originally WebInspector.Uint32Array was used for dynamic array
reallocation because we had no information about expected arrays sizes.
Now we have these sizes and allocates array precisely.
Reviewed by Yury Semikhatsky.
* bindings/v8/ScriptHeapSnapshot.cpp:
(WebCore):
* inspector/front-end/HeapSnapshot.js:
* inspector/front-end/HeapSnapshotLoader.js:
(WebInspector.HeapSnapshotLoader.prototype._parseUintArray):
(WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk):
2012-05-25 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: cmd-[ shortcut navigates page and is fr-keyboard incompatible
https://bugs.webkit.org/show_bug.cgi?id=85312
Reviewed by Vsevolod Vlasov.
Suppress the handling of panel history navigation events if the corresponding keyboard activities produce
the "keypress" event (which is the case on French keyboards, where AltGr+[ is translated into Ctrl+Alt+[ on Windows).
The event is also told to preventDefault() to avoid browser history navigation on Mac while traversing the Inspector panel history.
* inspector/front-end/InspectorView.js:
(WebInspector.InspectorView):
(WebInspector.InspectorView.prototype._keyPress):
(WebInspector.InspectorView.prototype._keyDown):
(WebInspector.InspectorView.prototype._keyDownInternal):
* inspector/front-end/UIUtils.js:
(WebInspector.isWin):
2012-05-25 Yury Semikhatsky <yurys@google.com>
Unreviewed. Fixed closure compiler warnings.
* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
(WebInspector.NativeMemoryProfileHeader.prototype.createView):
2012-05-25 Lu Guanqun <guanqun.lu@intel.com>
[GTK] fix compilation warning in GtkInputMethodFilter.cpp
https://bugs.webkit.org/show_bug.cgi?id=87475
Reviewed by Martin Robinson.
* platform/gtk/GtkInputMethodFilter.cpp:
(WebCore::GtkInputMethodFilter::setWidget):
2012-05-25 Zalan Bujtas <zbujtas@gmail.com>
[Qt] Broken controls rendering when transform is applied.
https://bugs.webkit.org/show_bug.cgi?id=87483
Reviewed by Simon Hausmann.
Use only the scaling transform value to determine the size of
the control to be drawn. When other transforms present such as
rotate or skew, ignore them, unless scaling also involved. In
that case, calculate the scaling value out of the transformation.
* ManualTests/qt/control_paiting_with_transforms.html: Added.
* platform/qt/RenderThemeQtMobile.cpp:
(WebCore::painterScale):
(WebCore):
(WebCore::StylePainterMobile::sizeForPainterScale):
2012-05-17 Andrey Kosyakov <caseq@chromium.org>
[chromium] add instrumentation for compositing
https://bugs.webkit.org/show_bug.cgi?id=83928
Reviewed by James Robinson.
- plumb willCommit() and didBeginFrame() from CCSingleThreadProxy and CCThreadProxy to inspector instrumentation;
- note for threaded case, didBeginFrame() is invoked upon unblocking of main thread;
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(CCLayerTreeHostClient):
(WebCore::CCLayerTreeHost::didBeginFrame):
(WebCore::CCLayerTreeHost::willCommit):
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::commitAndComposite):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::beginFrame):
2012-05-25 Taiju Tsuiki <tzik@chromium.org>
Web Inspector: Drop InspectorFileSystemInstrumentation
https://bugs.webkit.org/show_bug.cgi?id=87460
Inspector does not need to track DOMFileSystem object now. So we can
drop InspectorFileSystemInstrumentation.
Reviewed by Vsevolod Vlasov.
* GNUmakefile.list.am:
* Modules/filesystem/DOMFileSystem.cpp:
(WebCore::DOMFileSystem::create):
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorFileSystemAgent.cpp:
(WebCore::InspectorFileSystemAgent::enable):
* inspector/InspectorFileSystemAgent.h:
(InspectorFileSystemAgent):
* inspector/InspectorFileSystemInstrumentation.h: Removed.
* inspector/InspectorInstrumentation.cpp:
(WebCore):
* inspector/InspectorInstrumentation.h:
(WebCore):
(InspectorInstrumentation):
2012-05-25 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: HeapProfiler: speed-up _calculateClassesRetainedSize and _buildAggregates.
https://bugs.webkit.org/show_bug.cgi?id=87482
Engine didn't inline node's classIndex method because the switch statement in it wasn't inlineable.
Reviewed by Yury Semikhatsky.
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotNode.prototype.classIndex):
2012-05-24 Andreas Kling <kling@webkit.org>
Dodge style recalc when id attribute is overwritten with same value.
<http://webkit.org/b/87211>
Reviewed by Eric Seidel.
Don't force style recalc when the id attribute is set to the same value it already had.
~3.5% improvement on Dromaeo's "dom-attr" locally.
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
2012-05-24 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: add profile type for native memory snapshots
https://bugs.webkit.org/show_bug.cgi?id=87400
Reviewed by Vsevolod Vlasov.
Introduced new profile type and view classes for native memory snapshots.
All the stuff is hidden behind an experimental setting.
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/NativeMemorySnapshotView.js: Added.
(WebInspector.NativeMemorySnapshotView):
(WebInspector.NativeMemorySnapshotView.prototype.dispose):
(WebInspector.NativeMemorySnapshotView.prototype.get statusBarItems):
(WebInspector.NativeMemorySnapshotView.prototype.get profile):
(WebInspector.NativeMemoryProfileType):
(WebInspector.NativeMemoryProfileType.prototype.get buttonTooltip):
(WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
(WebInspector.NativeMemoryProfileType.prototype.get treeItemTitle):
(WebInspector.NativeMemoryProfileType.prototype.get description):
(WebInspector.NativeMemoryProfileType.prototype.createTemporaryProfile):
(WebInspector.NativeMemoryProfileType.prototype.createProfile):
(WebInspector.NativeMemoryProfileHeader):
(WebInspector.NativeMemoryProfileHeader.prototype.createSidebarTreeElement):
(WebInspector.NativeMemoryProfileHeader.prototype.createView):
* inspector/front-end/ProfilesPanel.js:
* inspector/front-end/Settings.js:
(WebInspector.ExperimentsSettings):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
2012-05-25 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: make some profiler methods private
https://bugs.webkit.org/show_bug.cgi?id=87479
Reviewed by Vsevolod Vlasov.
- Removed unused methods.
- Renamed private methods so that their names start with underscore.
- ProfileLauncherView methods are called directly from ProfilesPanel instead
of sending events.
* inspector/front-end/CPUProfileView.js:
* inspector/front-end/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorProfileType.prototype.buttonClicked):
(WebInspector.CSSSelectorProfileType.prototype._startRecordingProfile):
(WebInspector.CSSSelectorProfileType.prototype.createTemporaryProfile):
* inspector/front-end/ProfileLauncherView.js:
(WebInspector.ProfileLauncherView.prototype.profileStarted):
(WebInspector.ProfileLauncherView.prototype.profileFinished):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfileType.prototype.createProfile):
(WebInspector.ProfilesPanel.prototype.toggleRecordButton):
(WebInspector.ProfilesPanel.prototype._reset):
(WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback.var):
(WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback):
(WebInspector.ProfilesPanel.prototype._populateProfiles):
(WebInspector.ProfilesPanel.prototype.setRecordingProfile):
(WebInspector.ProfilesPanel.prototype.takeHeapSnapshot.done):
(WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
2012-05-25 Keishi Hattori <keishi@webkit.org>
Bad checkValidity result on recently "enabled" form fields
https://bugs.webkit.org/show_bug.cgi?id=85704
Reviewed by Kent Tamura.
Test: fast/forms/disabled-attr-checkvalidity.html
We were tripping on the assertion m_isValid == validity()->valid()
inside HTMLFormControlElement::isValidFormControlElement.
m_isValid was becoming stale because setNeedsValidityCheck wasn't called
after m_willValidate changed.
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::willValidate): We used const_cast
because it was too difficult to remove const. We are checking if the
value from willValidate has changed to avoid an infinite loop.
(WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
2012-05-24 Kinuko Yasuda <kinuko@chromium.org>
[chromium] DataTransferItem.webkitGetAsEntry() shouldn't be exposed without flag yet
https://bugs.webkit.org/show_bug.cgi?id=87457
Reviewed by Kent Tamura.
No new tests, marking some tests SKIP as we stop exposing this by default.
* Modules/filesystem/DataTransferItemFileSystem.idl: Removed webkitGetAsEntry
2012-05-25 Rakesh KN <rakesh.kn@motorola.com>
RadioNodeList does not include a object element
https://bugs.webkit.org/show_bug.cgi?id=87371
Reviewed by Kent Tamura.
As per spec http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#category-listed
Object element should also be listed in RadioNodeList object.
Updated existing test.
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
Compares if test element's name/id and form matches that of the RadioNodeList filter.
(WebCore::RadioNodeList::nodeMatches):
Added support for Object element, check if object elements name/id matches the RadioNodeList filter.
* html/RadioNodeList.h:
(RadioNodeList): Ditto
2012-05-25 Jan Keromnes <janx@linux.com>
Web Inspector: Resource object has no methods getContent and setContent
https://bugs.webkit.org/show_bug.cgi?id=87424
This fixes the extension API so that it uses the `new Resource()`
constructor, which adds the missing `getContent` and `setContent`
methods to a `Resource` object.
Reviewed by Vsevolod Vlasov.
The tests were fixed accordingly in:
LayoutTests/inspector/extensions/extensions-resources-expected.txt
* inspector/front-end/ExtensionAPI.js:
(injectedExtensionAPI.Panels.prototype.setOpenResourceHandler.else.callbackWrapper):
(injectedExtensionAPI.Panels.prototype.setOpenResourceHandler):
2012-05-24 Tim Horton <timothy_horton@apple.com>
Add feature defines for web-facing parts of CSS Regions and Exclusions
https://bugs.webkit.org/show_bug.cgi?id=87442
<rdar://problem/10887709>
Reviewed by Dan Bernstein.
* Configurations/FeatureDefines.xcconfig:
* GNUmakefile.am:
* bindings/generic/RuntimeEnabledFeatures.cpp:
* bindings/generic/RuntimeEnabledFeatures.h:
(RuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::setCSSExclusionsEnabled):
(WebCore::RuntimeEnabledFeatures::cssExclusionsEnabled):
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/objc/DOMCSS.mm:
(kitClass):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::isSimpleLengthPropertyID):
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::detectAtToken):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSRule.cpp:
(WebCore::CSSRule::cssText):
(WebCore::CSSRule::destroy):
(WebCore::CSSRule::reattach):
* css/CSSRule.h:
(WebCore::CSSRule::isRegionRule):
* css/CSSRule.idl:
* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyValue):
(WebCore::StylePropertySet::asText):
* css/StylePropertyShorthand.cpp:
(WebCore::shorthandForProperty):
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy):
(WebCore::StyleRuleBase::createCSSOMWrapper):
* css/WebKitCSSRegionRule.cpp:
* css/WebKitCSSRegionRule.h:
* css/WebKitCSSRegionRule.idl:
* dom/Document.cpp:
* dom/Document.h:
* dom/Document.idl:
* page/DOMWindow.idl:
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setCSSRegionsEnabled):
(WebCore::Settings::cssRegionsEnabled):
2012-05-24 Geoffrey Garen <ggaren@apple.com>
WebKit should be lazy-finalization-safe (esp. the DOM)
https://bugs.webkit.org/show_bug.cgi?id=87456
Reviewed by Filip Pizlo.
* bindings/js/DOMWrapperWorld.cpp:
(WebCore::JSStringOwner::finalize):
* bindings/js/JSDOMBinding.cpp:
(WebCore::jsStringSlowCase):
* bindings/js/JSDOMBinding.h:
(WebCore::cacheWrapper):
(WebCore::uncacheWrapper): Use the new idioms.
(WebCore::jsString): Use get instead of find because get is simpler in
the case of entries that are logically null.
(WebCore::domObjectWrapperMapFor): Removed, since it was unused.
* bindings/js/ScriptWrappable.h:
(WebCore::ScriptWrappable::clearWrapper): Use the new idioms.
* bridge/runtime_root.cpp:
(JSC::Bindings::RootObject::invalidate): Check for null while iterating,
since that's possible now.
(JSC::Bindings::RootObject::addRuntimeObject):
(JSC::Bindings::RootObject::removeRuntimeObject):
(JSC::Bindings::RootObject::finalize): Use the new idioms.
* bridge/runtime_root.h:
(RootObject): Clarified the word "need".
2012-05-24 Kent Tamura <tkent@chromium.org>
PAGE_POPUP: window.setValueAndClosePopup should be moved to a
per-context property of DOMWindow.
https://bugs.webkit.org/show_bug.cgi?id=87086
Reviewed by Adam Barth.
- Introduce window.pagePagePopupController property as V8EnabledPerContext.
- Move window.setValueAndClosePopup() to window.pagePopupController.
So, we can remove ad-hoc ScriptController::installFunctionsForPagePopup().
No behavior change.
Test: fast/forms/date/no-page-popup-controller.html
* Resources/calendarPicker.js:
(submitValue): Use window.pagePopupController.
(handleCancel): ditto.
* WebCore.gypi: Add new files.
* bindings/generic/ContextEnabledFeatures.cpp:
(WebCore::ContextEnabledFeatures::pagePopupEnabled): Added.
* bindings/generic/ContextEnabledFeatures.h:
(ContextEnabledFeatures): Added.
* bindings/v8/ScriptController.cpp: Remove installFunctionsForPagePopup().
* bindings/v8/ScriptController.h: ditto.
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::allowPagePopup): Added.
* page/DOMWindowPagePopup.cpp:
(WebCore::DOMWindowPagePopup::DOMWindowPagePopup):
Creates a PagePopupController object for the specified PagePopupClient.
(WebCore::DOMWindowPagePopup::~DOMWindowPagePopup):
Empty destructor to generate the RefPtr<PagePopupController> destructor.
(WebCore::DOMWindowPagePopup::pagePopupController):
* page/DOMWindowPagePopup.h:
(DOMWindowPagePopup):
- Remove setValueAndClosePopup()
- Add pagePopupController()
- Change the data member from PagePopupClient to PagePopupController.
* page/DOMWindowPagePopup.idl: Supply per-context window.pagePopupController.
* page/PagePopupController.cpp: Added. This object is attached to window.
* page/PagePopupController.h: ditto.
* page/PagePopupController.idl: ditto.
2012-05-21 Kinuko Yasuda <kinuko@chromium.org>
Cleanup: add a file system call which captures the file metadata at once.
https://bugs.webkit.org/show_bug.cgi?id=86995
Reviewed by David Levin.
Current File.slice() (webkitSlice()) implementation calls two separate platform calls,
getFileSize() and getFileModificationTime() [both are defined in platform/FileSystem.h],
to capture the file metadata, but we should have a single file system call to get them at once
for two reasons: 1. save additional system call costs, and 2. atomically obtain the file metadata.
No new tests: existing tests (http/tests/local/fileapi/* and fast/files/*) should pass.
* fileapi/File.cpp:
(WebCore::File::captureSnapshot):
* platform/FileMetadata.h:
* platform/FileSystem.h:
* platform/chromium/FileSystemChromium.cpp:
(WebCore::getFileMetadata): Added.
* platform/chromium/PlatformSupport.h:
(PlatformSupport):
* platform/gtk/FileSystemGtk.cpp:
(WebCore::getFileMetadata): Added.
* platform/posix/FileSystemPOSIX.cpp:
(WebCore::getFileMetadata): Added.
* platform/qt/FileSystemQt.cpp:
(WebCore::getFileMetadata): Added.
* platform/win/FileSystemWin.cpp:
(WebCore::getFileSizeFromFindData):
(WebCore::getFileModificationTimeFromFindData):
(WebCore::getFileSize):
(WebCore::getFileModificationTime):
(WebCore::getFileMetadata): Added.
* platform/wince/FileSystemWinCE.cpp:
(WebCore::getFileSizeFromFileInfo):
(WebCore::getFileModificationTimeFromFileInfo):
(WebCore::getFileSize):
(WebCore::getFileModificationTime):
(WebCore::getFileMetadata): Added.
* platform/wx/FileSystemWx.cpp:
(WebCore::getFileMetadata): Added.
(WebCore):
2012-05-24 Hironori Bono <hbono@chromium.org>
Enable grammar checking on Chromium when we paste text (Take 2)
https://bugs.webkit.org/show_bug.cgi?id=74393
Reviewed by Ryosuke Niwa.
This change enables grammar checking on Chromium and implements a mock grammar
checker to fix a failing test.
Test: editing/spelling/grammar-markers.html
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::drawLineForDocumentMarker): render grammar markers in gray on Windows and Linux or in green on Mac.
2012-05-24 Dominic Mazzoni <dmazzoni@google.com>
Crash in WebCore::AccessibilityTable::isDataTable
https://bugs.webkit.org/show_bug.cgi?id=87409
Reviewed by Abhishek Arya.
Use Node::rendererIsEditable everywhere rather than
Node::isContentEditable because the latter can trigger a layout
and destroy the renderer. New test covers the change to
AccessibilityTable.cpp, changes to AccessibilityRenderObject.cpp
are covered by existing tests.
Test: accessibility/contenteditable-table-check-causes-crash.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isReadOnly):
(WebCore::AccessibilityRenderObject::contentChanged):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
2012-05-24 Yoshifumi Inoue <yosin@chromium.org>
[Forms][TextArea] Too long validation message doesn't count LF as CRLF
https://bugs.webkit.org/show_bug.cgi?id=87458
Reviewed by Kent Tamura.
This patch changes current number of characters in "too long" validation message
parameter to counting newline as 2 characters (CR and LF) as submission data.
No new tests. To have test for this change, we need to change localization
text handling during DRT. We'll try.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::validationMessage): Use computeLengthForSubmission instead of numGraphmeClusters.
2012-05-24 Hayato Ito <hayato@chromium.org>
Fix crashes caused by a DOMCharacterDataModified event on a text node.
https://bugs.webkit.org/show_bug.cgi?id=86953
Reviewed by Dimitri Glazkov.
TextNode can be released while CharacterData::setData() will dispatch a mutation event.
So protect it.
Mutation event itself should not be dispatched on the test case.
This is being tracked by webkit bug https://bugs.webkit.org/show_bug.cgi?id=87372.
Test: fast/events/dom-character-data-modified-textarea-crash.html
* dom/CharacterData.cpp:
(WebCore::CharacterData::setData):
2012-05-24 Philippe Normand <pnormand@igalia.com>
[GTK] Add --enable-css3-flexbox configure option after r118304.
https://bugs.webkit.org/show_bug.cgi?id=87455
Reviewed by Xan Lopez.
* GNUmakefile.am:
2012-05-24 MORITA Hajime <morrita@google.com>
Scoped stylesheet should be per-document-configurable.
https://bugs.webkit.org/show_bug.cgi?id=86985
Reviewed by Kent Tamura.
This change replaced RuntimeEnabledFeatures::styleScopedEnabled() callsites
with newly introduced ContextEnabledFeatures::styleScopedEnabled().
Clients can override the decision by implementing FrameLoaderClient::allowStyleScoped().
No new tests. This isn't testable on DRT.
* bindings/generic/ContextEnabledFeatures.cpp:
(WebCore):
(WebCore::ContextEnabledFeatures::styleScopedEnabled):
* bindings/generic/ContextEnabledFeatures.h:
(WebCore):
(ContextEnabledFeatures):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::determineScope):
* css/StyleResolver.h:
(StyleResolver):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::registerWithScopingNode):
(WebCore::HTMLStyleElement::unregisterWithScopingNode):
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::allowStyleScoped):
2012-05-24 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r118452.
http://trac.webkit.org/changeset/118452
https://bugs.webkit.org/show_bug.cgi?id=87446
Causes many tests to assert on Mac, NRWT bails out (Requested
by sundiamonde on #webkit).
* rendering/RenderObject.cpp:
(WebCore::RenderObject::~RenderObject):
(WebCore::RenderObject::clearLayoutRootIfNeeded):
2012-05-24 Kevin Ollivier <kevino@theolliviers.com>
[wx] Unreviewed build fix. Add contextMenuItemVector stub.
* platform/wx/ContextMenuWx.cpp:
(WebCore):
(WebCore::contextMenuItemVector):
2012-05-24 Raymond Toy <rtoy@google.com>
Use 32-byte alignment in AudioArray if using WEBAUDIO_FFMPEG
https://bugs.webkit.org/show_bug.cgi?id=87430
Reviewed by Chris Rogers.
Covered by existing tests.
* platform/audio/AudioArray.h:
(WebCore::AudioArray::allocate):
2012-05-24 Antoine Labour <piman@chromium.org>
[chromium] Add a setForceRenderSurface to WebLayer for test/bench purpose
https://bugs.webkit.org/show_bug.cgi?id=87436
Reviewed by James Robinson.
Tested by CCLayerTreeHostCommonTest.verifyForceRenderSurface
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
(WebCore::LayerChromium::setForceRenderSurface):
(WebCore):
(WebCore::LayerChromium::pushPropertiesTo):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::forceRenderSurface):
(LayerChromium):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::CCLayerImpl):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(WebCore::CCLayerImpl::forceRenderSurface):
(WebCore::CCLayerImpl::setForceRenderSurface):
(CCLayerImpl):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::subtreeShouldRenderToSeparateSurface):
2012-05-24 Ken Buchanan <kenrb@chromium.org>
Layout root not getting cleared for anonymous renderers geting destroyed
https://bugs.webkit.org/show_bug.cgi?id=84002
Reviewed by Abhishek Arya.
This is a follow-up to r109406, which added a check to clear layout
roots when they point to a renderer that is being destroyed. The
thinking was that layout roots would never be anonymous renderers,
but there are some cases where this is not true (in particular,
generated content containers with overflow clips can be layout roots).
As in r109406, this patch has no layout test. This is because any test
that exercises this behavior is caused by an existing layout bug where
a child is not properly getting layout (or a renderer is getting dirtied
out of order during layout) and will fail multiple ASSERTs:
in particular, ASSERT(!m_layoutRoot->container() || !m_layoutRoot->
container()->needsLayout()) in FrameView::scheduleRelayoutOfSubtree(),
and ASSERT_NOT_REACHED() in RenderObject::clearLayoutRootIfNeeded().
We are preventing those bugs from manifesting as security issues with
this patch.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::~RenderObject):
(WebCore::RenderObject::willBeDestroyed):
2012-05-24 Anders Carlsson <andersca@apple.com>
Corrupted pages rendering when images are zoomed on Google+
https://bugs.webkit.org/show_bug.cgi?id=87439
<rdar://problem/11503078>
Reviewed by Beth Dakin.
The rect that's given to scrollContentsSlowPath is in frame view coordinates, but if we end up
passing them to RenderLayer::setBackingNeedsRepaintInRect we need to account for the frame scale factor.
* page/FrameView.cpp:
(WebCore::FrameView::scrollContentsSlowPath):
2012-05-24 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION (r112399): insertHTML doesn't respect current selection range and inserts HTML to incorrect position
https://bugs.webkit.org/show_bug.cgi?id=87195
Reviewed by Darin Adler.
The bug was caused by our passing insertionPos.anchorNode() to splitTreeToNode's start node even when
the position's type was an offset in a container. Fixed the bug by passing the node after the insert position
or the container node if the position is at the end of the container.
Test: editing/pasteboard/paste-at-end-of-node-followed-by-inline-element.html
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply):
2012-05-24 Emil A Eklund <eae@chromium.org>
REGRESSION (115573): Incorrect rounding of margins for floats
https://bugs.webkit.org/show_bug.cgi?id=87319
Reviewed by Eric Seidel.
In RenderBlock::computeInlinePreferredLogicalWidths we used a float to
accumulate margins for floating children while the children themselves
represent their margins as LayoutUnits. Due to lack of rounding this can
cause the block to be too small at certain certain zoom levels, causing
unwanted wrapping.
This patch changes computeInlinePreferredLogicalWidths to use a
LayoutUnit to accumulate the margins and thus ensures that the margin
values are rounded the same way.
Test: fast/block/float/floats-with-margin-should-not-wrap.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2012-05-24 Christophe Dumez <christophe.dumez@intel.com>
postMessage and webkitPostMessage should behave the same way
https://bugs.webkit.org/show_bug.cgi?id=87384
Reviewed by Adam Barth.
Make postMessage behave the same way as webkitPostMessage, meaning
that it supports transfer of MessagePorts and ArrayBuffers as per
the spec. Both V8 and JSC implementations have been updated.
Test: fast/dom/Window/window-postmessage-args.html
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::handlePostMessage):
(WebCore::JSDOMWindow::postMessage):
(WebCore::JSDOMWindow::webkitPostMessage):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::handlePostMessageCallback):
(WebCore::V8DOMWindow::postMessageCallback):
(WebCore::V8DOMWindow::webkitPostMessageCallback):
* bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
(WebCore::handlePostMessageCallback):
(WebCore::V8DedicatedWorkerContext::postMessageCallback):
(WebCore::V8DedicatedWorkerContext::webkitPostMessageCallback):
* bindings/v8/custom/V8MessagePortCustom.cpp:
(WebCore::handlePostMessageCallback):
(WebCore::V8MessagePort::postMessageCallback):
(WebCore::V8MessagePort::webkitPostMessageCallback):
* bindings/v8/custom/V8WorkerCustom.cpp:
(WebCore::handlePostMessageCallback):
(WebCore::V8Worker::postMessageCallback):
(WebCore::V8Worker::webkitPostMessageCallback):
2012-05-24 Pablo Flouret <pablof@motorola.com>
Submit button doesn't submit the form if the form is wrapped by an anchor tag
https://bugs.webkit.org/show_bug.cgi?id=86719
Reviewed by Ryosuke Niwa.
When a form's button is clicked or activated with the keyboard a
DOMActivate event is dispatched internally and the default handler for
it takes care of processing the form submission, but the underlying
event that prompted it is not set as handled and so it ends up
navigating the anchor, thereby cancelling the form submission.
This patch sets the original click event as handled if the DOMActivate
event was handled. This matches the rest of the browsers for form
controls that submit a form (input type=submit, button type=submit,
input type=image, etc), and matches IE for the rest of the controls
(basically, IE never activates the anchor when clicking on form
controls, Presto and Gecko mostly don't either, except in a few cases.
Test: fast/forms/form-in-anchor-controls-activation.html
* dom/Node.cpp:
(WebCore::Node::dispatchDOMActivateEvent):
(WebCore::Node::defaultEventHandler):
* dom/Node.h:
(Node):
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::defaultEventHandler):
2012-05-24 Crystal Zhang <haizhang@rim.com>
[BlackBerry] Implement select popup and remove old hook to air popup
https://bugs.webkit.org/show_bug.cgi?id=87419
Reviewed by Rob Buis.
Add new files to make file, add css file for select popup.
* PlatformBlackBerry.cmake:
* Resources/blackberry/popupControlBlackBerry.css: Added.
(html):
(body):
(.bottombuttonOK):
(.bottombuttonCancel):
(.tablebutton):
2012-05-24 Levi Weintraub <leviw@chromium.org>
Avoid creating InlineBoxes for floating and positioned objects in isolates.
https://bugs.webkit.org/show_bug.cgi?id=87277
Reviewed by Eric Seidel.
We currently will create a placeholder run for the first object we encounter inside an isolate. Then
in RenderBlockLineLayout's constructBidiRuns, we replace that run with the contents of the Isolate.
We run into problems when there are no valid contents in the Isolate. We can't simply remove the
placeholder if there's nothing to replace it with since it may be the logically last run, which we
track but can't rebuild by the time we're handling isolates (we've already shuffled the BidiRuns around).
With this change, we avoid creating a placeholder altogether until we hit contents in the isolate
that would warrant a BidiRun in the first place.
Test: fast/text/international/float-as-only-child-of-isolate-crash.html
* rendering/InlineIterator.h:
(WebCore::IsolateTracker::addFakeRunIfNecessary):
* rendering/RenderBlock.h:
(RenderBlock):
(WebCore::RenderBlock::shouldSkipCreatingRunsForObject):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::appendRunsForObject):
2012-05-24 Ryosuke Niwa <rniwa@webkit.org>
There are too many poorly named functions to create a fragment from markup
https://bugs.webkit.org/show_bug.cgi?id=87339
Reviewed by Eric Seidel.
Moved all functions that create a fragment from markup to markup.h/cpp.
There should be no behavioral change.
* dom/Range.cpp:
(WebCore::Range::createContextualFragment):
* dom/Range.h: Removed createDocumentFragmentForElement.
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::setInnerHTML):
* editing/markup.cpp:
(WebCore::createFragmentFromMarkup):
(WebCore::createFragmentForInnerOuterHTML): Renamed from createFragmentFromSource.
(WebCore::createFragmentForTransformToFragment): Moved from XSLTProcessor.
(WebCore::removeElementPreservingChildren): Moved from Range.
(WebCore::createContextualFragment): Ditto.
* editing/markup.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setInnerHTML):
(WebCore::HTMLElement::setOuterHTML):
(WebCore::HTMLElement::insertAdjacentHTML):
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::patchNode): Added a FIXME since this code should be using
one of the functions listed in markup.h
* xml/XSLTProcessor.cpp:
(WebCore::XSLTProcessor::transformToFragment):
2012-05-24 Jer Noble <jer.noble@apple.com>
MediaControlTimelineElement is adjusting time 3 times per click
https://bugs.webkit.org/show_bug.cgi?id=58160
Reviewed by Eric Carlson.
No new tests; we intentionally throttle timeupdate events for the same
movie time, so there is no way to write a layout test for this case.
Only call setCurrentTime() on mousedown or mousemove events.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineElement::defaultEventHandler):
2012-05-24 John Mellor <johnme@chromium.org>
Font Boosting: Add compile flag and runtime setting
https://bugs.webkit.org/show_bug.cgi?id=87394
Reviewed by Adam Barth.
Add ENABLE_FONT_BOOSTING compile flag and fontBoostingEnabled runtime setting.
No functionality yet, so no new tests.
* Configurations/FeatureDefines.xcconfig:
* GNUmakefile.am:
* Target.pri:
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::setFontBoostingEnabled):
(WebCore):
* page/Settings.h:
(Settings):
(WebCore::Settings::fontBoostingEnabled):
2012-05-24 Greg Spencer <gspencer@chromium.org>
MHTML files should be loadable from all schemes considered local,
not just "file:"
https://bugs.webkit.org/show_bug.cgi?id=86540
Reviewed by Adam Barth.
Existing tests should verify correct function.
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::continueAfterContentPolicy):
* loader/archive/mhtml/MHTMLArchive.cpp:
(WebCore::MHTMLArchive::create):
2012-05-24 Dana Jansens <danakj@chromium.org>
[chromium] Remove some leftover references to LayerTilerChromium
https://bugs.webkit.org/show_bug.cgi?id=87405
Reviewed by James Robinson.
* platform/graphics/chromium/LayerChromium.h:
(LayerChromium):
* platform/graphics/chromium/SolidColorLayerChromium.h:
2012-05-24 Jessie Berlin <jberlin@apple.com>
REGRESSION(r109663) All the the dom/html/level2/html/HTMLFrameElement* tests crash on Windows
https://bugs.webkit.org/show_bug.cgi?id=87410
Reviewed by Anders Carlsson.
Do not pass a reference type to va_start (see r75435).
* platform/LocalizedStrings.cpp:
(WebCore::formatLocalizedString):
2012-05-24 Yael Aharon <yael.aharon@nokia.com>
[Qt] Stop using the flag FIXED_POSITION_CREATES_STACKING_CONTEXT
https://bugs.webkit.org/show_bug.cgi?id=87392
Reviewed by Antonio Gomes.
Remove our dependency on a build flag and use the new setting.
No new tests.
* css/StyleResolver.cpp:
2012-05-24 Alexey Proskuryakov <ap@apple.com>
[WK2] Let the client give local files universal access on a case by case basis
https://bugs.webkit.org/show_bug.cgi?id=87174
<rdar://problem/11024330>
Reviewed by Maciej Stachowiak.
* dom/Document.cpp: (WebCore::Document::initSecurityContext): When settings->allowUniversalAccessFromFileURLs()
is false, also try asking the client for an indulgence.
* loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::shouldForceUniversalAccessFromLocalURL):
Default implementation doesn't change anything.
2012-05-24 Tony Chang <tony@chromium.org>
improve StyleRareNonInheritedData bit packing on Windows
https://bugs.webkit.org/show_bug.cgi?id=87322
Reviewed by Eric Seidel.
Accessors for m_runningAcceleratedAnimation and m_hasAspectRatio are on RenderStyle already.
Also reorder the variables in operator== to be consistent with the constructor and header file.
This makes it easier to add or remove values.
No new tests, just refactoring.
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
(StyleRareNonInheritedData):
2012-05-24 Robert Hogan <robert@webkit.org>
Negative margin block doesn't properly clear a float enclosed by a previous sibling
https://bugs.webkit.org/show_bug.cgi?id=10900
Reviewed by David Hyatt.
Tests: fast/css/clear-float-sibling.html
Parent blocks keep a list of child floats that extend out of the parent block and
by implication overhang into the parent's siblings. But this doesn't work if the
sibling has collapsing margins - it will not find the float in the previous block's
list so will ignore the float and fail to clear it.
RenderBlock:collapseMargins() needs to check if a child's collapsing margin has
reduced the height of the parent up past the bottom of its previous sibling's lowest float
and add the now overhanging float to the parent's float list if appropriate.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::collapseMargins):
2012-05-24 Kinuko Yasuda <kinuko@chromium.org>
Cleanup: introduce toFile() to reduce static cast from Blob to File
https://bugs.webkit.org/show_bug.cgi?id=87234
Reviewed by Eric Seidel.
No new tests as this must have no side effect.
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::toV8):
* fileapi/Blob.cpp:
(WebCore::Blob::webkitSlice):
* fileapi/Blob.h:
(Blob):
* fileapi/File.h:
(WebCore::toFile): Added.
(WebCore):
* fileapi/FileReader.cpp:
(WebCore::FileReader::readAsArrayBuffer):
(WebCore::FileReader::readAsBinaryString):
(WebCore::FileReader::readAsText):
(WebCore::FileReader::readAsDataURL):
* fileapi/WebKitBlobBuilder.cpp:
(WebCore::WebKitBlobBuilder::append):
* platform/chromium/ClipboardChromium.cpp:
(WebCore::ClipboardChromium::files):
* platform/network/FormData.cpp:
(WebCore::FormData::appendKeyValuePairItems):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send):
2012-05-24 Darin Adler <darin@apple.com>
SVGElement::addEventListener has peculiar RefPtr usage
https://bugs.webkit.org/show_bug.cgi?id=86497
Reviewed by Andy Estes.
* svg/SVGElement.cpp:
(WebCore::SVGElement::addEventListener): Switch to a more-standard style of RefPtr usage,
getting rid of some unneeded reference count churn; also removed an unneeded special case
for zero listeners.
2012-05-24 Raphael Kubo da Costa <rakuco@webkit.org>
[EFL] Modify keycode conversion functions to return keycodes with location information after r118001.
https://bugs.webkit.org/show_bug.cgi?id=87203
Reviewed by Andreas Kling.
Add the required changes to make
fast/events/keydown-leftright-keys.html pass after r118001.
* platform/efl/EflKeyboardUtilities.cpp:
(WebCore::createWindowsKeyMap): Translate the keycodes for
"{left,right}{Shift,Alt,Control}" into the right windows keyboard
definitions.
2012-05-24 Claudio Saavedra <csaavedra@igalia.com>
[Gtk] Wrong cursor used for ne-resize
https://bugs.webkit.org/show_bug.cgi?id=87366
Reviewed by Eric Seidel.
* platform/gtk/CursorGtk.cpp:
(WebCore::Cursor::ensurePlatformCursor): Use GDK_TOP_RIGHT_CORNER
for Cursor::NorthEastPanning.
2012-05-24 Gabor Ballabas <gaborb@inf.u-szeged.hu>
[Qt] Fix Webkit1 + V8 build.
https://bugs.webkit.org/show_bug.cgi?id=87368
Reviewed by Eric Seidel.
No new tests, because this is a buildfix.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateImplementation):
* bindings/v8/npruntime_impl.h:
* bindings/v8/npruntime_priv.h:
2012-05-24 Dana Jansens <danakj@chromium.org>
[chromium] Only display frames created with memory allocations meant to be displayed
https://bugs.webkit.org/show_bug.cgi?id=85108
Reviewed by Adrienne Walker.
In this patch we remove the setVisible() code paths from CCProxy, and
instead commit visiblity state along with a frame. We also commit a
flag with a frame that indicates if the frame is one that can be drawn.
The impl host is set to visible during commit instead of using a
special channel through the proxy, and the scheduler allows
commits when we are waiting to draw our first frame but blocked on
being non-visible.
canDraw is gated on a new flag that indicates if the frame is one meant
for display. A frame is meant for display if the frame was generated
with a memory allocation meant for display. At this time, any non-zero
memory allocation is considered meant for display.
We prevent races by not changing the memory allocation at any time
except during a commit. So we force a commit when the memory
allocation needs to be adjusted and we are not visible. Similarly,
we force a commit when visibility changes so that we are able to
commit the visibility change to the impl tree.
In order to prevent drawing frames that are not meant for display
with a single thread, we prevent compositing when the impl tree
is not visible, with an early out in CCSingleThreadProxy.
Unit tests: CCLayerTreeHostTestVisibilityAndAllocationControlDrawing
* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/TiledLayerChromium.cpp:
* platform/graphics/chromium/TiledLayerChromium.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::CCLayerTreeHost):
(WebCore::CCLayerTreeHost::initializeLayerRenderer):
(WebCore::CCLayerTreeHost::finishCommitOnImplThread):
(WebCore::CCLayerTreeHost::setNeedsCommit):
(WebCore):
(WebCore::CCLayerTreeHost::setNeedsForcedCommit):
(WebCore::CCLayerTreeHost::setVisible):
(WebCore::CCLayerTreeHost::setContentsMemoryAllocationLimitBytes):
(WebCore::CCLayerTreeHost::scheduleComposite):
(WebCore::CCLayerTreeHost::updateLayers):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(CCLayerTreeHost):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
(WebCore::CCLayerTreeHostImpl::canDraw):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
(WebCore::CCLayerTreeHostImpl::sourceFrameCanBeDrawn):
(WebCore::CCLayerTreeHostImpl::setSourceFrameCanBeDrawn):
(CCLayerTreeHostImpl):
* platform/graphics/chromium/cc/CCProxy.h:
(CCProxy):
* platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
(WebCore::CCSchedulerStateMachine::drawSuspendedUntilCommit):
(WebCore::CCSchedulerStateMachine::scheduledToDraw):
(WebCore::CCSchedulerStateMachine::updateState):
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::doCommit):
(WebCore::CCSingleThreadProxy::setNeedsCommit):
(WebCore):
(WebCore::CCSingleThreadProxy::setNeedsForcedCommit):
(WebCore::CCSingleThreadProxy::doComposite):
* platform/graphics/chromium/cc/CCSingleThreadProxy.h:
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::CCThreadProxy):
(WebCore::CCThreadProxy::setNeedsForcedCommit):
(WebCore):
(WebCore::CCThreadProxy::setNeedsForcedCommitOnImplThread):
(WebCore::CCThreadProxy::forceBeginFrameOnImplThread):
(WebCore::CCThreadProxy::beginFrame):
(WebCore::CCThreadProxy::scheduledActionCommit):
* platform/graphics/chromium/cc/CCThreadProxy.h:
(CCThreadProxy):
2012-05-24 Pavel Feldman <pfeldman@chromium.org>
Web Inspector: [regression] search in formatted scripts is broken.
https://bugs.webkit.org/show_bug.cgi?id=87377
Reviewed by Vsevolod Vlasov.
Using formatted content in search.
Test: inspector/debugger/script-formatter-search.html
* inspector/front-end/JavaScriptSource.js:
(WebInspector.JavaScriptSource.prototype.workingCopyCommitted):
(WebInspector.JavaScriptSource.prototype.searchInContent.callbackWrapper):
(WebInspector.JavaScriptSource.prototype.searchInContent):
2012-05-24 Philip Rogers <pdr@google.com>
Refactor SVGAnimateTransformElement to avoid expensive determineAnimatedPropertyType call
https://bugs.webkit.org/show_bug.cgi?id=87309
Reviewed by Nikolas Zimmermann.
This is a simple refactor that matches the work done in
https://bugs.webkit.org/show_bug.cgi?id=87309 to avoid an expensive call.
No new tests, no actual effects beyond performance improvement.
* svg/SVGAnimateElement.h:
(SVGAnimateElement):
* svg/SVGAnimateTransformElement.cpp:
(WebCore::SVGAnimateTransformElement::hasValidAttributeType):
2012-05-24 Csaba Osztrogonác <ossy@webkit.org>
[Qt] Unreviewed trvial fixes.
* Target.pri: Typo fix after r118226.
* WebCore.pri: Warning fix after r117291.
2012-05-24 Antti Koivisto <antti@apple.com>
Move StyleRuleImport to a file of its own
https://bugs.webkit.org/show_bug.cgi?id=87386
Rubber-stamped by Andreas Kling.
Move StyleRuleImport out from CSSImportRule.cpp/.h
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSImportRule.cpp:
(WebCore):
(WebCore::CSSImportRule::href):
* css/CSSImportRule.h:
(WebCore):
(CSSImportRule):
* css/CSSParser.cpp:
* css/StyleRuleImport.cpp: Copied from Source/WebCore/css/CSSImportRule.cpp.
(WebCore):
* css/StyleRuleImport.h: Copied from Source/WebCore/css/CSSImportRule.h.
(WebCore):
* css/StyleSheetContents.cpp:
2012-05-24 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r118352.
http://trac.webkit.org/changeset/118352
https://bugs.webkit.org/show_bug.cgi?id=87390
Caused 6 editing/spelling tests crash/fail on chromium in
debug. (Requested by vsevik on #webkit).
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::drawLineForDocumentMarker):
2012-05-24 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Support hierarchical context menus
https://bugs.webkit.org/show_bug.cgi?id=86847
Reviewed by Pavel Feldman.
This patch makes use of the WebMenuItemInfo SubMenu type to expose the capability of building submenu items
in the Web Inspector's context menu. ContextMenuItems are also passed/stored by reference/value rather than pointer
in order to be consistent with the PlatformMenuDescription typedef.
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::populateContextMenuItems): Enable submenu item population.
(WebCore):
(WebCore::JSInspectorFrontendHost::showContextMenu): Extract the menu population part into populateContextMenuItems().
* bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
(WebCore::populateContextMenuItems): Enable submenu item population.
(WebCore):
(WebCore::V8InspectorFrontendHost::showContextMenuCallback): Extract the menu population part into populateContextMenuItems().
* inspector/InspectorFrontendHost.cpp:
(WebCore::FrontendMenuProvider::create): Use reference instead of pointer for ContextMenuItems.
(WebCore::FrontendMenuProvider::FrontendMenuProvider): Use reference instead of pointer for ContextMenuItems.
(WebCore::FrontendMenuProvider::populateContextMenu): Use reference instead of pointer for ContextMenuItems.
(WebCore::FrontendMenuProvider::contextMenuCleared):
(FrontendMenuProvider):
(WebCore::InspectorFrontendHost::showContextMenu): Use reference instead of pointer for ContextMenuItems.
* inspector/InspectorFrontendHost.h:
(InspectorFrontendHost):
* inspector/front-end/ContextMenu.js: Support the tree-like structure of context menus.
(WebInspector.ContextMenuItem):
(WebInspector.ContextMenuItem.prototype.id):
(WebInspector.ContextMenuItem.prototype.type):
(WebInspector.ContextMenuItem.prototype._buildDescriptor):
(WebInspector.ContextSubMenuItem):
(WebInspector.ContextSubMenuItem.prototype.appendItem):
(WebInspector.ContextSubMenuItem.prototype.appendSubMenuItem):
(WebInspector.ContextSubMenuItem.prototype.appendCheckboxItem):
(WebInspector.ContextSubMenuItem.prototype.appendSeparator):
(WebInspector.ContextSubMenuItem.prototype._buildDescriptor):
(WebInspector.ContextMenu):
(WebInspector.ContextMenu.prototype.nextId):
(WebInspector.ContextMenu.prototype.show):
(WebInspector.ContextMenu.prototype._setHandler):
(WebInspector.ContextMenu.prototype._buildDescriptor):
* inspector/front-end/SoftContextMenu.js:
(.WebInspector.SoftContextMenu): Support sub-menus.
(.WebInspector.SoftContextMenu.prototype.show):
(.WebInspector.SoftContextMenu.prototype._parentGlassPaneElement):
(.WebInspector.SoftContextMenu.prototype._createMenuItem):
(.WebInspector.SoftContextMenu.prototype._createSubMenu):
(.WebInspector.SoftContextMenu.prototype._createSeparator):
(.WebInspector.SoftContextMenu.prototype._menuItemMouseUp):
(.WebInspector.SoftContextMenu.prototype._focus):
(.WebInspector.SoftContextMenu.prototype._triggerAction):
(.WebInspector.SoftContextMenu.prototype._showSubMenu):
(.WebInspector.SoftContextMenu.prototype._buildMouseEventForSubMenu):
(.WebInspector.SoftContextMenu.prototype._hideSubMenu):
(.WebInspector.SoftContextMenu.prototype._menuItemMouseOut):
(.WebInspector.SoftContextMenu.prototype._highlightMenuItem):
(.WebInspector.SoftContextMenu.prototype._menuKeyDown):
(.WebInspector.SoftContextMenu.prototype._glassPaneMouseUp):
(.WebInspector.SoftContextMenu.prototype._discardMenu):
(.WebInspector.SoftContextMenu.prototype._discardSubMenus):
* inspector/front-end/inspector.css: Support for sub-menus, separator improvement.
(.soft-context-menu-separator):
(.soft-context-menu-separator > .separator-line):
(.soft-context-menu-item-submenu-arrow):
* platform/chromium/ContextMenuChromium.cpp:
(WebCore::contextMenuItemVector): Implemented.
(WebCore):
2012-05-24 Vivek Galatage <vivekgalatage@gmail.com>
Web Inspector: Breakpoints Pane should not show context menu with no breakpoints
https://bugs.webkit.org/show_bug.cgi?id=87340
Reviewed by Pavel Feldman.
Removed the method _contextMenu as this would be redundant call
because _breakpointContextMenu would take care of showing the remove
all breakpoints option.
* inspector/front-end/BreakpointsSidebarPane.js:
(WebInspector.JavaScriptBreakpointsSidebarPane):
(WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu):
2012-05-24 Yury Semikhatsky <yurys@chromium.org>
Unreviewed. Chromium Mac build fix after r118357.
Use full name specifier instead of "using" directive.
* inspector/InspectorMemoryAgent.cpp:
(WebCore::jsHeapInfo):
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2012-05-24 Pavel Feldman <pfeldman@chromium.org>
Web Inspector: introduce virtual resource for inspector stylesheet.
https://bugs.webkit.org/show_bug.cgi?id=87357
Reviewed by Vsevolod Vlasov.
This change introduces virtual resource that represents inspector stylesheet (that is added for styles added via inspector).
New resource has url of form "inspector://<page url folder>/inspector-stylesheet. It enables live editing and revision
history of the inspector stylesheet.
Test: inspector/styles/edit-inspector-stylesheet.html
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::asInspectorStyleSheet):
(WebCore::InspectorCSSAgent::bindStyleSheet):
(WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
(WebCore::InspectorCSSAgent::detectOrigin):
* inspector/InspectorCSSAgent.h:
(InspectorCSSAgent):
* inspector/InspectorDOMAgent.h:
(InspectorDOMAgent):
(WebCore::InspectorDOMAgent::pageAgent):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::create):
(WebCore::InspectorStyleSheet::InspectorStyleSheet):
(WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::InspectorStyleSheet::resourceStyleSheetText):
(WebCore::InspectorStyleSheetForInlineStyle::create):
(WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
* inspector/InspectorStyleSheet.h:
(WebCore):
(InspectorStyleSheet):
(WebCore::InspectorStyleSheet::canBind):
(InspectorStyleSheetForInlineStyle):
* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSStyleModel):
(WebInspector.CSSStyleModel.prototype._undoRedoCompleted):
(WebInspector.CSSStyleModel.prototype.getViaInspectorResourceForRule):
(WebInspector.CSSStyleModelResourceBinding):
(WebInspector.CSSStyleModelResourceBinding.prototype.setContent):
(WebInspector.CSSStyleModelResourceBinding.prototype._inspectedURLChanged):
(WebInspector.CSSStyleModelResourceBinding.prototype._loadStyleSheetHeaders):
(WebInspector.CSSStyleModelResourceBinding.prototype._innerStyleSheetChanged):
(WebInspector.CSSStyleModelResourceBinding.prototype._getViaInspectorResource.hadersLoaded):
(WebInspector.CSSStyleModelResourceBinding.prototype._getViaInspectorResource):
(WebInspector.CSSStyleModelResourceBinding.prototype._viaInspectorResource.overrideRequestContent.callbackWrapper):
(WebInspector.CSSStyleModelResourceBinding.prototype._viaInspectorResource.overrideRequestContent):
(WebInspector.CSSStyleModelResourceBinding.prototype._viaInspectorResource):
(WebInspector.CSSStyleModelResourceBinding.prototype._viaInspectorResourceURL):
* inspector/front-end/Resource.js:
(WebInspector.Resource):
(WebInspector.Resource.prototype.isHidden):
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.ResourceTreeModel.prototype._onRequestUpdateDropped):
(WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
(WebInspector.ResourceTreeFrame.prototype._navigate):
(WebInspector.ResourceTreeFrame.prototype.addResource):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.FrameTreeElement.prototype.appendResource):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._createSourceFrame):
* inspector/front-end/StylesPanel.js:
(WebInspector.InspectorStyleSource):
* inspector/front-end/StylesSidebarPane.js:
(WebInspector.StylePropertiesSection.prototype._createRuleOriginNode.callback):
(WebInspector.StylePropertiesSection.prototype._createRuleOriginNode):
(WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted.successCallback):
(WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted):
2012-05-24 Robin Cao <robin.cao@torchmobile.com.cn>
[BlackBerry] Possible deadlock in the WebGL code path
https://bugs.webkit.org/show_bug.cgi?id=87375
Reviewed by Rob Buis.
Fix a deadlock happening in the WebGL code path. The mutex is locked
but is not unlocked afterword. Also fix a possible double delete,
the mutex m_frontBufferLock will be destroyed in the base class.
Covered by tests in fast/canvas/webgl.
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::releaseTextureResources):
* platform/graphics/blackberry/WebGLLayerWebKitThread.cpp:
(WebCore::WebGLLayerWebKitThread::~WebGLLayerWebKitThread):
2012-05-24 Ian Vollick <vollick@chromium.org>
[chromium] Forcibly sync running animations in the waiting state when synchronized start times are needed.
https://bugs.webkit.org/show_bug.cgi?id=87153
Reviewed by James Robinson.
Unit test: CCLayerAnimationControllerTest.ForceSyncWhenSynchronizedStartTimeNeeded
* platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
(WebCore::CCLayerAnimationController::replaceImplThreadAnimations):
2012-05-24 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: convert HeapSnapshotGridNode._provider into getter.
https://bugs.webkit.org/show_bug.cgi?id=87382
I found that we create a provider for child nodes for the each DataGrid node in advance.
It cost us one async call to the HeapSnapshot's worker per each such the node.
I converted the property into the getter which is initializing the provider lazily.
Reviewed by Yury Semikhatsky.
* inspector/front-end/HeapSnapshot.js:
* inspector/front-end/HeapSnapshotGridNodes.js:
(WebInspector.HeapSnapshotGridNode):
(WebInspector.HeapSnapshotGridNode.prototype.createProvider):
(WebInspector.HeapSnapshotGridNode.prototype._provider):
(WebInspector.HeapSnapshotGridNode.prototype.dispose):
(WebInspector.HeapSnapshotGridNode.prototype._populate):
(WebInspector.HeapSnapshotGridNode.prototype.expandWithoutPopulate):
(WebInspector.HeapSnapshotGridNode.prototype._populateChildren.serializeNextChunk):
(WebInspector.HeapSnapshotGridNode.prototype.sort):
(WebInspector.HeapSnapshotGenericObjectNode):
(WebInspector.HeapSnapshotGenericObjectNode.prototype.updateHasChildren):
(WebInspector.HeapSnapshotObjectNode):
(WebInspector.HeapSnapshotInstanceNode):
(WebInspector.HeapSnapshotConstructorNode):
(WebInspector.HeapSnapshotConstructorNode.prototype.createProvider):
(WebInspector.HeapSnapshotConstructorNode.prototype.revealNodeBySnapshotObjectId):
(WebInspector.HeapSnapshotDiffNode):
(WebInspector.HeapSnapshotDiffNode.prototype.createProvider):
(WebInspector.HeapSnapshotDominatorObjectNode):
(WebInspector.HeapSnapshotDominatorObjectNode.prototype.createProvider):
(WebInspector.HeapSnapshotDominatorObjectNode.prototype.retrieveChildBySnapshotObjectId):
2012-05-24 Rakesh KN <rakesh.kn@motorola.com>
Filter for RadioNodeList should be case sensitive.
https://bugs.webkit.org/show_bug.cgi?id=87369
Reviewed by Kent Tamura.
Element's id/name attribute matching criteria is case sensitive now.
Modified existing test.
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::nodeMatches):
Element matching criteria is case sensitive.
2012-05-23 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: add a command to InspectorMemoryAgent for getting process memory break down
https://bugs.webkit.org/show_bug.cgi?id=87263
Reviewed by Pavel Feldman.
Introduced new protocol command Memory.getProcessMemoryDistribution which returns
memory distribution for the inspected process. Currently only JS allocated and used
heap size is included.
* inspector/Inspector.json:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::jsHeapInfo):
(WebCore):
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
* inspector/InspectorMemoryAgent.h:
(InspectorMemoryAgent):
* platform/chromium/PlatformSupport.h:
(PlatformSupport):
2012-05-24 Nikolas Zimmermann <nzimmermann@rim.com>
SVGZoomAndPan constants are missing from window object
https://bugs.webkit.org/show_bug.cgi?id=15494
Reviewed by Rob Buis.
Generate the SVGZoomAndPanConstructor, so that the constants defined in the IDL
can be reached from the bindings. Provide a stub-implementation of ref/deref
that's never used, as we don't actually use JSSVGZoomAndPan which needs this, but
only the JSSVGZoomAndPanConstructor.
Add a new IDL flag "SuppressToJSObject" which disables generation of toJS/toV8
methods for classes that are only used in SVGs interfaces via multiple inheritance.
This affects: SVGFitToViewBox, SVGTests, SVGLangSapce, SVGExternalResourcesRequired, etc.
Unlike those classes SVGZoomAndPan defines constants, and thus needs a generated Constructor.
That requires us to build JSSVGZoomAndPan.* (JSSVGFitToViewBox/etc. is generated, but not built!).
Unfortunately this causes compilation problems on Windows, as it builds all sources in a single-file.
MSVC can't decide whether it should call toJS(Node*) or toJS(SVGZoomAndPan*) for a SVGSVGElement.
To avoid these problems stop generating toJS/toV8 completely for all SVG MI types. They were
never used before, so there's no point in actually generating them, as it's now causing problems.
This is a preparation towards bug 15495, which covers implementing
SVGSVGElement.currentView and the SVGViewSpec interface.
No new tests. The SVGZoomAndPan constructor is covered by existing tests, now that its enabled.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.pri:
* GNUmakefile.list.am:
* WebCore.gyp/WebCore.gyp:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(ShouldGenerateToJSDeclaration):
(ShouldGenerateToJSImplementation):
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
* bindings/scripts/IDLAttributes.txt:
* gyp/WebCore.gyp:
* page/DOMWindow.idl:
* svg/SVGDocument.cpp:
(WebCore::SVGDocument::zoomAndPanEnabled):
* svg/SVGExternalResourcesRequired.idl:
* svg/SVGFitToViewBox.idl:
* svg/SVGLangSpace.idl:
* svg/SVGLocatable.idl:
* svg/SVGRenderingIntent.idl:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::SVGSVGElement):
(WebCore::SVGSVGElement::parseAttribute):
(WebCore::SVGSVGElement::viewBoxToViewTransform):
(WebCore::SVGSVGElement::setupInitialView):
(WebCore::SVGSVGElement::inheritViewAttributes):
* svg/SVGSVGElement.h:
(SVGSVGElement):
(WebCore::SVGSVGElement::useCurrentView):
(WebCore::SVGSVGElement::setUseCurrentView):
(WebCore::SVGSVGElement::zoomAndPan):
(WebCore::SVGSVGElement::setZoomAndPan):
* svg/SVGStylable.idl:
* svg/SVGTests.idl:
* svg/SVGURIReference.idl:
* svg/SVGUnitTypes.idl:
* svg/SVGViewElement.cpp:
(WebCore::SVGViewElement::SVGViewElement):
(WebCore::SVGViewElement::parseAttribute):
* svg/SVGViewElement.h:
(SVGViewElement):
(WebCore::SVGViewElement::zoomAndPan):
(WebCore::SVGViewElement::setZoomAndPan):
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::SVGViewSpec):
(WebCore::SVGViewSpec::setTransformString):
(WebCore::SVGViewSpec::parseViewSpec):
* svg/SVGViewSpec.h:
(SVGViewSpec):
(WebCore::SVGViewSpec::transformBaseValue):
(WebCore::SVGViewSpec::zoomAndPan):
(WebCore::SVGViewSpec::setZoomAndPanBaseValue):
* svg/SVGZoomAndPan.cpp:
(WebCore::SVGZoomAndPan::isKnownAttribute):
(WebCore::SVGZoomAndPan::addSupportedAttributes):
(WebCore):
(WebCore::SVGZoomAndPan::parseZoomAndPan):
(WebCore::SVGZoomAndPan::ref):
(WebCore::SVGZoomAndPan::deref):
(WebCore::SVGZoomAndPan::setZoomAndPan):
* svg/SVGZoomAndPan.h:
(SVGZoomAndPan):
(WebCore::SVGZoomAndPan::parseFromNumber):
(WebCore::SVGZoomAndPan::parseAttribute):
(WebCore::SVGZoomAndPan::zoomAndPan):
* svg/SVGZoomAndPan.idl:
2012-05-24 Hironori Bono <hbono@chromium.org>
Enable grammar checking on Chromium when we paste text.
https://bugs.webkit.org/show_bug.cgi?id=74393
Reviewed by Hajime Morita.
This change enables grammar checking on Chromium and implements a mock grammar
checker to fix a failing test.
Test: editing/spelling/grammar-markers.html
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::drawLineForDocumentMarker): render grammar markers in gray on Windows and Linux or in green on Mac.
2012-05-17 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: add inspector instrumentation interface for compositing
https://bugs.webkit.org/show_bug.cgi?id=83842
Reviewed by Pavel Feldman.
- added instrumentation methods to mark start/end of layer compositing;
- added associated timeline record type (CompositeLayers);
- plumbed the calls from instrumentation up to the timeline panel;
- actual call-sites are platform-specific and will come as separate patches.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willCompositeImpl):
(WebCore):
(WebCore::InspectorInstrumentation::didCompositeImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::willComposite):
(WebCore):
(WebCore::InspectorInstrumentation::didComposite):
* inspector/InspectorTimelineAgent.cpp:
(TimelineRecordType):
(WebCore::InspectorTimelineAgent::willComposite):
(WebCore):
(WebCore::InspectorTimelineAgent::didComposite):
* inspector/InspectorTimelineAgent.h:
(InspectorTimelineAgent):
* inspector/front-end/TimelineModel.js:
* inspector/front-end/TimelinePresentationModel.js:
(WebInspector.TimelinePresentationModel.recordStyle):
2012-05-24 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed Web Inspector: remove obsolete isDetailedSnapshot method from HeapSnapshotView.
* inspector/front-end/HeapSnapshotView.js:
2012-05-24 Vivek Galatage <vivekgalatage@gmail.com>
Web Inspector: localStorage items are not updated when the storage changes
https://bugs.webkit.org/show_bug.cgi?id=83012
Reviewed by Pavel Feldman.
Renamed the inspector protocol UpdateDOMStorage to domStorageUpdated.
Instrumented StorageEventDispatcher to send the update event to the
front-end. Also removed the way DOM Storage Agent used to listen for
the storage events. Added new test to verify the update notifications.
Test: inspector/storage-panel-dom-storage-update.html
* dom/EventListener.h:
* inspector/Inspector.json:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore):
(WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
(WebCore::InspectorDOMStorageAgent::storageId):
(WebCore::InspectorDOMStorageAgent::didUseDOMStorage):
(WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
* inspector/InspectorDOMStorageAgent.h:
(InspectorDOMStorageAgent):
* inspector/InspectorDOMStorageResource.cpp:
(WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
(WebCore::InspectorDOMStorageResource::isSameHostAndType):
(WebCore::InspectorDOMStorageResource::unbind):
* inspector/InspectorDOMStorageResource.h:
(WebCore):
(InspectorDOMStorageResource):
(WebCore::InspectorDOMStorageResource::create):
(WebCore::InspectorDOMStorageResource::id):
(WebCore::InspectorDOMStorageResource::storageArea):
(WebCore::InspectorDOMStorageResource::frame):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didDispatchDOMStorageEventImpl):
(WebCore):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::didUseDOMStorage):
(WebCore):
(WebCore::InspectorInstrumentation::didDispatchDOMStorageEvent):
* inspector/front-end/DOMStorage.js:
(WebInspector.DOMStorageDispatcher.prototype.domStorageUpdated):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.domStorageUpdated):
* storage/StorageEventDispatcher.cpp:
(WebCore::StorageEventDispatcher::dispatch):
2012-05-23 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: introduce console proxy object for HeapSnapshot worker.
https://bugs.webkit.org/show_bug.cgi?id=87346
There is no console object in html5 workers at the moment.
This makes me sad when I'm troubleshooting the HeapSnapshot stuff.
I wrote a simplest proxy object which sends the log, info and error messages
to the WebInspector window.
Reviewed by Pavel Feldman.
* inspector/front-end/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotRealWorker.prototype._messageReceived):
* inspector/front-end/HeapSnapshotWorker.js:
(WebInspector.WorkerConsole):
(WebInspector.WorkerConsole.prototype.log):
(WebInspector.WorkerConsole.prototype.error):
(WebInspector.WorkerConsole.prototype.info):
(WebInspector.WorkerConsole.prototype._postMessage):
2012-05-24 Shinya Kawanaka <shinyak@chromium.org>
Elements in Shadow DOM are not resizable.
https://bugs.webkit.org/show_bug.cgi?id=87342
Reviewed by Ryosuke Niwa.
In RenderLayer::resize(), shadowAncestorNode() was used but if the ancestor node is used,
it is not possible to resize elements in Shadow DOM.
The comments said it is necessary for textarea, however actually it is not necessary now.
Existing test (fast/css/resize-corner-tracking) covers it.
Test: fast/dom/shadow/resize-in-shadow-dom.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::resize):
2012-05-24 Antti Koivisto <antti@apple.com>
Move StyleSheetContents to a separate file
https://bugs.webkit.org/show_bug.cgi?id=87354
Reviewed by Eric Seidel.
Move StyleSheetContents class to StyleSheetContents.h/cpp.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontFaceSrcValue.cpp:
* css/CSSGrammar.y:
* css/CSSImportRule.cpp:
* css/CSSParser.cpp:
* css/CSSPrimitiveValue.cpp:
* css/CSSRule.cpp:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::create):
(WebCore::CSSStyleSheet::href):
(WebCore):
(WebCore::CSSStyleSheet::baseURL):
(WebCore::CSSStyleSheet::isLoading):
* css/CSSStyleSheet.h:
(WebCore):
(CSSStyleSheet):
* css/StylePropertySet.cpp:
* css/StyleResolver.cpp:
* css/StyleSheetContents.cpp: Copied from css/CSSStyleSheet.cpp.
(WebCore):
* css/StyleSheetContents.h: Copied from css/CSSStyleSheet.h.
(WebCore):
* dom/DOMImplementation.cpp:
(WebCore::XMLMIMETypeRegExp::XMLMIMETypeRegExp):
* dom/Document.cpp:
* dom/ProcessingInstruction.cpp:
* dom/StyleElement.cpp:
* html/HTMLLinkElement.cpp:
* html/HTMLStyleElement.cpp:
* inspector/InspectorStyleSheet.cpp:
* loader/cache/CachedCSSStyleSheet.cpp:
* page/PageSerializer.cpp:
2012-05-24 Kristóf Kosztyó <kkristof@inf.u-szeged.hu>
[Qt] Buildfix for the minimal build because the r118197 broke it.
https://bugs.webkit.org/show_bug.cgi?id=87096
Reviewed by Csaba Osztrogonác.
* plugins/PluginData.cpp:
(WebCore):
(WebCore::PluginData::refresh):
(WebCore::PluginData::initPlugins):
2012-05-23 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed: Web Inspector single line fix for r118162.
* inspector/front-end/HeapSnapshotDataGrids.js:
(WebInspector.HeapSnapshotConstructorsDataGrid.prototype._populateChildren):
2012-05-23 Lu Guanqun <guanqun.lu@intel.com>
sort the array 'non_wrapper_types'
https://bugs.webkit.org/show_bug.cgi?id=87335
Reviewed by Kentaro Hara.
* bindings/scripts/CodeGeneratorV8.pm:
2012-05-23 Shinya Kawanaka <shinyak@chromium.org>
Document.elementFromPoint exposes inner element of Shadow DOM.
https://bugs.webkit.org/show_bug.cgi?id=87235
Reviewed by Dimitri Glazkov.
Document::elementFromPoint didn't consider nested Shadow DOM.
The container node should be adjusted up to document TreeScope beyond ShadowRoot TreeScope.
Test: fast/dom/shadow/element-from-point-in-nested-shadow.html
* dom/Document.cpp:
(WebCore::Document::elementFromPoint):
2012-05-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r118297.
http://trac.webkit.org/changeset/118297
https://bugs.webkit.org/show_bug.cgi?id=87338
It caused several layout failures on Mac (Requested by
sundiamonde on #webkit).
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2012-05-23 Shinya Kawanaka <shinyak@chromium.org>
Document.caretRangeFromPoint exposes inner elemnet of Shadow DOM.
https://bugs.webkit.org/show_bug.cgi?id=87231
Reviewed by Dimitri Glazkov.
Document::caretRangeFromPoint didn't consider nested Shadow DOM.
The container node should be adjusted up to document TreeScope beyond ShadowRoot TreeScope.
Test: fast/dom/shadow/caret-range-from-point-in-nested-shadow.html
* dom/Document.cpp:
(WebCore::Document::caretRangeFromPoint):
2012-05-23 Julien Chaffraix <jchaffraix@webkit.org>
Crash in RenderTableCol::nextColumn
https://bugs.webkit.org/show_bug.cgi?id=87314
Reviewed by Abhishek Arya.
Tests: fast/table/canvas-column-in-column-group.html
fast/table/columngroup-inside-columngroup.html
The issue comes from elements not abiding by the display property (e.g. canvas). This means
that any renderer with display: table-column would pass the current isChildAllowed check and
would confuse our algorithm to iterate.
We were getting away with allowing those children as table columns or column groups don't
paint themselves but it's better to just not allow such children in the first place.
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::isChildAllowed):
Fixed the logic to only accept proper column renderer (RenderTableCol with display: column
to ignore column-groups). Also removed an unneeded NULL-check.
2012-05-23 Jer Noble <jer.noble@apple.com>
REGRESSION: compositing/video/video-poster.html fails on Mac
https://bugs.webkit.org/show_bug.cgi?id=87199
Reviewed by Maciej Stachowiak.
No new tests; fixes failing compositing/video/video-poster.html test.
Instead of creating the video layer directly, simply allow the layer
to be created in updateStates() by changing the definition of
isReadyForVideoSetup() to bypass the m_isAllowedToRender check if
the player reports a video track is present. This causes the video layer
to be created and for future calls to prepareForRendering() to result
in calls to mediaPlayerRenderingModeChanged().
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::isReadyForVideoSetup):
(WebCore::MediaPlayerPrivateAVFoundation::metadataLoaded):
2012-05-23 Nico Weber <thakis@chromium.org>
[chromium/mac] Unbreak popup menus.
https://bugs.webkit.org/show_bug.cgi?id=87325
Reviewed by David Levin.
http://svn.webkit.org/repository/webkit/trunk@117607 added this function, but the
Chromium/Mac build doesn't use the file added in that change and hence didn't have
the category method.. Adding it doesn't help, as the category calls a
10.7-only function. Just don't use the category for chromium/mac. Fixes
http://crbug.com/129418
* platform/mac/WebCoreNSCellExtras.h:
2012-05-23 Ojan Vafai <ojan@chromium.org>
add back the ability to disable flexbox
https://bugs.webkit.org/show_bug.cgi?id=87147
Reviewed by Tony Chang.
* Configurations/FeatureDefines.xcconfig:
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
2012-05-23 Shinya Kawanaka <shinyak@chromium.org>
[Shadow] mousewheel event isn't fired on nodes in Shadow DOM.
https://bugs.webkit.org/show_bug.cgi?id=87218
Reviewed by Dimitri Glazkov.
EventHander::handleWheelEvent re-targets an event to a shadow ancestor node,
however it should be done by adjusting event target. So we don't need to have it.
Tests: fast/dom/shadow/wheel-event-in-shadow-dom.html
fast/dom/shadow/wheel-event-on-input-in-shadow-dom.html
* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent):
2012-05-23 Huang Dongsung <luxtella@company100.net>
Remove an unused setter in CachedResource.h.
https://bugs.webkit.org/show_bug.cgi?id=87324
CachedResource::setInLiveDecodedResourcesList was defined in r24925, but it has
been unused.
Reviewed by Darin Adler.
* loader/cache/CachedResource.h:
2012-05-23 Hayato Ito <hayato@chromium.org>
Adjust a target node of a mouse event correctly when a distributed text node is clicked.
https://bugs.webkit.org/show_bug.cgi?id=86999
Reviewed by Dimitri Glazkov.
Make EventHandler::updateMouseEventTargetNode() be aware of shadow dom subtree
so that an insertion point can receive an event when a distributed text node is clicked.
Tests: fast/dom/shadow/shadow-dom-event-dispatching.html
* page/EventHandler.cpp:
(WebCore::EventHandler::updateMouseEventTargetNode):
2012-05-23 Shinya Kawanaka <shinyak@chromium.org>
[Shadow] drop event is not fired on nodes in Shadow DOM
https://bugs.webkit.org/show_bug.cgi?id=85774
Reviewed by Dimitri Glazkov.
EventHander::updateDragAndDrop re-targets an event to a shadow ancestor node,
however it should be done by adjusting event target. So we don't need to have it.
Tests: fast/dom/shadow/drop-event-for-input-in-shadow.html
fast/dom/shadow/drop-event-in-shadow.html
* page/EventHandler.cpp:
(WebCore::EventHandler::updateDragAndDrop):
2012-05-23 Emil A Eklund <eae@chromium.org>
REGRESSION (115573): Incorrect rounding of margins for floats
https://bugs.webkit.org/show_bug.cgi?id=87319
Reviewed by Eric Seidel.
In RenderBlock::computeInlinePreferredLogicalWidths we used a float to
accumulate margins for floating children while the children themselves
represent their margins as LayoutUnits. Due to lack of rounding this can
cause the block to be too small at certain certain zoom levels, causing
unwanted wrapping.
This patch changes computeInlinePreferredLogicalWidths to use a
LayoutUnit to accumulate the margins and thus ensures that the margin
values are rounded the same way.
Test: fast/block/float/floats-with-margin-should-not-wrap.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2012-05-23 Huang Dongsung <luxtella@company100.net>
Remove unused declarations in MemoryCache.h
https://bugs.webkit.org/show_bug.cgi?id=87323
It is originated from r75912.
Reviewed by Darin Adler.
* loader/cache/MemoryCache.h:
2012-05-23 Eric Seidel <eric@webkit.org>
Add seamless layout code (and pass most of the remaining seamless tests)
https://bugs.webkit.org/show_bug.cgi?id=86608
Reviewed by Ojan Vafai.
This patch contains almost all the layout changes needed for seamless iframes.
I removed the scroll-bar avoiding code at the last moment, as it didn't
work for platforms other than mac-lion. I'll add that, as well as the
HTMLIFrameElement.seamless idl attribute in a follow-up patch.
Seamless iframes piggy-back a bit on the existing frame-flattening
logic, however seamless is different from frame-flattening in a few ways:
- Frame flattening can only ever make an iframe larger (seamless just behaves like a normal div).
- Frame flattening disables scrollbars (seamless frames behave like normal overflow: auto divs).
- Seamless only has to work with iframes (flattening works with frame/frameset as well).
- Seamless support shrink-wrap size negotiation when the iframe is inline.
Test: fast/frames/seamless/seamless-percent-height.html
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): map inline -> inline-block for seamless iframes.
* dom/Document.cpp:
(WebCore::Document::scheduleStyleRecalc):
- Seamless iframes don't manage their own style recalc.
(WebCore::Document::recalcStyle):
- We should make sure our parent is resolved before we are, but currently that causes some tests to crash
I don't have a test to demonstrate this need yet, as presumably it's fulfilled through other codepaths atm.
* page/FrameView.cpp:
(WebCore::FrameView::scheduleRelayout): Do the cheaper check first.
(WebCore::FrameView::isInChildFrameWithFrameFlattening): Make frameview layout abort child layouts like how frame flattening does.
* rendering/RenderBox.h:
(WebCore::RenderBox::stretchesToViewport): Disable the stretch-to-viewport quirk for seamless iframes (it makes no sense and breaks the layout code).
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::computeLogicalHeight):
- This function is needed for the child document to participate in the normal block shrink-wrap algorithm.
Thankfully all the shrink-wrap logic is in RenderBox instead of RenderBlock. In the future we may make
RenderIframe a RenderBlock for the seamless case. We may just split RenderIframe into two renderers.
(WebCore::RenderIFrame::computeLogicalWidth):
(WebCore::RenderIFrame::shouldComputeSizeAsReplaced):
- seamless iframes behave like blocks, not inline replaced elements.
(WebCore):
(WebCore::RenderIFrame::isInlineBlockOrInlineTable):
- Behave like an inline-block when marked inline.
(WebCore::RenderIFrame::minPreferredLogicalWidth):
- When asked for our pref widths, return those of our child document.
(WebCore::RenderIFrame::maxPreferredLogicalWidth):
(WebCore::RenderIFrame::isSeamless): helper function
(WebCore::RenderIFrame::contentRootRenderer): helper function
(WebCore::RenderIFrame::flattenFrame): seamless iframes never use the frame-flattening feature.
(WebCore::RenderIFrame::layoutSeamlessly): The guts of seamless layout.
(WebCore::RenderIFrame::layout):
* rendering/RenderIFrame.h:
(WebCore):
(RenderIFrame):
2012-05-23 Rafael Brandao <rafael.lobo@openbossa.org>
[Qt] GraphicsContext should avoid converting rotation angle to degrees
https://bugs.webkit.org/show_bug.cgi?id=87317
Reviewed by Noam Rosenthal.
The angle for rotate is already in radians, so we should take advantage of it
by using QTransform::rotateRadians, rather than converting it back internally.
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::rotate):
2012-05-23 David Tseng <dtseng@google.com>
AX: Prevents assertion from potentially dereferencing null pointer.
https://bugs.webkit.org/show_bug.cgi?id=87290
Reviewed by Chris Fleizach.
Changes to assertions. Coverage by existing tests.
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::cellForColumnAndRow):
2012-05-23 Tony Chang <tony@chromium.org>
auto margins on flexbox should allocate space in the cross direction
https://bugs.webkit.org/show_bug.cgi?id=86913
Reviewed by Ojan Vafai.
Test: css3/flexbox/auto-margins.html
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::hasAutoMarginsInCrossAxis):
(WebCore):
(WebCore::RenderFlexibleBox::updateAutoMarginsInCrossAxis):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren): If we have flex-align: baseline and auto margins, we ignore flex-align: baseline.
(WebCore::RenderFlexibleBox::alignChildren): auto margins apply before flex-align.
* rendering/RenderFlexibleBox.h:
2012-05-23 Kentaro Hara <haraken@chromium.org>
Unreviewed, rolling out r118120.
http://trac.webkit.org/changeset/118120
https://bugs.webkit.org/show_bug.cgi?id=87193
some LayoutTests crash since the patch passes a NULL to
Null(isolate)
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
* bindings/scripts/test/V8/V8TestActiveDOMObject.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventConstructor.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventTarget.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestException.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestInterface.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNamedConstructor.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNode.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestObj.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
(WebCore::toV8):
2012-05-23 Kentaro Hara <haraken@chromium.org>
Unreviewed, rolling out r118129.
http://trac.webkit.org/changeset/118129
https://bugs.webkit.org/show_bug.cgi?id=87202
some LayoutTests crash since the patch passes a NULL to
Null(isolate)
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
(GenerateFunctionCallback):
(NativeToJSValue):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::contentDocumentAttrGetter):
(WebCore::TestObjV8Internal::getSVGDocumentCallback):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetter):
(WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetter):
(WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter):
(WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter):
2012-05-23 Kentaro Hara <haraken@chromium.org>
Unreviewed, rolling out r118133.
http://trac.webkit.org/changeset/118133
https://bugs.webkit.org/show_bug.cgi?id=87207
some LayoutTests crash since the patch passes a NULL to
Null(isolate)
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CSSRuleCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CSSStyleSheetCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CSSValueCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ClipboardCustom.cpp:
(WebCore::V8Clipboard::typesAccessorGetter):
* bindings/v8/custom/V8CoordinatesCustom.cpp:
(WebCore::V8Coordinates::altitudeAccessorGetter):
(WebCore::V8Coordinates::altitudeAccuracyAccessorGetter):
(WebCore::V8Coordinates::headingAccessorGetter):
(WebCore::V8Coordinates::speedAccessorGetter):
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DOMTokenListCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DataViewCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
(WebCore::V8DeviceMotionEvent::accelerationAccessorGetter):
(WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAccessorGetter):
(WebCore::V8DeviceMotionEvent::rotationRateAccessorGetter):
(WebCore::V8DeviceMotionEvent::intervalAccessorGetter):
* bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
(WebCore::V8DeviceOrientationEvent::alphaAccessorGetter):
(WebCore::V8DeviceOrientationEvent::betaAccessorGetter):
(WebCore::V8DeviceOrientationEvent::gammaAccessorGetter):
(WebCore::V8DeviceOrientationEvent::absoluteAccessorGetter):
* bindings/v8/custom/V8DocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DocumentLocationCustom.cpp:
(WebCore::V8Document::locationAccessorGetter):
* bindings/v8/custom/V8EntryCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8EntrySyncCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8EventCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Float32ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Float64ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
(WebCore::V8HTMLCanvasElement::getContextCallback):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::toV8):
2012-05-23 Kentaro Hara <haraken@chromium.org>
Unreviewed, rolling out r118134.
http://trac.webkit.org/changeset/118134
https://bugs.webkit.org/show_bug.cgi?id=87209
some LayoutTests crash since the patch passes a NULL to
Null(isolate)
* bindings/v8/custom/V8HTMLElementCustom.cpp:
(WebCore::toV8Object):
(WebCore::toV8):
* bindings/v8/custom/V8HistoryCustom.cpp:
(WebCore::V8History::stateAccessorGetter):
* bindings/v8/custom/V8IDBAnyCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8IDBKeyCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ImageDataCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Int16ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Int32ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Int8ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8LocationCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8MessageEventCustom.cpp:
(WebCore::V8MessageEvent::dataAccessorGetter):
* bindings/v8/custom/V8NamedNodeMapCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8NodeCustom.cpp:
(WebCore::V8Node::insertBeforeCallback):
(WebCore::V8Node::replaceChildCallback):
(WebCore::V8Node::removeChildCallback):
(WebCore::V8Node::appendChildCallback):
(WebCore::toV8Slow):
* bindings/v8/custom/V8PopStateEventCustom.cpp:
(WebCore::V8PopStateEvent::stateAccessorGetter):
* bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
(WebCore::V8SQLResultSetRowList::itemCallback):
* bindings/v8/custom/V8SVGDocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8SVGElementCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8SVGPathSegCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ScriptProfileCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8StyleSheetCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8TrackEventCustom.cpp:
(WebCore::V8TrackEvent::trackAccessorGetter):
* bindings/v8/custom/V8Uint16ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Uint32ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Uint8ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::toV8Object):
(WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
(WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
* bindings/v8/custom/V8WorkerContextCustom.cpp:
(WebCore::toV8):
2012-05-23 James Robinson <jamesr@chromium.org>
Add a Setting to make position:fixed form a new stacking context
https://bugs.webkit.org/show_bug.cgi?id=87186
Reviewed by Adam Barth.
position:fixed elements form a new stacking context in several mobile WebKit ports and in the Qt port always. To
be consistent across devices, we want to try turning it on everywhere. This will likely cause compatibility
issues, so we need a runtime setting in order to stage the change carefully.
Tests: fast/block/positioning/fixed-position-stacking-context.html
fast/block/positioning/fixed-position-stacking-context2.html
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setFixedPositionCreatesStackingContext):
(WebCore::Settings::fixedPositionCreatesStackingContext):
(Settings):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::InternalSettings):
(WebCore::InternalSettings::restoreTo):
(WebCore::InternalSettings::setFixedPositionCreatesStackingContext):
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:
2012-05-23 Michael Nordman <michaeln@google.com>
[chromium] DomStorage events handling needs TLC (3)
https://bugs.webkit.org/show_bug.cgi?id=87031
https://code.google.com/p/chromium/issues/detail?id=128482
Create WebCore::Storage instances as a side effect of attaching storage event handlers.
This allows storage events in chromium to be propagated with less IPC chatter.
Worth noting that in non-chromium ports, creation of the localStorage instance can have
an additional side effect of scheduling a background task to read the area's values
from disk, which given the interest in events is probably a beneficial side effect.
Reviewed by Adam Barth.
No new tests. Existing tests cover this.
* page/DOMWindow.cpp:
(WebCore::didAddStorageEventListener):
(WebCore::DOMWindow::addEventListener):
2012-05-23 Michael Saboff <msaboff@apple.com>
Crash in fast/files/read tests during Garbage Collection
https://bugs.webkit.org/show_bug.cgi?id=87165
Reviewed by Alexey Proskuryakov.
Changed hasPendingActivity() processing to use ActiveDOMObject::hasPendingActivity()
and associated setPendingActivity() / unsetPendingActivity().
Fixed two existing tests with change.
* Modules/filesystem/FileWriter.cpp:
(WebCore::FileWriter::stop):
(WebCore::FileWriter::write):
(WebCore::FileWriter::truncate):
(WebCore::FileWriter::signalCompletion):
* Modules/filesystem/FileWriter.h:
* fileapi/FileReader.cpp:
(WebCore::FileReader::readInternal):
(WebCore::FileReader::doAbort):
(WebCore::FileReader::didFinishLoading):
(WebCore::FileReader::didFail):
* fileapi/FileReader.h:
2012-05-23 Abhishek Arya <inferno@chromium.org>
Crash in run-ins with continuations while moving back to original position.
https://bugs.webkit.org/show_bug.cgi?id=87264
Reviewed by Julien Chaffraix.
Run-in that are now placed in sibling block can break up into continuation
chains when new children are added to it. We cannot easily send them back to their
original place since that requires writing integration logic with RenderInline::addChild
and all other places that might cause continuations to be created (without blowing away
|this|). Disabling this feature for now to prevent crashes.
Test: fast/runin/runin-continuations-crash.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::moveRunInToOriginalPosition):
2012-05-23 Abhishek Arya <inferno@chromium.org>
Crash in RenderInline::linesVisualOverflowBoundingBox.
https://bugs.webkit.org/show_bug.cgi?id=85804
Reviewed by Dave Hyatt.
Defer layout of replaced elements to the next line break function.
We shouldn't do it while we are clearing our inline chilren
lineboxes in full layout mode.
Test: fast/block/inline-children-root-linebox-crash.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutInlineChildren):
(WebCore::RenderBlock::LineBreaker::nextLineBreak):
2012-05-23 Chris Rogers <crogers@google.com>
AudioParam must support fan-in (multiple audio connections) (take 2)
https://bugs.webkit.org/show_bug.cgi?id=83610
Reviewed by Kenneth Russell.
This re-lands bug: https://bugs.webkit.org/show_bug.cgi?id=83610
Now that a fix has been landed: http://trac.webkit.org/changeset/118099
Test: webaudio/audioparam-summingjunction.html
* Modules/webaudio/AudioParam.cpp:
* Modules/webaudio/AudioParam.h:
(WebCore::AudioParam::calculateSampleAccurateValues):
(WebCore::AudioParam::calculateAudioRateSignalValues):
Sums intrinsic parameter value with all audio-rate connections.
(WebCore::AudioParam::connect):
(WebCore::AudioParam::disconnect):
Support multiple connections.
(WebCore::AudioParam::hasSampleAccurateValues):
If we have one or more audio-rate connections.
(WebCore::AudioParam::AudioParam):
AudioParam now sub-classes AudioSummingJunction.
2012-05-23 Christophe Dumez <christophe.dumez@intel.com>
[EFL] webintents/web-intents-delivery-reuse.html is failing on EFL port
https://bugs.webkit.org/show_bug.cgi?id=87092
Reviewed by Adam Barth.
Remove readonly keyword from the webkitIntent attribute. This is
needed otherwise the [Replaceable] extended attribute has not effect
with JSC. This is tested by webintents/web-intents-delivery-reuse.html
test case.
* Modules/intents/DOMWindowIntents.idl:
2012-05-23 Abhishek Arya <inferno@chromium.org>
ASSERT failure toRenderProgress in HTMLProgressElement::didElementStateChange
https://bugs.webkit.org/show_bug.cgi?id=87274
Reviewed by Darin Adler.
Progress bar can't run-in. Prevent it from becoming a run-in, leading to an
unworkable RenderInline.
Test: fast/runin/progress-run-in-crash.html
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::didElementStateChange):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
2012-05-23 Andrew Lo <anlo@rim.com>
[BlackBerry] UI thread unnecessarily blocks on WebKit thread when servicing requestAnimationFrames
https://bugs.webkit.org/show_bug.cgi?id=87289
Reviewed by Antonio Gomes.
requestAnimationFrame already covered by tests in LayoutTests/fast/animation.
If UI thread cannot acquire DisplayRefreshMonitor mutex immediately,
avoid blocking on the mutex, it can trigger the frame change on the next
animation tick instead.
* platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
(WebCore::DisplayRefreshMonitor::displayLinkFired):
2012-05-23 Alec Flett <alecflett@chromium.org>
Implement DOM4 DOMError
https://bugs.webkit.org/show_bug.cgi?id=87055
Reviewed by Adam Barth.
Implement the DOMError class and it's IDL interface.
No new tests. Not testable yet, as it's not used.
* WebCore.gypi:
* dom/DOMError.cpp: Added.
(WebCore):
(WebCore::DOMError::DOMError):
* dom/DOMError.h: Added.
(WebCore):
(DOMError):
(WebCore::DOMError::create):
(WebCore::DOMError::name):
* dom/DOMError.idl: Added.
2012-05-23 Kenneth Russell <kbr@google.com>
REGRESSION(117918) - 4 webgl/tex-iomage-and-sub-image-2d-with-image tests failing on Mac bots.
https://bugs.webkit.org/show_bug.cgi?id=87136
Reviewed by Stephen White.
Fixed longstanding bug in GraphicsContext3D constructor in Mac
port, and logic error in tracking of texture bound to unit 0. Also
fixed up Cairo port's constructor by code inspection. This code is
ripe for cleanup; Bug 87198 filed for this.
Covered by existing tests.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
Initialize missing members.
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D):
Correctly initialize m_activeTexture.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::bindTexture):
Fix logic error in tracking of texture bound to unit 0.
2012-05-23 Dana Jansens <danakj@chromium.org>
[chromium] Layers on main thread should get a RenderSurface for animating transform only if masksToBounds is true also
https://bugs.webkit.org/show_bug.cgi?id=87184
Reviewed by James Robinson.
Layers on main thread get a RenderSurface if their impl counterpart may
have a RenderSurface due to its animating transform. We currently create
a RenderSurface for all layers with an animating transform and
a descendant that drawsContents. But a RenderSurface on impl also
implies that the layer masksToBounds. So only make a RenderSurface on
main thread when the layer also masksToBounds.
Modified unit test CCLayerTreeHostCommonTest.verifyAnimationsForRenderSurfaceHierarchy.
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::subtreeShouldRenderToSeparateSurface):
2012-05-23 Chris Fleizach <cfleizach@apple.com>
Regression(r112694): Crash in WebCore::AXObjectCache::postNotification
https://bugs.webkit.org/show_bug.cgi?id=86029
Reviewed by Abhishek Arya.
Test: accessibility/content-changed-notification-causes-crash.html
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isDetached):
(AccessibilityObject):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::contentChanged):
2012-05-23 Robin Dunn <robin@alldunn.com>
[wx] Fix memory leak in FontHolder.
https://bugs.webkit.org/show_bug.cgi?id=87281
Reviewed by Kevin Ollivier.
* platform/graphics/wx/FontPlatformData.h:
2012-05-23 Robin Dunn <robin@alldunn.com>
[wx] Make sure we do not create a substitute font if the facename is not found.
https://bugs.webkit.org/show_bug.cgi?id=87280
Reviewed by Kevin Ollivier.
* platform/graphics/wx/FontCacheWx.cpp:
(WebCore::FontCache::createFontPlatformData):
2012-05-23 Robin Dunn <robin@alldunn.com>
[wx] Implement transparency layer support.
https://bugs.webkit.org/show_bug.cgi?id=87279
Reviewed by Kevin Ollivier.
* platform/graphics/wx/GraphicsContextWx.cpp:
(WebCore::GraphicsContext::beginPlatformTransparencyLayer):
(WebCore::GraphicsContext::endPlatformTransparencyLayer):
(WebCore::GraphicsContext::supportsTransparencyLayers):
2012-05-23 Jer Noble <jer.noble@apple.com>
GenericClock loses precision due to float->double conversion.
https://bugs.webkit.org/show_bug.cgi?id=87227
Reviewed by Darin Adler.
No new tests; fixes media/media-controller-time.html on Chromium.
Only narrow to float after the entire calculation is complete. This requires now() and m_offset
to be double-precision.
* platform/ClockGeneric.cpp:
(ClockGeneric::currentTime):
(ClockGeneric::now): Make double-precision.
* platform/ClockGeneric.h:
(ClockGeneric): Make m_offset double-precision.
2012-05-22 Jer Noble <jer.noble@apple.com>
PlatformClockCM has uninitialized m_rate member.
https://bugs.webkit.org/show_bug.cgi?id=87217
Reviewed by Eric Carlson.
Test: media/media-controller-time.html
Initialize the m_rate member to a default of 1 (second-per-second), matching the implementation
of ClockGeneric.
* platform/mac/PlatformClockCM.mm:
(PlatformClockCM::PlatformClockCM):
2012-05-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r118096.
http://trac.webkit.org/changeset/118096
https://bugs.webkit.org/show_bug.cgi?id=87285
caused multiple crashes on the mac bots (Requested by
jessieberlin on #webkit).
* dom/ContainerNodeAlgorithms.h:
2012-05-23 Darin Adler <darin@apple.com>
Speed up traverseNextNode when called on a ContainerNode or Element
https://bugs.webkit.org/show_bug.cgi?id=87224
Reviewed by Geoffrey Garen.
* dom/ContainerNode.h: Added overrides of traverseNextNode for ContainerNode.
That way, when we know at compile time something is ContainerNode, we can
skip a branch at the start of this hot function.
2012-05-23 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
Use PluginDataNone.cpp always when NETSCAPE_PLUGIN_API is OFF
https://bugs.webkit.org/show_bug.cgi?id=87096
Reviewed by Andy Estes.
Fix a build error by adding an extra check in PluginData.cpp to use
PluginStrategy only when NETSCAPE_PLUGIN_API is ON.
No new tests. This is only a build fix.
* plugins/PluginData.cpp:
(WebCore):
2012-05-23 Malcolm MacLeod <malcolm.macleod@tshwanedje.com>
[wx] Fix scrollbar drawing under wxGTK.
https://bugs.webkit.org/show_bug.cgi?id=87150
Reviewed by Kevin Ollivier.
* platform/wx/wxcode/gtk/scrollbar_render.cpp:
(wxRenderer_DrawScrollbar):
2012-05-23 Antti Koivisto <antti@apple.com>
Rename StyleSheetInternal to StyleSheetContents
https://bugs.webkit.org/show_bug.cgi?id=87272
Reviewed by Andreas Kling.
The name is more descriptive and the code reads better.
Plain "StyleSheet" would be good too but that is a CSSOM type and the name can't be used without
changing idl code generation and resolving bunch of other issues.
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs):
* css/CSSFontFaceSrcValue.h:
(CSSFontFaceSrcValue):
* css/CSSImportRule.cpp:
(WebCore::StyleRuleImport::setCSSStyleSheet):
(WebCore::StyleRuleImport::requestStyleSheet):
* css/CSSImportRule.h:
(WebCore):
(WebCore::StyleRuleImport::parentStyleSheet):
(WebCore::StyleRuleImport::setParentStyleSheet):
(WebCore::StyleRuleImport::styleSheet):
(StyleRuleImport):
* css/CSSMediaRule.cpp:
(WebCore::CSSMediaRule::insertRule):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseSheet):
(WebCore::CSSParser::parseRule):
(WebCore::CSSParser::parseKeyframeRule):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseSelector):
(WebCore::CSSParser::parseDeclaration):
(WebCore::CSSParser::setStyleSheet):
(WebCore::CSSParser::parseFlowThread):
* css/CSSParser.h:
(WebCore):
(CSSParser):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::addSubresourceStyleURLs):
* css/CSSPrimitiveValue.h:
(CSSPrimitiveValue):
* css/CSSReflectValue.cpp:
(WebCore::CSSReflectValue::addSubresourceStyleURLs):
* css/CSSReflectValue.h:
(CSSReflectValue):
* css/CSSRule.cpp:
(WebCore::CSSRule::parserContext):
* css/CSSStyleSheet.cpp:
(WebCore::StyleSheetContents::estimatedSizeInBytes):
(WebCore::StyleSheetContents::StyleSheetContents):
(WebCore::StyleSheetContents::~StyleSheetContents):
(WebCore::StyleSheetContents::isCacheable):
(WebCore::StyleSheetContents::parserAppendRule):
(WebCore::StyleSheetContents::ruleAt):
(WebCore::StyleSheetContents::ruleCount):
(WebCore::StyleSheetContents::clearCharsetRule):
(WebCore::StyleSheetContents::clearRules):
(WebCore::StyleSheetContents::parserSetEncodingFromCharsetRule):
(WebCore::StyleSheetContents::wrapperInsertRule):
(WebCore::StyleSheetContents::wrapperDeleteRule):
(WebCore::StyleSheetContents::parserAddNamespace):
(WebCore::StyleSheetContents::determineNamespace):
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
(WebCore::StyleSheetContents::parseString):
(WebCore::StyleSheetContents::parseStringAtLine):
(WebCore::StyleSheetContents::isLoading):
(WebCore::StyleSheetContents::checkLoaded):
(WebCore::StyleSheetContents::notifyLoadedSheet):
(WebCore::StyleSheetContents::startLoadingDynamicSheet):
(WebCore::StyleSheetContents::rootStyleSheet):
(WebCore::StyleSheetContents::singleOwnerNode):
(WebCore::StyleSheetContents::singleOwnerDocument):
(WebCore::StyleSheetContents::completeURL):
(WebCore::StyleSheetContents::addSubresourceStyleURLs):
(WebCore::StyleSheetContents::parentStyleSheet):
(WebCore::StyleSheetContents::registerClient):
(WebCore::StyleSheetContents::unregisterClient):
(WebCore::StyleSheetContents::addedToMemoryCache):
(WebCore::StyleSheetContents::removedFromMemoryCache):
(WebCore::CSSStyleSheet::createInline):
(WebCore::CSSStyleSheet::CSSStyleSheet):
(WebCore::CSSStyleSheet::~CSSStyleSheet):
(WebCore::CSSStyleSheet::willMutateRules):
(WebCore::CSSStyleSheet::didMutateRules):
(WebCore::CSSStyleSheet::reattachChildRuleCSSOMWrappers):
(WebCore::CSSStyleSheet::length):
(WebCore::CSSStyleSheet::item):
(WebCore::CSSStyleSheet::rules):
(WebCore::CSSStyleSheet::insertRule):
(WebCore::CSSStyleSheet::deleteRule):
(WebCore::CSSStyleSheet::cssRules):
* css/CSSStyleSheet.h:
(WebCore::StyleSheetContents::create):
(StyleSheetContents):
(WebCore::StyleSheetContents::copy):
(WebCore::CSSStyleSheet::create):
(WebCore::CSSStyleSheet::contents):
(CSSStyleSheet):
* css/CSSValue.cpp:
(WebCore::CSSValue::addSubresourceStyleURLs):
* css/CSSValue.h:
(WebCore):
(CSSValue):
* css/CSSValueList.cpp:
(WebCore::CSSValueList::addSubresourceStyleURLs):
* css/CSSValueList.h:
(CSSValueList):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::contextStyleSheet):
* css/PropertySetCSSStyleDeclaration.h:
(WebCore):
(PropertySetCSSStyleDeclaration):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::setProperty):
(WebCore::StylePropertySet::parseDeclaration):
(WebCore::StylePropertySet::addSubresourceStyleURLs):
* css/StylePropertySet.h:
(WebCore):
(StylePropertySet):
* css/StyleResolver.cpp:
(RuleSet):
(WebCore):
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::addAuthorRulesAndCollectUserRulesFromSheets):
(WebCore::StyleResolver::appendAuthorStylesheets):
(WebCore::parseUASheet):
(WebCore::StyleResolver::collectMatchingRulesForList):
* css/StyleResolver.h:
(StyleResolver):
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::WebKitCSSKeyframesRule::insertRule):
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createCSSStyleSheet):
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::updateBaseURL):
(WebCore::Document::pageUserSheet):
(WebCore::Document::pageGroupUserSheets):
(WebCore::Document::addUserSheet):
(WebCore::Document::testAddedStylesheetRequiresStyleRecalc):
(WebCore::Document::analyzeStylesheetChange):
(WebCore::styleSheetsUseRemUnits):
* dom/Document.h:
(WebCore):
(Document):
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::setCSSStyleSheet):
(WebCore::ProcessingInstruction::parseStyleSheet):
* dom/StyleElement.cpp:
(WebCore::StyleElement::createSheet):
* dom/StyledElement.cpp:
(WebCore::StyledElement::setInlineStyleProperty):
(WebCore::StyledElement::addSubresourceAttributeURLs):
(WebCore::StyledElement::addPropertyToAttributeStyle):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):
(WebCore::HTMLLinkElement::styleSheetIsLoading):
(WebCore::HTMLLinkElement::addSubresourceAttributeURLs):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::addSubresourceAttributeURLs):
* inspector/InspectorStyleSheet.cpp:
(WebCore::fillMediaListChain):
(WebCore::InspectorStyle::setPropertyText):
(WebCore::InspectorStyleSheet::styleSheetURL):
(WebCore::InspectorStyleSheet::reparseStyleSheet):
(WebCore::InspectorStyleSheet::ensureSourceData):
(WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
(WebCore::CachedCSSStyleSheet::saveParsedStyleSheet):
* loader/cache/CachedCSSStyleSheet.h:
(WebCore):
(CachedCSSStyleSheet):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeCSSStyleSheet):
2012-05-23 Darin Adler <darin@apple.com>
Use ContainerNode instead of Node where possible
https://bugs.webkit.org/show_bug.cgi?id=87220
Reviewed by Geoffrey Garen.
It's better to use a more specific type; in some cases we even generate
more efficient code if we have a more specific type. Also, we want any
type casts to be as close as possible to the corresponding type checks,
so eliminating these uses of toContainerNode is a plus, also.
* dom/ContainerNodeAlgorithms.h: Changed insertionPoint to be a ContainerNode
instead of a Node. Fixed spelling error "inseretions". Changed
(WebCore::ChildFrameDisconnector::Target::Target): Changed type of frame owner
element to HTMLFrameOwnerElement from Node.
* dom/DocumentType.cpp:
(WebCore::DocumentType::insertedInto):
(WebCore::DocumentType::removedFrom):
* dom/DocumentType.h:
* dom/Element.cpp:
(WebCore::Element::insertedInto):
(WebCore::Element::removedFrom):
* dom/Element.h:
* dom/Node.cpp:
(WebCore::Node::insertedInto):
(WebCore::Node::removedFrom):
* dom/Node.h:
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::insertedInto):
(WebCore::ProcessingInstruction::removedFrom):
* dom/ProcessingInstruction.h:
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::insertedInto):
* dom/ScriptElement.h:
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::insertedInto):
(WebCore::FormAssociatedElement::removedFrom):
* html/FormAssociatedElement.h:
* html/HTMLBaseElement.cpp:
(WebCore::HTMLBaseElement::insertedInto):
(WebCore::HTMLBaseElement::removedFrom):
* html/HTMLBaseElement.h:
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedInto):
(WebCore::HTMLBodyElement::didNotifyDescendantInsertions):
* html/HTMLBodyElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::insertedInto):
(WebCore::HTMLFormControlElement::removedFrom):
* html/HTMLFormControlElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::insertedInto):
(WebCore::HTMLFormElement::didNotifyDescendantInsertions):
(WebCore::HTMLFormElement::removedFrom):
* html/HTMLFormElement.h:
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::insertedInto):
(WebCore::HTMLFrameElementBase::didNotifyDescendantInsertions):
* html/HTMLFrameElementBase.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::insertedInto):
(WebCore::HTMLFrameSetElement::removedFrom):
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::insertedInto):
(WebCore::HTMLIFrameElement::removedFrom):
* html/HTMLIFrameElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):
* html/HTMLImageElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::insertedInto):
(WebCore::HTMLInputElement::removedFrom):
* html/HTMLInputElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::insertedInto):
(WebCore::HTMLLinkElement::removedFrom):
* html/HTMLLinkElement.h:
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::insertedInto):
(WebCore::HTMLMapElement::removedFrom):
* html/HTMLMapElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::insertedInto):
(WebCore::HTMLMediaElement::removedFrom):
* html/HTMLMediaElement.h:
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::insertedInto):
* html/HTMLMetaElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::insertedInto):
(WebCore::HTMLObjectElement::removedFrom):
* html/HTMLObjectElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::insertedInto):
* html/HTMLOptionElement.h:
* html/HTMLQuoteElement.cpp:
(WebCore::HTMLQuoteElement::insertedInto):
* html/HTMLQuoteElement.h:
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::insertedInto):
* html/HTMLScriptElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::insertedInto):
* html/HTMLSelectElement.h:
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::insertedInto):
(WebCore::HTMLSourceElement::removedFrom):
* html/HTMLSourceElement.h:
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::insertedInto):
(WebCore::HTMLStyleElement::removedFrom):
* html/HTMLStyleElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::insertedInto):
* html/HTMLTextFormControlElement.h:
* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::insertedInto):
(WebCore::HTMLTitleElement::removedFrom):
* html/HTMLTitleElement.h:
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::insertedInto):
(WebCore::HTMLTrackElement::removedFrom):
* html/HTMLTrackElement.h:
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::insertedInto):
* mathml/MathMLMathElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::removedFrom):
* svg/SVGElement.h:
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::insertedInto):
(WebCore::SVGFEImageElement::removedFrom):
* svg/SVGFEImageElement.h:
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::insertedInto):
(WebCore::SVGFontFaceElement::removedFrom):
* svg/SVGFontFaceElement.h:
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::insertedInto):
* svg/SVGFontFaceUriElement.h:
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::insertedInto):
(WebCore::SVGGlyphElement::removedFrom):
* svg/SVGGlyphElement.h:
* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::insertedInto):
(WebCore::SVGHKernElement::removedFrom):
* svg/SVGHKernElement.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::insertedInto):
* svg/SVGImageElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::insertedInto):
(WebCore::SVGSVGElement::removedFrom):
* svg/SVGSVGElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::insertedInto):
* svg/SVGScriptElement.h:
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::insertedInto):
(WebCore::SVGStyleElement::removedFrom):
* svg/SVGStyleElement.h:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::insertedInto):
(WebCore::SVGStyledElement::removedFrom):
* svg/SVGStyledElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::insertedInto):
(WebCore::SVGTRefElement::removedFrom):
* svg/SVGTRefElement.h:
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::insertedInto):
* svg/SVGTextPathElement.h:
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::insertedInto):
(WebCore::SVGTitleElement::removedFrom):
* svg/SVGTitleElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::insertedInto):
(WebCore::SVGUseElement::removedFrom):
* svg/SVGUseElement.h:
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::insertedInto):
(WebCore::SVGVKernElement::removedFrom):
* svg/SVGVKernElement.h:
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::insertedInto):
(WebCore::SVGSMILElement::removedFrom):
* svg/animation/SVGSMILElement.h:
Changed arguments of insertedInto and removedFrom to ContainerNode instead of Node.
Did the same with didNotifyDescendantInsertions, while fixing the typo in its name.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply): Put a typecast toHTMLElement here.
The check for isListElement and isLegacyAppleStyleSpan takes care of the type checking.
(WebCore::ReplaceSelectionCommand::insertAsListItems): Changed this function to take
an HTMLElement instead of a Node, then we can drop use of the toContainerNode function.
* editing/ReplaceSelectionCommand.h:
* editing/TextIterator.cpp: Fixed a typo in a comment.
2012-05-23 Alexei Filippov <alexeif@chromium.org>
Web Inspector: filter out debugging stuff from the heap class view
https://bugs.webkit.org/show_bug.cgi?id=86723
We mark objects that are accessible from user roots (e.g. Window)
with pageObject attribute. This fix filters out all non-pageObjects
from the classes view.
Reviewed by Yury Semikhatsky.
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotNode.prototype.isPageObject):
(WebInspector.HeapSnapshot.prototype._buildAggregates):
(WebInspector.HeapSnapshot.prototype._calculateClassesRetainedSize):
(WebInspector.HeapSnapshot.prototype._buildPostOrderIndex):
(WebInspector.HeapSnapshot.prototype._markPageOwnedNodes):
(WebInspector.HeapSnapshot.prototype.createNodesProviderForClass):
2012-05-23 Andrei Bucur <abucur@adobe.com>
[CSSRegions]Implement NamedFlow::name attribute
https://bugs.webkit.org/show_bug.cgi?id=79645
Implementation for the NamedFlow::name attribute per the CSS Regions WD 3-May-2012 recommendation:
http://www.w3.org/TR/2012/WD-css3-regions-20120503/
Reviewed by Andreas Kling.
Test: fast/regions/webkit-named-flow-name.html
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::name):
(WebCore):
* dom/WebKitNamedFlow.h:
(WebKitNamedFlow):
* dom/WebKitNamedFlow.idl:
2012-05-23 Andreas Kling <kling@webkit.org>
Let the compiler generate FontFamily's copy ctor and assignment operator.
Blindly rubberstamped by the brave Antti Koivisto.
* platform/graphics/FontFamily.cpp:
* platform/graphics/FontFamily.h:
2012-05-23 Andreas Kling <kling@webkit.org>
CSSParser: Simplify StylePropertySet creation.
<http://webkit.org/b/87259>
Reviewed by Alexis Menard.
Turn CSSParser's filteredProperties() into createStylePropertySet() which filters the parsed
properties and creates a new StylePropertySet, adopting the vector to avoid the Vector copy we
were previously incurring.
Added a StylePropertyVector typedef for Vector<CSSProperty, 4> since we need to pass this type
to the constructor for Vector::swap() to work.
And thus StylePropertySet::create(const Vector<CSSProperty>&, CSSParserMode) became
StylePropertySet::adopt(StylePropertyVector&, CSSParserMode).
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
* css/CSSParser.cpp:
(WebCore::CSSParser::createStylePropertySet):
(WebCore::CSSParser::createStyleRule):
(WebCore::CSSParser::createFontFaceRule):
(WebCore::CSSParser::createPageRule):
(WebCore::CSSParser::createKeyframe):
* css/CSSParser.h:
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::StylePropertySet):
(WebCore::StylePropertySet::removePropertiesInSet):
(WebCore::StylePropertySet::copyPropertiesInSet):
(SameSizeAsStylePropertySet):
* css/StylePropertySet.h:
(WebCore::StylePropertySet::adopt):
(StylePropertySet):
2012-05-23 Andreas Kling <kling@webkit.org>
Kill some frivolous null-checking of Element::m_attributeData.
<http://webkit.org/b/87248>
Reviewed by Antti Koivisto.
Replace unnecessary Element::m_attributeData with assertions where it makes sense.
Others are flat out removed because it should be obvious from context that it's non-null.
E.g if an attribute has changed, we're obviously storing it somewhere.
Also added a short-circuit to Element::normalize() if there are no Attr objects
associated with the element.
* dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::Element::attributeChanged):
(WebCore::Element::insertedInto):
(WebCore::Element::removedFrom):
(WebCore::Element::removeAttributeNode):
(WebCore::Element::normalizeAttributes):
* dom/StyledElement.cpp:
(WebCore::StyledElement::classAttributeChanged):
2012-05-23 Andreas Kling <kling@webkit.org>
Let Element::detachAttribute() handle removal of the attribute.
<http://webkit.org/b/87242>
Reviewed by Antti Koivisto.
All the call sites were removing the attribute after detaching it, so move
that into detachAttribute(). The function name already made it sound like it
removes the attribute anyway.
Also sprinkle some assertions wrt being called with guaranteed presence of
attributeData() and the provided index in the attribute vector.
* dom/Element.cpp:
(WebCore::Element::detachAttribute):
(WebCore::Element::removeAttributeNode):
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::removeNamedItem):
(WebCore::NamedNodeMap::removeNamedItemNS):
2012-05-23 Andreas Kling <kling@webkit.org>
Streamline Element teardown for the no-Attr-objects case.
<http://webkit.org/b/87228>
Reviewed by Antti Koivisto.
Dodge one function call in ~Element() if the element has no Attr objects
associated (the typical case.)
Renamed detachAttributes to detachAttrObjectsFromElement to reduce ambiguity.
* dom/Element.cpp:
(WebCore::Element::~Element):
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::detachAttrObjectsFromElement):
(WebCore::ElementAttributeData::clearAttributes):
* dom/ElementAttributeData.h:
(ElementAttributeData):
2012-05-23 Jochen Eisinger <jochen@chromium.org>
Fix incomplete switch statement in CSSParser after r118082
https://bugs.webkit.org/show_bug.cgi?id=87250
Reviewed by Alexis Menard.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
2012-05-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r118105.
http://trac.webkit.org/changeset/118105
https://bugs.webkit.org/show_bug.cgi?id=87255
New LayoutTest is causing several cookie tests to fail on
numerous bots (Requested by steveblock on #webkit).
* platform/blackberry/CookieJarBlackBerry.cpp:
(WebCore::setCookies):
* platform/blackberry/CookieManager.cpp:
(WebCore::CookieManager::setCookies):
(WebCore::CookieManager::checkAndTreatCookie):
(WebCore::CookieManager::addCookieToMap):
(WebCore::CookieManager::setPrivateMode):
(WebCore):
* platform/blackberry/CookieManager.h:
* platform/blackberry/CookieMap.cpp:
(WebCore::CookieMap::addOrReplaceCookie):
(WebCore::CookieMap::removeCookie):
* platform/blackberry/CookieMap.h:
(CookieMap):
2012-05-23 Zan Dobersek <zandobersek@gmail.com>
[Gtk] EventSender should properly handle (left|right)(control|shift|alt) after r118001
https://bugs.webkit.org/show_bug.cgi?id=87221
Reviewed by Martin Robinson.
No new tests - covered by fast/events/keydown-leftright-keys.html.
Windows key code for shift, control and alt keys should respect the
left or right position of that key. This way the DOM location code of
a key event is properly determined for these keys.
* platform/gtk/PlatformKeyboardEventGtk.cpp:
(WebCore::PlatformKeyboardEvent::windowsKeyCodeForGdkKeyCode):
2012-05-23 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: eliminate getters from HeapSnapshot.js
https://bugs.webkit.org/show_bug.cgi?id=87241
getters can't be inlined by engine at the moment.
I found that conversion getters into functions gives us about 600 ms
RESULT heap-snapshot: switch-to-containment-view= 1920 ms
vs
RESULT heap-snapshot: switch-to-containment-view= 1367 ms
Reviewed by Yury Semikhatsky.
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotEdge.prototype.hasStringName):
(WebInspector.HeapSnapshotEdge.prototype.isElement):
(WebInspector.HeapSnapshotEdge.prototype.isHidden):
(WebInspector.HeapSnapshotEdge.prototype.isWeak):
(WebInspector.HeapSnapshotEdge.prototype.isInternal):
(WebInspector.HeapSnapshotEdge.prototype.isInvisible):
(WebInspector.HeapSnapshotEdge.prototype.isShortcut):
(WebInspector.HeapSnapshotEdge.prototype.name):
(WebInspector.HeapSnapshotEdge.prototype.node):
(WebInspector.HeapSnapshotEdge.prototype.nodeIndex):
(WebInspector.HeapSnapshotEdge.prototype.rawEdges):
(WebInspector.HeapSnapshotEdge.prototype.toString):
(WebInspector.HeapSnapshotEdge.prototype.type):
(WebInspector.HeapSnapshotEdge.prototype._hasStringName):
(WebInspector.HeapSnapshotEdge.prototype._name):
(WebInspector.HeapSnapshotEdge.prototype._nameOrIndex):
(WebInspector.HeapSnapshotEdgeIterator.prototype.index):
(WebInspector.HeapSnapshotEdgeIterator.prototype.setIndex):
(WebInspector.HeapSnapshotEdgeIterator.prototype.item):
(WebInspector.HeapSnapshotRetainerEdge):
(WebInspector.HeapSnapshotRetainerEdge.prototype.clone):
(WebInspector.HeapSnapshotRetainerEdge.prototype.hasStringName):
(WebInspector.HeapSnapshotRetainerEdge.prototype.isElement):
(WebInspector.HeapSnapshotRetainerEdge.prototype.isHidden):
(WebInspector.HeapSnapshotRetainerEdge.prototype.isInternal):
(WebInspector.HeapSnapshotRetainerEdge.prototype.isInvisible):
(WebInspector.HeapSnapshotRetainerEdge.prototype.isShortcut):
(WebInspector.HeapSnapshotRetainerEdge.prototype.isWeak):
(WebInspector.HeapSnapshotRetainerEdge.prototype.name):
(WebInspector.HeapSnapshotRetainerEdge.prototype.node):
(WebInspector.HeapSnapshotRetainerEdge.prototype.nodeIndex):
(WebInspector.HeapSnapshotRetainerEdge.prototype.retainerIndex):
(WebInspector.HeapSnapshotRetainerEdge.prototype.setRetainerIndex):
(WebInspector.HeapSnapshotRetainerEdge.prototype._node):
(WebInspector.HeapSnapshotRetainerEdge.prototype._edge):
(WebInspector.HeapSnapshotRetainerEdge.prototype.toString):
(WebInspector.HeapSnapshotRetainerEdge.prototype.type):
(WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.first):
(WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.hasNext):
(WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.index):
(WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.setIndex):
(WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.item):
(WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.next):
(WebInspector.HeapSnapshotNode.prototype.canBeQueried):
(WebInspector.HeapSnapshotNode.prototype.distanceToWindow):
(WebInspector.HeapSnapshotNode.prototype.className):
(WebInspector.HeapSnapshotNode.prototype.dominatorIndex):
(WebInspector.HeapSnapshotNode.prototype.edges):
(WebInspector.HeapSnapshotNode.prototype.edgesCount):
(WebInspector.HeapSnapshotNode.prototype.flags):
(WebInspector.HeapSnapshotNode.prototype.id):
(WebInspector.HeapSnapshotNode.prototype.isHidden):
(WebInspector.HeapSnapshotNode.prototype.isNative):
(WebInspector.HeapSnapshotNode.prototype.isSynthetic):
(WebInspector.HeapSnapshotNode.prototype.isWindow):
(WebInspector.HeapSnapshotNode.prototype.isDetachedDOMTreesRoot):
(WebInspector.HeapSnapshotNode.prototype.isDetachedDOMTree):
(WebInspector.HeapSnapshotNode.prototype.isRoot):
(WebInspector.HeapSnapshotNode.prototype.name):
(WebInspector.HeapSnapshotNode.prototype.rawEdges):
(WebInspector.HeapSnapshotNode.prototype.retainedSize):
(WebInspector.HeapSnapshotNode.prototype.retainers):
(WebInspector.HeapSnapshotNode.prototype.selfSize):
(WebInspector.HeapSnapshotNode.prototype.type):
(WebInspector.HeapSnapshotNode.prototype._name):
(WebInspector.HeapSnapshotNode.prototype._edgeIndexesEnd):
(WebInspector.HeapSnapshotNode.prototype._nextNodeIndex):
(WebInspector.HeapSnapshotNode.prototype._type):
(WebInspector.HeapSnapshotNodeIterator):
(WebInspector.HeapSnapshotNodeIterator.prototype.hasNext):
(WebInspector.HeapSnapshotNodeIterator.prototype.index):
(WebInspector.HeapSnapshotNodeIterator.prototype.setIndex):
(WebInspector.HeapSnapshotNodeIterator.prototype.item):
(WebInspector.HeapSnapshotNodeIterator.prototype.next):
(WebInspector.HeapSnapshot.prototype._allNodes):
(WebInspector.HeapSnapshot.prototype.rootNode):
(WebInspector.HeapSnapshot.prototype.get totalSize):
(WebInspector.HeapSnapshot.prototype._dominatedNodesOfNode):
(WebInspector.HeapSnapshot.prototype.aggregatesForDiff):
(WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance):
(WebInspector.HeapSnapshot.prototype._buildAggregates):
(WebInspector.HeapSnapshot.prototype._calculateClassesRetainedSize):
(WebInspector.HeapSnapshot.prototype._sortAggregateIndexes):
(WebInspector.HeapSnapshot.prototype._markInvisibleEdges):
(WebInspector.HeapSnapshot.prototype._markDetachedDOMTreeNodes):
(WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
(WebInspector.HeapSnapshot.prototype._calculateDiffForClass):
(WebInspector.HeapSnapshot.prototype._nodeForSnapshotObjectId):
(WebInspector.HeapSnapshot.prototype.nodeClassName):
(WebInspector.HeapSnapshot.prototype.dominatorIdsForNode):
(WebInspector.HeapSnapshot.prototype.createEdgesProvider):
(WebInspector.HeapSnapshot.prototype.createRetainingEdgesProvider):
(WebInspector.HeapSnapshotFilteredOrderedIterator.prototype._createIterationOrder):
(WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.isEmpty):
(WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.item):
(WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.serializeItemsRange):
(WebInspector.HeapSnapshotEdgesProvider.prototype.serializeItem):
(WebInspector.HeapSnapshotEdgesProvider.prototype.sort.compareEdgeFieldName):
(WebInspector.HeapSnapshotEdgesProvider.prototype.sort.compareNodeField):
(WebInspector.HeapSnapshotNodesProvider):
(WebInspector.HeapSnapshotNodesProvider.prototype.nodePosition):
(WebInspector.HeapSnapshotNodesProvider.prototype.serializeItem):
(WebInspector.HeapSnapshotNodesProvider.prototype.sort.sortByNodeField):
* inspector/front-end/HeapSnapshotGridNodes.js:
* inspector/front-end/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotProviderProxy.prototype.isEmpty):
2012-05-22 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: Debugger should correctly show catch scope
https://bugs.webkit.org/show_bug.cgi?id=87197
Reviewed by Vsevolod Vlasov.
* bindings/v8/DebuggerScript.js: In case of Catch scope the scope object
is a synthetic one which means that it contains all standard object properties.
When passing this object further we need to leave only properties available in
the catch block(only variable thar stores the exception in fact).
2012-05-23 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] FloatSize Qt Support
https://bugs.webkit.org/show_bug.cgi?id=87237
Reviewed by Andreas Kling.
No new functionality. No new tests.
* Target.pri:
* platform/graphics/FloatSize.h:
(FloatSize):
* platform/graphics/qt/FloatSizeQt.cpp: Added.
(WebCore::FloatSize::FloatSize):
(WebCore::FloatSize::operator QSizeF):
2012-05-23 Alexei Filippov <alexeif@chromium.org>
Web Inspector: Enable HeapSnapshotRealWorker in production mode.
https://bugs.webkit.org/show_bug.cgi?id=87240
Reviewed by Yury Semikhatsky.
* inspector/front-end/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotWorker):
2012-05-23 'Pavel Feldman' <pfeldman@chromium.org>
Not reviewed: inspector's Find is not consuming event as of r117974.
* inspector/front-end/AdvancedSearchController.js:
(WebInspector.AdvancedSearchController.prototype.handleShortcut):
* inspector/front-end/SearchController.js:
(WebInspector.SearchController.prototype.handleShortcut):
2012-05-23 Pavel Feldman <pfeldman@chromium.org>
Web Inspector: enable drag-an-drop from the navigator panel.
https://bugs.webkit.org/show_bug.cgi?id=87238
Reviewed by Vsevolod Vlasov.
Making tree item draggable.
* inspector/front-end/NavigatorView.js:
(WebInspector.NavigatorSourceTreeElement.prototype.onattach):
(WebInspector.NavigatorSourceTreeElement.prototype._onmousedown.callback):
(WebInspector.NavigatorSourceTreeElement.prototype._onmousedown):
(WebInspector.NavigatorSourceTreeElement.prototype._ondragstart):
2012-05-23 Ryosuke Niwa <rniwa@webkit.org>
WebKit spends ~20% of time in HTMLTextAreaElement::defaultValue() when opening a review page
https://bugs.webkit.org/show_bug.cgi?id=86813
Reviewed by Eric Seidel.
Replace String and calls to String::operator+= by StringBuilder and calls to append respectively.
While there are other optimizations we can implement such as not replacing all nodes in the shadow DOM,
or not serializing the value when detecting whether the value had changed, they require considerable
amount of refactoring and this change alone seems to buy us a lot so let us defer those 'til later time.
Also avoid the redundant call to setValue in childrenChanged when the value is dirty.
This should halve the time we spend in setting the value.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::childrenChanged):
(WebCore::HTMLTextAreaElement::defaultValue):
2012-05-23 Alice Boxhall <aboxhall@chromium.org>
AX: Contenteditable tables should always be exposed as data tables
https://bugs.webkit.org/show_bug.cgi?id=87052
Reviewed by Chris Fleizach.
Tested in accessibility/table-detection.html.
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable): Return true if the node is contenteditable.
2012-05-23 Ryosuke Niwa <rniwa@webkit.org>
Fix a typo per Darin's comment.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::constructBidiRuns):
2012-05-23 Kentaro Hara <haraken@chromium.org>
[V8] Pass Isolate to v8::Null() in custom bindings (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=87209
Reviewed by Adam Barth.
The objective is to pass Isolate around in V8 bindings.
This patch passes Isolate to v8::Null() in custom bindings.
No tests. No change in behavior.
* bindings/v8/custom/V8HTMLElementCustom.cpp:
(WebCore::toV8Object):
(WebCore::toV8):
* bindings/v8/custom/V8HistoryCustom.cpp:
(WebCore::V8History::stateAccessorGetter):
* bindings/v8/custom/V8IDBAnyCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8IDBKeyCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ImageDataCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Int16ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Int32ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Int8ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8LocationCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8MessageEventCustom.cpp:
(WebCore::V8MessageEvent::dataAccessorGetter):
* bindings/v8/custom/V8NamedNodeMapCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8NodeCustom.cpp:
(WebCore::V8Node::insertBeforeCallback):
(WebCore::V8Node::replaceChildCallback):
(WebCore::V8Node::removeChildCallback):
(WebCore::V8Node::appendChildCallback):
(WebCore::toV8Slow):
* bindings/v8/custom/V8PopStateEventCustom.cpp:
(WebCore::V8PopStateEvent::stateAccessorGetter):
* bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
(WebCore::V8SQLResultSetRowList::itemCallback):
* bindings/v8/custom/V8SVGDocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8SVGElementCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8SVGPathSegCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ScriptProfileCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ScriptProfileNodeCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8StyleSheetCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8TrackEventCustom.cpp:
(WebCore::V8TrackEvent::trackAccessorGetter):
* bindings/v8/custom/V8Uint16ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Uint32ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Uint8ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::toV8Object):
(WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
(WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
* bindings/v8/custom/V8WorkerContextCustom.cpp:
(WebCore::toV8):
2012-05-23 Kentaro Hara <haraken@chromium.org>
[V8] Pass Isolate to v8::Null() in custom bindings (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=87207
Reviewed by Adam Barth.
The objective is to pass Isolate around in V8 bindings.
This patch passes Isolate to v8::Null() in custom bindings.
Also this patch makes V8DeviceMotionEventCustom::createAccelerationObject()
and V8DeviceMotionEventCustom::createRotationRateObject() static.
No tests. No change in behavior.
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CSSRuleCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CSSStyleSheetCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8CSSValueCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8ClipboardCustom.cpp:
(WebCore::V8Clipboard::typesAccessorGetter):
* bindings/v8/custom/V8CoordinatesCustom.cpp:
(WebCore::V8Coordinates::altitudeAccessorGetter):
(WebCore::V8Coordinates::altitudeAccuracyAccessorGetter):
(WebCore::V8Coordinates::headingAccessorGetter):
(WebCore::V8Coordinates::speedAccessorGetter):
* bindings/v8/custom/V8DOMStringMapCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DOMTokenListCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DataViewCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
(WebCore::V8DeviceMotionEvent::accelerationAccessorGetter):
(WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAccessorGetter):
(WebCore::V8DeviceMotionEvent::rotationRateAccessorGetter):
(WebCore::V8DeviceMotionEvent::intervalAccessorGetter):
* bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
(WebCore::V8DeviceOrientationEvent::alphaAccessorGetter):
(WebCore::V8DeviceOrientationEvent::betaAccessorGetter):
(WebCore::V8DeviceOrientationEvent::gammaAccessorGetter):
(WebCore::V8DeviceOrientationEvent::absoluteAccessorGetter):
* bindings/v8/custom/V8DocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8DocumentLocationCustom.cpp:
(WebCore::V8Document::locationAccessorGetter):
* bindings/v8/custom/V8EntryCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8EntrySyncCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8EventCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Float32ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8Float64ArrayCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
(WebCore::V8HTMLCanvasElement::getContextCallback):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::toV8):
2012-05-22 MORITA Hajime <morrita@google.com>
[Refactoring] ElementShadow::m_needsRedistributing should be on ContentDistributor
https://bugs.webkit.org/show_bug.cgi?id=87216
Reviewed by Kentaro Hara.
Moved ElementShadow::m_needsRedistributing to ContentDistributor::m_needsRedistributing
No new tests. No behavior change.
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::recalcStyle):
(WebCore::ElementShadow::needsRedistributing):
(WebCore::ElementShadow::setNeedsRedistributing):
* dom/ElementShadow.h:
(ElementShadow):
* dom/ShadowRoot.h: Removed outdated declarations.
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::ContentDistributor):
* html/shadow/ContentDistributor.h:
(WebCore::ContentDistributor::needsRedistributing):
(WebCore::ContentDistributor::setNeedsRedistributing):
(WebCore::ContentDistributor::clearNeedsRedistributing):
2012-05-22 Kentaro Hara <haraken@chromium.org>
[V8] Pass Isolate to v8::Null() in CodeGeneratorV8.pm
https://bugs.webkit.org/show_bug.cgi?id=87202
Reviewed by Adam Barth.
The objective is to pass Isolate around in V8 bindings.
This patch passes Isolate to v8::Null() in CodeGeneratorV8.pm.
No tests. No change in behavior.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
(GenerateFunctionCallback):
(NativeToJSValue):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::contentDocumentAttrGetter):
(WebCore::TestObjV8Internal::getSVGDocumentCallback):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetter):
(WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetter):
(WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter):
(WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter):
2012-05-22 Andreas Kling <kling@webkit.org>
Short-circuit Element::attrIfExists() when the Element has no Attr list.
<http://webkit.org/b/87214>
Reviewed by Ryosuke Niwa.
This function was lukewarm on Dromaeo/dom-attr (0.4% of samples.)
Added an early return if !hasAttrList() to avoid the function call overhead of
ElementAttributeData::attrIfExists().
* dom/Element.cpp:
(WebCore::Element::attrIfExists):
2012-05-22 Hayato Ito <hayato@chromium.org>
Remove an assertion since an event's target might be a shadow root if a text node is clicked.
https://bugs.webkit.org/show_bug.cgi?id=87072
Reviewed by Dimitri Glazkov.
Tests: fast/dom/shadow/shadow-dom-event-dispatching.html
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::ComposedShadowTreeWalker):
2012-05-22 Dongwoo Im <dw.im@samsung.com>
[EFL] Implements the registerProtocolHandler method and option.
https://bugs.webkit.org/show_bug.cgi?id=73638
Reviewed by Andreas Kling.
The registerProtocolHandler() method allows Web sites to register themselves
as possible handlers for particular schemes.
http://dev.w3.org/html5/spec/Overview.html#dom-navigator-registerprotocolhandler
* CMakeLists.txt: Add page/NavigatorRegisterProtocolHandler.idl into WebCore_IDL_FILES.
2012-05-22 Kentaro Hara <haraken@chromium.org>
[V8][Performance] Pass Isolate to v8::Null() in V8Node::toV8()
https://bugs.webkit.org/show_bug.cgi?id=87193
Reviewed by Adam Barth.
This patch improves the performance of Bindings/undefined-first-child.html by 58.7%,
Bindings/undefined-get-element-by-id.html by 26.8%,
Dromaeo/dom-query.html(getElementById (not in document)) by 9.8%,
and Dromaeo/dom-query.html(getElementsByName (not in document)) by 2.1%.
These benchmarks test the performance of accessing an undefined Node object.
Performance test results in my Linux desktop:
[Bindings/undefined-first-child.html]
- without my patch
RESULT Bindings: undefined-first-child= 481.843775891 runs/s
median= 474.934036939 runs/s, stdev= 17.7753278263 runs/s, min= 471.204188482 runs/s, max= 534.629404617 runs/s
- with my patch
RESULT Bindings: undefined-first-child= 764.720531908 runs/s
median= 803.515696424 runs/s, stdev= 54.7402312963 runs/s, min= 688.806888069 runs/s, max= 807.061790668 runs/s
[Bindings/undefined-get-element-by-id.html]
- without my patch
RESULT Bindings: undefined-get-element-by-id= 236.642705579 runs/s
median= 234.527786832 runs/s, stdev= 5.77090297761 runs/s, min= 231.362467866 runs/s, max= 246.305418719 runs/s
- with my patch
RESULT Bindings: undefined-get-element-by-id= 300.031032067 runs/s
median= 303.797468354 runs/s, stdev= 6.99060409266 runs/s, min= 287.581699346 runs/s, max= 304.955527319 runs/s
[Dromaeo/dom-query.html(getElementById (not in document))]
- without my patch
2855.80runs/s ±0.30%
- with my patch
3136.20runs/s ±0.22%
[Dromaeo/dom-query.html(getElementsByName (not in document))]
- without my patch
2198.00runs/s ±0.50%
- with my patch
2243.40runs/s ±3.39%
Currently v8::Null() looks up Isolate, which is a bottleneck of
V8Node::toV8() for undefined Nodes. This patch removes the Isolate
look-up by passing Isolate to v8::Null(), like v8::Null(isolate).
* bindings/scripts/CodeGeneratorV8.pm: Modified as described above.
(GenerateHeader):
* bindings/scripts/test/V8/V8TestActiveDOMObject.h: Updated run-bindings-tests results.
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventConstructor.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventTarget.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestException.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestInterface.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNamedConstructor.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNode.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestObj.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
(WebCore::toV8):
2012-05-22 MORITA Hajime <morrita@google.com>
REGRESSION(r116629) tests for <style scoped> is crashing
https://bugs.webkit.org/show_bug.cgi?id=87191
Reviewed by Kent Tamura.
unregisterWithScopingNode() and registerWithScopingNode() doesn't follow
refactoring around removedFrom(), insertedInto() and willRemove().
This change aligns them to such recent changes.
No new tests. Covered by existing tests.
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::unregisterWithScopingNode)
(WebCore::HTMLStyleElement::insertedInto):
- Allowed registerWithScopingNode() only for in-document traversal.
That is how it originally did.
(WebCore::HTMLStyleElement::removedFrom):
- Gave ex-parent to unregisterWithScopingNode().
* html/HTMLStyleElement.h:
(WebCore::HTMLStyleElement::unregisterWithScopingNode):
(HTMLStyleElement):
2012-05-21 Shawn Singh <shawnsingh@chromium.org>
Improve W3C conformance of backface-visibility
https://bugs.webkit.org/show_bug.cgi?id=84195
Reviewed by Adrienne Walker.
Tests: compositing/backface-visibility/backface-visibility-3d.html
compositing/backface-visibility/backface-visibility-hierarchical-transform.html
compositing/backface-visibility/backface-visibility-non3d.html
compositing/backface-visibility/backface-visibility-simple.html
Unit Tests: CCLayerTreeHostCommonTest::verifyBackFaceCullingWithoutPreserves3d
CCLayerTreeHostCommonTest::verifyBackFaceCullingWithPreserves3d
Also updated a few other layout and unit tests.
This patch updates chromium to conform to the W3C spec on CSS
transforms, Section 12 about backface visibility. This patch also
updates layout tests to reflect the latest W3C spec. In
particular, rule #1 on section 12, http://dev.w3.org/csswg/css3-transforms/#backface-visibility-property
states which transforms should be used to determine backface-visibility.
Because chromium has an additional quirk of the concept of render
surfaces, unit tests needed to be updated as well.
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::layerIsRootOfNewRenderingContext):
(WebCore):
(WebCore::isLayerBackFaceVisible):
(WebCore::isSurfaceBackFaceVisible):
(WebCore::calculateVisibleLayerRect):
(WebCore::layerShouldBeSkipped):
(WebCore::calculateDrawTransformsAndVisibilityInternal):
2012-05-22 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r118095.
http://trac.webkit.org/changeset/118095
https://bugs.webkit.org/show_bug.cgi?id=87201
"Causing crashes on Mac in
WebCore::StyleResolver::adjustRenderStyle (Requested by
sundiamonde on #webkit).
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(Settings):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::InternalSettings):
(WebCore::InternalSettings::restoreTo):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:
2012-05-22 Levi Weintraub <leviw@chromium.org>
NULL ptr in WebCore::RenderBlock::layoutRunsAndFloatsInRange
https://bugs.webkit.org/show_bug.cgi?id=77786
Reviewed by Ryosuke Niwa.
InlineBidiResolver adds one fake TextRun for isolated inlines in the process of creating the
list of TextRuns to send to the UBA. After the UBA has been run and the TextRuns reordered,
we re-run InlineBidiResolver rooted in the isolate and replace the fake run with those
generated by the subsequent pass by calling the method BidiRunList::replaceRunWithRuns.
This method assumes there are runs to replace the fake run with.
Positioned inline children are ignored when creating TextRuns, so when an isolated inline
has only positioned children we end up with an empty set of runs to pass to replaceRunWithRuns.
Ideally, we'd remove the fake run and not replace it with anything, but BidiRunList keeps
a pointer to the logically last run, which we're unable to easily re-determine after the UBA
has been run. Instead, we leave the fake run in the list and simply avoid calling
replaceRunWithRuns when we don't have any replacement runs.
Test: fast/block/line-layout/crash-in-isolate-with-positioned-child.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::constructBidiRuns):
2012-05-22 Kent Tamura <tkent@chromium.org>
[V8] Refactor generation code for non-standard functions
https://bugs.webkit.org/show_bug.cgi?id=87185
Reviewed by Kentaro Hara.
No behavior change. Just a refactoring.
* bindings/scripts/CodeGeneratorV8.pm:
(IsStandardFunction): Introduce a new function to check if a
function can be in a batch registration.
(GenerateNonStandardFunction): Factor out a code to generate
non-standard functions.
(GenerateImplementation):
Use IsStandardFunction and GenerateNonStandardFunction.
2012-05-22 Hayato Ito <hayato@chromium.org>
Make ComposedShadowTreeWalker traverse inactive insertion points correctly.
https://bugs.webkit.org/show_bug.cgi?id=86830
Reviewed by Dimitri Glazkov.
Fixed InsertionPoint::isActive() issue, which may return true
wrongly even if the insertion point is not in Shadow DOM subtree.
Now ComposedShadowTreeWalker can traverse inactive insertion
points correctly using InsertionPoint::isActive().
Test: fast/dom/shadow/composed-shadow-tree-walker.html
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseNode):
(WebCore::ComposedShadowTreeWalker::escapeFallbackContentElement):
(WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::isActive):
* html/shadow/InsertionPoint.h:
(WebCore::isActiveInsertionPoint):
(WebCore):
2012-05-22 Mark Pilgrim <pilgrim@chromium.org>
[Chromium] Call canAccelerate2dCanvas directly
https://bugs.webkit.org/show_bug.cgi?id=86893
Reviewed by James Robinson.
Part of a refactoring series. See tracking bug 82948.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::shouldAccelerate):
* platform/chromium/PlatformSupport.h:
2012-05-22 Jason Liu <jason.liu@torchmobile.com.cn>
[BlackBerry] Possible to clobber httponly cookie.
https://bugs.webkit.org/show_bug.cgi?id=86067
Reviewed by Rob Buis.
If a cookie is set by javaScript and there is already a same httpOnly cookie in cookieManager,
we should reject it. If it has a httpOnly property, we reject it, too.
Test: http/tests/cookies/js-get-and-set-http-only-cookie.php
* platform/blackberry/CookieJarBlackBerry.cpp:
(WebCore::setCookies):
* platform/blackberry/CookieManager.cpp:
(WebCore::CookieManager::setCookies):
(WebCore::CookieManager::shouldRejectNotHttpCookie):
(WebCore):
* platform/blackberry/CookieManager.h:
2012-05-22 Dana Jansens <danakj@chromium.org>
[chromium] Don't drop children of a RenderSurface from the renderSurfaceLayerList when then position of the surface in its clipRect is not known
https://bugs.webkit.org/show_bug.cgi?id=87181
Reviewed by Adrienne Walker.
We want to avoid dropping things from the renderSurfaceLayerList on main
thread when they may be in the renderSurfaceLayerList on impl thread due
to animation. A render surface would drop all its children if its
contentRect was clipped to become empty by its parent. But when the
surface is being animated, then we can't be sure how its parent will
clip the surface's content, so we don't clip it at all.
Chromium bug: http://crbug.com/128739
Unit test: CCLayerTreeHostCommonTest.verifyClipRectCullsSurfaceWithoutVisibleContent
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::calculateDrawTransformsAndVisibilityInternal):
2012-05-22 Kangil Han <kangil.han@samsung.com>
[EFL][DRT] Implement touch event
https://bugs.webkit.org/show_bug.cgi?id=86720
Reviewed by Hajime Morita.
Currently EFL DRT doesn't support touch event.
Therefore, this patch enabled it and implemented some eventSender function callbacks.
* platform/PlatformTouchEvent.h:
(PlatformTouchEvent): Implement meta state.
* platform/efl/PlatformTouchEventEfl.cpp:
(WebCore::PlatformTouchEvent::PlatformTouchEvent): Implement meta state.
2012-05-22 Chris Rogers <crogers@google.com>
AudioNodeOutput::disconnectAllParams() must take care when iterating through its parameter list
https://bugs.webkit.org/show_bug.cgi?id=87190
Reviewed by Kenneth Russell.
No new tests. Covered by existing tests.
* Modules/webaudio/AudioNodeOutput.cpp:
(WebCore::AudioNodeOutput::disconnectAllParams):
2012-05-22 MORITA Hajime <morrita@google.com>
<shadow> and <content> should be hidden behind ContextEnabledFeatures
https://bugs.webkit.org/show_bug.cgi?id=87063
This change repalces "runtimeConditional" tag definition property
with new "contextConditional" property, which refers
ContextEnabledFeatures instead of RuntimeEnabledFeatures.
Reviewed by Dimitri Glazkov.
No new tests. DRT cannot test this. No behaviour change on DRT.
* dom/make_names.pl:
(defaultTagPropertyHash):
(printConstructorInterior):
(printFactoryCppFile):
(printWrapperFunctions):
(printWrapperFactoryCppFile):
* html/HTMLTagNames.in:
2012-05-22 Kent Tamura <tkent@chromium.org>
Fix a crash in HTMLFormControlElement::disabled().
https://bugs.webkit.org/show_bug.cgi?id=86534
Reviewed by Hajime Morita.
Node::removedFrom() was not called in some cases. This patch fixes it.
No new tests. It's almost impossible to make a reliable test.
* dom/ContainerNodeAlgorithms.h:
Remove inDocument() check so that Node::removedFrom() is called even if
a parent node in an orphan tree is deleted but a child node remains,
2012-05-22 James Robinson <jamesr@chromium.org>
Add a Setting to make position:fixed form a new stacking context
https://bugs.webkit.org/show_bug.cgi?id=87186
Reviewed by Adam Barth.
position:fixed elements form a new stacking context in several mobile WebKit ports and in the Qt port always. To
be consistent across devices, we want to try turning it on everywhere. This will likely cause compatibility
issues, so we need a runtime setting in order to stage the change carefully.
Tests: fast/block/positioning/fixed-position-stacking-context.html
fast/block/positioning/fixed-position-stacking-context2.html
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setFixedPositionCreatesStackingContext):
(WebCore::Settings::fixedPositionCreatesStackingContext):
(Settings):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::InternalSettings):
(WebCore::InternalSettings::restoreTo):
(WebCore::InternalSettings::setFixedPositionCreatesStackingContext):
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:
2012-05-22 Adam Barth <abarth@webkit.org>
RenderInline::absoluteRects does some incorrect layout math
https://bugs.webkit.org/show_bug.cgi?id=87036
Reviewed by Eric Seidel.
http://trac.webkit.org/changeset/88297/trunk/Source/WebCore/rendering/RenderInline.cpp
contained a typo. We should accumulate offsets, not add sizes to
offsets.
Test: fast/inline/boundingBox-with-continuation.html
* rendering/RenderInline.cpp:
(WebCore::RenderInline::absoluteRects):
(WebCore):
2012-05-22 Dana Jansens <danakj@chromium.org>
[chromium] Don't force the visibleLayerRect to be empty for animating layers whose front face is not visible
https://bugs.webkit.org/show_bug.cgi?id=86886
Reviewed by Adrienne Walker.
Previously we would force the visibleLayerRect to be empty for these
animating layers, and then special case the pre-painting code to
paint them if they were within some size limit, to avoid having the
layer steal too much memory.
Instead, just use the visibleLayerRect given to the layer. Since the
transform flips the layer such that its back face is visible, it will
also compute a visibleLayerRect in the front face of the layer, and
its size will be bounded by the viewport. This will cause the
layer to be painted with visible priority instead of prepainted, but
ensures the visible parts of the layer is painted and ready to go when
the animation flips the layer around.
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::calculateVisibleLayerRect):
2012-05-22 Jer Noble <jer.noble@apple.com>
REGRESSION (r98359): Video does not render on http://panic.com/dietcoda/
https://bugs.webkit.org/show_bug.cgi?id=87171
Reviewed by Maciej Stachowiak.
No new tests; behavior is very timing specific and only occurs on a subset of all platforms.
Instead of calling prepareForRendering() from metadataLoaded(), which may fail and cause subsequent
calls to prepareForRendering() to short circuit, call createVideoLayer() directly, which achieves
the original goals of the fix for http://webkit.org/b/70448, but without breaking subsequent calls
to prepareForRendering() if called at the wrong time.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::metadataLoaded):
2012-05-22 Tim Horton <timothy_horton@apple.com>
Add a quirk for applications that depend on the relative ordering of progressCompleted/didFinishLoad
https://bugs.webkit.org/show_bug.cgi?id=87178
<rdar://problem/11468434>
Reviewed by Maciej Stachowiak.
Some applications depend on the relative ordering of progressCompleted/didFinishLoad, which was changed
to be more correct in http://trac.webkit.org/changeset/94105. For applications built before 94105, we can
provide the old behavior. For the time being, this will only apply to Mail.app.
No new tests, will not affect behavior for any application except Mail.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setNeedsDidFinishLoadOrderQuirk):
(WebCore::Settings::needsDidFinishLoadOrderQuirk):
2012-05-22 Alexis Menard <alexis.menard@openbossa.org>
Move some CSS regions properties to CSSParser::isValidKeywordPropertyAndValue.
https://bugs.webkit.org/show_bug.cgi?id=87169
Reviewed by Tony Chang.
Move some CSS regions properties to the fast path implemented by
CSSParser::isValidKeywordPropertyAndValue.
No new tests : Existing tests should cover.
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
2012-05-22 Emil A Eklund <eae@chromium.org>
Represents margins as box and simplify writing mode logic
https://bugs.webkit.org/show_bug.cgi?id=86952
Reviewed by Eric Seidel.
Add a new class, FractionalLayoutBox, that represents the four sides of a
box and change RenderBox to use it to represent margins.
The new box class is intended to be used to represent things like
margins, paddings and borders where the current rect class isn't a good
fit. It also encapsulated a lot of the horizontal/vertical writing mode
and bidi logic allowing it to be reused.
No new tests, no change in functionality.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FractionalLayoutBoxExtent.cpp: Added.
* platform/graphics/FractionalLayoutBoxExtent.h: Added.
* rendering/LayoutTypes.h:
* rendering/RenderBlock.cpp:
* rendering/RenderBox.cpp:
* rendering/RenderBox.h:
* rendering/RenderScrollbarPart.cpp:
* rendering/RenderScrollbarPart.h:
2012-05-22 Kentaro Hara <haraken@chromium.org>
[V8] Replace 'throwTypeError(); return Undefined();' with 'return throwTypeError();'
https://bugs.webkit.org/show_bug.cgi?id=87106
Reviewed by Adam Barth.
This patch replaces
throwTypeError();
return v8::Undefined();
with
return throwTypeError();
No tests. No change in behavior.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateOverloadedFunctionCallback):
(GenerateParametersCheck):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::overloadedMethodCallback):
(WebCore::TestObjV8Internal::overloadedMethod1Callback):
2012-05-22 Dan Bernstein <mitz@apple.com>
REGRESSION (r105513): CSS max-width is not applied to SVG element
https://bugs.webkit.org/show_bug.cgi?id=87050
Reviewed by Darin Adler.
Tests: svg/css/max-height.html
svg/css/max-width.html
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeReplacedLogicalWidth): Changed to also call into the base
class implementation of this function if max-width was specified.
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Changed to call into the bas class
implementation of this function if either height or max-height were specified.
2012-05-22 Kentaro Hara <haraken@chromium.org>
[V8] Pass Isolate to throwTypeError()
https://bugs.webkit.org/show_bug.cgi?id=87111
Reviewed by Adam Barth.
The objective is to pass Isolate around in V8 bindings.
This patch passes Isolate to throwTypeError() in custom bindings.
No tests. No change in behavior.
* bindings/v8/custom/V8ArrayBufferCustom.cpp:
(WebCore::V8ArrayBuffer::constructorCallback):
* bindings/v8/custom/V8ArrayBufferViewCustom.h:
(WebCore::constructWebGLArrayWithArrayBufferArgument):
(WebCore::constructWebGLArray):
* bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
(WebCore::V8AudioBufferSourceNode::bufferAccessorSetter):
* bindings/v8/custom/V8AudioContextCustom.cpp:
(WebCore::V8AudioContext::constructorCallback):
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::V8Blob::constructorCallback):
* bindings/v8/custom/V8ClipboardCustom.cpp:
(WebCore::V8Clipboard::setDragImageCallback):
* bindings/v8/custom/V8DOMFormDataCustom.cpp:
(WebCore::V8DOMFormData::constructorCallback):
* bindings/v8/custom/V8DataViewCustom.cpp:
(WebCore::V8DataView::constructorCallback):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::V8HTMLDocument::openCallback):
* bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
(WebCore::v8HTMLImageElementConstructorCallback):
* bindings/v8/custom/V8HTMLInputElementCustom.cpp:
(WebCore::V8HTMLInputElement::selectionStartAccessorGetter):
(WebCore::V8HTMLInputElement::selectionStartAccessorSetter):
(WebCore::V8HTMLInputElement::selectionEndAccessorGetter):
(WebCore::V8HTMLInputElement::selectionEndAccessorSetter):
(WebCore::V8HTMLInputElement::selectionDirectionAccessorGetter):
(WebCore::V8HTMLInputElement::selectionDirectionAccessorSetter):
(WebCore::V8HTMLInputElement::setSelectionRangeCallback):
* bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
(WebCore::V8HTMLMediaElement::controllerAccessorSetter):
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::inspectedObjectCallback):
* bindings/v8/custom/V8IntentConstructor.cpp:
(WebCore::V8Intent::constructorCallback):
* bindings/v8/custom/V8MessageChannelConstructor.cpp:
(WebCore::V8MessageChannel::constructorCallback):
* bindings/v8/custom/V8NotificationCenterCustom.cpp:
(WebCore::V8NotificationCenter::requestPermissionCallback):
* bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
(WebCore::V8SQLResultSetRowList::itemCallback):
* bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
(WebCore::V8WebKitMutationObserver::constructorCallback):
* bindings/v8/custom/V8WebKitPointConstructor.cpp:
(WebCore::V8WebKitPoint::constructorCallback):
* bindings/v8/custom/V8WebSocketCustom.cpp:
(WebCore::V8WebSocket::constructorCallback):
* bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
(WebCore::V8XMLHttpRequest::constructorCallback):
2012-05-22 Kentaro Hara <haraken@chromium.org>
[V8] Replace 'setDOMException(); return Undefined();' with 'return setDOMException();'
https://bugs.webkit.org/show_bug.cgi?id=87102
Reviewed by Adam Barth.
This patch replaces
setDOMException();
return v8::Undefined();
with
return setDOMException();
In addition, just in case, this patch replaces
if (...)
setDOMException();
return v8::Undefined();
with
if (...)
return setDOMException();
return v8::Undefined();
because people might insert some code just above
'return v8::Undefined()' in the future.
No tests. No change in behavior.
* bindings/v8/custom/V8ArrayBufferViewCustom.h:
(WebCore::constructWebGLArrayWithArrayBufferArgument):
(WebCore::setWebGLArrayHelper):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::WindowSetTimeoutImpl):
* bindings/v8/custom/V8DataViewCustom.cpp:
(WebCore::V8DataView::getInt8Callback):
(WebCore::V8DataView::getUint8Callback):
(WebCore::V8DataView::setInt8Callback):
(WebCore::V8DataView::setUint8Callback):
* bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp:
(WebCore::V8DirectoryEntrySync::getDirectoryCallback):
(WebCore::V8DirectoryEntrySync::getFileCallback):
* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
(WebCore::V8HTMLOptionsCollection::addCallback):
* bindings/v8/custom/V8NodeCustom.cpp:
(WebCore::V8Node::insertBeforeCallback):
(WebCore::V8Node::replaceChildCallback):
(WebCore::V8Node::removeChildCallback):
(WebCore::V8Node::appendChildCallback):
* bindings/v8/custom/V8SVGLengthCustom.cpp:
(WebCore::V8SVGLength::valueAccessorGetter):
(WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::getObjectParameter):
(WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback):
(WebCore::V8WebGLRenderingContext::getParameterCallback):
(WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
(WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
(WebCore::V8WebGLRenderingContext::getUniformCallback):
(WebCore::vertexAttribAndUniformHelperf):
(WebCore::uniformHelperi):
(WebCore::uniformMatrixHelper):
* bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
(WebCore::V8WebKitMutationObserver::observeCallback):
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::V8XMLHttpRequest::responseAccessorGetter):
2012-05-22 Martin Robinson <mrobinson@igalia.com>
[TextureMapper] [Cairo] Implement repaint counters
https://bugs.webkit.org/show_bug.cgi?id=87062
Reviewed by Gustavo Noronha Silva.
No new tests. This just adds a debugging feature that shouldn't
affect the normal drawing of a page.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::updateBackingStore): Now, if repaint counters are
enabled, increment the repaint count and call drawRepaintCounter.
(WebCore::TextureMapperLayer::drawRepaintCounter): Added.
* platform/graphics/texmap/TextureMapperLayer.h:
(TextureMapperLayer): Added declaration for drawRepaintCounter.
2012-05-22 Simon Fraser <simon.fraser@apple.com>
Use the same animation begin time while updating compositing layers
https://bugs.webkit.org/show_bug.cgi?id=87080
Reviewed by Dean Jackson.
Tidied up some beginAnimationUpdate/endAnimationUpdate logic,
but further cleaning is required. We currently bracket some calls
to recaclcStyle() with begin/endAnimationUpdate, but not all.
We don't bracket layout, or compositing updates. This patch
adds bracketing around compositing updates, in order to be
able to add some assertions in a later patch that rely on
RenderLayer::currentTransform() giving consistent results,
since currentTransform() depends on the animation begin time.
Made AnimationController::beginAnimationUpdate() and
AnimationController::endAnimationUpdate() nestable by adding
a counter.
Added a stack-based class, AnimationUpdateBlock, which
calls begin/endAnimationUpdate.
Replaced calls to begin/endAnimationUpdate in Document::updateStyleIfNeeded()
and Document::styleResolverChanged() with AnimationUpdateBlock. Filed a bug
to cover other calls to recalcStyle which might need this (87159).
Removed a call to beginAnimationUpdate() in Document::implicitOpen(),
which was added in r42415. I believe that r57390 makes this unnecessary,
and was not able to reproduce the original bug after removing it. It
was the only unpaired beginAnimationUpdate call.
Made AnimationControllerPrivate::getAnimatedStyleForRenderer() not
use a new beginTime each time it was called, so its beginTime now
depends on some earlier beginAnimationUpdate.
Fixed CSSComputedStyleDeclaration::getPropertyCSSValue() to use
an AnimationUpdateBlock so that calls to computed style do
use the current time to compute an animating value (as before).
Not testable.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* dom/Document.cpp:
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::implicitOpen):
(WebCore::Document::styleResolverChanged):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
(WebCore::AnimationController::AnimationController):
(WebCore::AnimationController::beginAnimationUpdate):
(WebCore::AnimationController::endAnimationUpdate):
* page/animation/AnimationController.h:
(AnimationController):
(WebCore):
(AnimationUpdateBlock):
(WebCore::AnimationUpdateBlock::AnimationUpdateBlock):
(WebCore::AnimationUpdateBlock::~AnimationUpdateBlock):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
2012-05-22 Tony Chang <tony@chromium.org>
REGRESSION(r117613): Dromaeo/jslib-style-prototype regressed by 20%
https://bugs.webkit.org/show_bug.cgi?id=87142
Reviewed by Alexis Menard.
Move CSSPropertyDisplay back into isValidKeywordPropertyAndValue.
Pass in the parser context so we can check whether we're grid or not.
No new tests. Covered by Dromaeo/jslib-style-prototype perf test.
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::parseKeywordValue):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFont):
== Rolled over to ChangeLog-2012-05-22 ==