blob: 79de067571a750eec5bdf443f3874d92a922845b [file] [log] [blame]
2012-10-11 Nat Duca <nduca@chromium.org>
Expose high-resolution on requestAnimationFrame callback
https://bugs.webkit.org/show_bug.cgi?id=66683
This changes requestAnimationFrame's animationStartTime argument
to be a high resolution DOM timestamp, per disucssion here:
http://lists.w3.org/Archives/Public/public-web-perf/2012Apr/0004.html
Reviewed by James Robinson.
Covered by existing requestAnimationFrame tests.
* dom/Document.cpp:
(WebCore::Document::serviceScriptedAnimations):
* dom/Document.h:
(Document):
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::serviceScriptedAnimations):
(WebCore):
(WebCore::ScriptedAnimationController::windowScreenDidChange):
(WebCore::ScriptedAnimationController::scheduleAnimation):
(WebCore::ScriptedAnimationController::animationTimerFired):
(WebCore::ScriptedAnimationController::displayRefreshFired):
* dom/ScriptedAnimationController.h:
(ScriptedAnimationController):
* page/FrameView.cpp:
(WebCore::FrameView::serviceScriptedAnimations):
* page/FrameView.h:
(FrameView):
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
(WebCore::DisplayRefreshMonitor::notifyClients):
* platform/graphics/DisplayRefreshMonitor.h:
(DisplayRefreshMonitor):
* platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
(WebCore::DisplayRefreshMonitor::displayLinkFired):
* platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
(WebCore):
(WebCore::DisplayRefreshMonitor::requestRefreshCallback):
(WebCore::DisplayRefreshMonitor::displayLinkFired):
2012-10-11 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r131100.
http://trac.webkit.org/changeset/131100
https://bugs.webkit.org/show_bug.cgi?id=99127
Caused an ASSERT (Requested by abarth|gardening on #webkit).
* platform/graphics/filters/CustomFilterValidatedProgram.cpp:
(WebCore::CustomFilterValidatedProgram::compositeFunctionString):
2012-10-11 Kenichi Ishibashi <bashi@chromium.org>
[Chromium] Improve vertical text rendering of HarfBuzzShaper (Re-land)
https://bugs.webkit.org/show_bug.cgi?id=98979
Reviewed by Tony Chang.
- Specify 'vert' and 'vrt2' features when we render vertical text.
- Set appropriate script so that harfbuzz-ng can use the features.
No new tests. fast/text/international/text-spliced-font.html should cover this change.
This change will affect after switching to harfbuzz-ng.
* platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp:
(WebCore::HarfBuzzNGFace::HarfBuzzNGFace):
(WebCore::findScriptForVerticalGlyphSubstitution): Added.
(WebCore):
(WebCore::HarfBuzzNGFace::setScriptForVerticalGlyphSubstitution): Added.
* platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
(HarfBuzzNGFace): Added m_scriptForVerticalText.
* platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::setFontFeatures):
Set 'vert' and 'vrt2' features when orientation() == Vertical.
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
Call setScriptForVerticalGlyphSubstitution() when orientation() == Vertical.
2012-10-11 Jay Civelli <jcivelli@chromium.org>
Fix for a crasher when generating MHTML for a page containing SVG images.
https://bugs.webkit.org/show_bug.cgi?id=99105
Reviewed by Adam Barth.
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeCSSStyleSheet):
(WebCore::PageSerializer::addImageToResources):
2012-10-11 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r131107.
http://trac.webkit.org/changeset/131107
https://bugs.webkit.org/show_bug.cgi?id=99126
Causes an ASSERT (Requested by abarth|gardening on #webkit).
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::labelForElement):
* dom/DocumentOrderedMap.cpp:
* dom/DocumentOrderedMap.h:
(DocumentOrderedMap):
* dom/Element.cpp:
(WebCore::Element::insertedInto):
(WebCore::Element::removedFrom):
(WebCore):
(WebCore::Element::willModifyAttribute):
* dom/Element.h:
(Element):
* dom/TreeScope.cpp:
(WebCore::TreeScope::TreeScope):
* dom/TreeScope.h:
(WebCore):
(TreeScope):
2012-10-11 Tim Horton <timothy_horton@apple.com>
LocalCurrentGraphicsContext will never restore the current context to null
https://bugs.webkit.org/show_bug.cgi?id=99122
Reviewed by Simon Fraser.
LocalCurrentGraphicsContext is meant to cause temporary changes to
NSGraphicsContext's currentContext. However, if it is entered when
currentContext is null, it will not restore to null, as a null
m_savedNSGraphicsContext was being used to indicate that the current and
passed-in graphics contexts were equal (and thus no save/restore was required).
Add a separate flag for whether or not we need to restore the context.
Also flip the order of calls to restore graphics context state so that
exiting LocalCurrentGraphicsContext does things in exactly the opposite
of entry.
* platform/mac/LocalCurrentGraphicsContext.h:
(LocalCurrentGraphicsContext):
* platform/mac/LocalCurrentGraphicsContext.mm:
(WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
(WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext):
2012-10-11 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r131109.
http://trac.webkit.org/changeset/131109
https://bugs.webkit.org/show_bug.cgi?id=99124
Does not compile on chromium-mac (Requested by
abarth|gardening on #webkit).
* platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp:
(WebCore::HarfBuzzNGFace::HarfBuzzNGFace):
* platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
(HarfBuzzNGFace):
* platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::setFontFeatures):
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
2012-10-11 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=99111
ScrollingStateNode should keep its Vector of children in an OwnPtr
Reviewed by Ada Chan.
Vector<OwnPtr<ScrollingStateNode> >* m_children; is now:
OwnPtr<Vector<OwnPtr<ScrollingStateNode> > > m_children;
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::ScrollingStateNode):
(WebCore::ScrollingStateNode::~ScrollingStateNode):
(WebCore::ScrollingStateNode::appendChild):
* page/scrolling/ScrollingStateNode.h:
(ScrollingStateNode):
2012-10-11 Levi Weintraub <leviw@chromium.org>
[Sub pixel layout] Fast-path iframe scrolling can picks up an extra pixel
https://bugs.webkit.org/show_bug.cgi?id=98571
Reviewed by Emil A Eklund.
Refactoring all coordinate-switching functionality to use a single "mode" flag
as opposed to having a bunch of boolean values. This enables the same set of
options across the board, and a consistent interface. This was previously
done for mapLocalToContainer.
The imptetus for this for this stems from the one logical change in this patch
which only effects sub-pixel layout. FrameView::convertToRenderer and
convertFromRenderer return IntPoint coordinates, and need to also snap transform
offsets to determine proper rects for scrolling.
Unlabeled functions below are simply being updated to these new interfaces.
Test: fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html
* WebCore.exp.in:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getUpperLeftCorner):
(WebCore::ContainerNode::getLowerRightCorner):
* dom/Element.cpp:
(WebCore::Element::boundsInRootViewSpace):
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::computeRelativePosition):
* dom/Node.cpp:
(WebCore::Node::convertToPage):
(WebCore::Node::convertFromPage):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::defaultEventHandler):
* page/FrameView.cpp:
(WebCore::FrameView::convertToRenderer): Now pixel-snaps offsets before passing
them to TransformState, which transforms the coordinates.
(WebCore::FrameView::convertFromRenderer): Ditto.
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::absoluteQuads):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::absoluteQuads):
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::mapAbsoluteToLocalPoint):
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
* rendering/RenderBoxModelObject.h:
(RenderBoxModelObject):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::userResize):
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::absolutePoint):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::mapLocalToContainer):
* rendering/RenderInline.h:
(RenderInline):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::absoluteToContents):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderMediaControls.cpp:
(WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::showPopup):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::localToAbsolute):
(WebCore::RenderObject::absoluteToLocal):
(WebCore::RenderObject::mapLocalToContainer):
(WebCore::RenderObject::mapAbsoluteToLocalPoint):
(WebCore::RenderObject::localToContainerQuad):
(WebCore::RenderObject::localToContainerPoint):
* rendering/RenderObject.h:
(RenderObject): MapLocalToContainerFlags is now MapCoordinatesFlags since it's
now used for other conversion methods.
(WebCore::RenderObject::localToAbsoluteQuad):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
* rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer):
(WebCore::RenderView::mapAbsoluteToLocalPoint):
* rendering/RenderView.h:
(RenderView):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::mapLocalToContainer):
* rendering/svg/RenderSVGForeignObject.h:
(RenderSVGForeignObject):
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::mapLocalToContainer):
* rendering/svg/RenderSVGInline.h:
(RenderSVGInline):
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::mapLocalToContainer):
* rendering/svg/RenderSVGModelObject.h:
(RenderSVGModelObject):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::mapLocalToContainer):
* rendering/svg/RenderSVGRoot.h:
(RenderSVGRoot):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::mapLocalToContainer):
* rendering/svg/RenderSVGText.h:
(RenderSVGText):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::mapLocalToContainer):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::localCoordinateSpaceTransform):
2012-10-11 Adam Barth <abarth@webkit.org>
Incorrect/Illegal static cast in FrameView.cpp
https://bugs.webkit.org/show_bug.cgi?id=98943
Reviewed by Eric Seidel.
HTMLFrameElementBase is the common base class for <frame> and <iframe>.
* page/FrameView.cpp:
(WebCore::FrameView::init):
2012-10-11 Kenichi Ishibashi <bashi@chromium.org>
[Chromium] Improve vertical text rendering of HarfBuzzShaper
https://bugs.webkit.org/show_bug.cgi?id=98979
Reviewed by Tony Chang.
- Specify 'vert' and 'vrt2' features when we render vertical text.
- Set appropriate script so that harfbuzz-ng can use the features.
No new tests. fast/text/international/text-spliced-font.html should cover this change.
This change will affect after switching to harfbuzz-ng.
* platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp:
(WebCore::HarfBuzzNGFace::HarfBuzzNGFace):
(WebCore::findScriptForVerticalGlyphSubstitution): Added.
(WebCore):
(WebCore::HarfBuzzNGFace::setScriptForVerticalGlyphSubstitution): Added.
* platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
(HarfBuzzNGFace): Added m_scriptForVerticalText.
* platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::setFontFeatures):
Set 'vert' and 'vrt2' features when orientation() == Vertical.
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
Call setScriptForVerticalGlyphSubstitution() when orientation() == Vertical.
2012-10-11 Dominic Mazzoni <dmazzoni@google.com>
AX: labelForElement is slow when there are a lot of DOM elements
https://bugs.webkit.org/show_bug.cgi?id=97825
Reviewed by Ryosuke Niwa.
Adds a DocumentOrderedMap to TreeScope that allows accessibility to
quickly map from an id to the label for that id. This speeds up
AccessibilityNode::labelForElement, which was a bottleneck in Chromium
when accessibility was on.
Tests: accessibility/title-ui-element-correctness.html
perf/accessibility-title-ui-element.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::labelForElement):
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesLabelForAttribute):
(WebCore):
(WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
* dom/DocumentOrderedMap.h:
(DocumentOrderedMap):
* dom/Element.cpp:
(WebCore::Element::insertedInto):
(WebCore::Element::removedFrom):
(WebCore::Element::updateLabel):
(WebCore):
(WebCore::Element::willModifyAttribute):
* dom/Element.h:
(Element):
* dom/TreeScope.cpp:
(WebCore::TreeScope::TreeScope):
(WebCore::TreeScope::addLabel):
(WebCore):
(WebCore::TreeScope::removeLabel):
(WebCore::TreeScope::labelElementForId):
* dom/TreeScope.h:
(WebCore):
(TreeScope):
(WebCore::TreeScope::shouldCacheLabelsByForAttribute):
2012-10-11 James Simonsen <simonjam@chromium.org>
unprefix window.performance.webkitNow()
https://bugs.webkit.org/show_bug.cgi?id=88278
Reviewed by Tony Gentilcore.
Test: fast/dom/Window/window-properties-performance.html
fast/performance/performance-now-timestamps.html
* page/Performance.cpp:
(WebCore::Performance::now):
* page/Performance.h:
(Performance):
* page/Performance.idl:
2012-10-11 Roger Fong <roger_fong@apple.com>
[WebGL] [Mac] only the mapped symbol for the first element of a uniform/attribute array is stored.
https://bugs.webkit.org/show_bug.cgi?id=98966
Reviewed by Dean Jackson.
We currently do not add name/mappedName symbol pairs for each element of a uniform/attribute array.
This is because we only add a number of symbols equal to how many symbols the shader compiler tells us there are.
The shader compiler treats an array as a single uniform. We need to be adding in symbols to the map for each element of the array ourselves.
The mappedName of each array element is the same between elements except for the "[index]" at the end so this is easy to do.
Tested using Khronos WebGL conformance suite:
conformance/glsl/misc/glsl-long-variable-names.html
* platform/graphics/ANGLEWebKitBridge.cpp:
(WebCore::getSymbolInfo):
2012-10-11 Andreas Kling <kling@webkit.org>
ElementAttributeData shouldn't be managing Element's callbacks.
<http://webkit.org/b/98987>
Reviewed by Anders Carlsson.
Dispatch the following attribute-related Element callbacks from within Element
instead of ElementAttributeData. Also made them private.
- willModifyAttribute
- didModifyAttribute
- didAddAttribute
- didRemoveAttribute
No behavior change, just making ElementAttributeData a bit dumber (a good thing.)
* dom/Element.cpp:
(WebCore::Element::detachAttribute):
(WebCore::Element::removeAttribute):
(WebCore::Element::setAttributeInternal):
(WebCore::Element::removeAttributeInternal):
(WebCore::Element::addAttributeInternal):
* dom/Element.h:
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::addAttribute):
(WebCore::ElementAttributeData::removeAttribute):
* dom/ElementAttributeData.h:
2012-10-11 Huang Dongsung <luxtella@company100.net>
[CSS Shaders] Make custom filters use a premultiplied buffer.
https://bugs.webkit.org/show_bug.cgi?id=98396
Reviewed by Dean Jackson.
Currently, a GLSL css_Composite function returns a premultiplied color, so
FECustomFilter must make a premultiplied buffer in the case when an author is
using the CSS mix function.
In addition, there are two performance benefits when FECustomFilter uses a premultiplied buffer.
1. FilterEffect::asImageBuffer is faster.
2. In the future when Accelerated Compositing implementations use
FECustomFilter, they do not need to convert an unmultiplied buffer to a
premultiplied buffer.
Test: css3/filters/custom/custom-filter-composite-fractional-source-alpha.html
* platform/graphics/filters/FECustomFilter.cpp:
(WebCore::FECustomFilter::applyShader):
2012-10-11 Rob Buis <rbuis@rim.com>
[CMAKE] Do not add include dirs twice
https://bugs.webkit.org/show_bug.cgi?id=99099
Reviewed by Yong Li.
Do not add WebCore_INCLUDE_DIRECTORIES to WebCoreTestSupport_INCLUDE_DIRECTORIES, the includes_directory
call does this for us.
* CMakeLists.txt:
2012-10-11 Huang Dongsung <luxtella@company100.net>
[CSS Shaders] Implement all composite operators except destination and lighter.
https://bugs.webkit.org/show_bug.cgi?id=97859
Reviewed by Dean Jackson.
Add expressions for all composite operators except destination and
lighter. The expressions are lifted directly from the CSS Compositing
and Blending spec [1]. WebKit adds these compositing expressions to the
author's shader.
[1]: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#advancedcompositing
Test: css3/filters/custom/custom-filter-composite-operators.html
* platform/graphics/filters/CustomFilterValidatedProgram.cpp:
(WebCore::CustomFilterValidatedProgram::compositeFunctionString):
2012-10-11 Joshua Bell <jsbell@chromium.org>
IndexedDB: IDL types defined in spec should be visible to scripts
https://bugs.webkit.org/show_bug.cgi?id=99093
Reviewed by Adam Barth.
Interfaces defined in the spec WebIDL, such as IDBCursorWithValue, should be exposed
to scripts as properties of the global object. A few types were missing - add them.
Test: storage/indexeddb/interfaces.html
* Modules/indexeddb/DOMWindowIndexedDatabase.idl:
* Modules/indexeddb/WorkerContextIndexedDatabase.idl:
2012-10-11 Geoffrey Garen <ggaren@apple.com>
Removed ASSERT_CLASS_FITS_IN_CELL
https://bugs.webkit.org/show_bug.cgi?id=97634
Reviewed by Mark Hahnenberg.
* bindings/js/JSDOMWindowShell.cpp:
(WebCore):
* bindings/js/JSImageConstructor.cpp:
(WebCore):
* bindings/js/JSNodeFilterCondition.cpp:
(WebCore):
* bindings/js/JSWorkerContextBase.cpp:
(WebCore):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore):
* bridge/runtime_method.cpp:
(JSC):
2012-10-10 Brady Eidson <beidson@apple.com>
Switch ResourceLoader::resourceData() from SharedBuffer to ResourceBuffer
https://bugs.webkit.org/show_bug.cgi?id=98976
Reviewed by Anders Carlsson.
No new tests (No change in behavior).
* WebCore.exp.in:
* html/ImageDocument.cpp:
(WebCore::ImageDocumentParser::appendBytes):
(WebCore::ImageDocumentParser::finish):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::mainResourceContent):
(WebCore::InspectorPageAgent::sharedBufferContent):
(WebCore):
(WebCore::InspectorPageAgent::dataContent):
* inspector/InspectorPageAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didFinishLoading):
(WebCore::InspectorResourceAgent::didFailLoading):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::mainResourceData):
(WebCore::DocumentLoader::setupForReplaceByMIMEType):
(WebCore::DocumentLoader::maybeCreateArchive):
(WebCore::DocumentLoader::mainResource):
(WebCore::DocumentLoader::maybeFinishLoadingMultipartContent):
* loader/DocumentLoader.h:
(WebCore):
(DocumentLoader):
* loader/ResourceBuffer.cpp:
(WebCore::ResourceBuffer::append):
(WebCore):
(WebCore::ResourceBuffer::clear):
* loader/ResourceBuffer.h:
(ResourceBuffer):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::resourceData):
(WebCore::ResourceLoader::addData):
(WebCore::ResourceLoader::willStopBufferingData):
* loader/ResourceLoader.h:
(WebCore):
(ResourceLoader):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::sendDataToResource):
(WebCore::SubresourceLoader::didFinishLoading):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
2012-10-11 Konrad Piascik <kpiascik@rim.com>
Web Inspector: node search does not work with elements on touch start listener
https://bugs.webkit.org/show_bug.cgi?id=95252
Reviewed by Pavel Feldman.
Added new InspectorInstrumentation::handleTouchEvent() method which
will prevent a touch handler from firing and inspect and element if we
are already searching for a node to highlight.
Now when a user has chosen to inspect element (magnifying glass icon)
and touches on a page the event will be directed to inspector and
handled appropriately.
Not testable.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::handleTouchEvent):
(WebCore):
* inspector/InspectorDOMAgent.h:
(InspectorDOMAgent):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::handleTouchEventImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::handleTouchEvent):
(WebCore):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleTouchEvent):
2012-10-11 Otto Derek Cheung <otcheung@rim.com>
[BlackBerry] Credentials for HTTPS urls are saved in the HTTP protection space
https://bugs.webkit.org/show_bug.cgi?id=99082
Reviewed by Rob Buis.
Adding support for secure ProtectionSpaces in Credentials
to prevent credentials from being overwritten/used when the user
accesses both versions of the same url.
PR 199457
The issue was the secure/non-secure version of the same protocol
were using the same ProtectionSpace enum in the network stack. When
the credentials are saved, it will overwrite each other since the
protection object is identical.
The fix is to use the WebKit provided secure enums when the protcol is secure.
To test this, access a restricted site that is running on http. Save the
password and access the same restricted site (same domain
and path) but on https. The browser should prompt for credentials.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::notifyAuthReceived):
(WebCore::NetworkJob::handleFTPHeader):
(WebCore::NetworkJob::sendRequestWithCredentials):
(WebCore::NetworkJob::storeCredentials):
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob):
2012-10-11 Arnaud Renevier <a.renevier@sisa.samsung.com>
[texmap] logic error in BitmapTextureGL::updateContents
https://bugs.webkit.org/show_bug.cgi?id=98969
Reviewed by Noam Rosenthal.
Incorrect test (bytesPerLine == targetRect.width() / 4) never
evaluates to true. Change it to correct test
(bytesPerLine == targetRect.width() * 4)
No new tests because no functional change.
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::BitmapTextureGL::updateContents):
2012-10-11 Dan Bernstein <mitz@apple.com>
<rdar://problem/12477191> Combined text reverts to full-width font after a style change
https://bugs.webkit.org/show_bug.cgi?id=99009
Reviewed by John Sullivan.
Test: fast/text/text-combine-width-after-style-change.html
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::styleDidChange): Changed to reset m_isCombined to false, to
ensure that combineText() is called on the next layout.
2012-10-11 Arnaud Renevier <a.renevier@sisa.samsung.com>
accelerated compositing does not work with ati driver
https://bugs.webkit.org/show_bug.cgi?id=97472
Reviewed by Martin Robinson.
Create m_parentWindow at positive position. Otherwise, parts of it are
not displayed on ati drivers.
Covered by existing tests.
* platform/gtk/RedirectedXCompositeWindow.cpp:
(WebCore::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
2012-10-11 Jaehun Lim <ljaehun.lim@samsung.com>
Fix JPEG decoding faiure when IMAGE_DECODER_DOWN_SAMPLING is enabled
https://bugs.webkit.org/show_bug.cgi?id=98878
Reviewed by Kenneth Russell.
When using libjpeg-turbo and enabling IMAGE_DECODER_DOWN_SAMPLING,
JPEG decoding failed because of no support for JCS_EXT_RGBA, JCS_EXT_BGRA.
Set RGBA values when color space is JCS_EXT_RGBA or JCS_EXT_BGRA.
No new tests.
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageDecoder::outputScanlines):
2012-10-11 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Preview HTML in ajax responses in network panel
https://bugs.webkit.org/show_bug.cgi?id=99066
Reviewed by Yury Semikhatsky.
HTML preview is now shown for XHR responses with text/html mime types.
Also RequestHTMLView is refactored to use sandbox iframe correctly.
Also extracted a method to generate dataURL from resource/request content.
* inspector/front-end/NetworkRequest.js:
(WebInspector.NetworkRequest):
(WebInspector.NetworkRequest.prototype.populateImageSource):
(WebInspector.NetworkRequest.prototype.asDataURL):
* inspector/front-end/RequestHTMLView.js:
(WebInspector.RequestHTMLView):
(WebInspector.RequestHTMLView.prototype._createIFrame):
* inspector/front-end/RequestPreviewView.js:
(WebInspector.RequestPreviewView.prototype._createPreviewView):
* inspector/front-end/Resource.js:
(WebInspector.Resource.prototype.populateImageSource):
* inspector/front-end/ResourceUtils.js:
(WebInspector.contentAsDataURL):
2012-10-11 Christophe Dumez <christophe.dumez@intel.com>
Regression(r131058): Broke EFL build
https://bugs.webkit.org/show_bug.cgi?id=99079
Unreviewed build fix.
Use iterator::value instead of iterator::second to fix
build break after r131058.
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
2012-10-11 Mihai Balan <mibalan@adobe.com>
Always enable the experiments tab for WebKit nightly
Web Inspector: Enabling experiments tab in WebKit nightly.
https://bugs.webkit.org/show_bug.cgi?id=98923
Reviewed by Pavel Feldman.
Enabling Web Inspector experiments tab in WebKit nightly. This is done by adding a new
Preference key, Preferences.experimentsEnabled. Default values are true for WebKit and false
for Chromium. They can also be overridden as before (in Chromium)
* inspector/front-end/Settings.js:
(WebInspector.ExperimentsSettings.prototype.get experimentsEnabled):
2012-10-11 Hayato Ito <hayato@chromium.org>
Support re-projection for Shadow DOM.
https://bugs.webkit.org/show_bug.cgi?id=97151
Reviewed by Dimitri Glazkov.
Update node distribution algorithm so that nodes can be re-projected to insertion points
in nested shadow subtree.
See the latest Shadow DOM spec for what 're-projected' means:
- http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
Also see the related W3C bug:
- http://www.w3.org/Bugs/Public/show_bug.cgi?id=18513
Since this change breaks existing behavior, we have to update several code at once, which includes:
- ContentDistributer: ContentDistributor now re-projects distributed nodes.
- ComposedShadowTreeWalker: ComposedShadowTreeWalker is now aware of re-projection. That can
resolve re-projection transparently.
- AncestorChainWalker (formerly named ComposedShadowTreeParentWallker):
AncestorChainWalker is now aware of re-projection. I've also added a crossingInsertionPoint()
member function so that clients of the walker can know whether the walker is just crossing
insertion points for a re-projected node.
- EventDispatcher: EventDispatcher now uses the updated AncestorChainWalker and its
crossingInsertionPoint() so that EventDispatcher can compute relative target for each ancestor correctly.
I've also updated existing layout tests and added some layout tests for re-projection.
Re-projection for multiple shadow root is not supported yet. I'll address that in another bug.
Tests: fast/dom/shadow/composed-shadow-tree-walker.html
fast/dom/shadow/shadow-dom-event-dispatching.html
fast/dom/shadow/shadowdom-reprojection-1.html
fast/dom/shadow/shadowdom-reprojection-2.html
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::resolveReprojection):
(WebCore):
(WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
(WebCore::ComposedShadowTreeWalker::traverseParent):
(WebCore::AncestorChainWalker::AncestorChainWalker):
(WebCore::AncestorChainWalker::parent):
* dom/ComposedShadowTreeWalker.h:
(AncestorChainWalker):
(WebCore::AncestorChainWalker::crossingInsertionPoint):
* dom/EventDispatcher.cpp:
(WebCore::EventRelatedTargetAdjuster::adjust):
(WebCore::EventDispatcher::ensureEventAncestors):
* dom/TreeScope.cpp:
(WebCore::TreeScope::focusedNode):
* html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::attach):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distribute):
* page/EventHandler.cpp:
(WebCore::EventHandler::updateMouseEventTargetNode):
2012-10-11 Shinya Kawanaka <shinyak@chromium.org>
Make ContentSelectorQuery work when siblings are passed explicitly.
https://bugs.webkit.org/show_bug.cgi?id=96990
Reviewed by Dimitri Glazkov.
When we implement content reprojection in ShadowDOM, we have to pass a node pool to SelectorChecker.
We introdue ShadowDOMSiblingTraversalStrategy, which traverses a node pool instead of real node siblings.
Since ContentSelector is a very hot place, we don't want to regress performance. In the previous patch,
we've make ContentSelector::checkOneSelector template to take SiblingTraversalStrategy as an argument.
We also move DOMSiblingTraversalStrategy to SiblingTraversalStrategies.h.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/SelectorChecker.cpp:
(WebCore):
* css/SelectorChecker.h:
* css/SiblingTraversalStrategies.h: Added.
(WebCore):
(DOMSiblingTraversalStrategy): Moved from SelectorChecker.
(WebCore::DOMSiblingTraversalStrategy::isFirstChild):
(WebCore::DOMSiblingTraversalStrategy::isLastChild):
(WebCore::DOMSiblingTraversalStrategy::isFirstOfType):
(WebCore::DOMSiblingTraversalStrategy::isLastOfType):
(WebCore::DOMSiblingTraversalStrategy::countElementsBefore):
(WebCore::DOMSiblingTraversalStrategy::countElementsOfTypeBefore):
(WebCore::DOMSiblingTraversalStrategy::countElementsAfter):
(WebCore::DOMSiblingTraversalStrategy::countElementsOfTypeAfter):
(WebCore::ShadowDOMSiblingTraversalStrategy::ShadowDOMSiblingTraversalStrategy):
(ShadowDOMSiblingTraversalStrategy): SiblingTraversalStrategy which uses a node pool instead of a real element
siblings. This strategy takes a vector of node which we traverse.
(WebCore::ShadowDOMSiblingTraversalStrategy::isFirstChild):
(WebCore::ShadowDOMSiblingTraversalStrategy::isLastChild):
(WebCore::ShadowDOMSiblingTraversalStrategy::isFirstOfType):
(WebCore::ShadowDOMSiblingTraversalStrategy::isLastOfType):
(WebCore::ShadowDOMSiblingTraversalStrategy::countElementsBefore):
(WebCore::ShadowDOMSiblingTraversalStrategy::countElementsAfter):
(WebCore::ShadowDOMSiblingTraversalStrategy::countElementsOfTypeBefore):
(WebCore::ShadowDOMSiblingTraversalStrategy::countElementsOfTypeAfter):
* css/StyleResolver.cpp:
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distributeSelectionsTo):
* html/shadow/ContentSelectorQuery.cpp: Uses ShadowDOMSiblingTraversalStrategy instead of DOMSiblingTraversalStrategy.
(WebCore::ContentSelectorChecker::ContentSelectorChecker):
(WebCore):
(WebCore::ContentSelectorChecker::checkContentSelector):
(WebCore::ContentSelectorDataList::initialize):
(WebCore::ContentSelectorDataList::matches):
(WebCore::ContentSelectorQuery::ContentSelectorQuery):
(WebCore::ContentSelectorQuery::matches):
* html/shadow/ContentSelectorQuery.h:
(ContentSelectorChecker):
(WebCore):
(ContentSelectorDataList):
(ContentSelectorQuery):
2012-10-11 Balazs Kelemen <kbalazs@webkit.org>
[Qt] GraphicsContextPlatformPrivate is leaking it's ShadowBlur
https://bugs.webkit.org/show_bug.cgi?id=99073
Reviewed by Noam Rosenthal.
Stop leaking GraphicsContextPlatformPrivate::shadow.
No change in behavior so no new tests.
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
Always destroy shadow. It is obviously owned by the context so it has
nothing to do with the erly return.
2012-10-11 Joshua Bell <jsbell@chromium.org>
WebIDL: overloaded methods prevent number -> string conversion
https://bugs.webkit.org/show_bug.cgi?id=85326
Reviewed by Kentaro Hara.
Make the default behavior for overloaded methods matching DOMString arguments match the
default behavior for non-overloaded methods, which more closely matches the WebIDL spec.
Enable legacy behavior of only matching undefined/null/string/object(and not number,
boolean, etc) via the StrictTypeChecking attribute.
Tests: storage/indexeddb/cursor-overloads.html
storage/indexeddb/legacy-constants.html
... and run-bindings-tests
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::stringToDirection): Handle "0"..."4" as stringified legacy constants.
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBDatabase.cpp: Remove redundant overloads.
(WebCore::IDBDatabase::transaction): Remove redundant overloads.
* Modules/indexeddb/IDBDatabase.h:
(IDBDatabase):
* Modules/indexeddb/IDBDatabase.idl: Remove redundant overloads.
* Modules/indexeddb/IDBIndex.cpp: Remove redundant overloads.
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::openKeyCursor):
* Modules/indexeddb/IDBIndex.h: Remove redundant overloads.
(IDBIndex):
* Modules/indexeddb/IDBIndex.idl: Remove redundant overloads.
* Modules/indexeddb/IDBObjectStore.cpp: Remove redundant overloads.
(WebCore::IDBObjectStore::openCursor):
* Modules/indexeddb/IDBObjectStore.h: Remove redundant overloads.
(IDBObjectStore):
* Modules/indexeddb/IDBObjectStore.idl: Remove redundant overloads.
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::stringToMode): Handle "0"..."4" as stringified legacy constants.
* Modules/indexeddb/IDBTransaction.h:
* bindings/scripts/CodeGeneratorJS.pm: Check for StrictTypeChecking attribute.
(GenerateParametersCheckExpression):
* bindings/scripts/CodeGeneratorV8.pm: Ditto.
(GenerateParametersCheckExpression):
* bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined.
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
(WebCore):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
* bindings/scripts/test/TestObj.idl: Added [StrictTypeChecking] to DOMString overloads,
plus a new DOMString overload w/o it.
* bindings/scripts/test/V8/V8TestObj.cpp: Rebaselined.
(WebCore::TestObjV8Internal::overloadedMethod11Callback):
(TestObjV8Internal):
(WebCore::TestObjV8Internal::overloadedMethodCallback):
* html/canvas/CanvasRenderingContext2D.idl: Tag legacy overloads with [StrictTypeChecking].
* xml/XMLHttpRequest.idl: Ditto.
2012-10-11 Justin Novosad <junov@chromium.org>
[Chromium][Mac] r130994 seems to break chromium gpu test
https://bugs.webkit.org/show_bug.cgi?id=98995
Reviewed by Stephen White.
Removing unnecessary assertion that was based on an invalid assumption
that 2d canvas draw operations were always called from within WebThread
tasks.
Test: Canvas2DAllowed chromium gpu_test
* platform/graphics/chromium/Canvas2DLayerManager.cpp:
(WebCore::Canvas2DLayerManager::willProcessTask):
2012-10-11 Kenichi Ishibashi <bashi@chromium.org>
REGRESSION(130231): Causes 3 complex font test failures on EFL / Harfbuzz+Freetype
https://bugs.webkit.org/show_bug.cgi?id=98247
Reviewed by Kenneth Rohde Christiansen.
Implement canRenderCombiningCharacterSequence() for the Freetype case.
No new tests, covered by existing tests. Actually the lack of the implementation made
fast/text/atsui-multiple-renderers.html, fast/text/atsui-spacing-features.html and
fast/text/wide-zero-width-space.html fail on EFL.
* platform/graphics/freetype/SimpleFontDataFreeType.cpp: Implement canRenderCombiningCharacterSequence().
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
2012-10-11 Keishi Hattori <keishi@webkit.org>
F4 key should open the picker popup on Windows and Linux
https://bugs.webkit.org/show_bug.cgi?id=98754
Reviewed by Kent Tamura.
On Windows, F4 key is used to open the combo box popup. We will introduce the same keybinding for picker popups.
Added test to calendar-picker-key-operations.html, date-suggestion-picker-key-operations.html, time-suggestion-picker-key-operations.html.
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent): Open picker on F4 key if it is enabled.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::shouldOpenPickerWithF4Key): Returns true if we want to enable the F4 key binding on this platform. Return false for default.
(WebCore):
* rendering/RenderTheme.h:
(RenderTheme):
* rendering/RenderThemeChromiumLinux.cpp:
(WebCore::RenderThemeChromiumLinux::shouldOpenPickerWithF4Key): Returns true.
(WebCore):
* rendering/RenderThemeChromiumLinux.h:
* rendering/RenderThemeChromiumWin.cpp:
(WebCore):
(WebCore::RenderThemeChromiumWin::shouldOpenPickerWithF4Key): Returns true.
* rendering/RenderThemeChromiumWin.h:
(RenderThemeChromiumWin):
2012-10-11 John J. Barton <johnjbarton@chromium.org>
Web Inspector: Zebra stripe the console
https://bugs.webkit.org/show_bug.cgi?id=98701
Reviewed by Pavel Feldman.
Add .console-message:hover rule to lightly highlight the message line.
* inspector/front-end/inspector.css:
(.console-message:hover):
2012-10-11 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Filter out embedder injected content scripts
https://bugs.webkit.org/show_bug.cgi?id=99039
Reviewed by Yury Semikhatsky.
* inspector/front-end/NetworkUISourceCodeProvider.js:
(WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
2012-10-11 Pavel Feldman <pfeldman@chromium.org>
Not reviewed: revert 131004, 131012, 131016, 131042, 131043 for breaking inspector console
https://bugs.webkit.org/show_bug.cgi?id=99042
One can't type in the inspector console after 131004.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMAllInOne.cpp:
* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::detach):
(WebCore::Element::recalcStyle):
* dom/Element.h:
(WebCore):
(Element):
* dom/ElementRareData.h:
(ElementRareData):
* dom/Node.cpp:
(WebCore::checkAcceptChild):
* dom/Node.h:
(Node):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::nextRenderer):
* dom/PseudoElement.cpp: Removed.
* dom/PseudoElement.h: Removed.
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::setInnerNode):
(WebCore::HitTestResult::setInnerNonSharedNode):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::updateBeforeAfterContent):
(WebCore):
(WebCore::RenderBlock::splitBlocks):
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
(WebCore::RenderBlock::createReplacementRunIn):
(WebCore::RenderBlock::renderName):
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::updateBeforeAfterContent):
(WebCore):
* rendering/RenderButton.h:
(RenderButton):
* rendering/RenderCounter.cpp:
(WebCore::RenderCounter::originalText):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::renderName):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::renderName):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::styleDidChange):
(WebCore::RenderInline::addChildIgnoringContinuation):
(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::renderName):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::updateMarkerLocation):
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::renderName):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
* rendering/RenderObject.h:
(WebCore::RenderObject::generatingNode):
* rendering/RenderObjectChildList.cpp:
(WebCore):
(WebCore::findBeforeAfterParent):
(WebCore::RenderObjectChildList::updateBeforeAfterStyle):
(WebCore::createRendererForBeforeAfterContent):
(WebCore::ensureBeforeAfterContainer):
(WebCore::RenderObjectChildList::updateBeforeAfterContent):
* rendering/RenderObjectChildList.h:
(RenderObjectChildList):
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::updateBeforeAfterContent):
(WebCore):
* rendering/RenderRubyText.h:
(RenderRubyText):
* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::renderName):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::updateBeforeAndAfterContent):
(WebCore):
(WebCore::RenderTableRow::styleDidChange):
* rendering/RenderTableRow.h:
(RenderTableRow):
(WebCore::RenderTableRow::renderName):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addChild):
* rendering/RenderTableSection.h:
(WebCore::RenderTableSection::renderName):
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
2012-10-11 Arpita Bahuguna <arpitabahuguna@gmail.com>
REGRESSION (r96393): In some cases, generated content is never shown
https://bugs.webkit.org/show_bug.cgi?id=88196
Reviewed by Antti Koivisto.
Elements with style specified from an attribute selector in conjunction
with a pseudo-element should not take on the shared style of their
previous matching sibling (if any).
The problem here is that an attribute selector appended by a pseudo-element
does not return any matched rules for the call (matchesRuleSet(m_uncommonAttributeRuleSet.get()))
in StyleResolver::locateSharedStyle().
This is because of the way pseudo-elements are handled in
SelectorChecker::checkSelector(). For a pseudo-element selector we check
for the condition (!context.elementStyle && m_mode == ResolvingStyle) and
since for this particular flow the SelectorChecker mode is set to ResolvingStyle
and since the current element's style is still not available we fail this
initial check and return SelectorFailsLocally from checkSelector(). This is
incorrect behavior since the element does have an attribute selector specified
for it.
Have thus introduced another enum value: SharingRules for SelectorChecker's Mode.
SelectorChecker's mode should be set to SharingRules before making the
call to collectMatchingRules() and then reset (back to ResolvingStyle) thereafter.
Existing Mode value: CollectingRules although appropriate cannot be used in this
scenario because we also don't want to set any value to dynamicPseudo for this flow.
Test: fast/selectors/style-sharing-attribute-selector-with-pseudo-element.html
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkSelector):
Added additional check for SelectorChecker's mode: SharingRules when
trying to match for the pseudo-element selector.
* css/SelectorChecker.h:
Added SharingRules to Mode enum.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
(WebCore::StyleResolver::locateSharedStyle):
* css/StyleResolver.h:
(StyleResolver):
Renamed matchesRuleSet() to a more descriptive styleSharingCandidateMatchesRuleSet().
Also, setting the SelectorChecker's mode to SharingRules before calling
on collectMatchingRules() from styleSharingCandidateMatchesRuleSet().
2012-10-11 Shinya Kawanaka <shinyak@chromium.org>
Some shadow roots are not showing up in Inspector.
https://bugs.webkit.org/show_bug.cgi?id=88251
Reviewed by Pavel Feldman.
When an element has only text node, its shadow root is not showing up in Inspector, since
child text is shown in oneline. We had to prevent from inlining child text when a shadow root is
added.
Test: inspector/elements/shadow-root.html
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMNode):
(WebInspector.DOMNode.prototype.hasShadowRoots):
* inspector/front-end/ElementsTreeOutline.js:
2012-10-11 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] More responsive scroll animations
https://bugs.webkit.org/show_bug.cgi?id=99016
Reviewed by Jocelyn Turcotte.
Changes the scrolling animations so they accelerate faster than they deccelerate,
making the animation respond faster to user input.
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::parametersForScrollGranularity):
* platform/ScrollAnimatorNone.h:
(ScrollAnimatorNone):
2012-10-11 Alexander Shalamov <alexander.shalamov@intel.com>
[CSS3 Media Queries] Aspect ratio value re-parsed when media query expression is evaluated
https://bugs.webkit.org/show_bug.cgi?id=99003
Reviewed by Kenneth Rohde Christiansen.
Use CSSAspectRatioValue instead of CSSValueList to store aspect ratio value
in order to avoid re-parsing of aspect ratio data during media expression evaluation.
test: fast/media/w3c/test_media_queries.html
* css/MediaQueryEvaluator.cpp:
(WebCore::compareAspectRatioValue):
(WebCore):
(WebCore::aspect_ratioMediaFeatureEval):
(WebCore::device_aspect_ratioMediaFeatureEval):
* css/MediaQueryExp.cpp:
(WebCore::MediaQueryExp::MediaQueryExp):
2012-10-11 Zeno Albisser <zeno@webkit.org>
[Qt] Implement GraphicsSurfaceToken to replace uint64_t as token type.
https://bugs.webkit.org/show_bug.cgi?id=98501
Replace the token type for GraphicsSurface with a new class GraphicsSurfaceToken.
This is necessary in order to implement GraphicsSurface for Windows.
Depending on the platform a GraphicsSurfaceToken might contain a
WindowID (Linux/GLX), two IOSurfaceIDs (Mac) or in the future two HANDLEs (Windows).
The simple uint64_t is not sufficient anymore, since a single HANDLE in windows
can be 64bit already.
Reviewed by Noam Rosenthal.
* Target.pri:
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::graphicsSurfaceToken):
* platform/graphics/surfaces/GraphicsSurface.cpp:
(WebCore::GraphicsSurface::create):
(WebCore::GraphicsSurface::exportToken):
* platform/graphics/surfaces/GraphicsSurface.h:
(GraphicsSurface):
* platform/graphics/surfaces/GraphicsSurfaceToken.h: Added.
(WebCore):
(GraphicsSurfaceToken):
(WebCore::GraphicsSurfaceToken::GraphicsSurfaceToken):
(WebCore::GraphicsSurfaceToken::operator!=):
(WebCore::GraphicsSurfaceToken::isValid):
* platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
(WebCore::GraphicsSurfacePrivate::token):
(GraphicsSurfacePrivate):
(WebCore::GraphicsSurface::platformExport):
(WebCore::GraphicsSurface::platformImport):
* platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
(WebCore::GraphicsSurface::platformExport):
(WebCore::GraphicsSurface::platformImport):
* platform/graphics/texmap/TextureMapperBackingStore.cpp:
(WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface):
(WebCore::TextureMapperSurfaceBackingStore::setSurface):
* platform/graphics/texmap/TextureMapperBackingStore.h:
(TextureMapperSurfaceBackingStore):
(WebCore::TextureMapperSurfaceBackingStore::TextureMapperSurfaceBackingStore):
* platform/graphics/texmap/TextureMapperPlatformLayer.h:
(WebCore::TextureMapperPlatformLayer::graphicsSurfaceToken):
2012-10-11 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: [Elements] Breadcrumbs are not updated upon involved elements' className changes
https://bugs.webkit.org/show_bug.cgi?id=98887
Reviewed by Vsevolod Vlasov.
Breadcrumbs should be updated upon the "class" and "id" attribute changes of elements participating in the breadcrumb path.
Test: inspector/elements/breadcrumb-updates.html
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel):
(WebInspector.ElementsPanel.prototype._updateBreadcrumbIfNeeded):
2012-10-11 Kunihiko Sakamoto <ksakamoto@chromium.org>
Final newline (LF or CRLF) in paste buffer is converted to space
https://bugs.webkit.org/show_bug.cgi?id=80838
Reviewed by Ryosuke Niwa.
Currently newline characters are replaced with spaces when pasted
to text input. This behavior was introduced in r37539, with the
intention to follow the FireFox's behavior (see
https://bugs.webkit.org/show_bug.cgi?id=20461). However, FireFox
truncates newlines at the end of pasted text, instead of replacing
them with spaces. So this patch changes TextFieldInputType to cut
trailing newlines of inserted text.
Test: fast/forms/paste-multiline-text-input.html
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
Truncates trailing newlines.
2012-10-11 Kent Tamura <tkent@chromium.org>
Introduce Localizer::isRTL, and use it in DateTimeChooserImpl
https://bugs.webkit.org/show_bug.cgi?id=98992
* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::isRTL): Need to initialize 'status'.
2012-10-11 Eugene Klyuchnikov <eustas.bug@gmail.com>
Web Inspector: The 'X' of the close button of Settings view is not centered
https://bugs.webkit.org/show_bug.cgi?id=99008
Reviewed by Alexander Pavlov.
Fixed text positioning in CSS.
* inspector/front-end/helpScreen.css:
(.help-close-button):
2012-10-11 Kent Tamura <tkent@chromium.org>
Introduce Localizer::isRTL, and use it in DateTimeChooserImpl
https://bugs.webkit.org/show_bug.cgi?id=98992
Reviewed by Kentaro Hara.
- Move the RTL detection code in
WebKit/chromium/src/DateTimeChooserImpl.cpp to LocaleWin::isRTL()
- Introduce Localizer::isRTL as a pure virtual function
- Implement LocaleMac::isRTL with native API
- Implement LocaleICU::isRTL with ICU API
- Add dummy implementation: LocaleNone::isRTL
Add some tests to WebKit/chromium/tests/.
* platform/text/Localizer.h:
(Localizer): Declare pure virtual isRTL.
* platform/text/LocaleICU.h:
(LocaleICU): Declare isRTL.
* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::isRTL): Implemented with uloc_getCharacterOrientation.
* platform/text/LocaleNone.cpp:
(LocaleNone): Declare isRTL.
(WebCore::LocaleNone::isRTL): Added.
* platform/text/LocaleWin.h:
(LocaleWin): Declare isRTL.
* platform/text/LocaleWin.cpp:
(WebCore::LocaleWin::isRTL): Implemented.
* platform/text/mac/LocaleMac.h:
(LocaleMac): Declare isRTL.
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::isRTL): Implemented.
2012-10-11 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: TypeError in ConsoleMessage.js
https://bugs.webkit.org/show_bug.cgi?id=98999
Reviewed by Alexander Pavlov.
This patch is based on patch by John J. Barton.
Added a check that stack length is equal.
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype.isEqual):
2012-10-10 Jer Noble <jer.noble@apple.com>
Disallow full screen mode keyboard access by default.
https://bugs.webkit.org/show_bug.cgi?id=98971
<rdar://problem/12474226>
Reviewed by Sam Weinig.
Fall back to requesting non-keyboard access if the client refuses to allow keyboard access.
* dom/Document.cpp:
(WebCore::Document::requestFullScreenForElement):
2012-10-10 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI instrument HTMLCanvas element.
https://bugs.webkit.org/show_bug.cgi?id=98917
Reviewed by Yury Semikhatsky.
It also includes non intrusive instrumentation for skia classes.
Test: inspector/profiler/memory-instrumentation-canvas.html
* WebCore.gypi:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::reportMemoryUsage):
(WebCore):
* html/HTMLCanvasElement.h:
(HTMLCanvasElement):
* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::reportMemoryUsage):
(WebCore):
* platform/graphics/ImageBuffer.h:
(ImageBuffer):
* platform/graphics/chromium/ImageBufferDataSkia.h:
(ImageBufferData):
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBufferData::reportMemoryUsage):
(WebCore):
* platform/graphics/skia/MemoryInstrumentationSkia.cpp: Copied from Source/WebCore/platform/graphics/chromium/ImageBufferDataSkia.h.
(reportMemoryUsage):
* platform/graphics/skia/MemoryInstrumentationSkia.h: Copied from Source/WebCore/platform/graphics/chromium/ImageBufferDataSkia.h.
* platform/graphics/skia/NativeImageSkia.cpp:
2012-10-10 Mike West <mkwst@google.com>
Document calls createElement with the wrong parameters.
https://bugs.webkit.org/show_bug.cgi?id=98907
Reviewed by Kent Tamura.
Document::importNode calls Document::createElement with a QualifiedName
and ExceptionCode. The Document::createElement that takes a
QualifiedName doesn't generate an exception; the second argument is a
bool, which the ExceptionCode autocasts into.
Changing the argument to an explicit bool shouldn't have any visible
effect; no new tests are required.
* dom/Document.cpp:
(WebCore::Document::importNode):
2012-10-10 Lianghui Chen <liachen@rim.com>
[BlackBerry] Fix assertion in NetworkJob::notifyChallengeResult.
https://bugs.webkit.org/show_bug.cgi?id=97397
Internal PR: 186597.
Internally reviewed by Yong Li, Joe Mason.
Reviewed by George Staikos.
Add a singleton AuthenticationChallengeManager to manage authentication
challenge dialog. It does following things:
Record page creation/deletion, so it knows what page is present or not.
Record page visibility change so it knows when to display a dialog or not.
Accept authentication challenge, and decide whether to postpone the
challenge dialog based on whether there is active authentication challenge
dialog already and whether its page is visible or not.
When a challenge result comes back, notify the result to all clients
authenticating for the same protection space, and then start the next
authentication challenge from the same page, if there is one.
When a page becomes visible, start the first authentication challenge
dialog that has been blocked before.
When an authentication challenge is requested, the NetworkJob will be
deferred so its initial response will be saved while waiting for
user decision on the challenge.
No new tests for platform specific internal change.
* PlatformBlackBerry.cmake:
* platform/blackberry/AuthenticationChallengeManager.cpp: Added.
(WebCore):
(ChallengeInfo):
(WebCore::ChallengeInfo::ChallengeInfo):
(AuthenticationChallengeManagerPrivate):
(WebCore::AuthenticationChallengeManagerPrivate::AuthenticationChallengeManagerPrivate):
(WebCore::AuthenticationChallengeManagerPrivate::resumeAuthenticationChallenge):
(WebCore::AuthenticationChallengeManagerPrivate::startAuthenticationChallenge):
(WebCore::AuthenticationChallengeManagerPrivate::pageExists):
(WebCore::AuthenticationChallengeManager::AuthenticationChallengeManager):
(WebCore::AuthenticationChallengeManager::pageCreated):
(WebCore::AuthenticationChallengeManager::pageDeleted):
(WebCore::AuthenticationChallengeManager::pageVisibilityChanged):
(WebCore::AuthenticationChallengeManager::authenticationChallenge):
(WebCore::AuthenticationChallengeManager::cancelAuthenticationChallenge):
(WebCore::AuthenticationChallengeManager::notifyChallengeResult):
(WebCore::AuthenticationChallengeManager::instance):
(WebCore::AuthenticationChallengeManager::init):
* platform/blackberry/AuthenticationChallengeManager.h:
(WebCore):
(AuthenticationChallengeManager):
* platform/blackberry/PageClientBlackBerry.h:
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
(WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
(WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
(WebCore::MediaPlayerPrivate::notifyChallengeResult):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
(MediaPlayerPrivate):
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::NetworkJob):
(WebCore::NetworkJob::~NetworkJob):
(WebCore):
(WebCore::NetworkJob::handleNotifyStatusReceived):
(WebCore::NetworkJob::handleNotifyClose):
(WebCore::NetworkJob::shouldReleaseClientResource):
(WebCore::NetworkJob::sendRequestWithCredentials):
(WebCore::NetworkJob::notifyChallengeResult):
* platform/network/blackberry/NetworkJob.h:
(NetworkJob):
2012-10-10 Simon Fraser <simon.fraser@apple.com>
compositing/tiling/crash-reparent-tiled-layer.html is flakey
https://bugs.webkit.org/show_bug.cgi?id=82546
Reviewed by Beth Dakin.
When calling layerTreeAsText() inside the document load event,
GraphicsLayerCA may have not flushed layers yet, so layer tree
properties that are affected by flushing (tiled layer, visible
rects) appeared flakey in tests.
Fix by forcing a flush before dumping the layer tree.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerTreeAsText):
2012-10-10 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=98984
REGRESSION: Crash happens after we add non-top-level frame to the
ScrollingStateTree
Reviewed by Simon Fraser.
isRootLayer() can return true for layers that do not correspond to
the main frame. But we only want the ones that DO correspond to the
main frame!
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
2012-10-10 Dan Bernstein <mitz@apple.com>
<rdar://problem/12472460> text-combine doesn’t use third- and quarter-width variants when used with @font-face
https://bugs.webkit.org/show_bug.cgi?id=98961
Reviewed by Tim Horton.
Test: fast/text/text-combine-with-font-face.html
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::getFontData): Added the width variant to the
key used for entries in the font data table, so that we can return different
font data for different width variants.
* platform/graphics/FontWidthVariant.h: Defined FontWidthVariantWidth for
use in the computation of the above key.
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText): Added a local variable to store
the font selector before changing the font description. Previously, by the time
we tried to get the font selector from the font, it had already been cleared,
so we called Font::update() with a 0 font selector, meaning @font-face fonts
could not be selected.
2012-10-10 Elliott Sprehn <esprehn@chromium.org>
Move :before and :after into the DOM
https://bugs.webkit.org/show_bug.cgi?id=95117
Reviewed by Eric Seidel.
Reimplement generated content :before and :after as DOM Elements. Now ElementRareData has
two RefPtrs to PseudoElements for the generated content and Node has methods for traversing
the tree including generated content.
This allows the generated content to be treated as real nodes instead of anonymous and take
part in the usual recalcStyle and attach flow which fixes many bugs and vastly simplifies the
lifecycle of generated content.
No new tests needed for now.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMAllInOne.cpp:
* dom/Element.cpp:
(WebCore::Element::attach): Add generated content if needed.
(WebCore::Element::detach): Remove all child generated content.
(WebCore::Element::recalcStyle): Add or remove generated content based on the new style.
(WebCore::Element::updatePseudoElement): Updates pseudo content based on a pseudoId.
(WebCore):
(WebCore::Element::createPseudoElementIfNeeded):
(WebCore::Element::beforePseudoElement):
(WebCore::Element::afterPseudoElement):
* dom/Element.h:
(WebCore):
(Element):
* dom/ElementRareData.h:
(ElementRareData):
(WebCore::ElementRareData::setPseudoElement):
(WebCore):
(WebCore::ElementRareData::pseudoElement):
* dom/Node.cpp:
(WebCore::Node::pseudoAwarePreviousSibling):
(WebCore):
(WebCore::Node::pseudoAwareNextSibling):
(WebCore::checkAcceptChild): Forbid moving PseudoElements for sanity. The code never does this.
* dom/Node.h:
(Node):
(WebCore::Node::isPseudoElement):
(WebCore::Node::pseudoId): Fast path that only calls virtualPseudoId if the node has custom callbacks so isPseudoElement is fast.
(WebCore::Node::virtualPseudoId):
(WebCore::Node::isBeforePseudoElement):
(WebCore::Node::isAfterPseudoElement):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::nextRenderer): Changed to find the next sibling of pseudos for insertion.
* dom/PseudoElement.cpp: Added.
(WebCore):
(WebCore::pseudoElementName):
(WebCore::PseudoElement::PseudoElement):
(WebCore::PseudoElement::pseudoRendererIsNeeded):
(WebCore::PseudoElement::customStyleForRenderer):
(WebCore::PseudoElement::attach):
(WebCore::PseudoElement::rendererIsNeeded):
(WebCore::PseudoElement::updateChildStyle): Propagates the style downward into the anonymous renderers for the content.
(WebCore::PseudoElement::didRecalcStyle):
(WebCore::PseudoElement::createRendererForContent): Refactored from RenderObjectChildList.
* dom/PseudoElement.h: Added.
(WebCore):
(PseudoElement):
(WebCore::PseudoElement::create):
(WebCore::toPseudoElement):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::setInnerNode): Hit testing a PseudoElement should really hit the parent.
(WebCore::HitTestResult::setInnerNonSharedNode): Same as above.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange): Remove old generated content code, same for below.
(WebCore::RenderBlock::splitBlocks):
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
(WebCore::RenderBlock::createReplacementRunIn):
(WebCore::RenderBlock::renderName):
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderButton.cpp:
* rendering/RenderButton.h:
(RenderButton):
* rendering/RenderCounter.cpp:
(WebCore::RenderCounter::originalText):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::renderName):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::renderName):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::styleDidChange):
(WebCore::RenderInline::addChildIgnoringContinuation):
(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::renderName):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::updateMarkerLocation):
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::renderName):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
* rendering/RenderObject.h:
(WebCore::RenderObject::isPseudoElement):
(RenderObject):
(WebCore::RenderObject::generatingNode):
* rendering/RenderObjectChildList.cpp:
* rendering/RenderObjectChildList.h:
(RenderObjectChildList):
* rendering/RenderRubyText.cpp:
* rendering/RenderRubyText.h:
(RenderRubyText):
* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::renderName):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::styleDidChange):
* rendering/RenderTableRow.h:
(WebCore::RenderTableRow::renderName):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addChild):
* rendering/RenderTableSection.h:
(WebCore::RenderTableSection::renderName):
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
2012-10-10 Sam Weinig <sam@webkit.org>
Add more Objective-C WebKit2 DOM API skeletons.
https://bugs.webkit.org/show_bug.cgi?id=98981
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Add necessary export.
2012-10-10 Dimitri Glazkov <dglazkov@chromium.org>
Minimize the recent template explosion in SelectorChecker.
https://bugs.webkit.org/show_bug.cgi?id=98829
Reviewed by Antti Koivisto.
We've recently added the capability to switch sibling traversal strategy to SelectorChecker, at some readability/clarity expense.
This patch tries to minimize the surface of this expense to SelectorChecker::checkOneSelector.
No new tests, no change in behavior.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkSelector): Turned back into a function.
(WebCore::SelectorChecker::checkOneSelector): Changed to specialize on traversal strategy, rather than the context, which was less clear.
(WebCore::SelectorChecker::DOMTraversalStrategy::isFirstChild): Turned into a function.
(WebCore::SelectorChecker::DOMTraversalStrategy::isLastChild): Ditto.
(WebCore::SelectorChecker::DOMTraversalStrategy::isFirstOfType): Ditto.
(WebCore::SelectorChecker::DOMTraversalStrategy::isLastOfType): Ditto.
(WebCore::SelectorChecker::DOMTraversalStrategy::countElementsBefore): Ditto.
(WebCore::SelectorChecker::DOMTraversalStrategy::countElementsOfTypeBefore): Ditto.
(WebCore::SelectorChecker::DOMTraversalStrategy::countElementsAfter): Ditto.
(WebCore::SelectorChecker::DOMTraversalStrategy::countElementsOfTypeAfter): Ditto.
* css/SelectorChecker.h:
(DOMTraversalStrategy): Changed into a class, rather than a template.
(SelectorChecker): Turned back into a function.
2012-10-10 James Simonsen <simonjam@chromium.org>
High res times should start at 0
https://bugs.webkit.org/show_bug.cgi?id=84912
Reviewed by Tony Gentilcore.
Test: Existing Navigation Timing tests.
* inspector/InspectorInstrumentation.cpp: Use legacy document time, pending 98223.
(WebCore):
(WebCore::InspectorInstrumentation::didFinishLoadingImpl):
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForTiming):
* loader/DocumentLoadTiming.cpp:
(WebCore::DocumentLoadTiming::convertMonotonicTimeToLegacyDocumentTime):
(WebCore):
(WebCore::DocumentLoadTiming::convertMonotonicTimeToZeroBasedDocumentTime):
(WebCore::DocumentLoadTiming::markNavigationStart):
* loader/DocumentLoadTiming.h:
(DocumentLoadTiming):
(WebCore::DocumentLoadTiming::navigationStart): These just report raw monotonic times now.
(WebCore::DocumentLoadTiming::unloadEventStart):
(WebCore::DocumentLoadTiming::unloadEventEnd):
(WebCore::DocumentLoadTiming::redirectStart):
(WebCore::DocumentLoadTiming::redirectEnd):
(WebCore::DocumentLoadTiming::fetchStart):
(WebCore::DocumentLoadTiming::responseEnd):
(WebCore::DocumentLoadTiming::loadEventStart):
(WebCore::DocumentLoadTiming::loadEventEnd):
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::navigationStart): Convert these back to legacy document times.
(WebCore::PerformanceTiming::unloadEventStart):
(WebCore::PerformanceTiming::unloadEventEnd):
(WebCore::PerformanceTiming::redirectStart):
(WebCore::PerformanceTiming::redirectEnd):
(WebCore::PerformanceTiming::fetchStart):
(WebCore::PerformanceTiming::responseEnd):
(WebCore::PerformanceTiming::loadEventStart):
(WebCore::PerformanceTiming::loadEventEnd):
(WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute):
(WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds):
* platform/network/ResourceLoadTiming.cpp:
(WebCore::ResourceLoadTiming::convertResourceLoadTimeToMonotonicTime):
* platform/network/ResourceLoadTiming.h:
(ResourceLoadTiming):
2012-10-10 Levi Weintraub <leviw@chromium.org>
Tests failure on Chromium Mac after r130821
https://bugs.webkit.org/show_bug.cgi?id=98865
Reviewed by Adam Barth.
Updating the check for USE(HARFBUZZ_NG) to check for Mac Chromium, as the HARFBUZZ_NG flag isn't
actually set, despite us using Harfbuzz. This unbreaks Chromium Mac as we diagnose the root
cause of this issue.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun):
2012-10-10 Stephen Chenney <schenney@chromium.org>
SVGTextRunRenderingContext changes font data in the glyph page, but it shouldn't
https://bugs.webkit.org/show_bug.cgi?id=98755
Reviewed by Eric Seidel.
The code in SVGTextRunRenderingContext::glyphDataForCharacter, when it
encounters an <altglyph> tag, immediately replaces the font data for a
glyph with font data for the primary font, presumably to meet the SVG
spec requirement: "If the references to alternate glyphs do not result
in successful identification of alternate glyphs to use, then the
character(s) that are inside of the ‘altGlyph’ element are rendered as
if the ‘altGlyph’ element were a ‘tspan’ element instead."
If the alt glyph is not then found we are in the case from the spec
and indeed we should use the primary font. However, we end up replacing the GlyphPage
entry for the character with primary font data, which we should not do
because the glyph page might be used in some place that does not have
the alt glyph tag.
Furthermore, this causes object lifetime problems for font data, because
in cases where the font data that is replaced is for the system fallback
font the GlyphPage will live forever with no knowldege that it contains
font data pointers into font data other that the system fallback. The
replaced font data may be deleted while the pointer lives on in the
system fallback page.
The fix is simply not to replace the font data in the page.
Test: svg/text/alt-glpyh-on-fallback-font-crash.html
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Keep track of the original font data and put it back
in the glyph page when the method has finished.
2012-10-10 Tab Atkins <jackalmage@gmail.com>
column-count: 0 should not prevent margin-collapse through
https://bugs.webkit.org/show_bug.cgi?id=65159
Reviewed by Tony Chang.
This patch makes "column-count:0" be properly recognized as invalid syntax,
as it violates the property grammar in the spec.
Tests: fast/multicol/zeroColumnCount.html
* css/CSSParser.cpp:
(WebCore::CSSParser::validUnit):
(WebCore::CSSParser::parseValue):
* css/CSSParser.h:
2012-10-10 Benjamin Poulain <bpoulain@apple.com>
[WK2] Safari crashes on error when using CFNetwork
https://bugs.webkit.org/show_bug.cgi?id=98965
Reviewed by Sam Weinig.
The code of ResourceErrorMac when using CFNetwork was assuming
there is always either a CFError or an NSError associated with
any ResourceError.
This is not true on WebKit2 where error can be generic errors
in the WebProcess (for example a cannotShowURLError).
The code was crashing when trying to invoke function on the
non-existing CFError.
This patch fixes the issue by handling that third case separately.
If the ResourceError is a generic error, a new NSError is created,
similarily to what is done in the non-CFNetwork case.
* platform/network/mac/ResourceErrorMac.mm:
(WebCore::ResourceError::nsError):
2012-10-10 Alexander Shalamov <alexander.shalamov@intel.com>
Invalid values for media query features are not handled
https://bugs.webkit.org/show_bug.cgi?id=97006
Reviewed by Kenneth Rohde Christiansen.
This patch improves pass rate of CSS3 Media Queries test suite
by making media expressions compliant with W3C specification. Few
performance issues are fixed by removal of string comparison during
media expression evaluation.
Tests: fast/media/w3c/test_media_queries.html
* css/CSSGrammar.y: Handle media query expression with specified media restrictor as invalid.
* css/MediaQuery.cpp:
(WebCore::MediaQuery::serialize): Serialize invalid query according to specification.
* css/MediaQueryEvaluator.cpp:
(WebCore::orientationMediaFeatureEval): Compare CSSValueID instead of strings.
(WebCore::view_modeMediaFeatureEval): Compare CSSValueID instead of strings.
(WebCore::pointerMediaFeatureEval): Compare CSSValueID instead of strings.
* css/MediaQueryExp.cpp:
(WebCore::MediaQueryExp::MediaQueryExp): Check that media features initialized with correct values.
2012-10-10 Justin Novosad <junov@chromium.org>
[Chromium] Smoother animation for non-RAF 2D canvas animations
https://bugs.webkit.org/show_bug.cgi?id=97918
Reviewed by Stephen White.
Reduces animation jank by preventing the accumulation of multiple
frames of backlog in the deferred canvas rendering queue. When the
animation is more than one full frame ahead of the compositor, an
immediate flush is triggered. This takes into account overdraw
elimination by the skip-on-clear optimization that is built-in to
SkDeferredCanvas, to allow non-RAF animations that clear the canvas at
each frame to run without any rate limiting. This change also
incidentally improves frame rate in many cases by providing more
granular batching of GPU API calls, resulting in better pipelining
through the command buffer.
Test: webkit_unit_test Canvas2DLayerManagerTest.testDeferredFrame
* platform/graphics/chromium/Canvas2DLayerBridge.cpp:
(WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
(WebCore::Canvas2DLayerBridge::limitPendingFrames):
Called at the end of a task (usually a scheduled script action) that
invoked 2d canvas rendering context methods. The end of the task
marks the completion of a displayable frame. This method will trigger
a flush if it detects that the layer has pending draw commands that
are more that one frame old.
(WebCore):
(WebCore::Canvas2DLayerBridge::flushedDrawCommands):
(WebCore::Canvas2DLayerBridge::didFlushPendingCommands):
(WebCore::Canvas2DLayerBridge::skippedPendingDrawCommands):
(WebCore::Canvas2DLayerBridge::flush):
(WebCore::Canvas2DLayerBridge::contextAcquired):
* platform/graphics/chromium/Canvas2DLayerBridge.h:
(Canvas2DLayerBridge):
* platform/graphics/chromium/Canvas2DLayerManager.cpp:
(WebCore::Canvas2DLayerManager::~Canvas2DLayerManager):
(WebCore::Canvas2DLayerManager::willProcessTask):
(WebCore):
(WebCore::Canvas2DLayerManager::didProcessTask):
(WebCore::Canvas2DLayerManager::layerDidDraw):
* platform/graphics/chromium/Canvas2DLayerManager.h:
(Canvas2DLayerManager):
2012-10-10 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=98968
REGRESSION: Unable to scroll with trackpad on some websites after
r130783
Reviewed by Simon Fraser.
This bug seems to reproduce mostly on web pages that require login.
The re-routing causes extra churn of the RenderLayerBacking, and we
end up destroying and re-creating the backing and therefore the
ScrollingStateNodes, and when the timing is just wrong we get into a
state where the ScrollingTree has a set of incorrect information.
This patch fixes the bug by making sure the ScrollingStateNodes keep
the ScrollingTree in synch with their re-set data.
Tell the ScrollingStateTree that the root layer has changed.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
New virtual function will set every property as having changed.
* page/scrolling/ScrollingStateNode.h:
(WebCore::ScrollingStateNode::setHasChangedProperties):
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::setHasChangedProperties):
(WebCore):
* page/scrolling/ScrollingStateScrollingNode.h:
When the root layer changes, make sure we update the ScrollingTree
appropriately by indicating that every property could have changed.
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::rootLayerDidChange):
(WebCore):
* page/scrolling/ScrollingStateTree.h:
(ScrollingStateTree):
2012-10-10 MORITA Hajime <morrita@google.com>
[Chromium] Crash on SpellChecker::didCheck()
https://bugs.webkit.org/show_bug.cgi?id=98476
Reviewed by Kent Tamura.
SpellChecker::didCheck() assumed m_processingRequest is non-NULL. However, SpellChecker::invokeRequest()
calls SpellCheckRequest::didCancel(), which results didCheck() with NULL m_processingRequest.
This chagne eliminates the problematic didCheck().
No new tests. The case depends on specific timing and is hard to hit by automated testing.
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::didCheck):
2012-10-10 MORITA Hajime <morrita@google.com>
https://bugs.webkit.org/show_bug.cgi?id=95664
[Shadow DOM] should be able to be available without <style scoped>
Reviewed by Dimitri Glazkov.
This change relaxes ENABLE(STYLE_SCOPED) compilation guard
and styleScopedEnabled() runtime guard. The flags now masks
user visible bits of the code, rather than all of it.
This change also eliminates some redundant guards for simplicity.
Test: fast/dom/shadow/style-scoped-not-enabled.html
* css/StyleResolver.cpp:
(WebCore::StyleResolver::matchScopedAuthorRules):
(WebCore::StyleResolver::locateCousinList):
(WebCore::StyleResolver::canShareStyleWithElement):
(WebCore::StyleResolver::locateSharedStyle):
* css/StyleScopeResolver.cpp:
(WebCore::StyleScopeResolver::scopeFor):
* css/StyleScopeResolver.h:
(WebCore):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::HTMLStyleElement):
(WebCore::HTMLStyleElement::parseAttribute):
(WebCore::HTMLStyleElement::scopedAttributeChanged):
(WebCore::HTMLStyleElement::isRegisteredAsScoped):
(WebCore::HTMLStyleElement::registerWithScopingNode):
(WebCore::HTMLStyleElement::unregisterWithScopingNode):
(WebCore::HTMLStyleElement::insertedInto):
(WebCore::HTMLStyleElement::removedFrom):
(WebCore::HTMLStyleElement::scoped):
(WebCore::HTMLStyleElement::scopingElement):
* html/HTMLStyleElement.h:
(HTMLStyleElement):
* testing/InternalSettings.cpp: Exporsing a flag for testing.
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setStyleScopedEnabled):
(WebCore):
* testing/InternalSettings.h: Exporsing a flag for testing.
(Backup):
(InternalSettings):
* testing/InternalSettings.idl: Exporsing a flag for testing.
2012-10-10 Roger Fong <roger_fong@apple.com>
[WebGL] [On Mac] queried attributes and uniforms need to return the original variable name, not the mapped name.
https://bugs.webkit.org/show_bug.cgi?id=98470
Reviewed by Timothy Horton.
When a variable name is too long we translate to a shorter version and keep a mapping between the long and short names.
However, when querying for a variable client side using getActiveAttrib or getActiveUniform, we accidentally return the
translated names. This fix makes these methods return the original variable names.
Tested using Khronos WebGL conformance suite:
conformance/glsl/misc/glsl-long-variable-names.html
* platform/graphics/GraphicsContext3D.h:
(GraphicsContext3D):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: getActiveAttrib and getActiveUniform
now use GraphicsContext3D::originalSymbolName to find the original variable name.
(WebCore::GraphicsContext3D::getActiveAttrib):
(WebCore::GraphicsContext3D::getActiveUniform):
(WebCore):
(WebCore::GraphicsContext3D::originalSymbolName): This method returns the original variable name given
the mapped name.
2012-10-10 Brady Eidson <beidson@apple.com>
Switch over CachedResource::data() from taking a SharedBuffer to taking a ResourceBuffer.
https://bugs.webkit.org/show_bug.cgi?id=98952
Reviewed by Anders Carlsson.
No new tests (No behavior change).
* html/ImageDocument.cpp:
(WebCore::ImageDocumentParser::appendBytes):
(WebCore::ImageDocumentParser::finish):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::sendDataToResource):
(WebCore::SubresourceLoader::didFinishLoading):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::data):
* loader/cache/CachedCSSStyleSheet.h:
(WebCore):
(CachedCSSStyleSheet):
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::data):
* loader/cache/CachedFont.h:
(WebCore):
(CachedFont):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::data):
* loader/cache/CachedImage.h:
(CachedImage):
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::data):
* loader/cache/CachedRawResource.h:
(CachedRawResource):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::data):
* loader/cache/CachedResource.h:
(CachedResource):
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::data):
* loader/cache/CachedSVGDocument.h:
(CachedSVGDocument):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::data):
* loader/cache/CachedScript.h:
(CachedScript):
* loader/cache/CachedShader.cpp:
(WebCore::CachedShader::data):
* loader/cache/CachedShader.h:
(CachedShader):
* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::data):
* loader/cache/CachedTextTrack.h:
(CachedTextTrack):
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::data):
* loader/cache/CachedXSLStyleSheet.h:
(CachedXSLStyleSheet):
2012-10-10 Jon Lee <jonlee@apple.com>
[WK2] Activate plugins when user clicks on snapshot
https://bugs.webkit.org/show_bug.cgi?id=98328
<rdar://problem/12426681>
Reviewed by Brady Eidson.
Extend the default event handler to deal with plugins with snapshots.
When the user clicks on the placeholder, the plugin is recreated and displayed.
* loader/FrameLoaderClient.h: Add new client function recreatePlugin(), which is
expected to re-create the plugin with the same parameters as when it was run to
obtain the plugin's snapshot placeholder.
* loader/EmptyClients.cpp: Stub implementation of recreatePlugin().
* loader/EmptyClients.h:
* WebCore.exp.in: Expose HTMLPlugInElement::pluginWidget().
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::defaultEventHandler): Update to look for
RenderSnapshottedPlugIn. If the plugin is not playing, have the renderer handle the
event.
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugin::getCursor): Set to hand cursor when the plugin is not
playing.
(WebCore::RenderSnapshottedPlugIn::handleEvent): If the user clicked on the plugin using the
left button, update the state of the element to playing. Recreate the plugin if the widget exists
to begin with. The cached snapshot image will be saved for possible reuse on back/forward navigation.
* rendering/RenderSnapshottedPlugIn.h:
(RenderSnapshottedPlugIn):
2012-10-10 Kenichi Ishibashi <bashi@chromium.org>
FontVerticalDataCache should allow zero as a key value
https://bugs.webkit.org/show_bug.cgi?id=98877
Reviewed by Tony Chang.
Use WTF::UnsignedWithZeroKeyHashTraits for type definition of
FontVerticalDataCache.
No new tests because there is no certain way to make
FontPlatformDataHarfBuzz::uniqueID() be zero.
* platform/graphics/FontCache.cpp:
(WebCore):
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
(WebCore::FontPlatformData::verticalData): Removed zero check of uniqueID().
(WebCore::FontPlatformData::openTypeTable): Ditto.
2012-10-10 Regina Chung <heejin.r.chung@samsung.com>
[EFL] Use the shareable GraphicsContext3DOpenGL* implementation.
https://bugs.webkit.org/show_bug.cgi?id=96627
Reviewed by Kenneth Rohde Christiansen.
Changed EFL implementation of GraphicsContext3D(GC3D) to use GraphicsContext3DOpenGL*.
It was initially implemented in a different way, due to characteristics of Evas,
but it would be better to use the common implementation and find another way
to deal with Evas, especially because all the duplicated code.
No new tests. No functional changes.
* PlatformEfl.cmake: Removed cairo implementation of GC3D and added efl files to WebCore_SOURCES.
* platform/graphics/efl/GraphicsContext3DEfl.cpp: Modified code so GC3DOpenGL* can be used.
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::platformLayer):
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::setContextLostCallback):
(WebCore::GraphicsContext3D::setErrorMessageCallback):
(WebCore::GraphicsContext3D::paintToCanvas):
(WebCore):
(WebCore::GraphicsContext3D::createGraphicsSurfaces):
(WebCore::GraphicsContext3D::releaseShaderCompiler):
(WebCore::GraphicsContext3D::getImageData):
* platform/graphics/efl/GraphicsContext3DPrivate.cpp: Removed functions implemented in GC3DOpenGL*
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore):
(WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::createSurface):
(WebCore::GraphicsContext3DPrivate::platformGraphicsContext3D):
(WebCore::GraphicsContext3DPrivate::makeContextCurrent):
(WebCore::GraphicsContext3DPrivate::isGLES2Compliant):
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
* platform/graphics/efl/GraphicsContext3DPrivate.h: Removed functions implemented in GC3DOpenGL*
(GraphicsContext3DPrivate):
2012-10-10 Tony Chang <tony@chromium.org>
Unreviewed, rolling out r130937, r130949, r130955, and
r130957.
http://trac.webkit.org/changeset/130937
http://trac.webkit.org/changeset/130949
http://trac.webkit.org/changeset/130955
http://trac.webkit.org/changeset/130957
https://bugs.webkit.org/show_bug.cgi?id=94290
Breaks Qt build
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* WebCore.gyp/WebCore.gyp:
* WebCore.gyp/scripts/action_preprocessgrammar.py: Removed.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSGrammar.y: Renamed from Source/WebCore/css/CSSGrammar.y.in.
* css/CSSGrammar.y.includes: Removed.
* css/makegrammar.pl:
2012-10-10 Rob Buis <rbuis@rim.com>
[BlackBerry] Adapt to new image for search-cancel
https://bugs.webkit.org/show_bug.cgi?id=98954
Reviewed by Antonio Gomes.
The new image for search-cancel is bigger than the old one, so invert the scaling.
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::adjustSearchFieldCancelButtonStyle):
2012-10-10 Tony Chang <tony@chromium.org>
Unreviewed, another speculative fix for Qt Win.
* DerivedSources.pri: Pass --preprocessor to the perl script.
* css/makegrammar.pl: Use --preprocessor instead of /usr/bin/gcc.
2012-10-10 Tony Chang <tony@chromium.org>
Unreviewed, another speculative fix for Qt Win.
* DerivedSources.pri: Make the path slash marks be forward slashes to the .in file.
2012-10-10 David Barton <dbarton@mathscribe.com>
Turn on ENABLE_MATHML for Chromium
https://bugs.webkit.org/show_bug.cgi?id=96960
Reviewed by Adam Barth.
Add the rendering/mathml directory to search.
* WebCore.gyp/WebCore.gyp:
2012-10-10 Tony Chang <tony@chromium.org>
Unreviewed, speculative build fix for Qt Win.
* css/makegrammar.pl: Rather than making a temp file, use a pipe to
pass data from gcc to the final output file.
2012-10-10 Brady Eidson <beidson@apple.com>
Switch CachedResource over from SharedBuffer to a new ResourceBuffer
https://bugs.webkit.org/show_bug.cgi?id=98541
Reviewed by Anders Carlsson.
As part of preparation for a WebKit2 NetworkProcess, we need to change the data handle shared
between CachedResources and ResourceLoaders to be one that can be backed by something other
than a SharedBuffer.
ResourceBuffer is this new object. Right now it is directly backed by a SharedBuffer and there
should be no change in behavior.
No new tests (No behavior change).
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* WebCore.vcproj/WebCore.vcproj:
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
Implementation of the new ResourceBuffer, backed directly by a SharedBuffer:
* loader/ResourceBuffer.cpp: Added.
(WebCore):
(WebCore::ResourceBuffer::ResourceBuffer):
(WebCore::ResourceBuffer::~ResourceBuffer):
(WebCore::ResourceBuffer::data):
(WebCore::ResourceBuffer::size):
(WebCore::ResourceBuffer::isEmpty):
(WebCore::ResourceBuffer::getSomeData):
(WebCore::ResourceBuffer::sharedBuffer):
(WebCore::ResourceBuffer::copy):
(WebCore::ResourceBuffer::hasPurgeableBuffer):
(WebCore::ResourceBuffer::releasePurgeableBuffer):
(WebCore::ResourceBuffer::createCFData):
* loader/ResourceBuffer.h: Added.
(WebCore):
(ResourceBuffer):
(WebCore::ResourceBuffer::create):
(WebCore::ResourceBuffer::adoptSharedBuffer):
* loader/mac/ResourceBuffer.mm: Added.
(WebCore):
(WebCore::ResourceBuffer::createNSData):
Switch CachedResource over to using it:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::makePurgeable):
* loader/cache/CachedResource.h:
(WebCore):
(WebCore::CachedResource::resourceBuffer):
(CachedResource):
Switch all the other CachedResource subclasses over to using it:
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::data):
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::data):
(WebCore::CachedFont::ensureCustomFontData):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didAddClient):
(WebCore::CachedImage::data):
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::data):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::data):
* loader/cache/CachedShader.cpp:
(WebCore::CachedShader::data):
* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::data):
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::data):
Switch other affect parties over to using it:
* inspector/InspectorPageAgent.cpp:
(WebCore::decodeBuffer):
(WebCore::InspectorPageAgent::cachedResourceContent):
(WebCore::InspectorPageAgent::sharedBufferContent):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::subresource):
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::processNewCueData):
(WebCore::TextTrackLoader::didReceiveData):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::notifyFinished):
* platform/mac/PasteboardMac.mm:
(WebCore::fileWrapperForImage):
2012-10-10 Julien Chaffraix <jchaffraix@webkit.org>
Unreviewed build fix after r130940.
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::drawLineForDocumentMarker):
Avoid redefining the same variable twice.
2012-10-10 Alexis Menard <alexis@webkit.org>
[Mac] Deprecate getPropertyShorthand from objective c bindings for future removal
https://bugs.webkit.org/show_bug.cgi?id=98916
Reviewed by Timothy Hatcher.
Mark getPropertyShorthand as deprecated so we can remove it later. It will allow us
to remove getPropertyShorthand from the web exposed API (this function is not part of
any specification, it was there for historical reason).
No new tests : just mark a function as deprecated.
* bindings/objc/PublicDOMInterfaces.h:
2012-10-10 Mike West <mkwst@chromium.org>
Web Inspector: add support for %c (style) in console API
https://bugs.webkit.org/show_bug.cgi?id=69401
Reviewed by Pavel Feldman.
This patch mimics Firebug's '%c' option when calling 'console.log'
messages. 'console.log("%cBlue!", "color: blue;");' will write blue
text to the console, and so on.
To match Firebug's behavior, multiple '%c' entries will overwrite each
other: only one style will be applied. Sorry, folks.
Test: inspector/console/console-format-style.html
* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString.styleFormatter):
(WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString.append):
(WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString):
2012-10-10 Varun Jain <varunjain@chromium.org>
[chromium] Spelling and grammar markers are pixelated in hidpi.
https://bugs.webkit.org/show_bug.cgi?id=98339
Reviewed by Stephen White.
We create separate bitmaps for markers in normal and hidpi mode as per
specification from UX and choose the right bitmap based on the current
device scale factor.
Tests: editing/spelling/grammar-markers-hidpi.html
editing/spelling/inline-spelling-markers-hidpi.html
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::draw2xMarker):
(WebCore):
(WebCore::draw1xMarker):
(WebCore::GraphicsContext::drawLineForDocumentMarker):
* platform/graphics/skia/PlatformContextSkia.cpp:
(WebCore::PlatformContextSkia::PlatformContextSkia):
* platform/graphics/skia/PlatformContextSkia.h:
(WebCore::PlatformContextSkia::deviceScaleFactor):
(WebCore::PlatformContextSkia::setDeviceScaleFactor):
(PlatformContextSkia):
2012-10-10 Pablo Flouret <pablof@motorola.com>
Pre-process CSSGrammar.y before running through bison.
https://bugs.webkit.org/show_bug.cgi?id=94290
Reviewed by Tony Chang.
Running CSSGrammar.y through a preprocessor allows the use of feature
defines in all places of the yacc file (i.e. not just in C blocks).
Mostly useful to be able to keep every part of a feature under feature
flags for self-documenting purposes.
No new tests, CSSGrammar.y should be generated correctly and everything
should keep working as before.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
Modify build systems to use makegrammar.pl to generate the .y files
and run those through bison.
* WebCore.gyp/WebCore.gyp:
* WebCore.gyp/scripts/action_preprocessgrammar.py: Added.
Add a new action to preprocess the CSSGrammar.y.in file before the
bison rule is run.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
Add the new .y.in / .y.includes files.
* css/CSSGrammar.y.in: Renamed from Source/WebCore/css/CSSGrammar.y.
Also moved the top declarations section that has includes, defines,
etc. to its own file. These shouldn't be touched by the first
pass of the preprocessor. And changed the existing ENABLE(FEATURE)
ifdefs to ENABLE_FEATURE since the ENABLE() macro is not available
yet.
* css/CSSGrammar.y.includes: Added.
The aforementioned declarations header section. After the .y.in file
is processed it will be concatenated with this one to make the
CSSGrammar.y file.
* css/makegrammar.pl:
Modify the script to handle .y.in files.
2012-10-10 Luciano Wolf <luciano.wolf@openbossa.org>
EventHandler::handleGestureLongPress breaks compilation if CONTEXT_MENUS isn't set
https://bugs.webkit.org/show_bug.cgi?id=98890
Reviewed by Caio Marcelo de Oliveira Filho.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureLongPress):
2012-10-10 David Grogan <dgrogan@chromium.org>
Inspector: display IndexedDB integer versions
https://bugs.webkit.org/show_bug.cgi?id=95816
Reviewed by Vsevolod Vlasov.
Added basic test to database-structure.html
* inspector/Inspector.json:
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore):
* inspector/front-end/IndexedDBModel.js:
(WebInspector.IndexedDBModel.prototype._loadDatabase.callback):
(WebInspector.IndexedDBModel.prototype._loadDatabase):
(WebInspector.IndexedDBModel.Database):
* inspector/front-end/IndexedDBViews.js:
(WebInspector.IDBDatabaseView):
(WebInspector.IDBDatabaseView.prototype._refreshDatabase):
2012-10-10 Simon Fraser <simon.fraser@apple.com>
Store a visible rect in GraphicsLayers, and optionally dump it in layerTreeAsText
https://bugs.webkit.org/show_bug.cgi?id=98839
Reviewed by Sam Weinig.
To replace CATiledLayer with TileCaches, we need to be able to compute the visible part of a GraphicsLayer,
in order to limit the extent of TileCache tiles. Reuse the existing code in GraphicsLayerCA for this,
but store the computed rect in m_visibleRect.
Add a flag to layerTreeAsText() so that tests can optionally include this visible rect in
layer tree dumps. This output will be platform-specific, so we don't want to do it unconditionally.
* WebCore.exp.in: Signature of Frame::layerTreeAsText() changed.
* page/Frame.cpp:
(WebCore::Frame::layerTreeAsText): Change to take some enum flags rather than just a bool.
* page/Frame.h:
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::writeIndent): Make into a static class method so subclasses can use it.
(WebCore::GraphicsLayer::dumpProperties): Call a virtual dumpAdditionalProperties() for subclasses.
(showGraphicsLayerTree):
* platform/graphics/GraphicsLayer.h:
(GraphicsLayer): New LayerTreeAsTextIncludeVisibleRects flag.
(WebCore::GraphicsLayer::dumpAdditionalProperties): New virtual method.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::recursiveCommitChanges): clipRectForChildren and clipRectForSelf
were previously unused and buggy. Fix to correctly compute clipRectForSelf, to assign
to m_visibleRect.
(WebCore::GraphicsLayerCA::dumpAdditionalProperties): Dump m_visibleRect.
* platform/graphics/ca/GraphicsLayerCA.h:
(GraphicsLayerCA):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::layerTreeAsText): Convert the flags from Frame flags
to GraphicsLayerFlags and pass them along.
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):
* testing/Internals.cpp:
(WebCore::Internals::layerTreeAsText): Overloaded method to handle the optional IDL arguments.
* testing/Internals.h: Add enum.
* testing/Internals.idl: Add optional flags, and a const short to describe the flags.
2012-10-10 Shinya Kawanaka <shinyak@chromium.org>
Needs internal API to return distributed nodes for InsertionPoint
https://bugs.webkit.org/show_bug.cgi?id=98868
Reviewed by Hajime Morita.
When testing insertion points, we would like to have an internal API which returns a node list
distributed to an insertion point.
We've added the API in Internals.
Test: fast/dom/shadow/distributed-nodes.html
* WebCore.exp.in:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::distributedNodes): Returns the distributed nodes. When InsertionPoint is not
attached, the result will be null, since the distribution is not calculated correctly.
(WebCore):
* html/shadow/InsertionPoint.h:
(InsertionPoint):
* testing/Internals.cpp:
(WebCore::Internals::distributedNodes):
(WebCore):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:
2012-10-10 Wei James <james.wei@intel.com>
[Chromium]Android x86 content shell debug build warning for uninitialized value used as error with gcc 4.6
https://bugs.webkit.org/show_bug.cgi?id=98629
Reviewed by Adam Barth.
Warning was taken as error for uninitialized value being used when
building content shell for Android x86 with gcc 4.6.
* WebCore.gyp/WebCore.gyp:
2012-10-10 Andrei Bucur <abucur@adobe.com>
[CSS Regions] Create a separate list for the invalid regions
https://bugs.webkit.org/show_bug.cgi?id=98752
Reviewed by Andreas Kling.
This patch moves the invalid regions in a low traffic data structure, outside the main region list. This should add a small performance boost (there's no test for it) and simplifies the code in the following ways:
- iterations through the region list don't need to worry about invalid regions
- accessing the first/last region is straightforward
- list manipulations are easier to implement (e.g. binary search for a region)
Tests: Adapted fast/regions/flows-dependency-same-flow.html to use the new dump format for the region chain.
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::getRegionsByContent): Now returns only the valid regions.
(WebCore::WebKitNamedFlow::getRegions): Now returns only the valid regions.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::updateLogicalWidth):
(WebCore::RenderFlowThread::computeLogicalHeight):
(WebCore::RenderFlowThread::repaintRectangleInRegions):
(WebCore::RenderFlowThread::regionAtBlockOffset):
(WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
(WebCore::RenderFlowThread::logicalWidthChangedInRegions):
(WebCore::RenderFlowThread::firstRegion):
(WebCore::RenderFlowThread::lastRegion):
(WebCore::RenderFlowThread::computeOverflowStateForRegions):
(WebCore::RenderFlowThread::regionInRange):
(WebCore::RenderFlowThread::checkRegionsWithStyling):
(WebCore::RenderFlowThread::objectInFlowRegion):
(WebCore::RenderFlowThread::autoLogicalHeightRegionsCount):
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore):
(WebCore::addRegionToList):
(WebCore::RenderNamedFlowThread::addRegionToThread):
(WebCore::RenderNamedFlowThread::removeRegionFromThread):
(WebCore::RenderNamedFlowThread::checkInvalidRegions):
* rendering/RenderNamedFlowThread.h:
(WebCore::RenderNamedFlowThread::invalidRenderRegionList):
(RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::canBeDestroyed):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList):
(WebCore):
(WebCore::writeRenderNamedFlowThreads): The valid regions are listed first followed by the invalid regions.
2012-10-10 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: [Regression] Stale revisions are not cleared when inspector is opened for the already loaded page.
https://bugs.webkit.org/show_bug.cgi?id=98915
Reviewed by Alexander Pavlov.
WorkspaceController now clears stale revisions on navigation as well.
* inspector/front-end/Workspace.js:
(WebInspector.WorkspaceController):
(WebInspector.WorkspaceController.prototype._mainFrameNavigated):
2012-10-10 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Exception when committing java script editing with revision history view open.
https://bugs.webkit.org/show_bug.cgi?id=98908
Reviewed by Alexander Pavlov.
Added null check.
* inspector/front-end/RevisionHistoryView.js:
2012-10-10 Pavel Feldman <pfeldman@chromium.org>
Web Inspector: protect node in the InspectorDOMNode::inspect
https://bugs.webkit.org/show_bug.cgi?id=98914
Reviewed by Yury Semikhatsky.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::inspect):
2012-10-10 Mike West <mkwst@google.com>
EditorCommand calls setProperty with the wrong parameters.
https://bugs.webkit.org/show_bug.cgi?id=98896
Reviewed by Jochen Eisinger.
EditorCommand::executeToggleStyleInList calls
StylePropertySet::setProperty with an ExceptionCode as the final
argument. This only succeeds because it's automagically cast to a bool,
which is what the method actually expects.
Implicitly passing in 'false' by dropping the parameter shouldn't change
any visible functionality; no new tests are required.
* editing/EditorCommand.cpp:
(WebCore::executeToggleStyleInList):
2012-10-10 Mike West <mkwst@google.com>
HTMLTextFormControlElement calls setInlineStyleProperty with the wrong parameters.
https://bugs.webkit.org/show_bug.cgi?id=98892
Reviewed by Jochen Eisinger.
HTMLTextFormControlElement::updatePlaceholderVisibility calls
HTMLElement::setInlineStyleProperty with an ExceptionCode as the last
parameter. This only succeeds because it's automagically cast to a bool,
which is what the method actually expects.
Implicitly passing in 'false' by dropping the parameter shouldn't change
any functionality; so no new tests are required.
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
2012-10-10 Christophe Dumez <christophe.dumez@intel.com>
SQLResultSet.rowsAffected not cleared
https://bugs.webkit.org/show_bug.cgi?id=46070
Reviewed by Kenneth Rohde Christiansen.
SQLResultSet.rowsAffected is supposed to return the number
of rows that were changed by the statement. For "SELECT"
statements, it should return 0.
However, our implementation currently relies on sqlite3_changes()
to compute this value. sqlite3_changes() returns the number of
direct row changes in the most recent INSERT, UPDATE, or DELETE
statement within the same trigger context. Unfortunately, the
most recent INSERT, UPDATE, or DELETE statement may not be the
last statement. As a consequence, if you INSERT 1 row, then
do a SELECT, SQLResultSet.rowsAffected will be 1 for both the
INSERT and the SELECT statements.
The proposed solution is to use sqlite3_total_changes() instead
of sqlite3_changes(). sqlite3_total_changes() returns the number
of row changes caused by INSERT, UPDATE or DELETE statements since
the database connection was opened. We now store the value
returned by sqlite3_total_changes() before each statement in
order to return the count difference in
SQLiteDatabase::lastChanges().
Test: storage/websql/execute-sql-rowsAffected.html
* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::SQLiteDatabase):
(WebCore::SQLiteDatabase::updateLastChangesCount):
(WebCore):
(WebCore::SQLiteDatabase::lastChanges):
* platform/sql/SQLiteDatabase.h:
(SQLiteDatabase):
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::step):
2012-10-10 Keishi Hattori <keishi@webkit.org>
REGRESSION (r129738): Calendar picker is too wide when the input is rtl
https://bugs.webkit.org/show_bug.cgi?id=98881
Reviewed by Kent Tamura.
Calendar picker should use param.isCalendarRTL instead of param.isRTL but some were left.
No new tests. Covered by ManualTests/forms/calendar-picker.html.
* Resources/pagepopups/calendarPicker.js:
(CalendarPicker.prototype.fixWindowSize): Calendar picker should use param.isCalendarRTL instead of param.isRTL.
(DaysTable.prototype._handleKey): Ditto.
2012-10-10 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: Semantically incorrect CSS rules result in broken source code data
https://bugs.webkit.org/show_bug.cgi?id=98520
Reviewed by Vsevolod Vlasov.
Pop and throw away rule data from the stack when data have been collected for a semantically invalid CSS rule
(which is not going to be created).
* css/CSSParser.cpp:
(WebCore::CSSParser::createImportRule):
(WebCore::CSSParser::createFontFaceRule):
(WebCore::CSSParser::createPageRule):
(WebCore::CSSParser::createRegionRule):
2012-10-10 Zeno Albisser <zeno@webkit.org>
[Qt][Mac] GL_ARB_texture_rectangle must be activated when using ANGLE.
https://bugs.webkit.org/show_bug.cgi?id=98387
Check for the availability of GL_ARB_texture_rectangle extension.
In case it is available, we activate the extension for ANGLE.
This is necessary for WebGL on mac, because the GraphicsSurface
on this platform is based on an IOSurface, which requires this extension.
Reviewed by Noam Rosenthal.
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::initializeANGLE):
2012-10-10 Andreas Kling <kling@webkit.org>
ElementAttributeData: tighten member packing on 64-bit.
<http://webkit.org/b/98861>
Reviewed by Anders Carlsson.
Pack m_isMutable and m_arraySize into the slack from the RefCounted base on 64-bit.
218kB progression on Membuster3.
* dom/ElementAttributeData.h:
(ElementAttributeData):
2012-10-10 Alexandre Elias <aelias@chromium.org>
Text Autosizing: Counteract funky window sizing on Android.
https://bugs.webkit.org/show_bug.cgi?id=98809
Reviewed by Adam Barth.
In Chrome for Android, the window sizes provided to WebCore are
currently in physical screen pixels instead of
device-scale-adjusted units. For example window width on a
Galaxy Nexus is 720 instead of 360. Text autosizing expects
device-independent pixels. When Chrome for Android cuts over to
the new coordinate space, it will be tied to the setting
applyPageScaleFactorInCompositor.
No new tests.
* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::processSubtree):
2012-10-09 Philip Rogers <pdr@google.com>
Recursively detach SVGElementInstances
https://bugs.webkit.org/show_bug.cgi?id=98851
Reviewed by Ryosuke Niwa and Abhishek Arya
Before this patch, SVGElementInstance child nodes were not being detached. This
patch makes detach() recursively detach SVGElementInstances.
* svg/SVGElementInstance.cpp:
(WebCore::SVGElementInstance::detach):
2012-10-09 Kenichi Ishibashi <bashi@chromium.org>
[Chromium] Fix harfbuzz-ng related code after r130231
https://bugs.webkit.org/show_bug.cgi?id=98858
Reviewed by Kent Tamura.
Replace first/second with key/value.
No new tests. No changes in behavior.
* platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp:
(WebCore::harfbuzzGetGlyph):
* platform/graphics/skia/SimpleFontDataSkia.cpp:
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
2012-10-09 Enrica Casucci <enrica@apple.com>
Only measure text once instead of twice when performing line layout.
https://bugs.webkit.org/show_bug.cgi?id=98317
<rdar://problem/12080821>
Reviewed by Dan Bernstein.
Since we are measuring each word to find out where the line break should occur,
we should cache that information to avoid measuring the run again when
creating the line box. The bulk of the change is in nextLineBreak, where
the measurements are collected and placed in a vector so that they can
be consumed in setLogicalWidthForTextRun where we used to measure the
text one more time.
Each entry in the vector is a WordMeasurement object that contains information
about the start and end offset in the run, the renderer, the measured width
and, possibly, a list of fallback fonts.
When we need to compute the width of the run to create the line box, we add
all the measurements for the given renderer in the run to get the total width.
This optiomization is currently disabled for platforms using HarfBuzz.
* platform/graphics/Font.cpp:
(WebCore::Font::width): Added fallback fonts parameter.
* platform/graphics/Font.h:
(Font): Added fallback fonts parameter to the width static member function.
This method is called when we compute the width using TextLayout.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::TextLayout::width): Added fallback fonts parameter.
(WebCore::Font::width):
(WebCore::ComplexTextController::advance):
* platform/graphics/mac/ComplexTextController.h:
(ComplexTextController): Added fallback fonts parameter to advance method.
* rendering/RenderBlock.h: Added WordMeasures parameter to few methods.
* rendering/RenderBlockLineLayout.cpp:
(WordMeasurement): Added new class to hold measurement information.
(WebCore::setLogicalWidthForTextRun): This is where we compute the run width using the
cached information.
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Added wordMeasures parameter.
(WebCore::RenderBlock::createLineBoxesFromBidiRuns): Added wordMeasures parameter.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Added declaration of the WordMeasures
vector and its use.
(WebCore::textWidth): Added fallbackFonts parameter, since now we only measure once.
(WebCore::RenderBlock::LineBreaker::nextLineBreak): This method has been modified to collect
the measurements of the individual words and add them to the vector.
2012-10-09 Andreas Kling <kling@webkit.org>
GlyphPageTreeNode should use HashMap<OwnPtr>.
<http://webkit.org/b/98845>
Reviewed by Dan Bernstein.
- Replace manual memory management by OwnPtrs.
- Added a GlyphPageTreeNodeMap typedef to make call sites look a bit nicer.
= Changed some hashmap get()/remove() pairs to use the more efficient take() instead.
- Made the constructor private, it has no external clients.
* platform/graphics/GlyphPageTreeNode.cpp:
(WebCore::GlyphPageTreeNode::getRoot):
(WebCore::GlyphPageTreeNode::pageCount):
(WebCore::GlyphPageTreeNode::getChild):
(WebCore::GlyphPageTreeNode::pruneCustomFontData):
(WebCore::GlyphPageTreeNode::pruneFontData):
(WebCore::GlyphPageTreeNode::showSubtree):
* platform/graphics/GlyphPageTreeNode.h:
(GlyphPageTreeNode):
(WebCore::GlyphPageTreeNode::GlyphPageTreeNode):
2012-10-09 Kent Tamura <tkent@chromium.org>
Sub-fields in input[type=time] should not be focusable if the input is disabled or read-only
https://bugs.webkit.org/show_bug.cgi?id=98850
Reviewed by Kentaro Hara.
Covered by additional test cases of
time-multiple-fields/time-multiple-fields-keyboard-events.html and
time-multiple-fields/time-multiple-fields-mouse-events.html.
* html/shadow/DateTimeFieldElement.h:
(FieldOwner): Add isFieldOwnerDisabledOrReadOnly.
* html/shadow/DateTimeFieldElement.cpp:
(WebCore::DateTimeFieldElement::isFocusable):
Check isFieldOwnerDisabledOrReadOnly, and calls HTMLElement::isFocusable()
just in case.
* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditElement::isFieldOwnerDisabledOrReadOnly): Added.
* html/shadow/DateTimeEditElement.h:
(DateTimeEditElement): Declare isFieldOwnerDisabledOrReadOnly.
2012-10-09 Robert Kroeger <rjkroege@chromium.org>
[chromium] revert fling deacceleration parameter change
https://bugs.webkit.org/show_bug.cgi?id=98820
Reviewed by Adrienne Walker.
After an extended discussion, it has been decided that a previous
adjustment to fling deacceleration parameters should be reverted.
Tested by existing unit tests.
* platform/TouchFlingPlatformGestureCurve.cpp:
(WebCore::TouchFlingPlatformGestureCurve::createForTouchPad):
(WebCore::TouchFlingPlatformGestureCurve::createForTouchScreen):
2012-10-09 Kent Tamura <tkent@chromium.org>
Should reject invalid dates constructed with multiple fields UI
https://bugs.webkit.org/show_bug.cgi?id=98727
Reviewed by Hajime Morita.
In input[type=date] with multiple fields UI, we allow users to set
day-of-month value to 1-31 regardless of the month value. So users can
construct an invalid date such as "2012-02-31". We should sanitize such
values.
This change affects platforms with ENABLE_INPUT_TYPE_DATE &&
ENABLE_INPUT_MULTIPLE_FIELDS_UI.
Test: fast/forms/date-multiple-fields/date-multiple-fields-keyboard-events.html
* html/BaseDateAndTimeInputType.h:
(BaseDateAndTimeInputType): Make sanitizeValue protected to be called from
BaseMultipleFieldsDateAndTimeInputType.
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::editControlValueChanged):
Apply sanitizeValue to a value constructed in UI.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::restoreFormControlState):
Ditto.
2012-10-09 Joe Mason <jmason@rim.com>
Check for null m_frame in NetworkJob
https://bugs.webkit.org/show_bug.cgi?id=98830
Reviewed by George Staikos.
PR 220025
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::sendRequestWithCredentials):
(WebCore::NetworkJob::storeCredentials):
2012-10-09 Jian Li <jianli@chromium.org>
Update the CSS property used to support draggable regions.
https://bugs.webkit.org/show_bug.cgi?id=97156
Reviewed by Adam Barth.
The CSS property to support draggable regions has been changed from
"-webkit-widget-region" to "-webkit-app-region" in the following syntax:
-webkit-app-region: drag|no-drag
The CSS parsing code for draggable regions is now different from the CSS
parsing code for dashboard regions since we have quite different syntax.
We still try to share as much rendering update code as possible for
these two features. To make the shared code easier to understand for
both features, the name "DashboardRegions" in the shared code is changed
to "AnnotatedRegions" to work for both dashboard regions and draggable
regions.
Note that we still using WIDGET_REGION as feature name in order not to
add more changes to this patch. It will be renamed to a more appropriate
name in next patch. WIDGET_REGION is now only turned on for the chromium
port.
Test: fast/css/draggable-region-parser.html
* Configurations/FeatureDefines.xcconfig: Disable WIDGET_REGION feature.
* WebCore.exp.in: Update the exported symbol due to renaming.
* css/CSSComputedStyleDeclaration.cpp: Update the CSS parsing.
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp: Update the CSS parsing.
(WebCore::CSSParser::parseValue):
(WebCore):
(WebCore::CSSParser::parseDashboardRegions):
* css/CSSParserValues.cpp: Update the CSS parsing.
(WebCore::CSSParserValue::createCSSValue):
* css/CSSPrimitiveValue.cpp: Update the CSS parsing.
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::customCssText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
(WebCore::CSSPrimitiveValue::reportDescendantMemoryUsage):
* css/CSSPrimitiveValue.h: Update the CSS parsing.
(CSSPrimitiveValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in: Rename the CSS property for draggable region.
* css/CSSValueKeywords.in: Add the keywords supported for the draggable region.
* css/DashboardRegion.h: Remove WIDGET_REGION guard.
(DashboardRegion):
* css/StyleResolver.cpp: Update the CSS parsing.
(WebCore::StyleResolver::collectMatchingRulesForList):
* dom/Document.cpp: Rename dashboardRegions to annotatedRegions.
(WebCore::Document::Document):
(WebCore::Document::annotatedRegions):
(WebCore::Document::setAnnotatedRegions):
(WebCore::Document::reportMemoryUsage):
* dom/Document.h: Rename dashboardRegions to annotatedRegions.
(WebCore):
(WebCore::Document::setAnnotatedRegionsDirty):
(WebCore::Document::annotatedRegionsDirty):
(WebCore::Document::hasAnnotatedRegions):
(WebCore::Document::setHasAnnotatedRegions):
(Document):
* page/Chrome.cpp: Rename dashboardRegions to annotatedRegions.
(WebCore::ChromeClient::annotatedRegionsChanged):
* page/ChromeClient.h: Rename dashboardRegions to annotatedRegions.
(ChromeClient):
* page/FrameView.cpp: Rename dashboardRegions to annotatedRegions.
(WebCore::FrameView::layout):
(WebCore::FrameView::updateAnnotatedRegions):
(WebCore::FrameView::paintContents):
* page/FrameView.h: Rename dashboardRegions to annotatedRegions.
(FrameView):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::addAnnotatedRegions):
* rendering/RenderInline.h: Rename dashboardRegions to annotatedRegions.
(RenderInline):
* rendering/RenderLayer.cpp: Rename dashboardRegions to annotatedRegions.
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
* rendering/RenderListBox.cpp: Rename dashboardRegions to annotatedRegions.
(WebCore::RenderListBox::setHasVerticalScrollbar):
* rendering/RenderObject.cpp: Rename dashboardRegions to annotatedRegions.
(WebCore::RenderObject::styleWillChange):
(WebCore::RenderObject::addAnnotatedRegions):
(WebCore::RenderObject::collectAnnotatedRegions):
* rendering/RenderObject.h: Rename dashboardRegions to annotatedRegions.
(WebCore::AnnotatedRegionValue::operator==):
(WebCore::AnnotatedRegionValue::operator!=):
(AnnotatedRegionValue):
(RenderObject):
* rendering/style/RenderStyle.cpp: Update the CSS parsing.
(WebCore::RenderStyle::diff):
(WebCore):
* rendering/style/RenderStyle.h: Update the CSS parsing.
* rendering/style/RenderStyleConstants.h: Update the CSS parsing.
* rendering/style/StyleDashboardRegion.h: Update the CSS parsing.
* rendering/style/StyleRareNonInheritedData.cpp: Update the CSS parsing.
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h: Update the CSS parsing.
(WebCore):
(StyleRareNonInheritedData):
2012-10-09 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130811 and r130821.
http://trac.webkit.org/changeset/130811
http://trac.webkit.org/changeset/130821
https://bugs.webkit.org/show_bug.cgi?id=98831
Broke date-suggestion-picker-appearance-with-scroll-bar.html
(Requested by abarth|gardening on #webkit).
* WebCore.exp.in:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getUpperLeftCorner):
(WebCore::ContainerNode::getLowerRightCorner):
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::computeRelativePosition):
* dom/Node.cpp:
(WebCore::Node::convertToPage):
(WebCore::Node::convertFromPage):
* editing/FrameSelection.cpp:
(WebCore::CaretBase::absoluteBoundsForLocalRect):
* editing/RenderedPosition.cpp:
(WebCore::RenderedPosition::absoluteRect):
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::absoluteCaretBounds):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::defaultEventHandler):
* page/FrameView.cpp:
(WebCore::FrameView::convertFromRenderer):
(WebCore::FrameView::convertToRenderer):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDocumentMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::computeRectForReplacementMarker):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::absoluteQuads):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::absoluteQuads):
(WebCore::RenderBox::absoluteContentBox):
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::mapAbsoluteToLocalPoint):
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
* rendering/RenderBoxModelObject.h:
(RenderBoxModelObject):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::userResize):
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::absolutePoint):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::mapLocalToContainer):
* rendering/RenderInline.h:
(RenderInline):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::absoluteToContents):
(WebCore::RenderLayer::convertToLayerCoords):
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::calculateClipRects):
(WebCore::RenderLayer::childrenClipRect):
(WebCore::RenderLayer::selfClipRect):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::contentsVisible):
* rendering/RenderMediaControls.cpp:
(WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::showPopup):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::absoluteFocusRingQuads):
(WebCore::RenderObject::localToAbsolute):
(WebCore::RenderObject::absoluteToLocal):
(WebCore::RenderObject::mapLocalToContainer):
(WebCore::RenderObject::mapAbsoluteToLocalPoint):
(WebCore::RenderObject::localToContainerQuad):
(WebCore::RenderObject::localToContainerPoint):
* rendering/RenderObject.h:
(RenderObject):
(WebCore::RenderObject::localToAbsoluteQuad):
* rendering/RenderText.cpp:
(WebCore::RenderText::absoluteRectsForRange):
(WebCore::RenderText::absoluteQuads):
(WebCore::RenderText::absoluteQuadsForRange):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
* rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer):
(WebCore::RenderView::mapAbsoluteToLocalPoint):
(WebCore::RenderView::selectionBounds):
* rendering/RenderView.h:
(RenderView):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::updateWidgetGeometry):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::mapLocalToContainer):
* rendering/svg/RenderSVGForeignObject.h:
(RenderSVGForeignObject):
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::mapLocalToContainer):
* rendering/svg/RenderSVGInline.h:
(RenderSVGInline):
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::mapLocalToContainer):
(WebCore::RenderSVGModelObject::absoluteQuads):
* rendering/svg/RenderSVGModelObject.h:
(RenderSVGModelObject):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::mapLocalToContainer):
* rendering/svg/RenderSVGRoot.h:
(RenderSVGRoot):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::mapLocalToContainer):
(WebCore::RenderSVGText::absoluteQuads):
* rendering/svg/RenderSVGText.h:
(RenderSVGText):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::mapLocalToContainer):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::localCoordinateSpaceTransform):
2012-10-09 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130812.
http://trac.webkit.org/changeset/130812
https://bugs.webkit.org/show_bug.cgi?id=98826
Caused fast/text/shaping/shaping-selection-rect to fail
(Requested by abarth|gardening on #webkit).
* platform/graphics/Font.cpp:
(WebCore::Font::width):
* platform/graphics/Font.h:
(Font):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::TextLayout::width):
(WebCore::Font::width):
(WebCore::ComplexTextController::advance):
* platform/graphics/mac/ComplexTextController.h:
(ComplexTextController):
* rendering/RenderBlock.h:
(WebCore):
(LineBreaker):
(RenderBlock):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun):
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlock::createLineBoxesFromBidiRuns):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::textWidth):
(WebCore::RenderBlock::LineBreaker::nextLineBreak):
2012-10-09 Ryosuke Niwa <rniwa@webkit.org>
DOM/textarea-edit.html spends 35% of time in numGraphemeClusters
https://bugs.webkit.org/show_bug.cgi?id=98711
Reviewed by Kent Tamura.
Since the number of characters is always greater than the number of grapheme clusters,
we can avoid calling computeLengthForSubmission when the number of characters is less
than maxlength. We still have to count the number of LFs since they all need to be
converted into CRLFs. This improves WebKit's score on DOM/textarea-edit.html by 45%.
* html/HTMLTextAreaElement.cpp:
(WebCore::computeLengthForSubmission):
(WebCore::numberOfLineBreaks):
(WebCore::upperBoundForLengthForSubmission): Added.
(WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
(WebCore::HTMLTextAreaElement::tooLong):
2012-10-09 Nate Chapin <japhet@chromium.org>
Make CachedResourceLoader RefCounted and have both Document
and DocumentLoader hold RefPtrs. This is in preparation for
caching main resources.
https://bugs.webkit.org/show_bug.cgi?id=86787
Reviewed by Adam Barth.
No new tests, no functionality changes at this time.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::Document): Only create our own CachedResourceLoader
if we were given a null frame.
(WebCore::Document::~Document):
(WebCore::Document::cachedResourceLoader):
(WebCore):
* dom/Document.h:
(Document):
* loader/DocumentLoader.cpp: Throughout, use our m_cachedResourceLoader instead
of the Document's pointer.
(WebCore::DocumentLoader::DocumentLoader): Create a CachedResourceLoader.
(WebCore::DocumentLoader::~DocumentLoader):
(WebCore::DocumentLoader::isLoadingInAPISense):
(WebCore::DocumentLoader::subresource):
(WebCore::DocumentLoader::getSubresources):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::cachedResourceLoader):
(DocumentLoader):
* loader/SubresourceLoader.cpp: Remove m_document, since it only existed to keep alive and access the CachedResourceLoader.
It can now be accessed from m_documentLoader.
(WebCore::SubresourceLoader::SubresourceLoader):
(WebCore::SubresourceLoader::~SubresourceLoader):
(WebCore::SubresourceLoader::willSendRequest):
(WebCore::SubresourceLoader::releaseResources):
* loader/SubresourceLoader.h:
(SubresourceLoader):
* loader/cache/CachedResourceLoader.cpp: Handle the possibility of a null Document in several places.
(WebCore::CachedResourceLoader::CachedResourceLoader):
(WebCore::CachedResourceLoader::~CachedResourceLoader):
(WebCore::CachedResourceLoader::frame):
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
(WebCore::CachedResourceLoader::printAccessDeniedMessage):
(WebCore::CachedResourceLoader::loadDone):
* loader/cache/CachedResourceLoader.h:
(WebCore):
(WebCore::CachedResourceLoader::create): Add create(), make constructor private.
(CachedResourceLoader):
(WebCore::CachedResourceLoader::document):
(WebCore::CachedResourceLoader::setDocument):
(WebCore::CachedResourceLoader::clearDocumentLoader):
2012-10-09 Alexander Shalamov <alexander.shalamov@intel.com>
CSS Style is not recalculated when media attribute of style element is changed
https://bugs.webkit.org/show_bug.cgi?id=96752
Reviewed by Kenneth Rohde Christiansen.
When "media" attribute of style element is changed, style should be recalculated.
This patch modifies HTMLStyleElement::parseAttribute, so that when the media attribute
is updated, new MediaQuerySet is created and applied to the style element then, document
style is recalculated. Since media query set is updated for CSSStyleSheet, CSSOM wrapper
for media query should be updated as well in order to sync with new media query set value.
Test: fast/media/mq-js-update-media.html
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::setMediaQueries):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::parseAttribute):
2012-10-09 Ben Murdoch <benm@google.com>
[chromium][Android] Add WebSecurityOrigin::grantLoadLocalResources()
https://bugs.webkit.org/show_bug.cgi?id=97689
Reviewed by Adam Barth.
In addition to the WebKit/chromium side of the change, remove the
ASSERT in SecurityOrigin::grantLoadLocalResources(). Android WebView
is a legitimate user of this API in cases where neither of the
ASSERT'd conditions hold.
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::grantLoadLocalResources): Remove ASSERT.
2012-10-09 Jon Lee <jonlee@apple.com>
Build fix for Qt Windows.
* html/HTMLPlugInElement.h: Include Image.h.
2012-10-09 Enrica Casucci <enrica@apple.com>
Only measure text once instead of twice when performing line layout.
https://bugs.webkit.org/show_bug.cgi?id=98317
<rdar://problem/12080821>
Reviewed by Dan Bernstein.
Since we are measuring each word to find out where the line break should occur,
we should cache that information to avoid measuring the run again when
creating the line box. The bulk of the change is in nextLineBreak, where
the measurements are collected and placed in a vector so that they can
be consumed in setLogicalWidthForTextRun where we used to measure the
text one more time.
Each entry in the vector is a WordMeasurement object that contains information
about the start and end offset in the run, the renderer, the measured width
and, possibly, a list of fallback fonts.
When we need to compute the width of the run to create the line box, we add
all the measurements for the given renderer in the run to get the total width.
* platform/graphics/Font.cpp:
(WebCore::Font::width): Added fallback fonts parameter.
* platform/graphics/Font.h:
(Font): Added fallback fonts parameter to the width static member function.
This method is called when we compute the width using TextLayout.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::TextLayout::width): Added fallback fonts parameter.
(WebCore::Font::width):
(WebCore::ComplexTextController::advance):
* platform/graphics/mac/ComplexTextController.h:
(ComplexTextController): Added fallback fonts parameter to advance method.
* rendering/RenderBlock.h: Added WordMeasures parameter to few methods.
* rendering/RenderBlockLineLayout.cpp:
(WordMeasurement): Added new class to hold measurement information.
(WebCore::setLogicalWidthForTextRun): This is where we compute the run width using the
cached information.
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Added wordMeasures parameter.
(WebCore::RenderBlock::createLineBoxesFromBidiRuns): Added wordMeasures parameter.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Added declaration of the WordMeasures
vector and its use.
(WebCore::textWidth): Added fallbackFonts parameter, since now we only measure once.
(WebCore::RenderBlock::LineBreaker::nextLineBreak): This method has been modified to collect
the measurements of the individual words and add them to the vector.
2012-10-09 Levi Weintraub <leviw@chromium.org>
[Sub pixel layout] Fast-path iframe scrolling can picks up an extra pixel
https://bugs.webkit.org/show_bug.cgi?id=98571
Reviewed by Emil A Eklund.
Refactoring all coordinate-switching functionality to use a single "mode" flag
as opposed to having a bunch of boolean values. This enables the same set of
options across the board, and a consistent interface. This was previously
done for mapLocalToContainer.
The imptetus for this for this stems from the one logical change in this patch
which only effects sub-pixel layout. FrameView::convertToRenderer and
convertFromRenderer return IntPoint coordinates, and need to also snap transform
offsets to determine proper rects for scrolling.
Unlabeled functions below are simply being updated to these new interfaces.
Test: fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html
* WebCore.exp.in:
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getUpperLeftCorner):
(WebCore::ContainerNode::getLowerRightCorner):
* dom/Element.cpp:
(WebCore::Element::boundsInRootViewSpace):
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::computeRelativePosition):
* dom/Node.cpp:
(WebCore::Node::convertToPage):
(WebCore::Node::convertFromPage):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::defaultEventHandler):
* page/FrameView.cpp:
(WebCore::FrameView::convertToRenderer): Now pixel-snaps offsets before passing
them to TransformState, which transforms the coordinates.
(WebCore::FrameView::convertFromRenderer): Ditto.
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::absoluteQuads):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::absoluteQuads):
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::mapAbsoluteToLocalPoint):
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
* rendering/RenderBoxModelObject.h:
(RenderBoxModelObject):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::userResize):
* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::absolutePoint):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::mapLocalToContainer):
* rendering/RenderInline.h:
(RenderInline):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::absoluteToContents):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderMediaControls.cpp:
(WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::showPopup):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::localToAbsolute):
(WebCore::RenderObject::absoluteToLocal):
(WebCore::RenderObject::mapLocalToContainer):
(WebCore::RenderObject::mapAbsoluteToLocalPoint):
(WebCore::RenderObject::localToContainerQuad):
(WebCore::RenderObject::localToContainerPoint):
* rendering/RenderObject.h:
(RenderObject): MapLocalToContainerFlags is now MapCoordinatesFlags since it's
now used for other conversion methods.
(WebCore::RenderObject::localToAbsoluteQuad):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
* rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer):
(WebCore::RenderView::mapAbsoluteToLocalPoint):
* rendering/RenderView.h:
(RenderView):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::mapLocalToContainer):
* rendering/svg/RenderSVGForeignObject.h:
(RenderSVGForeignObject):
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::mapLocalToContainer):
* rendering/svg/RenderSVGInline.h:
(RenderSVGInline):
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::mapLocalToContainer):
* rendering/svg/RenderSVGModelObject.h:
(RenderSVGModelObject):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::mapLocalToContainer):
* rendering/svg/RenderSVGRoot.h:
(RenderSVGRoot):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::mapLocalToContainer):
* rendering/svg/RenderSVGText.h:
(RenderSVGText):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::mapLocalToContainer):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::localCoordinateSpaceTransform):
2012-10-09 Jon Lee <jonlee@apple.com>
[WK2] Have plugins render offscreen to capture snapshot
https://bugs.webkit.org/show_bug.cgi?id=98326
<rdar://problem/12426658>
Reviewed by Simon Fraser.
Change updateSnapshot() to use a PassRefPtr<Image> instead of Image*. WebKit2 ultimately
hands the image off to RenderSnapshottedPlugin. A CachedImage instance then manages the
lifetime of the Image.
* html/HTMLPlugInElement.h:
(WebCore::HTMLPlugInElement::updateSnapshot):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::updateSnapshot):
* html/HTMLPlugInImageElement.h:
(HTMLPlugInImageElement):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::updateSnapshot): Updated to use the PassRefPtr<Image>
pointer.
* rendering/RenderSnapshottedPlugIn.h:
(RenderSnapshottedPlugIn):
2012-10-09 Adam Barth <abarth@webkit.org>
Unreviewed. Move this file to where the build systems think it should
be. See https://bugs.webkit.org/show_bug.cgi?id=94755
* platform/graphics/CustomFilterConstants.h: Removed.
* platform/graphics/filters/CustomFilterConstants.h: Copied from Source/WebCore/platform/graphics/CustomFilterConstants.h.
2012-10-09 Tony Chang <tony@chromium.org>
Use computeLogical* methods instead of updateLogical* methods in RenderImage
https://bugs.webkit.org/show_bug.cgi?id=98802
Reviewed by Eric Seidel.
We were storing the old values of width/height, calling updateLogical{Width,Height}, then restoring
the old values. Instead, use the computeLogical{Width,Height} methods so we don't have to overwrite
the current values.
No new tests, this is just a refactoring.
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageDimensionsChanged):
2012-10-09 Enrica Casucci <enrica@apple.com>
[chromium] fast/text/international/text-spliced-font.html and fast/writing-mode/Kusa-Makura-
background-canvas.html failing on the Mac after r130443
https://bugs.webkit.org/show_bug.cgi?id=98545
Reviewed by Tony Chang.
Adding back the ! removed by mistake before submitting r130779.
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::glyphDataAndPageForCharacter):
2012-10-09 Artem Simonov <asimonov@rim.com>
[BlackBerry] EGL Context deleted prematurely in GraphicsContext3D destructor
https://bugs.webkit.org/show_bug.cgi?id=98796
Reviewed by George Staikos.
Reordered destruction of GraphicsContext3D so that the compositing layer is
destroyed first.
* platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
(WebCore::GraphicsContext3D::~GraphicsContext3D):
2012-10-09 Ben Wagner <bungeman@chromium.org>
Disable hinting when webkit-font-smoothing:antialiased is used on Mac.
https://bugs.webkit.org/show_bug.cgi?id=98061
Reviewed by Stephen White.
Normal anti-aliased text matches subpixel anti-aliased text.
However, text marked with webkit-font-smoothing:antialiased should be drawn without hinting to match Safari.
See crbug.com/152304 .
Test is fast/css/font-smoothing.html, but DRT runs with font smoothing disabled, so no change visible.
* platform/graphics/skia/FontSkia.cpp:
(WebCore::setupPaint):
Set kNo_Hinting when webkit-font-smoothing is antialiased.
2012-10-09 Max Vujovic <mvujovic@adobe.com>
[CSS Shaders] Create constants for vertex attribute sizes and offsets
https://bugs.webkit.org/show_bug.cgi?id=94755
Reviewed by Dean Jackson.
Factor out the vertex attribute size and offset constants into a new file,
CustomFilterConstants.h. Replace literals in CustomFilterMeshGenerator with the constants.
I could have added the constants to CustomFilterMeshGenerator.h, but this would make
FECustomFilter depend on CustomFilterMeshGenerator.
I also could have added the constants to CustomFilterMesh.h, but this would make
CustomFilterMeshGenerator depend on CustomFilterMesh.
No new tests. No change in behavior.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/CustomFilterConstants.h: Added.
(WebCore):
* platform/graphics/filters/CustomFilterMeshGenerator.h:
(WebCore::CustomFilterMeshGenerator::floatsPerVertex):
Use the new constants instead of literal values.
* platform/graphics/filters/FECustomFilter.cpp:
(WebCore::FECustomFilter::bindProgramAndBuffers):
Pull the constant definitions out of here.
2012-10-09 Michael Saboff <msaboff@apple.com>
MarkupAccumulator should optimally handle 8 bit Strings
https://bugs.webkit.org/show_bug.cgi?id=98224
Reviewed by Ryosuke Niwa.
Updated appendCharactersReplacingEntities to take a string, offset and length and process 8 or 16 bit
data as appropriate. Also made it a member function of MarkupAccumulator.
No new tests, behavior covered by existing tests.
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendCharactersReplacingEntities):
(WebCore::MarkupAccumulator::appendAttributeValue):
(WebCore::MarkupAccumulator::appendNodeValue):
* editing/MarkupAccumulator.h:
(MarkupAccumulator):
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::appendText):
(WebCore::urlToMarkup):
2012-10-09 Joshua Bell <jsbell@chromium.org>
IndexedDB: Overflowing key generator should throw ConstraintError
https://bugs.webkit.org/show_bug.cgi?id=98807
Reviewed by Tony Chang.
After the WebKit implementation landed throwing DataError, public-webapps
consensus was that the exception thrown should be ConstraintError. Trivial
change, and we pass one more W3C test submission.
Test: storage/indexeddb/key-generator.html
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::putInternal):
2012-10-08 Martin Robinson <mrobinson@igalia.com>
Fix the order of the statements in my previous build fix.
Reviewed by Gustavo Noronha Silva.
My previous build build fix for ResourceHandleSoup ordered the assignment
of the local ResourceHandleInternal incorrectly. Instead of being before
both assertions, it should be interspersed among them.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::createSoupMessageForHandleAndRequest):
2012-10-09 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=98457
ScrollingStateNodes should be referenced via IDs on
RenderLayerBacking
Reviewed by Simon Fraser.
This patch associates all ScrollingStateNodes with a
RenderLayerBacking via a HashMap from RenderLayerBackings to
ScrollingStateNodes on ScrollingCoordinator. Prior to this patch, the
root ScrollingStateNode was created immediately upon creation of the
ScrollingCoordinator, and it was constantly re-used for every main
FrameView. This doesn't work in the new model since that doesn't
allow that ScrollingStateNode to have a definite association with a
RenderLayerBacking. So this patch does also introduce some lifetime
differences with the ScrollingStateNodes.
If a page is going into the page cache, we should clear the state
tree. When the page is in the cache, we won't have access to the
RenderLayerBacking, and we don't want to be doing anything with the
ScrollingStateNodes anyway.
* dom/Document.cpp:
(WebCore::Document::setInPageCache):
When a page is restored from the page cache, call
frameViewRootLayerDidChange() to re-create the state tree.
* loader/HistoryController.cpp:
(WebCore::HistoryController::restoreScrollPositionAndViewState):
This new FrameView function will return the scrollLayerID for a given FrameView.
* page/FrameView.cpp:
(WebCore::FrameView::scrollLayerID):
(WebCore):
* page/FrameView.h:
(FrameView):
There is a lot of unfortunate fiddling with the terrible
if-defs in ScrollingCoordinator. I added a FIXME to the header
noting how we can avoid this in the future.
* page/scrolling/ScrollingCoordinator.cpp:
All of this code used to refer to the rootStateNode directly.
Instead, now it looks up the proper ScrollingStateNode for the given
FrameView in the HashMap.
(WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::ScrollingCoordinator::frameViewWheelEventHandlerCountChanged):
(WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::ScrollingCoordinator::updateMainFrameScrollLayerPosition):
(WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
(WebCore::ScrollingCoordinator::setScrollLayerForNode):
(WebCore::ScrollingCoordinator::setNonFastScrollableRegionForNode):
(WebCore::ScrollingCoordinator::setScrollParametersForNode):
(WebCore::ScrollingCoordinator::setWheelEventHandlerCountForNode):
Returns the existing ScrollingStateNode for a given FrameView by
looking it up in the HashMap.
(WebCore::ScrollingCoordinator::stateNodeForFrameView):
This is called when a RenderLayerBacking is destroyed. At that time,
its associated ScrollingStateNode is destroyed.
(WebCore::ScrollingCoordinator::detachFromStateTree):
clearStateTree() clears the HashMap and destroys all of the nodes in
the current state tree.
(WebCore::ScrollingCoordinator::clearStateTree):
Creates a new root state node for the given FrameView.
(WebCore::ScrollingCoordinator::ensureRootStateNodeForFrameView):
Some new functions for the new node stuff.
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinatorNone.cpp:
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
(WebCore::ScrollingCoordinator::supportsFixedPositionLayers):
(WebCore::ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers):
(WebCore::ScrollingCoordinator::setLayerIsFixedToContainerLayer):
(WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
(WebCore::ScrollingCoordinator::detachFromStateTree):
(WebCore::ScrollingCoordinator::clearStateTree):
(WebCore::ScrollingCoordinator::ensureRootStateNodeForFrameView):
(WebCore::setScrollParameters):
(WebCore::setWheelEventHandlerCount):
New remove functions are used when the sate tree is cleared and when
a RenderLayerBacking is destroyed.
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::removeChild):
(WebCore):
* page/scrolling/ScrollingStateNode.h:
(WebCore::ScrollingStateNode::isScrollingStateScrollingNode):
(ScrollingStateNode):
(WebCore::ScrollingStateNode::parent):
New convenience function for casting to ScrollingStateScrollingNodes.
* page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::toScrollingStateScrollingNode):
(WebCore):
No longer automatically create a root node upon creation of the
ScrollingStateTree. We now want to wait to create the root node until
we have a RenderLayerBacking to associate it with.
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::ScrollingStateTree):
(WebCore::ScrollingStateTree::removeNode):
(WebCore):
* page/scrolling/ScrollingStateTree.h:
(WebCore::ScrollingStateTree::setRootStateNode):
(ScrollingStateTree):
RenderLayerBacking has a new data member called m_scrollLayerID. If
this RenderLayerBacking is represented in the scrolling tree, then
the ID with be unique and non-zero.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::~RenderLayerBacking):
(WebCore::generateScrollLayerID):
(WebCore):
(WebCore::RenderLayerBacking::attachToScrollingCoordinator):
(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
* rendering/RenderLayerBacking.h:
(RenderLayerBacking):
(WebCore::RenderLayerBacking::scrollLayerID):
Move the call to ScrollingCooridinator::frameViewRootLayerDidChange()
from RenderLayerCompositor::attachRootLayer() to
RenderLayerCompositor:: updateBacking(). The problem with the old call
site is that there is no backing at that time, so we are trying to set
state on the root scrolling state node before we have enough
information to create that node and add it to the HashMap.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::attachRootLayer):
2012-10-09 Florin Malita <fmalita@chromium.org>
SVGResources should use HashSet<AtomicString> instead of HashSet<AtomicStringImpl*>
https://bugs.webkit.org/show_bug.cgi?id=98683
Reviewed by Darin Adler.
Eric's notes:
SVGResources should use HashSet<AtomicString> instead of HashSet<AtomicStringImpl*>
They do basically the same thing, and the former is much more common (and less code). It's
also safe, on the off-chance that we're using AtomicStrings which might otherwise go away.
No new tests, refactoring.
* rendering/svg/SVGResources.cpp:
(WebCore::clipperFilterMaskerTags):
(WebCore::markerTags):
(WebCore::fillAndStrokeTags):
(WebCore::chainableResourceTags):
(WebCore::SVGResources::buildCachedResources):
2012-10-09 Enrica Casucci <enrica@apple.com>
[chromium] fast/text/international/text-spliced-font.html and fast/writing-mode/Kusa-Makura-background-canvas.html
failing on the Mac after r130443
https://bugs.webkit.org/show_bug.cgi?id=98545
Reviewed by Tony Chang.
Fixes a regression introduced with r130443.
No new tests added since we already have tests covering this.
Updated TestExpectations for chromium and mac.
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::glyphDataAndPageForCharacter): Text orientation should not be
taken into account if the character is an ideograph or a symbol.
2012-10-09 Philip Rogers <pdr@google.com>
Prevent animation when CSS attributeType is invalid.
https://bugs.webkit.org/show_bug.cgi?id=94569
Reviewed by Dirk Schulze.
This patch changes hasValidAttributeType() to return false when
we have attributeType=CSS with a non-CSS attribute name.
Previously we would animate non-CSS attributes when attributeType was
CSS which resulted in crashes. To track this case, this patch catches
changes to targetElement, attributeName, and attributeType and checks
if an invalid combination is present. If invalid, hasInvalidCSSAttributeType()
will return true causing hasValidAttributeType() to return false and prevent
the animation from running.
Tests: svg/animations/animate-css-xml-attributeType.html
svg/animations/invalid-css-attribute-crash-expected.svg
svg/animations/invalid-css-attribute-crash.svg
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::hasValidAttributeType):
(WebCore::SVGAnimateElement::targetElementWillChange):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::SVGAnimationElement):
(WebCore::SVGAnimationElement::isSupportedAttribute):
This now supports the attributeType attribute which is stored in m_attributeType.
(WebCore::SVGAnimationElement::parseAttribute):
(WebCore::SVGAnimationElement::setAttributeType):
Changes to attributeType, attributeName, and targetElement need to be tracked
to determine when an invalid combination happens.
(WebCore::SVGAnimationElement::targetElementWillChange):
(WebCore):
(WebCore::SVGAnimationElement::setAttributeName):
(WebCore::SVGAnimationElement::checkInvalidCSSAttributeType):
* svg/SVGAnimationElement.h:
(WebCore::SVGAnimationElement::attributeType):
(SVGAnimationElement):
(WebCore::SVGAnimationElement::hasInvalidCSSAttributeType):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::targetElement):
* svg/animation/SVGSMILElement.h:
(SVGSMILElement):
2012-10-09 Pravin D <pravind.2k4@gmail.com>
max-width property is does not overriding the width properties for css tables(display:table)
https://bugs.webkit.org/show_bug.cgi?id=98455
Reviewed by Tony Chang.
The max-width property determines the maximum computed width an element can have. In case of css tables(display:table),
the computed was not being limited by the max-width property. The current patch fixes this issue.
Test: fast/table/css-table-max-width.html
* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
Logic to compute the logical width of an element such that it does not exceed the max-width value.
Also when both min-width and max-width are present, the following contraint is used to compute the logical width:
1) min-width < Computed LogicalWidth < max-width, when min-width < max-width.
2) Computed LogicalWidth = min-width, when min-width > max-width.
2012-10-09 Harald Alvestrand <hta@google.com>
Change PeerConnection getStats function to single value local / remote
elements in RTCStatsReport.
https://bugs.webkit.org/show_bug.cgi?id=98753
Reviewed by Adam Barth.
IDL of RTCStatsReport has been changed to make local/remote
single valued RTCStatsElement attributes.
The RTCStatsReport argument to index the list of RTCStatsElement
in the local and remote functions has been removed.
Tested by modifications to RTCPeerConnection-stats.html
* Modules/mediastream/RTCStatsReport.cpp:
(WebCore::RTCStatsReport::addElement):
(WebCore::RTCStatsReport::addStatistic):
* Modules/mediastream/RTCStatsReport.h:
(WebCore::RTCStatsReport::local):
(WebCore::RTCStatsReport::remote):
(RTCStatsReport):
* Modules/mediastream/RTCStatsReport.idl:
* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::RTCStatsResponse::addElement):
(WebCore::RTCStatsResponse::addStatistic):
* Modules/mediastream/RTCStatsResponse.h:
(RTCStatsResponse):
* platform/chromium/support/WebRTCStatsResponse.cpp:
(WebKit::WebRTCStatsResponse::addElement):
(WebKit::WebRTCStatsResponse::addStatistic):
* platform/mediastream/RTCStatsResponseBase.h:
(RTCStatsResponseBase):
2012-10-09 Antonio Gomes <agomes@rim.com>
Get rid of FIXED_POSITION_CREATES_STACKING_CONTEXT in favor of Settings::fixedPositionCreatesStackingContext()
https://bugs.webkit.org/show_bug.cgi?id=98756
Reviewed by Rob Buis.
No behavior change so no new tests.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
2012-10-09 Simon Hausmann <simon.hausmann@digia.com>
[Qt] Fix build with QtMultimedia
Reviewed by Tor Arne Vestbø.
This is an initial rudimentary port to of the QtMultimedia back-end,
adapted to slight API changes and (more importantly) to the
implementation of QAbstractVideoSurface instead of using
QGraphicsVideoItem (which is in QtMultimediaWidgets).
* WebCore.pri:
* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::supportsType):
(WebCore::MediaPlayerPrivateQt::MediaPlayerPrivateQt):
(WebCore::MediaPlayerPrivateQt::~MediaPlayerPrivateQt):
(WebCore::MediaPlayerPrivateQt::didLoadingProgress):
(WebCore::MediaPlayerPrivateQt::totalBytes):
(WebCore::MediaPlayerPrivateQt::setVisible):
(WebCore::MediaPlayerPrivateQt::surfaceFormatChanged):
(WebCore::MediaPlayerPrivateQt::setSize):
(WebCore::MediaPlayerPrivateQt::removeVideoItem):
(WebCore::MediaPlayerPrivateQt::restoreVideoItem):
(WebCore):
(WebCore::MediaPlayerPrivateQt::start):
(WebCore::MediaPlayerPrivateQt::supportedPixelFormats):
(WebCore::MediaPlayerPrivateQt::present):
(WebCore::MediaPlayerPrivateQt::paint):
(WebCore::MediaPlayerPrivateQt::paintCurrentFrameInContext):
(WebCore::MediaPlayerPrivateQt::paintToTextureMapper):
* platform/graphics/qt/MediaPlayerPrivateQt.h:
(MediaPlayerPrivateQt):
2012-10-09 Garrett Casto <gcasto@chromium.org>
Allow users to specify a different hover image for TextFieldDecorationElement
https://bugs.webkit.org/show_bug.cgi?id=93662
Reviewed by Kent Tamura.
* html/shadow/TextFieldDecorationElement.cpp:
(WebCore::TextFieldDecorationElement::TextFieldDecorationElement):
(WebCore::TextFieldDecorationElement::updateImage):
(WebCore::TextFieldDecorationElement::defaultEventHandler): Handles mouseover and mouseout events.
(WebCore::TextFieldDecorationElement::willRespondToMouseMoveEvents): Now returns true if the element is not disabled.
(WebCore):
* html/shadow/TextFieldDecorationElement.h:
(TextFieldDecorator):
(TextFieldDecorationElement):
2012-10-09 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Uploading images to Google+ using QtWebKit does not work.
https://bugs.webkit.org/show_bug.cgi?id=72329
Reviewed by Jocelyn Turcotte.
Implement handling of Blob FormData, including its extensions to the File FormData.
* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::FormDataIODevice::FormDataIODevice):
(WebCore::appendBlobResolved):
(WebCore::FormDataIODevice::prepareFormElements):
(WebCore::FormDataIODevice::computeSize):
(WebCore::FormDataIODevice::moveToNextElement):
(WebCore::FormDataIODevice::prepareCurrentElement):
(WebCore::FormDataIODevice::openFileForCurrentElement):
(WebCore::FormDataIODevice::readData):
(WebCore::QNetworkReplyHandler::sendNetworkRequest):
* platform/network/qt/QNetworkReplyHandler.h:
(FormDataIODevice):
2012-10-09 Arpita Bahuguna <arpitabahuguna@gmail.com>
Text decorations specified on the containing block are not properly applied when ::first-line is present.
https://bugs.webkit.org/show_bug.cgi?id=93829
Reviewed by Abhishek Arya.
If a container's style and its pseudo :first-line style have unique
text-decorations specified for them, only the :first-line text-decoarations
were being applied.
The uploaded patch intends to first compute the text decoration colors
for the containing box, followed by that of the first-line (if specified).
This thus avoids the condition wherein our containing box's text-decorations
were not getting applied at all since initially we were only computing
for the first-line style.
Test: fast/css/text-decorations-on-first-line-and-containing-block.html
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
getTextDecorationColors() is first called for computing the containing box's
text-decoration values and then for first-line style's text-decorations,
if specified.
2012-10-09 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130746.
http://trac.webkit.org/changeset/130746
https://bugs.webkit.org/show_bug.cgi?id=98749
It made 45 tests crash on Qt (Requested by Ossy on #webkit).
* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::FormDataIODevice::FormDataIODevice):
(WebCore::FormDataIODevice::computeSize):
(WebCore::FormDataIODevice::moveToNextElement):
(WebCore::FormDataIODevice::openFileForCurrentElement):
(WebCore::FormDataIODevice::readData):
(WebCore::QNetworkReplyHandler::getIODevice):
(WebCore::QNetworkReplyHandler::sendNetworkRequest):
* platform/network/qt/QNetworkReplyHandler.h:
(QNetworkReplyHandler):
(FormDataIODevice):
2012-10-09 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Uploading images to Google+ using QtWebKit does not work.
https://bugs.webkit.org/show_bug.cgi?id=72329
Reviewed by Jocelyn Turcotte.
Implement handling of Blob FormData, including its extensions to the File FormData.
* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::FormDataIODevice::FormDataIODevice):
(WebCore::FormDataIODevice::computeSize):
(WebCore::FormDataIODevice::moveToNextElement):
(WebCore::FormDataIODevice::prepareCurrentElement):
(WebCore::FormDataIODevice::openFileForCurrentElement):
(WebCore::FormDataIODevice::readData):
(WebCore::QNetworkReplyHandler::getIODevice):
(WebCore::QNetworkReplyHandler::handleBlobDataIfAny):
(WebCore::QNetworkReplyHandler::sendNetworkRequest):
* platform/network/qt/QNetworkReplyHandler.h:
(QNetworkReplyHandler):
(FormDataIODevice):
2012-10-09 Keishi Hattori <keishi@webkit.org>
Page popup should be smarter about its layout
https://bugs.webkit.org/show_bug.cgi?id=98499
Reviewed by Kent Tamura.
This change fixes these two issues:
1. Page popup should reposition itself so it won't get clipped by screen(Win/Linux) or rootview(Mac) bounds.
2. Page popup should resize itself when it doesn't fit.
Test: platform/chromium/fast/forms/page-popup/page-popup-adjust-rect.html
* Resources/pagepopups/calendarPicker.js:
(initialize): We need to set global.params at the beginning because we need it for resizeWindow().
* Resources/pagepopups/colorSuggestionPicker.js: Added global.params.
(handleMessage):
(initialize):
(handleArgumentsTimeout):
* Resources/pagepopups/pickerCommon.js:
(Rect): Represents an axis aligned rectangle.
(Rect.prototype.get maxX): Gets position of right edge.
(Rect.prototype.get maxY): Gets position of bottom edge.
(Rect.prototype.toString):
(Rect.intersection): Returns the intersection of two rectangles.
(resizeWindow): Resize window to a certain size. Don't allow shrinking.
(adjustWindowRect): Calculates the best position and size for the popup.
(_adjustWindowRectVertically):
(_adjustWindowRectHorizontally):
(setWindowRect): Sets the position and size of the popup to the given rect.
* Resources/pagepopups/suggestionPicker.css:
(.suggestion-list): Don't show horizontal scroll bar.
* Resources/pagepopups/suggestionPicker.js:
(SuggestionPicker.prototype._fixWindowSize):
* page/PagePopupClient.cpp:
(WebCore::PagePopupClient::addProperty): For adding an int to JSON.
(WebCore::PagePopupClient::addProperty): For adding an IntRect to JSON.
(WebCore):
* page/PagePopupClient.h:
(PagePopupClient):
2012-10-09 Hajime Morrita <morrita@google.com>
[Refactoring] Scoped Style related code should have its own class.
https://bugs.webkit.org/show_bug.cgi?id=98244
Reviewed by Dimitri Glazkov.
This change extracts StyleScopeResolver from StyleResolver to clarify
the responsibility of the style scope handling. Now we can easily see
where the style scoping needs to be involed.
Coming Shadow DOM related change like @host rules will fit within this class.
No new tests, refactoring.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSAllInOne.cpp:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::collectFeatures):
(WebCore::StyleResolver::appendAuthorStylesheets):
(WebCore::StyleResolver::pushParentElement):
(WebCore::StyleResolver::popParentElement):
(WebCore::StyleResolver::pushParentShadowRoot):
(WebCore::StyleResolver::popParentShadowRoot):
(WebCore::StyleResolver::matchScopedAuthorRules):
(WebCore::StyleResolver::collectMatchingRulesForList):
(WebCore::StyleResolver::reportMemoryUsage):
* css/StyleResolver.h:
(StyleResolver):
* css/StyleScopeResolver.cpp: Added.
(WebCore):
(WebCore::StyleScopeResolver::StyleScopeResolver):
(WebCore::StyleScopeResolver::~StyleScopeResolver):
(WebCore::StyleScopeResolver::scopeFor):
(WebCore::StyleScopeResolver::ruleSetFor):
(WebCore::StyleScopeResolver::ensureRuleSetFor):
(WebCore::StyleScopeResolver::setupStack):
(WebCore::StyleScopeResolver::push):
(WebCore::StyleScopeResolver::pop):
(WebCore::StyleScopeResolver::collectFeaturesTo):
(WebCore::StyleScopeResolver::reportMemoryUsage):
* css/StyleScopeResolver.h: Added.
(WebCore):
(StyleScopeResolver):
(WebCore::StyleScopeResolver::StackFrame::StackFrame):
(StackFrame):
(WebCore::StyleScopeResolver::hasScopedStyles):
(WebCore::StyleScopeResolver::stackSize):
(WebCore::StyleScopeResolver::stackFrameAt):
(WebCore::StyleScopeResolver::matchesStyleBounds):
(WebCore::StyleScopeResolver::stackIsConsistent):
(WebCore::StyleScopeResolver::ensureStackConsistency):
(WebCore::StyleScopeResolver::scopeFor):
(WebCore::StyleScopeResolver::ensureRuleSetFor):
2012-10-08 Simon Hausmann <simon.hausmann@digia.com>
[Qt] Make RenderThemeQStyle/ScrollbarThemeQStyle compile without QStyle/QtWidgets
https://bugs.webkit.org/show_bug.cgi?id=98268
Reviewed by Tor Arne Vestbø.
Extracted QStyle/QWidget related code into a QWebStyle class that implements the QStyleFacade interface.
QStyleFacade is a pure interface that lives in WebCore/platform/qt
(next to RenderThemeQStyle and ScrollbarThemeQStyle) and provides a
minimal interface of what we need to draw with QStyle as well as basic
hit testing and metric retrieval. It also provides a
QStyleFacadeOption class that aggregates common meta-data for
rendering primitives, such as direction, rectangle, state (sunken,
enabled, etc.) or palette. It also provides some more slider/scrollbar
specific fields in a slider sub-structure.
RenderThemeQStyle/ScrollbarThemeQStyle used to instantiate specific QStyleOption sub-classes and populate
them with state information from render objects, before calling straight to QStyle. Most of the common code
was encapsulated in StylePainterQStyle.
The new RenderThemeQStyle/ScrolllbarThemeQStyle uses common code in
StylePainterQStyle to populate state into QStyleFacadeOption before
calling into QStyleFacade.
The style facade is then implemented by QStyleFacadeImp, which extracts
meta-data from QStyleFacadeOption arguments, populates style
primitive specific QStyleOption objects and then calls on QStyle.
RenderThemeQStyle/ScrollbarThemeQStyle can only use interface methods
from QStyleFacade. QStyleFacadeImp on the other hand will live in the
separate QtWebKitWidgets library in the future and therefore cannot use
any WebCore types.
* Target.pri:
* platform/qt/QStyleFacade.cpp: Added.
(WebCore):
(WebCore::QStyleFacade::styleForPage):
* platform/qt/QStyleFacade.h: Added.
(WebCore):
(QStyleFacade):
(WebCore::QStyleFacade::~QStyleFacade):
(WebCore::QStyleFacadeOption::QStyleFacadeOption):
(QStyleFacadeOption):
* platform/qt/RenderThemeQStyle.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp.
(WebCore):
(WebCore::RenderThemeQStyle::getStylePainter):
(WebCore::StylePainterQStyle::StylePainterQStyle):
(WebCore::StylePainterQStyle::init):
(WebCore::RenderThemeQStyle::create):
(WebCore::RenderThemeQStyle::setStyleFactoryFunction):
(WebCore::RenderThemeQStyle::styleFactory):
(WebCore::RenderThemeQStyle::RenderThemeQStyle):
(WebCore::RenderThemeQStyle::~RenderThemeQStyle):
(WebCore::RenderThemeQStyle::setPaletteFromPageClientIfExists):
(WebCore::RenderThemeQStyle::inflateButtonRect):
(WebCore::RenderThemeQStyle::computeSizeBasedOnStyle):
(WebCore::RenderThemeQStyle::adjustButtonStyle):
(WebCore::RenderThemeQStyle::setButtonPadding):
(WebCore::RenderThemeQStyle::paintButton):
(WebCore::RenderThemeQStyle::paintTextField):
(WebCore::RenderThemeQStyle::adjustTextAreaStyle):
(WebCore::RenderThemeQStyle::paintTextArea):
(WebCore::RenderThemeQStyle::setPopupPadding):
(WebCore::RenderThemeQStyle::colorPalette):
(WebCore::RenderThemeQStyle::paintMenuList):
(WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
(WebCore::RenderThemeQStyle::paintMenuListButton):
(WebCore::RenderThemeQStyle::animationDurationForProgressBar):
(WebCore::RenderThemeQStyle::paintProgressBar):
(WebCore::RenderThemeQStyle::paintSliderTrack):
(WebCore::RenderThemeQStyle::adjustSliderTrackStyle):
(WebCore::RenderThemeQStyle::paintSliderThumb):
(WebCore::RenderThemeQStyle::adjustSliderThumbStyle):
(WebCore::RenderThemeQStyle::paintSearchField):
(WebCore::RenderThemeQStyle::adjustSearchFieldDecorationStyle):
(WebCore::RenderThemeQStyle::paintSearchFieldDecoration):
(WebCore::RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle):
(WebCore::RenderThemeQStyle::paintSearchFieldResultsDecoration):
(WebCore::RenderThemeQStyle::paintInnerSpinButton):
(WebCore::RenderThemeQStyle::initializeCommonQStyleOptions):
(WebCore::RenderThemeQStyle::adjustSliderThumbSize):
* platform/qt/RenderThemeQStyle.h: Renamed from Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h.
(WebCore):
(RenderThemeQStyle):
(WebCore::RenderThemeQStyle::qStyle):
(StylePainterQStyle):
(WebCore::StylePainterQStyle::isValid):
(WebCore::StylePainterQStyle::paintButton):
(WebCore::StylePainterQStyle::paintTextField):
(WebCore::StylePainterQStyle::paintComboBox):
(WebCore::StylePainterQStyle::paintComboBoxArrow):
(WebCore::StylePainterQStyle::paintSliderTrack):
(WebCore::StylePainterQStyle::paintSliderThumb):
(WebCore::StylePainterQStyle::paintInnerSpinButton):
(WebCore::StylePainterQStyle::paintProgressBar):
(WebCore::StylePainterQStyle::paintScrollCorner):
(WebCore::StylePainterQStyle::paintScrollBar):
* platform/qt/ScrollbarThemeQStyle.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/ScrollbarThemeQStyle.cpp.
(WebCore):
(WebCore::ScrollbarThemeQStyle::ScrollbarThemeQStyle):
(WebCore::ScrollbarThemeQStyle::~ScrollbarThemeQStyle):
(WebCore::scPart):
(WebCore::scrollbarPart):
(WebCore::initSliderStyleOption):
(WebCore::ScrollbarThemeQStyle::paint):
(WebCore::ScrollbarThemeQStyle::hitTest):
(WebCore::ScrollbarThemeQStyle::shouldCenterOnThumb):
(WebCore::ScrollbarThemeQStyle::invalidatePart):
(WebCore::ScrollbarThemeQStyle::scrollbarThickness):
(WebCore::ScrollbarThemeQStyle::thumbPosition):
(WebCore::ScrollbarThemeQStyle::thumbLength):
(WebCore::ScrollbarThemeQStyle::trackPosition):
(WebCore::ScrollbarThemeQStyle::trackLength):
(WebCore::ScrollbarThemeQStyle::paintScrollCorner):
* platform/qt/ScrollbarThemeQStyle.h: Renamed from Source/WebKit/qt/WebCoreSupport/ScrollbarThemeQStyle.h.
(WebCore):
(ScrollbarThemeQStyle):
(WebCore::ScrollbarThemeQStyle::qStyle):
2012-10-08 Kiran Muppala <cmuppala@apple.com>
Throttle DOM timers on hidden pages.
https://bugs.webkit.org/show_bug.cgi?id=98474
Reviewed by Maciej Stachowiak.
When the visibility of a page changes to "hidden", all it's DOM timers are
updated to align their fire times on one second intervals. This limits the
number of CPU wakes due to a hidden pages to one per second.
Test: fast/dom/timer-throttling-hidden-page.html
* Configurations/FeatureDefines.xcconfig:
* WebCore.exp.in:
* dom/Document.cpp:
(WebCore):
(WebCore::Document::timerAlignmentInterval):
Read Page::timerAlignmentInterval and pass it along to DOMTimer.
* dom/Document.h:
(Document):
* dom/ScriptExecutionContext.cpp:
(WebCore):
(WebCore::ScriptExecutionContext::didChangeTimerAlignmentInterval):
Scan through self DOM Timers and tell them to recompute their fire
time based on the updated alignment interval.
(WebCore::ScriptExecutionContext::timerAlignmentInterval):
* dom/ScriptExecutionContext.h:
(ScriptExecutionContext):
* page/DOMTimer.cpp:
(WebCore):
(WebCore::DOMTimer::alignedFireTime):
If the document's alignment interval is non zero, round up the fire
time to the next multiple of alignment interval.
* page/DOMTimer.h:
(DOMTimer):
(WebCore::DOMTimer::defaultTimerAlignmentInterval):
(WebCore::DOMTimer::setDefaultTimerAlignmentInterval):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore):
(WebCore::Page::setTimerAlignmentInterval):
(WebCore::Page::timerAlignmentInterval):
(WebCore::Page::setVisibilityState):
Getter and Setter for alignment interval. Expose setVisibilityState
if either PAGE_VISIBILITY_API is enabled or if HIDDEN_PAGE_DOM_TIMER_REDUCTION
is enabled.
* page/Page.h:
(Page):
* page/Settings.cpp:
(WebCore):
(WebCore::Settings::setDefaultDOMTimerAlignmentInterval):
(WebCore::Settings::defaultDOMTimerAlignmentInterval):
(WebCore::Settings::setDOMTimerAlignmentInterval):
(WebCore::Settings::domTimerAlignmentInterval):
* page/Settings.h:
(Settings):
* page/SuspendableTimer.cpp:
(WebCore::SuspendableTimer::suspend):
Save the time remaining to the original unaligned fire time, so that
on resuming, the fire time will be correctly aligned using the latest
alignment interval.
* platform/ThreadTimers.cpp:
(WebCore::ThreadTimers::sharedTimerFiredInternal):
Clear m_unalignedNextFireTime along with m_nextFireTime to keep
them always in sync.
* platform/Timer.cpp:
(WebCore::TimerBase::TimerBase):
(WebCore::TimerBase::setNextFireTime):
Save the requested fire time in m_unalignedNextFireTime and
set m_nextFireTime to the aligned value. The unalinged value
is used to recompute fire time if alignment interval changes.
(WebCore):
(WebCore::TimerBase::didChangeAlignmentInterval):
Recompute next fire time from m_unalignedNextFireTime.
(WebCore::TimerBase::nextUnalignedFireInterval):
Interval from current time to the original unaligned fire time.
* platform/Timer.h:
(TimerBase):
(WebCore::TimerBase::alignedFireTime):
2012-10-08 Andreas Kling <kling@webkit.org>
1.18MB below RenderTableSection::setCachedCollapsedBorderValue() on Membuster3.
<http://webkit.org/b/98670>
<rdar://problem/12454276>
Reviewed by Anders Carlsson.
Refactor CollapsedBorderValue to only store the bits and pieces from the BorderValue
that it actually needs. Packed the whole thing into 64 bits.
Reduces memory consumption by 547kB on Membuster3.
* rendering/RenderTableCell.cpp:
Add compile-time size assertion for CollapsedBorderValue.
* rendering/style/CollapsedBorderValue.h:
(WebCore::CollapsedBorderValue::CollapsedBorderValue):
(WebCore::CollapsedBorderValue::width):
(WebCore::CollapsedBorderValue::style):
(WebCore::CollapsedBorderValue::color):
(WebCore::CollapsedBorderValue::isTransparent):
(WebCore::CollapsedBorderValue::precedence):
(WebCore::CollapsedBorderValue::isSameIgnoringColor):
(CollapsedBorderValue):
Apply shrinkwrap to CollapsedBorderValue. Removed specialized copy constructor since
the class only has primitive members now.
2012-10-08 Yoshifumi Inoue <yosin@chromium.org>
HTMLSelectElement::typeAheadFind depends on implementation dependent behavior
https://bugs.webkit.org/show_bug.cgi?id=98710
Reviewed by Kent Tamura.
This patch gets rid of C/C++ implementation dependent behavior from
HTMLSelectElement::typeAheadFind() which does modulo operation with
a negative operand.
HTMLSelectElement::typeAheadFind() contains expression with modulo
operator and dividend can be -1 when the "select" element without
"option" element but "optgroup" element.
Test: fast/forms/select/select-typeahead-crash.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::typeAheadFind): Changed to do modulo
operation with both operands are non-negative.
2012-10-08 Kent Tamura <tkent@chromium.org>
Take account of overflowing values for width calculation of a year sub-field
https://bugs.webkit.org/show_bug.cgi?id=98506
Reviewed by Eric Seidel.
When we decide the width of a year field of an input[type=date]
with the multiple fields UI, we need to take account of the
current value width because we allow to set overflowing values to
the input[type=date].
This change affects only platforms with INPUT_TYPE_DATE &&
INPUT_MULTIPLE_FIELDS_UI.
Test: fast/forms/date-multiple-fields/date-multiple-fields-change-layout-by-value.html
* html/shadow/DateTimeNumericFieldElement.cpp:
(WebCore::DateTimeNumericFieldElement::customStyleForRenderer):
Take account of the current value width.
2012-10-08 Tony Chang <tony@chromium.org>
image not displayed in flexbox
https://bugs.webkit.org/show_bug.cgi?id=98611
Reviewed by Ojan Vafai.
Flexbox will override the width of a child and when stretching, will override the height of the child.
When this happens, when an image loads, it checks to see if it's width/height has
changed, and if so, does a relayout. The overridden width/height was preventing this
relayout from happening.
To fix, we clear all the override sizes when we're done laying out the flex children.
Test: css3/flexbox/relayout-image-load.html
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock): Clear child override sizes.
(WebCore::RenderFlexibleBox::clearChildOverrideSizes):
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): No longer need to clear the override size
here since it should have already been cleared.
* rendering/RenderFlexibleBox.h:
2012-10-08 Andreas Kling <kling@webkit.org>
REGRESSION(r130643): editing/pasteboard/data-transfer-item is failing on chromium.
<http://webkit.org/b/98686>
Reviewed by Tony Chang.
Change ChromiumDataObject::createFromPasteboard() to use a ListHashSet instead of a HashSet so that
item order is preserved.
* platform/chromium/ChromiumDataObject.cpp:
(WebCore::ChromiumDataObject::createFromPasteboard):
2012-10-08 Eric Seidel <eric@webkit.org>
Inline logicalHeightForRowSizing to shave another 2-3% off robohornet's resizecol.html
https://bugs.webkit.org/show_bug.cgi?id=98703
Reviewed by Emil A Eklund.
This is very small potatoes. There are much bigger wins for table layout yet, but
this was an easy win.
This function should probably be converted to use int's only, as table cells are pixel-sized
according to our subpixel-experts.
Also, I suspect there should be ways to early return with less-math in the common cases, but
I've saved such for a later patch.
Note that I changed from using paddingBefore/paddingAfter (which include the instrinsic padding)
to calling computedCSSPaddingBefore/computedCSSPaddingAfter directly as well.
This single function is about 11% of total time for robohornet's resizecol.
* rendering/RenderTableCell.cpp:
* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::logicalHeightForRowSizing):
2012-10-08 Alec Flett <alecflett@chromium.org>
IndexedDB: remove autogenerated objectStore/index id code
https://bugs.webkit.org/show_bug.cgi?id=98085
Reviewed by Tony Chang.
Remove support for backend-generated objectstore and index
ids. The frontend objects now manage that state during
versionchange transactions. The IDBDatabaseBackendInterface and
IDBObjectStoreBackendInterface methods will go away when
https://bugs.webkit.org/show_bug.cgi?id=98682 lands.
No new tests as this is part of a refactoring, existing indexeddb
tests cover correctness.
* Modules/indexeddb/IDBBackingStore.h:
(IDBBackingStore):
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::createObjectStore):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::createObjectStore):
(WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
(WebCore::IDBDatabaseBackendImpl::loadObjectStores):
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
(IDBDatabaseBackendInterface):
* Modules/indexeddb/IDBLevelDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::createObjectStore):
(WebCore::setMaxIndexId):
(WebCore::IDBLevelDBBackingStore::createIndex):
* Modules/indexeddb/IDBLevelDBBackingStore.h:
(IDBLevelDBBackingStore):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
(WebCore::IDBObjectStoreBackendImpl::createIndex):
(WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
* Modules/indexeddb/IDBObjectStoreBackendInterface.h:
2012-10-08 Jaehun Lim <ljaehun.lim@samsung.com>
[CAIRO] Adjust the source rect size when IMAGE_DECODER_DOWN_SAMPLING is enabled
https://bugs.webkit.org/show_bug.cgi?id=98630
Reviewed by Martin Robinson.
IMAGE_DECODER_DOWN_SAMPLING scales down the size of the big image.
CAIRO needs to adjust the source size to the scaled value.
No new tests.
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::draw):
2012-10-08 Adam Barth <abarth@webkit.org>
Remove unused features of BlobBuilder
https://bugs.webkit.org/show_bug.cgi?id=98331
Reviewed by Eric Seidel.
Now that we don't expose BlobBuilder as a web platform API, we can
strip down the class to handle only those cases that are needed by the
Blob constructor.
I've also renamed the class from WebKitBlobBuilder to BlobBuilder and
made it stack allocated rather than RefCounted. A future patch will
actually move the files around. (I didn't want to mix moving code
around with modifying the code.)
* bindings/js/JSBlobCustom.cpp:
(WebCore::JSBlobConstructor::constructJSBlob):
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::V8Blob::constructorCallback):
* fileapi/WebKitBlobBuilder.cpp:
(WebCore):
(WebCore::BlobBuilder::BlobBuilder):
(WebCore::BlobBuilder::getBuffer):
(WebCore::BlobBuilder::append):
(WebCore::BlobBuilder::appendBytesData):
(WebCore::BlobBuilder::getBlob):
* fileapi/WebKitBlobBuilder.h:
(WebCore):
(BlobBuilder):
* page/FeatureObserver.h:
2012-10-08 Martin Robinson <mrobinson@igalia.com>
Try to fix the debug build after r130699
Move the assignment of the ResourceHandleInternal local to before
the include statement where it is used.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::createSoupMessageForHandleAndRequest):
2012-10-08 Nate Chapin <japhet@chromium.org>
Post-r130226 Cleanup: Comment a complicated if statement and make it a helper.
https://bugs.webkit.org/show_bug.cgi?id=98463
Reviewed by Eric Seidel.
No new tests, refactor only.
* rendering/RenderLayer.cpp:
(WebCore::frameElementAndViewPermitScroll):
(WebCore::RenderLayer::scrollRectToVisible):
2012-10-06 Martin Robinson <mrobinson@igalia.com>
[Soup] Simplify the way that requests are started
https://bugs.webkit.org/show_bug.cgi?id=98532
Reviewed by Gustavo Noronha Silva.
Simplify the creation of the libsoup request and message when kicking off
requests, by elminating a bit of duplicate code.
No new tests. This should not change any behavior.
* platform/network/ResourceHandle.h:
(ResourceHandle):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore):
(WebCore::ResourceHandleInternal::soupSession): Ensure the session
is initialized when passing it to the caller.
(WebCore::createSoupMessageForHandleAndRequest): Added this helper which
takes care of creating the SoupMessage for HTTP/HTTPS requests.
(WebCore::createSoupRequestAndMessageForHandle): Collapsed the HTTP and
non-HTTP request creation into this helper.
(WebCore::ResourceHandle::start): Call the new helper now and then sendPendingRequest.
(WebCore::ResourceHandle::sendPendingRequest): Instead of having special
helpers to create and send the request, duplicating the logic for sending it
across the file, add this method which can be used in both cases.
(WebCore::waitingToSendRequest): Reworked the hasBeenSent method to answer
the question of whether or not the request is ready to be sent, but is unsent.
(WebCore::ResourceHandle::platformSetDefersLoading): Use the new helper.
* platform/network/soup/ResourceRequest.h:
(ResourceRequest): Added a new method for getting the URL string for soup.
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::urlStringForSoup): Added.
2012-10-08 Eric Seidel <eric@webkit.org>
Make no-column table-layout cases a little faster with inlining
https://bugs.webkit.org/show_bug.cgi?id=98566
Reviewed by Julien Chaffraix.
This change is almost not worth it at only a couple percent boost on
http://www.robohornet.org/tests/resizecol.html
However, I think the logicalWidthFromTableColumn split it kinda nice
so I've decided to post it anyway.
* rendering/RenderTable.cpp:
(WebCore::RenderTable::slowColElement):
* rendering/RenderTable.h:
(WebCore::RenderTable::colElement):
(RenderTable):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::logicalWidthFromTableColumn):
* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::styleOrColLogicalWidth):
(RenderTableCell):
2012-10-08 Arpita Bahuguna <arpitabahuguna@gmail.com>
Rename RenderObject::firstLineStyleSlowCase() to a more appropriate cachedFirstLineStyle()
https://bugs.webkit.org/show_bug.cgi?id=98631
Reviewed by Eric Seidel.
Renaming firstLineStyleSlowCase() to cachedFirstLineStyle().
The current name is confusing since the function actually gets the
the cached first-line styles.
It also makes the name more descriptive of its functionality
and in accordance with RenderObject::uncachedFirstLineStyle().
No new tests required for this change since no change in behavior is expected.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::cachedFirstLineStyle):
* rendering/RenderObject.h:
(WebCore::RenderObject::firstLineStyle):
(RenderObject):
Renamed RenderObject::firstLineStyleSlowCase() to cachedFirstLineStyle()
and made the associated changes.
2012-10-08 Sami Kyostila <skyostil@chromium.org>
Some non-scrollable elements are added to non-fast-scrollable region
https://bugs.webkit.org/show_bug.cgi?id=97927
Reviewed by James Robinson.
Only RenderLayers that can actually be scrolled should be added to the
ScrollingCoordinator's non-fast scrollable region. Otherwise we may
needlessly fall back to main thread scrolling.
Test: ScrollingCoordinatorChromiumTest.clippedBodyTest
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
(WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
2012-10-08 Simon Fraser <simon.fraser@apple.com>
Move layerTreeAsText to window.internals
https://bugs.webkit.org/show_bug.cgi?id=98690
Reviewed by James Robinson.
Add window.internals.layerTreeAsText(document), and change the tests to use it.
I'll remove testRunner.layerTreeAsText() in a later patch.
* testing/Internals.cpp:
(WebCore::Internals::layerTreeAsText):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:
2012-10-08 Jon Lee <jonlee@apple.com>
Add render object that paints plugin snapshots
https://bugs.webkit.org/show_bug.cgi?id=98322
<rdar://problem/12426546>
Reviewed by Simon Fraser.
First, teach plugins to maintain a set of states when plugin snapshotting is enabled.
Second, a new RenderSnapshottedPlugIn class is a RenderEmbeddedObject that knows how to paint
snapshots when the plugin is not visibly playing. It maintains a RenderImageResource to
the generated poster image.
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::HTMLPlugInElement): By default all plugins play on load.
* html/HTMLPlugInElement.h: Move the inheritance of ImageLoaderClientBase down to
HTMLPlugInImageElement, since that is the class that actually deals with image-based plugins.
(WebCore::HTMLPlugInElement::displayState): Add bit for display state.
(WebCore::HTMLPlugInElement::setDisplayState):
(WebCore::HTMLPlugInElement::updateSnapshot):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): If plugin snapshotting is
enabled, plugin state is set to wait for a poster image.
(WebCore::HTMLPlugInImageElement::createRenderer): Create RenderSnapshottedPlugIn if
plugin snapshotting is enabled.
(WebCore::HTMLPlugInImageElement::updateSnapshot): Once a snapshot is available, update the
renderer and set its state to wait for user input to start the plugin.
* html/HTMLPlugInImageElement.h:
(HTMLPlugInImageElement):
* rendering/RenderObject.h:
(WebCore::RenderObject::isSnapshottedPlugIn): Add new function to identify
RenderSnapshottedPlugIn instances. Since RenderSnapshottedPlugIn inherits from
RenderEmbeddedObject, isEmbeddedObject() still returns true.
* rendering/RenderEmbeddedObject.h:
(RenderEmbeddedObject): Elevate a few virtual methods to protected for
RenderSnapshottedPlugIn to override.
* rendering/RenderSnapshottedPlugIn.cpp: Added.
(WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): Initialize snapshot
resource.
(WebCore::RenderSnapshottedPlugIn::~RenderSnapshottedPlugIn): Shut down snapshot
image resource to remove the renderer as a client, and remove image from memory cache.
(WebCore::RenderSnapshottedPlugIn::plugInImageElement): Convenience function to get the
HTML element.
(WebCore::RenderSnapshottedPlugIn::updateSnapshot): Cache the snapshot, and repaint.
(WebCore::RenderSnapshottedPlugIn::paint): If the plugin is not playing, paint like a
RenderImage does.
(WebCore::RenderSnapshottedPlugIn::paintReplaced): Paint the snapshot and overlay if the
plugin is not playing.
(WebCore::RenderSnapshottedPlugIn::paintReplacedSnapshot): Inspired by
RenderImage::paintReplaced() and RenderImage::paintIntoRect().
* rendering/RenderSnapshottedPlugIn.h: Added.
(WebCore::RenderSnapshottedPlugIn::isSnapshottedPlugin): Returns true.
* rendering/RenderTheme.h: Add a function that paints the overlay on top of the snapshot.
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintPlugInSnapshotOverlay):
* WebCore.xcodeproj/project.pbxproj: Add new RenderSnapshottedPlugIn class.
* CMakeLists.txt: Ditto.
* GNUmakefile.list.am: Ditto.
* Target.pri: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* rendering/RenderingAllInOne.cpp: Ditto.
2012-10-08 Hans Muller <hmuller@adobe.com>
[CSS Exclusions] Add support for polygonal shapes
https://bugs.webkit.org/show_bug.cgi?id=96811
Reviewed by Dirk Schulze.
Initial version of the layout support for polygonal exclusion shapes: the ExclusionPolygon class.
Supports the public ExclusionShape operations using the algorithm described here:
http://hansmuller-webkit.blogspot.com/2012/06/horizontal-box-polygon-intersection-for.html.
Although both the "included" and "excluded" operations are supported, only the former is
used, since only shape-inside is supported at the moment.
The ExclusionPolygon class stores the polygon's edges in an interval tree.
Polygon edges are represented by the ExclusionPolygonEdge struct, which records the indices of
the pair of vertices joined by the edge. Edge vertex index1 is usually less than index2, except
the last edge where index2 is 0. We plan to improve the algorithm that creates the edges
by spanning vertices contained in sequences of more than two colinear vertices. For example,
a triangular polygon might be specified with 5 vertices like this: 3,0 5,0, 5,5, 4,4 2,2, 0,0.
By spanning the extra colinear points: 0,0 5,0, 5,5, which implies index1-index2 edges: 5-1 1-2 2-5.
Although the implementation supports complex polygons, the layout code is limited to
essentially rectangular shapes until a patch for https://bugs.webkit.org/show_bug.cgi?id=96813
lands.
Tests: fast/exclusions/shape-inside/shape-inside-polygon-rectangle.html
fast/exclusions/shape-inside/shape-inside-simple-polygon-001.html
fast/exclusions/shape-inside/shape-inside-simple-polygon-002.html
fast/exclusions/shape-inside/shape-inside-simple-polygon-003.html
fast/exclusions/shape-inside/shape-inside-simple-polygon-004.html
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/ExclusionPolygon.cpp: Added.
(WebCore):
(EdgeIntersection): Internal description of the intersection of a polygon edge and a horizontal line.
(WebCore::ExclusionPolygon::ExclusionPolygon): See the introductory text above for a description of this type.
(WebCore::computeXIntersection): Find and classify the X intercept of a polygon edge with horizontal line, if any.
(WebCore::ExclusionPolygon::rightVertexY): This method is used to decide if a horizontal line "crosses" a vertex.
(WebCore::appendIntervalX): Append an x coordinate to a vector of ExclusionIntervals.
(WebCore::ExclusionPolygon::computeXIntersections): Return a vector of the intersections of a horizontal line with the polygon's edges.
(WebCore::ExclusionPolygon::computeEdgeIntersections): Return a vector of the X projections of the edges that overlap a horizonal rectangle.
(WebCore::ExclusionPolygon::getExcludedIntervals): Return a SegmentList of the X intervals within a horizontal rectangle that overlap the polygon.
(WebCore::ExclusionPolygon::getIncludedIntervals): Return the X intervals within a horizontal rectangle that fit inside the polygon.
* rendering/ExclusionPolygon.h: Added.
(WebCore):
(ExclusionPolygon):
(WebCore::ExclusionPolygon::getXAt): X coordinate of a polygon vertex
(WebCore::ExclusionPolygon::getYAt): Y coordinate of a polygon vertex
(WebCore::ExclusionPolygon::numberOfVertices):
(WebCore::ExclusionPolygon::fillRule): A WindRule value that defines "inside" for self-intersecting polygons.
(ExclusionPolygonEdge):
(WebCore::ExclusionPolygonEdge::ExclusionPolygonEdge):
(WebCore::ExclusionPolygonEdge::vertex1):
(WebCore::ExclusionPolygonEdge::vertex2):
(WebCore::ExclusionPolygonEdge::minX):
(WebCore::ExclusionPolygonEdge::minY):
(WebCore::ExclusionPolygonEdge::maxX):
(WebCore::ExclusionPolygonEdge::maxY):
* rendering/ExclusionShape.cpp:
(WebCore::createExclusionPolygon): Return a new ExclusionPolygon.
(WebCore):
(WebCore::ExclusionShape::createExclusionShape): Added support for BasicShape::BASIC_SHAPE_POLYGON.
* rendering/ExclusionShapeInsideInfo.cpp:
(WebCore::ExclusionShapeInsideInfo::isExclusionShapeInsideInfoEnabledForRenderBlock): Enable BASIC_SHAPE_POLYGON shapes for RenderBlocks.
2012-10-08 Tony Chang <tony@chromium.org>
Replace 2 uses of updateLogicalHeight with computeLogicalHeight
https://bugs.webkit.org/show_bug.cgi?id=98677
Reviewed by Ojan Vafai.
This is part of bug 96804. Convert RenderTextControl and RenderSVGForeignObject to
override the const computeLogicalHeight method rather than the updateLogicalHeight
setter method.
No new tests, there should be no behavior change as this is just a refactor.
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeLogicalHeight): Pass logicalHeight through rather than setting height.
This is a slight correctness fix, although we don't support vertical inputs yet.
* rendering/RenderTextControl.h:
(RenderTextControl):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::computeLogicalHeight):
* rendering/svg/RenderSVGForeignObject.h:
(RenderSVGForeignObject):
2012-10-08 Min Qin <qinmin@chromium.org>
Upstream some tweaks for overlay play button on Android
https://bugs.webkit.org/show_bug.cgi?id=98671
Reviewed by Adam Barth.
This change stops displaying the overlay play button if video height is too small
No test for this. Will rebase layout test expectations for android later.
* css/mediaControlsChromiumAndroid.css:
(video::-webkit-media-controls-overlay-enclosure):
2012-10-08 Simon Fraser <simon.fraser@apple.com>
Some GraphicsLayer cleanup to separate the concepts of using a tile cache, and being the main tile cache layer
https://bugs.webkit.org/show_bug.cgi?id=98574
Reviewed by Dean Jackson.
GraphicsLayerCA assumed that using a TileCache equated to being the main page tile
cache layer, which has some special considerations. Make these two concepts separate
to get closer to being able to use TileCaches in place of CATiledLayer.
* platform/graphics/GraphicsLayer.h:
(GraphicsLayer): Remove m_usingTileCache member, which was not appropriate
for this class to have.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer): Remove init of m_usingTileCache.
(WebCore::GraphicsLayer::debugBorderInfo): Can no longer use m_usingTileCache to
get the blue color, so moved code into a virtual debugBorderInfo() method.
(WebCore::GraphicsLayer::updateDebugIndicators): Call the virtual debugBorderInfo().
* platform/graphics/GraphicsLayerClient.h: Remove the usingTileCache() callback;
we now just cache this information in the GraphicsLayerCA on creation.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA): Init m_isPageTileCacheLayer to false,
then set to m_isPageTileCacheLayer if the client says we should create a tile cache.
(WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter): Overidden to avoid duplicate repaint
counters in the top-left tile.
(WebCore::GraphicsLayerCA::updateLayerBackgroundColor): If this layer is the page tile cache layer,
we allow setting of its background color.
(WebCore::GraphicsLayerCA::debugBorderInfo): Overidden to use a blue color for tiles.
(WebCore::GraphicsLayerCA::requiresTiledLayer): Don't make CATiledLayers for the page tile cache.
* platform/graphics/ca/GraphicsLayerCA.h:
(GraphicsLayerCA):
* platform/graphics/ca/PlatformCALayerClient.h:
(PlatformCALayerClient): Need to pass the platform layer into platformCALayerShowRepaintCounter()
so we can distinguish between calls for tiles, and calls for the tile cache layer itself.
* platform/graphics/ca/mac/TileCache.mm:
(WebCore::TileCache::shouldShowRepaintCounters): Pass 0 to platformCALayerShowRepaintCounter() to
indicate that we're asking about a tile.
* platform/graphics/mac/WebLayer.mm:
(drawLayerContents): Now we can just rely on platformCALayerShowRepaintCounter() to tell us whether
to draw the repaint counter.
(-[WebLayer setNeedsDisplayInRect:]):
* platform/graphics/mac/WebTiledLayer.mm:
(-[WebTiledLayer setNeedsDisplayInRect:]):
* rendering/RenderLayerBacking.h:
(WebCore::RenderLayerBacking::usingTileCache):
(RenderLayerBacking):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::documentBackgroundColorDidChange): We can ask the RenderLayerBacking
whether it's for the tile cache, rather than going to the GraphicsLayer.
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerShowRepaintCounter):
2012-10-08 Huang Dongsung <luxtella@company100.net>
[Qt] Make ImageBufferQt use premultiplied converting functions in Color.h instead of its own mechanism.
https://bugs.webkit.org/show_bug.cgi?id=98582
Reviewed by Eric Seidel.
Only Qt port failed canvas/philip/tests/2d.imageData.put.unchanged.html because
ImageBufferQt converts from or to a premultiplied color using its own code. When
we convert twice from an unmultiplied color to a premultiplied color and then to
an unmultiplied color using this code, the calculated result are pretty
different against the input color. It is why Gtk passes this test although Qt
fails. Gtk port uses them in Color.h.
In addition, Qt should use the functions in Color.h to reduce duplicated codes.
Tests: canvas/philip/tests/2d.imageData.put.unchanged.html: Fixed a test case
* platform/graphics/qt/ImageBufferQt.cpp:
(WebCore::getImageData):
(WebCore::convertBGRAToRGBA):
(WebCore::ImageBuffer::putByteArray):
2012-10-08 Tab Atkins <jackalmage@gmail.com>
Remove "orphaned units" quirk
https://bugs.webkit.org/show_bug.cgi?id=98553
Reviewed by Eric Seidel.
This patch removes our "orphaned units" quirk.
We have an "orphaned units" quirk to match IE, which allows things like "width: 20 px;".
But FF and Opera don't have it and aren't aware of bugs for it,
and it's not in Simon Pieters' Quirks Mode spec <http://dvcs.w3.org/hg/quirks-mode/raw-file/tip/Overview.html>
No new tests, because I'm killing a quirk.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSParser.h:
(CSSParser):
2012-10-08 Robert Hogan <robert@webkit.org>
Border, margin and padding of an inline's inline ancestors counted twice
https://bugs.webkit.org/show_bug.cgi?id=63074
Reviewed by David Hyatt.
In a line such as '<span><span><img>Text' the border, padding and margin belonging
to the two spans was counted twice by RenderBlockLineLayout::nextLineBreak(): once
when adding the width of the <img> object to the line, and a second time when adding
the 'Text'. The result was that nextLineBreak() now had a length for the line that
exceeded the line's maximum length and inserted a bogus line break.
This all happened because the helper function that is used to add in the border etc.
from inline ancestors was crawling up the tree each time. It doesn't need to do that, it
should stop crawling up the tree when the current object is not the first or last sibling below a parent.
Test: fast/inline/bpm-inline-ancestors.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::shouldAddBorderPaddingMargin): Broke this check out into a helper function so that it
can help inlineLogicalWidth() return early and also treat empty RenderTexts the same as no previous/next
sibling on the line. This ensures that collapsed leading space does not interfere with the decision to
crawl up the ancestors accumulating border, padding, and margin.
(WebCore):
(WebCore::inlineLogicalWidth): Return early once the current child is no longer on the edge of its line -
this ensures the border, padding and margin of ancestors is not counted twice.
2012-10-08 Mike West <mkwst@chromium.org>
Null-check for DOMWindow before feeding it to FeatureObserver.
https://bugs.webkit.org/show_bug.cgi?id=98624
Reviewed by Adam Barth.
We shouldn't call out to FeatureObserver in
ContentSecurityPolicy::didReceiveHeader if the policy's document doesn't
have a DOMWindow.
Test: http/tests/security/contentSecurityPolicy/xmlhttprequest-protected-resource-does-not-crash.html
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::didReceiveHeader):
Null check 'document->domWindow' before passing it on.
* page/FeatureObserver.cpp:
(WebCore::FeatureObserver::observe):
ASSERT 'domWindow'.
2012-10-08 Nate Chapin <japhet@chromium.org>
Loader cleanup : Simplify FrameLoader/DocumentLoader setupForReplace()
https://bugs.webkit.org/show_bug.cgi?id=49072
Reviewed by Eric Seidel.
This patch contains one small known behavior change: multipart/x-mixed-replace main resources with text/html parts
will no longer load the text/html progressively. In practice, loading the html progressively causes the document
to get cleared as soon as the next part's data starts arriving, which leads to a blank page most of the time. This case
seems to be pathological, as IE, FF, Opera and WebKit all do something different currently. This patch will cause
us to behave like Firefox, which is the most sane of the current behaviors.
Test: http/tests/multipart/multipart-html.php
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::commitData): Use isMultipartReplacingLoad() helper.
(WebCore::DocumentLoader::receivedData):
(WebCore::DocumentLoader::setupForReplace): Renamed from setupForReplaceByMIMEType(). Call maybeFinishLoadingMultipartContent()
instead of doing identical work inline. After we call frameLoader()->setReplacing(), we will never load progressively, so remove
the if (doesProgressiveLoad(newMIMEType)) {} block.
(WebCore::DocumentLoader::isMultipartReplacingLoad):
(WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): Inline the old DocumentLoader::setupForeReplace(), check
frameLoader()->isReplacing() instead of the delete doesProgressiveLoad().
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::setupForReplace): Move all calls to revertToProvisionalState here.
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::didReceiveResponse): Call setupForReplace(), renamed from setupForReplaceByMIMEType().
2012-10-08 Zoltan Horvath <zoltan@webkit.org>
[Qt] r122720 causes performance regression with DirectFB on ARMv7
https://bugs.webkit.org/show_bug.cgi?id=97548
Reviewed by Jocelyn Turcotte.
Revert the rest of r122720. This change modifies the NativeImagePtr from QImage* to QPixmap*.
Covered by existing tests.
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::assignToHTMLImageElement):
(JSC::Bindings::QtPixmapRuntime::toQt):
* platform/DragImage.h:
(WebCore):
* platform/graphics/GraphicsContext.h:
(GraphicsContext):
* platform/graphics/Image.h:
(Image):
* platform/graphics/NativeImagePtr.h:
(WebCore):
* platform/graphics/gstreamer/ImageGStreamer.h:
* platform/graphics/gstreamer/ImageGStreamerQt.cpp:
(ImageGStreamer::ImageGStreamer):
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::getImageData):
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::pushTransparencyLayerInternal):
(WebCore::GraphicsContext::beginPlatformTransparencyLayer):
(WebCore::GraphicsContext::endPlatformTransparencyLayer):
* platform/graphics/qt/ImageBufferDataQt.h:
(ImageBufferData):
* platform/graphics/qt/ImageBufferQt.cpp:
(WebCore::ImageBufferData::ImageBufferData):
(WebCore):
(WebCore::ImageBufferData::toQImage):
(WebCore::ImageBuffer::copyImage):
(WebCore::ImageBuffer::clip):
(WebCore::ImageBuffer::platformTransformColorSpace):
(WebCore::getImageData):
(WebCore::ImageBuffer::putByteArray):
(WebCore::encodeImage):
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/qt/ImageDecoderQt.cpp:
(WebCore::ImageFrame::asNewNativeImage):
* platform/graphics/qt/ImageQt.cpp:
(graphics):
(loadResourcePixmap):
(WebCore::Image::loadPlatformResource):
(WebCore::Image::setPlatformResource):
(WebCore::Image::drawPattern):
(WebCore::BitmapImage::BitmapImage):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::checkForSolidColor):
(WebCore::BitmapImage::create):
* platform/graphics/qt/PatternQt.cpp:
(WebCore::Pattern::createPlatformPattern):
* platform/graphics/qt/StillImageQt.cpp:
(WebCore::StillImage::StillImage):
(WebCore::StillImage::~StillImage):
(WebCore::StillImage::currentFrameHasAlpha):
(WebCore::StillImage::size):
(WebCore::StillImage::nativeImageForCurrentFrame):
(WebCore::StillImage::draw):
* platform/graphics/qt/StillImageQt.h:
(WebCore::StillImage::create):
(WebCore::StillImage::createForRendering):
(StillImage):
* platform/graphics/qt/TransparencyLayer.h:
(WebCore::TransparencyLayer::TransparencyLayer):
(TransparencyLayer):
* platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp:
(WebCore::GraphicsSurface::createReadOnlyImage):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::BitmapTextureGL::updateContents):
* platform/qt/ClipboardQt.cpp:
(WebCore::ClipboardQt::createDragImage):
(WebCore::ClipboardQt::declareAndWriteDragImage):
* platform/qt/CursorQt.cpp:
(WebCore::createCustomCursor):
* platform/qt/DragImageQt.cpp:
(WebCore::createDragImageFromImage):
* platform/qt/PasteboardQt.cpp:
(WebCore::Pasteboard::writeImage):
2012-10-08 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header file to compilation.
2012-10-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130619.
http://trac.webkit.org/changeset/130619
https://bugs.webkit.org/show_bug.cgi?id=98634
Causes many crashes on the EFL bots. (Requested by rakuco on
#webkit).
* platform/RunLoop.h:
(RunLoop):
* platform/efl/RunLoopEfl.cpp:
(WebCore::RunLoop::RunLoop):
(WebCore::RunLoop::wakeUpEvent):
(WebCore::RunLoop::wakeUp):
2012-10-08 Byungwoo Lee <bw80.lee@samsung.com>
[EFL] Use ecore_main_loop_thread_safe_call_async() to wakeup main loop.
https://bugs.webkit.org/show_bug.cgi?id=98505
Reviewed by Kenneth Rohde Christiansen.
Instead of ecore_pipe_write(),
use ecore_main_loop_thread_safe_call_async() to wakeup ecore main loop.
According to the EFL API document, this function is designed to dispatch
a function on ecore main loop by avoiding dead lock or race condition.
With this function, webkit doesn't need to maintain ecore pipe also.
No new tests. The function to wakeup main loop is changed.
* platform/RunLoop.h:
(RunLoop):
* platform/efl/RunLoopEfl.cpp:
(WebCore::RunLoop::RunLoop):
(WebCore::RunLoop::wakeUpEvent):
(WebCore::RunLoop::wakeUp):
2012-10-07 Arpita Bahuguna <arpitabahuguna@gmail.com>
:first-line pseudo selector ignoring words created from :before
https://bugs.webkit.org/show_bug.cgi?id=80794
Reviewed by Daniel Bates.
The :first-line pseudo-element style is not applied for content
which is generated from the :before/:after pseudo-elements.
Test: fast/css/first-line-style-for-before-after-content.html
* rendering/RenderObject.cpp:
(WebCore::firstLineStyleForCachedUncachedType):
Added a new static helper function incorporating the common
functionality of both uncachedFirstLineStyle() and firstLineStyleSlowCase()
functions. It also modifies the functionality to handle the
scenario when :first-line style needs to be applied on content
generated from :before/:after.
While getting the :first-line style we should also consider the case
when the content is generated from a :before/:after pseudo-element in
which case the RenderInline's parent should be considered for
obtaining the first-line style.
(WebCore):
(WebCore::RenderObject::uncachedFirstLineStyle):
(WebCore::RenderObject::firstLineStyleSlowCase):
Moved the duplicate code between the two functions to the common
helper function firstLineStyleForCachedUncachedType().
2012-10-07 Peter Wang <peter.wang@torchmobile.com.cn>
Web Inspector: The front-end should provide the position in original source file when set a breakpoint
https://bugs.webkit.org/show_bug.cgi?id=93473
Reviewed by Yury Semikhatsky.
Since frontend truncates the indent, the first statement in a line must match the breakpoint (line, 0).
With this patch JSC debugger can support both normal and "Pretty Print" mode.
No new test case. This patch can be verified with cases in "LayoutTests/inspector/debugger/".
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::ScriptDebugServer):
(WebCore::ScriptDebugServer::hasBreakpoint):
(WebCore::ScriptDebugServer::createCallFrameAndPauseIfNeeded):
(WebCore::ScriptDebugServer::pauseIfNeeded):
* bindings/js/ScriptDebugServer.h:
(ScriptDebugServer):
2012-10-07 Martin Robinson <mrobinson@igalia.com>
[Soup] Clean up ResourceError creation
https://bugs.webkit.org/show_bug.cgi?id=98521
Reviewed by Carlos Garcia Campos.
Simplify the creation of ResourcErrors in ResourceHandleSoup. This is
part of a process to make the libsoup networking backend more hackable.
No new tests. This shouldn't change functionality.
* GNUmakefile.list.am: Added new file.
* PlatformEfl.cmake: Added new file.
* platform/network/soup/ResourceError.h:
(ResourceError): Added new factories.
* platform/network/soup/ResourceErrorSoup.cpp: Added.
(WebCore::failingURI): Added this helper.
(WebCore::ResourceError::httpError): New factory.
(WebCore::ResourceError::genericIOError): Ditto.
(WebCore::ResourceError::tlsError): Ditto.
(WebCore::ResourceError::timeoutError): Ditto.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::handleUnignoredTLSErrors): Created this helper which merges
some of the logic from sendRequestCallback.
(WebCore::sendRequestCallback): Use the new helper.
(WebCore::requestTimeoutCallback): Use the new factory.
2012-10-07 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Rename first/second to key/value in HashMap iterators
https://bugs.webkit.org/show_bug.cgi?id=82784
Reviewed by Eric Seidel.
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::Watchers::find):
(WebCore::Geolocation::Watchers::remove):
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::objectStoreNames):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::metadata):
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::deleteDatabase):
(WebCore::IDBFactoryBackendImpl::openBackingStore):
(WebCore::IDBFactoryBackendImpl::open):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::indexNames):
(WebCore::IDBObjectStore::put):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::deleteIndex):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::metadata):
(WebCore::makeIndexWriters):
(WebCore::IDBObjectStoreBackendImpl::deleteInternal):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::objectStore):
(WebCore::IDBTransaction::objectStoreDeleted):
(WebCore::IDBTransaction::onAbort):
(WebCore::IDBTransaction::dispatchEvent):
* Modules/mediastream/MediaConstraintsImpl.cpp:
(WebCore::MediaConstraintsImpl::getMandatoryConstraints):
(WebCore::MediaConstraintsImpl::getMandatoryConstraintValue):
* Modules/webdatabase/AbstractDatabase.cpp:
(WebCore::AbstractDatabase::performOpenAndVerify):
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::interruptAllDatabasesForContext):
* Modules/webdatabase/OriginUsageRecord.cpp:
(WebCore::OriginUsageRecord::diskUsage):
* Modules/webdatabase/SQLTransactionCoordinator.cpp:
(WebCore::SQLTransactionCoordinator::acquireLock):
(WebCore::SQLTransactionCoordinator::releaseLock):
(WebCore::SQLTransactionCoordinator::shutdown):
* Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp:
(WebCore::DatabaseTracker::interruptAllDatabasesForContext):
* Modules/webdatabase/chromium/QuotaTracker.cpp:
(WebCore::QuotaTracker::getDatabaseSizeAndSpaceAvailableToOrigin):
(WebCore::QuotaTracker::updateDatabaseSize):
* Modules/websockets/WebSocketDeflateFramer.cpp:
(WebCore::WebSocketExtensionDeflateFrame::processResponse):
* Modules/websockets/WebSocketExtensionDispatcher.cpp:
(WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::~AXObjectCache):
* bindings/gobject/DOMObjectCache.cpp:
(WebKit::DOMObjectCache::clearByFrame):
* bindings/js/DOMObjectHashTableMap.h:
(WebCore::DOMObjectHashTableMap::~DOMObjectHashTableMap):
(WebCore::DOMObjectHashTableMap::get):
* bindings/js/JSDOMBinding.cpp:
(WebCore::cacheDOMStructure):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::visitChildren):
* bindings/js/JSDOMGlobalObject.h:
(WebCore::getDOMConstructor):
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::addListener):
(WebCore::PageScriptDebugServer::removeListener):
* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
(WebCore::ScriptCachedFrameData::restore):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::~ScriptController):
(WebCore::ScriptController::clearWindowShell):
(WebCore::ScriptController::attachDebugger):
(WebCore::ScriptController::updateDocument):
(WebCore::ScriptController::createRootObject):
(WebCore::ScriptController::collectIsolatedContexts):
(WebCore::ScriptController::cleanupScriptObjectsForPlugin):
(WebCore::ScriptController::clearScriptObjects):
* bindings/js/ScriptController.h:
(WebCore::ScriptController::windowShell):
(WebCore::ScriptController::existingWindowShell):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::setBreakpoint):
(WebCore::ScriptDebugServer::removeBreakpoint):
(WebCore::ScriptDebugServer::hasBreakpoint):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::checkForDuplicate):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneSerializer::write):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateImplementation):
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore::V8Float64Array::GetRawTemplate):
(WebCore::V8Float64Array::GetTemplate):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore::V8TestActiveDOMObject::GetRawTemplate):
(WebCore::V8TestActiveDOMObject::GetTemplate):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
(WebCore::V8TestCustomNamedGetter::GetRawTemplate):
(WebCore::V8TestCustomNamedGetter::GetTemplate):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::V8TestEventConstructor::GetRawTemplate):
(WebCore::V8TestEventConstructor::GetTemplate):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore::V8TestEventTarget::GetRawTemplate):
(WebCore::V8TestEventTarget::GetTemplate):
* bindings/scripts/test/V8/V8TestException.cpp:
(WebCore::V8TestException::GetRawTemplate):
(WebCore::V8TestException::GetTemplate):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::V8TestInterface::GetRawTemplate):
(WebCore::V8TestInterface::GetTemplate):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore::V8TestMediaQueryListListener::GetRawTemplate):
(WebCore::V8TestMediaQueryListListener::GetTemplate):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructor::GetRawTemplate):
(WebCore::V8TestNamedConstructor::GetTemplate):
* bindings/scripts/test/V8/V8TestNode.cpp:
(WebCore::V8TestNode::GetRawTemplate):
(WebCore::V8TestNode::GetTemplate):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::V8TestObj::GetRawTemplate):
(WebCore::V8TestObj::GetTemplate):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::V8TestSerializedScriptValueInterface::GetRawTemplate):
(WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
* bindings/v8/DOMWrapperWorld.cpp:
(WebCore::DOMWrapperWorld::deallocate):
(WebCore::DOMWrapperWorld::ensureIsolatedWorld):
* bindings/v8/NPV8Object.cpp:
(WebCore::freeV8NPObject):
(WebCore::npCreateV8ScriptObject):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::clearScriptObjects):
(WebCore::ScriptController::resetIsolatedWorlds):
(WebCore::ScriptController::ensureIsolatedWorldContext):
(WebCore::ScriptController::existingWindowShellInternal):
(WebCore::ScriptController::evaluateInIsolatedWorld):
(WebCore::ScriptController::setIsolatedWorldSecurityOrigin):
(WebCore::ScriptController::cleanupScriptObjectsForPlugin):
(WebCore::ScriptController::collectIsolatedContexts):
* bindings/v8/SerializedScriptValue.cpp:
* bindings/v8/V8DOMMap.h:
(WebCore::WeakReferenceMap::removeIfPresent):
(WebCore::WeakReferenceMap::visit):
* bindings/v8/V8PerContextData.cpp:
(WebCore::V8PerContextData::dispose):
* bindings/v8/npruntime.cpp:
* bridge/IdentifierRep.cpp:
(WebCore::IdentifierRep::get):
* bridge/NP_jsobject.cpp:
(ObjectMap::add):
(ObjectMap::remove):
* bridge/runtime_root.cpp:
(JSC::Bindings::RootObject::invalidate):
* css/CSSCanvasValue.cpp:
(WebCore::CSSCanvasValue::canvasChanged):
(WebCore::CSSCanvasValue::canvasResized):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::counterToCSSValue):
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::crossfadeChanged):
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
(WebCore::CSSFontSelector::getFontData):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::addClient):
(WebCore::CSSImageGeneratorValue::removeClient):
(WebCore::CSSImageGeneratorValue::getImage):
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::getFontData):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::parsePseudoType):
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createColorValue):
(WebCore::CSSValuePool::createFontFamilyValue):
(WebCore::CSSValuePool::createFontFaceValue):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM):
* css/RuleSet.cpp:
(WebCore::reportAtomRuleMap):
(WebCore::RuleSet::addToRuleSet):
(WebCore::shrinkMapVectorsToFit):
* css/StyleBuilder.cpp:
(WebCore::ApplyPropertyCounter::applyInheritValue):
(WebCore::ApplyPropertyCounter::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectFeatures):
(WebCore::StyleResolver::ruleSetForScope):
(WebCore::StyleResolver::appendAuthorStylesheets):
(WebCore::StyleResolver::sweepMatchedPropertiesCache):
(WebCore::StyleResolver::collectMatchingRulesForList):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parserAddNamespace):
(WebCore::StyleSheetContents::determineNamespace):
* dom/CheckedRadioButtons.cpp:
(WebCore::CheckedRadioButtons::addButton):
(WebCore::CheckedRadioButtons::removeButton):
* dom/ChildListMutationScope.cpp:
(WebCore::ChildListMutationAccumulator::getOrCreate):
* dom/Document.cpp:
(WebCore::Document::windowNamedItems):
(WebCore::Document::documentNamedItems):
(WebCore::Document::getCSSCanvasElement):
(WebCore::Document::cachedImmutableAttributeData):
(WebCore::Document::getCachedLocalizer):
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::markerContainingPoint):
(WebCore::DocumentMarkerController::renderedRectsForMarkers):
(WebCore::DocumentMarkerController::removeMarkers):
(WebCore::DocumentMarkerController::repaintMarkers):
(WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect):
(WebCore::DocumentMarkerController::showMarkers):
* dom/DocumentOrderedMap.cpp:
(WebCore::DocumentOrderedMap::remove):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::pageGroupUserSheets):
* dom/ElementAttributeData.cpp:
(WebCore::ensureAttrListForElement):
* dom/EventDispatcher.cpp:
(WebCore::EventRelatedTargetAdjuster::findRelatedTarget):
* dom/IdTargetObserverRegistry.cpp:
(WebCore::IdTargetObserverRegistry::addObserver):
(WebCore::IdTargetObserverRegistry::removeObserver):
* dom/MutationObserverInterestGroup.cpp:
(WebCore::MutationObserverInterestGroup::isOldValueRequested):
(WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
* dom/Node.cpp:
(WebCore::Node::dumpStatistics):
(WebCore::Node::clearRareData):
(WebCore::NodeListsNodeData::invalidateCaches):
(WebCore::collectMatchingObserversForMutation):
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::addCacheWithAtomicName):
(WebCore::NodeListsNodeData::addCacheWithName):
(WebCore::NodeListsNodeData::addCacheWithQualifiedName):
(WebCore::NodeListsNodeData::adoptTreeScope):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::checkStyleSheet):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
(WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
(WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
(WebCore::ScriptExecutionContext::stopActiveDOMObjects):
(WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
* dom/SelectorQuery.cpp:
(WebCore::SelectorQueryCache::add):
* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitStringData::create):
* dom/StyledElement.cpp:
(WebCore::StyledElement::updateAttributeStyle):
* editing/mac/AlternativeTextUIController.mm:
(WebCore::AlternativeTextUIController::AlernativeTextContextController::alternativesForContext):
* html/FormController.cpp:
(WebCore::SavedFormState::serializeTo):
(WebCore::SavedFormState::appendControlState):
(WebCore::SavedFormState::takeControlState):
(WebCore::SavedFormState::getReferencedFilePaths):
(WebCore::FormKeyGenerator::formKey):
(WebCore::FormController::createSavedFormStateMap):
(WebCore::FormController::formElementsState):
(WebCore::FormController::takeStateForFormElement):
(WebCore::FormController::getReferencedFilePaths):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollectionCacheBase::append):
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::getAttachment):
(WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
(WebCore::WebGLFramebuffer::checkStatus):
(WebCore::WebGLFramebuffer::deleteObjectImpl):
(WebCore::WebGLFramebuffer::initializeAttachments):
* inspector/CodeGeneratorInspector.py:
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::diff):
(WebCore::DOMPatchSupport::innerPatchChildren):
(WebCore::DOMPatchSupport::removeChildAndMoveToNew):
* inspector/InjectedScriptManager.cpp:
(WebCore::InjectedScriptManager::injectedScriptForId):
(WebCore::InjectedScriptManager::injectedScriptIdFor):
(WebCore::InjectedScriptManager::discardInjectedScriptsFor):
(WebCore::InjectedScriptManager::releaseObjectGroup):
(WebCore::InjectedScriptManager::injectedScriptFor):
* inspector/InspectorCSSAgent.cpp:
(WebCore::SelectorProfile::commitSelector):
(WebCore::SelectorProfile::commitSelectorTime):
(WebCore::SelectorProfile::toInspectorObject):
(WebCore::UpdateRegionLayoutTask::onTimer):
(WebCore::InspectorCSSAgent::forcePseudoState):
(WebCore::InspectorCSSAgent::asInspectorStyleSheet):
(WebCore::InspectorCSSAgent::assertStyleSheetForId):
(WebCore::InspectorCSSAgent::didRemoveDOMNode):
(WebCore::InspectorCSSAgent::didModifyDOMAttr):
(WebCore::InspectorCSSAgent::resetPseudoStates):
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::stopTiming):
(WebCore::InspectorConsoleAgent::count):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::nodeForId):
(WebCore::InspectorDOMAgent::performSearch):
(WebCore::InspectorDOMAgent::getSearchResults):
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::clearFrontend):
(WebCore::InspectorDOMStorageAgent::enable):
(WebCore::InspectorDOMStorageAgent::storageId):
(WebCore::InspectorDOMStorageAgent::getDOMStorageResourceForId):
(WebCore::InspectorDOMStorageAgent::didUseDOMStorage):
(WebCore::InspectorDOMStorageAgent::memoryBytesUsedByStorageCache):
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::enable):
(WebCore::InspectorDatabaseAgent::databaseId):
(WebCore::InspectorDatabaseAgent::findByFileName):
(WebCore::InspectorDatabaseAgent::databaseForId):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
(WebCore::InspectorDebuggerAgent::removeBreakpoint):
(WebCore::InspectorDebuggerAgent::resolveBreakpoint):
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::getScriptSource):
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore):
* inspector/InspectorMemoryAgent.cpp:
(WebCore):
* inspector/InspectorPageAgent.cpp:
(WebCore::cachedResourcesForFrame):
(WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
(WebCore::InspectorPageAgent::frameDetached):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::getProfileHeaders):
(WebCore):
(WebCore::InspectorProfilerAgent::getProfile):
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForHeaders):
(WebCore::InspectorResourceAgent::willSendRequest):
(WebCore::InspectorResourceAgent::documentThreadableLoaderStartedLoadingForClient):
(WebCore::InspectorResourceAgent::willLoadXHR):
(WebCore::InspectorResourceAgent::replayXHR):
* inspector/InspectorState.cpp:
(WebCore::InspectorState::getBoolean):
(WebCore::InspectorState::getString):
(WebCore::InspectorState::getLong):
(WebCore::InspectorState::getDouble):
(WebCore::InspectorState::getObject):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::styleWithProperties):
(WebCore::InspectorStyleSheet::inspectorStyleForId):
* inspector/InspectorValues.cpp:
(WebCore::InspectorObjectBase::get):
(WebCore::InspectorObjectBase::writeJSON):
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::workerContextTerminated):
(WebCore::InspectorWorkerAgent::createWorkerFrontendChannelsForExistingWorkers):
(WebCore::InspectorWorkerAgent::destroyWorkerFrontendChannels):
* inspector/MemoryInstrumentationImpl.cpp:
(WebCore::MemoryInstrumentationClientImpl::countObjectSize):
* inspector/MemoryInstrumentationImpl.h:
(WebCore::MemoryInstrumentationClientImpl::totalSize):
(WebCore::MemoryInstrumentationClientImpl::reportedSizeForAllTypes):
* inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::setXHRReplayData):
(WebCore::NetworkResourcesData::removeCachedResource):
(WebCore::NetworkResourcesData::clear):
* loader/CrossOriginAccessControl.cpp:
(WebCore::isSimpleCrossOriginAccessRequest):
(WebCore::createAccessControlPreflightRequest):
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
(WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::getSubresources):
(WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::didReceiveResponse):
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::servePendingRequests):
* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::removeResource):
(WebCore::ApplicationCache::clearStorageID):
(WebCore::ApplicationCache::dump):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
(WebCore::ApplicationCacheGroup::startLoadingEntry):
(WebCore::ApplicationCacheGroup::addEntry):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::fillResourceList):
* loader/appcache/ApplicationCacheResource.cpp:
(WebCore::ApplicationCacheResource::estimatedSizeInStorage):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
(WebCore::ApplicationCacheStorage::cacheGroupForURL):
(WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
(WebCore::ApplicationCacheStorage::store):
(WebCore::ApplicationCacheStorage::empty):
(WebCore::ApplicationCacheStorage::storeCopyOfCache):
* loader/archive/ArchiveFactory.cpp:
(WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::canReuse):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::switchClientsToRevalidatedResource):
(WebCore::CachedResource::updateResponseAfterRevalidation):
* loader/cache/CachedResourceClientWalker.h:
(WebCore::CachedResourceClientWalker::CachedResourceClientWalker):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::~CachedResourceLoader):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
(WebCore::CachedResourceLoader::removeCachedResource):
(WebCore::CachedResourceLoader::garbageCollectDocumentResources):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::removeResourcesWithOrigin):
(WebCore::MemoryCache::getOriginsWithCache):
(WebCore::MemoryCache::getStatistics):
(WebCore::MemoryCache::setDisabled):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::removeAllIcons):
(WebCore::IconDatabase::iconRecordCountWithData):
(WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
(WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleTouchEvent):
* page/Frame.cpp:
(WebCore::Frame::injectUserScripts):
* page/PageGroup.cpp:
(WebCore::PageGroup::pageGroup):
(WebCore::PageGroup::closeLocalStorage):
(WebCore::PageGroup::clearLocalStorageForAllOrigins):
(WebCore::PageGroup::clearLocalStorageForOrigin):
(WebCore::PageGroup::syncLocalStorage):
(WebCore::PageGroup::addUserScriptToWorld):
(WebCore::PageGroup::addUserStyleSheetToWorld):
(WebCore::PageGroup::removeUserScriptFromWorld):
(WebCore::PageGroup::removeUserStyleSheetFromWorld):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::urlForBlankFrame):
* page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
(WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry):
* page/Settings.cpp:
(WebCore::setGenericFontFamilyMap):
(WebCore::getGenericFontFamilyForScript):
* page/SpeechInput.cpp:
(WebCore::SpeechInput::registerListener):
* page/TouchDisambiguation.cpp:
(WebCore::findGoodTouchTargets):
* page/WindowFeatures.cpp:
(WebCore::WindowFeatures::boolFeature):
(WebCore::WindowFeatures::floatFeature):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::updateAnimations):
(WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
(WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
(WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::clearRenderer):
(WebCore::CompositeAnimation::updateTransitions):
(WebCore::CompositeAnimation::updateKeyframeAnimations):
(WebCore::CompositeAnimation::animate):
(WebCore::CompositeAnimation::getAnimatedStyle):
(WebCore::CompositeAnimation::setAnimating):
(WebCore::CompositeAnimation::timeToNextService):
(WebCore::CompositeAnimation::getAnimationForProperty):
(WebCore::CompositeAnimation::suspendAnimations):
(WebCore::CompositeAnimation::resumeAnimations):
(WebCore::CompositeAnimation::overrideImplicitAnimations):
(WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
(WebCore::CompositeAnimation::isAnimatingProperty):
(WebCore::CompositeAnimation::numberOfActiveAnimations):
* platform/Language.cpp:
(WebCore::languageDidChange):
* platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::getNormalizedMIMEType):
* platform/audio/HRTFElevation.cpp:
(WebCore::getConcatenatedImpulseResponsesForSubject):
* platform/blackberry/CookieManager.cpp:
(WebCore::CookieManager::generateHtmlFragmentForCookies):
(WebCore::CookieManager::removeAllCookies):
* platform/blackberry/CookieMap.cpp:
(WebCore::CookieMap::removeOldestCookie):
(WebCore::CookieMap::getAllChildCookies):
* platform/cf/BinaryPropertyList.cpp:
(WebCore::BinaryPropertyListPlan::writeIntegerArray):
* platform/chromium/support/WebHTTPLoadInfo.cpp:
(WebKit::addHeader):
* platform/chromium/support/WebURLRequest.cpp:
(WebKit::WebURLRequest::visitHTTPHeaderFields):
* platform/chromium/support/WebURLResponse.cpp:
(WebKit::WebURLResponse::addHTTPHeaderField):
(WebKit::WebURLResponse::visitHTTPHeaderFields):
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
(WebCore::DisplayRefreshMonitorManager::unregisterClient):
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::getCachedFontPlatformData):
(WebCore::FontCache::getVerticalData):
(WebCore::FontCache::getCachedFontData):
(WebCore::FontCache::releaseFontData):
(WebCore::FontCache::purgeInactiveFontData):
* platform/graphics/GlyphPageTreeNode.cpp:
(WebCore::GlyphPageTreeNode::treeGlyphPageCount):
(WebCore::GlyphPageTreeNode::pageCount):
(WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
(WebCore::GlyphPageTreeNode::pruneTreeFontData):
(WebCore::GlyphPageTreeNode::pruneCustomFontData):
(WebCore::GlyphPageTreeNode::pruneFontData):
(WebCore::GlyphPageTreeNode::showSubtree):
(showGlyphPageTrees):
* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::updateTileBuffers):
(WebCore::TiledBackingStore::resizeEdgeTiles):
(WebCore::TiledBackingStore::setKeepRect):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::avfWrapperForCallbackContext):
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::layerVisibilityChanged):
(WebCore::LayerTiler::uploadTexturesIfNeeded):
(WebCore::LayerTiler::addTileJob):
(WebCore::LayerTiler::deleteTextures):
(WebCore::LayerTiler::pruneTextures):
(WebCore::LayerTiler::bindContentsTexture):
* platform/graphics/blackberry/TextureCacheCompositingThread.cpp:
(WebCore::TextureCacheCompositingThread::textureForTiledContents):
(WebCore::TextureCacheCompositingThread::textureForColor):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::moveOrCopyAnimations):
(WebCore::GraphicsLayerCA::pauseAnimation):
(WebCore::GraphicsLayerCA::layerDidDisplay):
(WebCore::GraphicsLayerCA::updateGeometry):
(WebCore::GraphicsLayerCA::updateTransform):
(WebCore::GraphicsLayerCA::updateChildrenTransform):
(WebCore::GraphicsLayerCA::updateMasksToBounds):
(WebCore::GraphicsLayerCA::updateContentsVisibility):
(WebCore::GraphicsLayerCA::updateContentsOpaque):
(WebCore::GraphicsLayerCA::updateBackfaceVisibility):
(WebCore::GraphicsLayerCA::updateFilters):
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
(WebCore::GraphicsLayerCA::updateLayerDrawsContent):
(WebCore::GraphicsLayerCA::updateContentsImage):
(WebCore::GraphicsLayerCA::updateContentsRect):
(WebCore::GraphicsLayerCA::updateMaskLayer):
(WebCore::GraphicsLayerCA::updateLayerAnimations):
(WebCore::GraphicsLayerCA::setAnimationOnLayer):
(WebCore::GraphicsLayerCA::removeCAAnimationFromLayer):
(WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer):
(WebCore::GraphicsLayerCA::suspendAnimations):
(WebCore::GraphicsLayerCA::resumeAnimations):
(WebCore::GraphicsLayerCA::findOrMakeClone):
(WebCore::GraphicsLayerCA::setOpacityInternal):
(WebCore::GraphicsLayerCA::updateOpacityOnLayer):
* platform/graphics/ca/mac/TileCache.mm:
(WebCore::TileCache::~TileCache):
(WebCore::TileCache::setNeedsDisplay):
(WebCore::TileCache::setScale):
(WebCore::TileCache::setAcceleratesDrawing):
(WebCore::TileCache::setTileDebugBorderWidth):
(WebCore::TileCache::setTileDebugBorderColor):
(WebCore::TileCache::revalidateTiles):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayer::animationStarted):
(resubmitAllAnimations):
(PlatformCALayer::animationForKey):
* platform/graphics/chromium/FontCacheChromiumWin.cpp:
(WebCore::LookupAltName):
(WebCore::fontContainsCharacter):
* platform/graphics/chromium/FontUtilsChromiumWin.cpp:
(WebCore::getDerivedFontData):
* platform/graphics/filters/CustomFilterGlobalContext.cpp:
(WebCore::CustomFilterGlobalContext::~CustomFilterGlobalContext):
(WebCore::CustomFilterGlobalContext::getValidatedProgram):
(WebCore::CustomFilterGlobalContext::removeValidatedProgram):
* platform/graphics/filters/CustomFilterProgram.cpp:
(WebCore::CustomFilterProgram::notifyClients):
* platform/graphics/harfbuzz/HarfBuzzSkia.cpp:
(WebCore::getCachedHarfbuzzFace):
(WebCore::releaseCachedHarfbuzzFace):
* platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp:
(WebCore::HarfBuzzNGFace::HarfBuzzNGFace):
(WebCore::HarfBuzzNGFace::~HarfBuzzNGFace):
* platform/graphics/mac/SimpleFontDataCoreText.cpp:
(WebCore::SimpleFontData::getCFStringAttributes):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::compileShader):
(WebCore::GraphicsContext3D::mappedSymbolName):
(WebCore::GraphicsContext3D::getShaderiv):
(WebCore::GraphicsContext3D::getShaderInfoLog):
(WebCore::GraphicsContext3D::getShaderSource):
* platform/graphics/openvg/EGLDisplayOpenVG.cpp:
(WebCore::EGLDisplayOpenVG::~EGLDisplayOpenVG):
(WebCore::EGLDisplayOpenVG::destroySurface):
(WebCore::EGLDisplayOpenVG::contextForSurface):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::SharedGLData::currentSharedGLData):
(WebCore::TextureMapperGLData::SharedGLData::~SharedGLData):
* platform/graphics/texmap/TextureMapperShaderManager.cpp:
(WebCore::TextureMapperShaderManager::getShaderProgram):
(WebCore::TextureMapperShaderManager::getShaderForFilter):
* platform/graphics/wince/FontPlatformData.cpp:
(WebCore::FixedSizeFontData::create):
* platform/gtk/DataObjectGtk.cpp:
(WebCore::DataObjectGtk::forClipboard):
* platform/gtk/GtkDragAndDropHelper.cpp:
(WebCore::GtkDragAndDropHelper::handleGetDragData):
(WebCore::GtkDragAndDropHelper::handleDragLeave):
(WebCore::GtkDragAndDropHelper::handleDragMotion):
(WebCore::GtkDragAndDropHelper::handleDragDataReceived):
(WebCore::GtkDragAndDropHelper::handleDragDrop):
* platform/gtk/RedirectedXCompositeWindow.cpp:
(WebCore::filterXDamageEvent):
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::gtkStyleChangedCallback):
(WebCore::getStyleContext):
* platform/mac/ScrollbarThemeMac.mm:
(+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
* platform/network/CredentialStorage.cpp:
(WebCore::CredentialStorage::set):
(WebCore::CredentialStorage::get):
* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::copyData):
(WebCore::HTTPHeaderMap::get):
* platform/network/MIMEHeader.cpp:
(WebCore::MIMEHeader::parseHeader):
* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::create):
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::addHTTPHeaderField):
(WebCore::ResourceRequestBase::addHTTPHeaderFields):
* platform/network/blackberry/ResourceRequestBlackBerry.cpp:
(WebCore::ResourceRequest::targetTypeFromMimeType):
(WebCore::ResourceRequest::initializePlatformRequest):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::makeFinalRequest):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::setHeaderFields):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle):
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
* platform/network/qt/ResourceRequestQt.cpp:
(WebCore::ResourceRequest::toNetworkRequest):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::sendRequestCallback):
(WebCore::ResourceHandle::setClientCertificate):
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessage):
(WebCore::ResourceRequest::toSoupMessage):
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::toSoupMessage):
* platform/network/win/ResourceHandleWin.cpp:
(WebCore::ResourceHandle::start):
* platform/qt/RunLoopQt.cpp:
(WebCore::RunLoop::TimerBase::timerFired):
* platform/text/LocaleToScriptMappingDefault.cpp:
(WebCore::scriptNameToCode):
(WebCore::localeToScriptCodeForFontSelection):
* platform/text/TextEncodingRegistry.cpp:
(WebCore::pruneBlacklistedCodecs):
(WebCore::dumpTextEncodingNameMap):
* platform/text/transcoder/FontTranscoder.cpp:
(WebCore::FontTranscoder::converterType):
* platform/text/win/TextCodecWin.cpp:
(WebCore::LanguageManager::LanguageManager):
(WebCore::getCodePage):
(WebCore::TextCodecWin::registerExtendedEncodingNames):
(WebCore::TextCodecWin::registerExtendedCodecs):
(WebCore::TextCodecWin::enumerateSupportedEncodings):
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::getDataMapItem):
(WebCore::getClipboardData):
(WebCore::setClipboardData):
* platform/win/ClipboardWin.cpp:
(WebCore::ClipboardWin::types):
* platform/win/FileSystemWin.cpp:
(WebCore::cachedStorageDirectory):
* platform/win/RunLoopWin.cpp:
(WebCore::RunLoop::TimerBase::timerFired):
* platform/win/WCDataObject.cpp:
(WebCore::WCDataObject::createInstance):
* platform/wince/MIMETypeRegistryWinCE.cpp:
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
* platform/wx/ContextMenuWx.cpp:
(WebCore::ContextMenu::appendItem):
* plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::refresh):
(WebCore::PluginDatabase::MIMETypeForExtension):
(WebCore::PluginDatabase::remove):
* plugins/PluginMainThreadScheduler.cpp:
(WebCore::PluginMainThreadScheduler::scheduleCall):
(WebCore::PluginMainThreadScheduler::dispatchCalls):
* plugins/PluginStream.cpp:
(WebCore::PluginStream::startStream):
* plugins/blackberry/PluginDataBlackBerry.cpp:
(WebCore::PluginData::initPlugins):
* plugins/wx/PluginDataWx.cpp:
(WebCore::PluginData::initPlugins):
* rendering/ExclusionShapeInsideInfo.cpp:
(WebCore::ExclusionShapeInsideInfo::ensureExclusionShapeInsideInfoForRenderBlock):
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::unregisterNamedFlowContentNode):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::requiresIdeographicBaseline):
(WebCore::InlineFlowBox::addTextBoxVisualOverflow):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::clearFloats):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun):
* rendering/RenderBoxModelObject.cpp:
(WebCore::ImageQualityController::highQualityRepaintTimerFired):
(WebCore::ImageQualityController::shouldPaintAtLowQuality):
* rendering/RenderCounter.cpp:
(WebCore::RenderCounter::destroyCounterNodes):
(WebCore::RenderCounter::destroyCounterNode):
(WebCore::updateCounters):
(WebCore::RenderCounter::rendererStyleChanged):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::setRegionRangeForBox):
(WebCore::RenderFlowThread::getRegionRangeForBox):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paint):
(WebCore::performOverlapTests):
* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayerFilterInfo::filterInfoForRenderLayer):
(WebCore::RenderLayerFilterInfo::createFilterInfoForRenderLayerIfNeeded):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::dependsOn):
(WebCore::RenderNamedFlowThread::pushDependencies):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::setRenderBoxRegionInfo):
(WebCore::RenderRegion::setRegionObjectsRegionStyle):
(WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
(WebCore::RenderRegion::computeChildrenStyleInRegion):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::cachedCollapsedBorder):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemColor):
* rendering/RenderView.cpp:
(WebCore::RenderView::selectionBounds):
(WebCore::RenderView::setSelection):
* rendering/RenderWidget.cpp:
(WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::ascentAndDescentForBox):
* rendering/VerticalPositionCache.h:
(WebCore::VerticalPositionCache::get):
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::characterStartsNewTextChunk):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::RenderSVGResourceGradient::applyResource):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::applyResource):
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::resourceDestroyed):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::swapItemsInLayoutAttributes):
* rendering/svg/SVGTextLayoutAttributes.cpp:
(WebCore::SVGTextLayoutAttributes::dump):
* rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
(WebCore::SVGTextLayoutAttributesBuilder::buildCharacterDataMap):
(WebCore::SVGTextLayoutAttributesBuilder::fillCharacterDataMap):
* rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::measureTextRenderer):
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::syncTimerFired):
(WebCore::StorageAreaSync::performImport):
(WebCore::StorageAreaSync::sync):
* storage/StorageMap.cpp:
(WebCore::StorageMap::key):
(WebCore::StorageMap::setItem):
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::localStorageNamespace):
(WebCore::StorageNamespaceImpl::copy):
(WebCore::StorageNamespaceImpl::close):
(WebCore::StorageNamespaceImpl::clearAllOriginsForDeletion):
(WebCore::StorageNamespaceImpl::sync):
* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::removeAnimationElementFromTarget):
(WebCore::SVGDocumentExtensions::removeAllAnimationElementsFromTarget):
(WebCore::SVGDocumentExtensions::addPendingResource):
(WebCore::SVGDocumentExtensions::isElementPendingResources):
(WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
(WebCore::SVGDocumentExtensions::setOfElementsReferencingTarget):
(WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement):
(WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget):
* svg/SVGElement.cpp:
(WebCore::SVGElement::~SVGElement):
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::setElapsed):
(WebCore::SMILTimeContainer::updateAnimations):
* svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::~SVGImageCache):
(WebCore::SVGImageCache::removeClientFromCache):
(WebCore::SVGImageCache::requestedSizeAndScales):
(WebCore::SVGImageCache::imageContentChanged):
(WebCore::SVGImageCache::redraw):
(WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer):
* svg/graphics/filters/SVGFilterBuilder.h:
(WebCore::SVGFilterBuilder::effectReferences):
(WebCore::SVGFilterBuilder::addBuiltinEffects):
* svg/properties/SVGAnimatedProperty.h:
(WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
* svg/properties/SVGAttributeToPropertyMap.cpp:
(WebCore::SVGAttributeToPropertyMap::addProperties):
(WebCore::SVGAttributeToPropertyMap::synchronizeProperties):
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::hasPendingActivity):
* workers/WorkerEventQueue.cpp:
(WebCore::WorkerEventQueue::close):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::setRequestHeaderInternal):
(WebCore::XMLHttpRequest::getAllResponseHeaders):
* xml/XPathFunctions.cpp:
(WebCore::XPath::createFunction):
* xml/XPathParser.cpp:
(isAxisName):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::xsltParamArrayFromParameterMap):
* xml/XSLTProcessorQt.cpp:
(WebCore::XSLTProcessor::transformToString):
2012-10-07 Geoffrey Garen <ggaren@apple.com>
REGRESSION (r130584): Crashes in JSC::MarkedAllocator::allocateSlowCase, failing fast/dom/gc-dom-tree-lifetime.html
https://bugs.webkit.org/show_bug.cgi?id=98612
Reviewed by Darin Adler.
Since DOM modification can happen outside of JS, calls into JS due to
DOM modification need to take the JS lock.
* bindings/js/JSNodeCustom.cpp:
(WebCore::willCreatePossiblyOrphanedTreeByRemovalSlowCase): Take the JS
lock before doing a JS allocation, since this may be a JS entrypoint.
* bindings/js/JSNodeCustom.h:
(WebCore::willCreatePossiblyOrphanedTreeByRemoval): Split out a slow case
to help the inliner.
2012-10-07 Nick Carter <nick@chromium.org>
[chromium] Crash in WebCore::GraphicsLayerChromium::setContentsToImage
https://bugs.webkit.org/show_bug.cgi?id=98456
Reviewed by James Robinson.
Handle null return of nativeImageForCurrentFrame.
Test: compositing/images/truncated-direct-png-image.html
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setContentsToImage):
2012-10-07 Benjamin Poulain <benjamin@webkit.org>
WTFURL: implement URL port removal for HTMLAnchorElement
https://bugs.webkit.org/show_bug.cgi?id=98604
Reviewed by Adam Barth.
* platform/KURLWTFURL.cpp:
(WebCore::KURL::hasPort):
(WebCore::KURL::removePort):
(WebCore::KURL::isHierarchical):
Implement those methods to pass the port removal test of HTMLAnchorElement.
2012-10-05 Dirk Schulze <krit@webkit.org>
SVG radialGradient should support 'fr' for focal radius (just like Canvas)
https://bugs.webkit.org/show_bug.cgi?id=97986
Reviewed by Daniel Bates.
Update SVGRadialGradient to the changed behavior in SVG2: http://www.w3.org/TR/SVG2/pservers.html#RadialGradients
SVG2 adds the focal radius for radial gradients. Color stops will start from the edge of
the focal radius.
The new specification does not limit the focal point to be inside the radial gradients radius.
This makes SVGRadialGradient consistent with the radial gradient on Canvas.
Test: svg/custom/radialGradient-focal-radius.svg
* rendering/svg/RenderSVGResourceRadialGradient.cpp:
Remove checks for position of focal point. The focal point
can be placed every where outside the radius of the gradient now.
(WebCore::RenderSVGResourceRadialGradient::focalRadius):
Add new method to get the focal radius from SVGRadialGradientElement.
(WebCore::RenderSVGResourceRadialGradient::buildGradient):
* rendering/svg/RenderSVGResourceRadialGradient.h:
(RenderSVGResourceRadialGradient):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):
Modify DRT output to include the focal radius.
* svg/RadialGradientAttributes.h:
(WebCore::RadialGradientAttributes::RadialGradientAttributes):
(WebCore::RadialGradientAttributes::fr):
(WebCore::RadialGradientAttributes::setFr):
(WebCore::RadialGradientAttributes::hasFr):
(RadialGradientAttributes):
New setters and getters for focal radius.
* svg/SVGRadialGradientElement.cpp:
(WebCore):
(WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
(WebCore::SVGRadialGradientElement::isSupportedAttribute):
(WebCore::SVGRadialGradientElement::parseAttribute):
(WebCore::SVGRadialGradientElement::collectGradientAttributes):
(WebCore::SVGRadialGradientElement::selfHasRelativeLengths):
Ditto.
* svg/SVGRadialGradientElement.h:
(SVGRadialGradientElement):
* svg/SVGRadialGradientElement.idl:
* svg/svgattrs.in:
Add 'fr' as new attribute to the SVG attribute list.
2012-10-07 Glenn Adams <glenn@skynav.com>
Use start instead of -webkit-auto in default and quirks mode stylesheets.
https://bugs.webkit.org/show_bug.cgi?id=98609
Reviewed by Antti Koivisto.
Change text-align use of legacy '-webkit-auto' to 'start' in the few places where it is used
in default/quirks stylesheets.
No new tests. No change of rendering/styling behavior. No performance impact.
* css/html.css:
(input, textarea, keygen, select, button, isindex):
(ruby > rt):
* css/quirks.css:
(table):
2012-10-06 Raul Hudea <rhudea@adobe.com>
-webkit-clip-path should parse IRIs
https://bugs.webkit.org/show_bug.cgi?id=96381
Reviewed by Andreas Kling.
Implemented the clipping via referencing a SVG clipPath. Currently it works only if the clipPath is defined
before using it on an HTML element. The forward reference issue is tracked via https://bugs.webkit.org/show_bug.cgi?id=90405.
Tests: css3/masking/clip-path-reference-userSpaceOnUse.html
css3/masking/clip-path-reference.html
fast/masking/parsing-clip-path-iri.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add handling for SVG clipPath references.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Add handling for SVG clipPath references.
* css/StyleBuilder.cpp:
(WebCore::ApplyPropertyClipPath::applyValue): Add handling for SVG references.
* rendering/ClipPathOperation.h:
(ReferenceClipPathOperation): Added a new class corresponding to SVG referenced clipPath.
(WebCore::ReferenceClipPathOperation::create):
(WebCore::ReferenceClipPathOperation::url):
(WebCore::ReferenceClipPathOperation::fragment):
(WebCore::ReferenceClipPathOperation::operator==):
(WebCore::ReferenceClipPathOperation::ReferenceClipPathOperation):
(WebCore):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents): Add handling for ReferenceClipPathOperation.
* rendering/svg/RenderSVGResourceClipper.h:
(RenderSVGResourceClipper): Made applyClippingToContext public as it needs to be called directly for HTML elements.
2012-10-06 Pratik Solanki <psolanki@apple.com>
Reduce calls to CGImageSourceCopyPropertiesAtIndex from frameSizeAtIndex
https://bugs.webkit.org/show_bug.cgi?id=98607
Reviewed by Dan Bernstein.
Refactor code so that we avoid a second call to CGImageSourceCopyPropertiesAtIndex under
ImageSource::frameSizeAtIndex().
No new tests because no functional change.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::orientationFromProperties):
(WebCore):
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::orientationAtIndex):
2012-10-06 Mark Rowe <mrowe@apple.com>
Build fix.
Stop calling -[NSSliderCell setTitle:]. It's never done anything on OS X.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::sliderThumbHorizontal):
(WebCore::RenderThemeMac::sliderThumbVertical):
2012-10-06 Andreas Kling <kling@webkit.org>
Clipboard::types() should return an ordered collection.
<http://webkit.org/b/98547>
Reviewed by Darin Adler.
Let Clipboard::types() return a ListHashSet<String> instead of a HashSet<String> to make sure
it retains the order in which type strings are added.
No test, this fixes an issue that was uncovered when lowering the default table size of WTF
hash tables, causing the HashSet<String> to rehash and reorder itself.
* bindings/js/JSClipboardCustom.cpp:
(WebCore::JSClipboard::types):
* bindings/v8/custom/V8ClipboardCustom.cpp:
(WebCore::V8Clipboard::typesAccessorGetter):
* dom/Clipboard.h:
(Clipboard):
* platform/blackberry/ClipboardBlackBerry.cpp:
(WebCore::ClipboardBlackBerry::types):
* platform/blackberry/ClipboardBlackBerry.h:
(ClipboardBlackBerry):
* platform/chromium/ChromiumDataObject.cpp:
(WebCore::ChromiumDataObject::types):
* platform/chromium/ChromiumDataObject.h:
(ChromiumDataObject):
* platform/chromium/ClipboardChromium.cpp:
(WebCore::ClipboardChromium::types):
* platform/chromium/ClipboardChromium.h:
(ClipboardChromium):
* platform/efl/ClipboardEfl.cpp:
(WebCore::ClipboardEfl::types):
* platform/efl/ClipboardEfl.h:
(ClipboardEfl):
* platform/gtk/ClipboardGtk.cpp:
(WebCore::ClipboardGtk::types):
* platform/gtk/ClipboardGtk.h:
(ClipboardGtk):
* platform/mac/ClipboardMac.h:
(ClipboardMac):
* platform/mac/ClipboardMac.mm:
(WebCore::addHTMLClipboardTypesForCocoaType):
(WebCore::ClipboardMac::types):
* platform/qt/ClipboardQt.cpp:
(WebCore::ClipboardQt::types):
* platform/qt/ClipboardQt.h:
(ClipboardQt):
* platform/win/ClipboardWin.cpp:
(WebCore::addMimeTypesForFormat):
(WebCore::ClipboardWin::types):
* platform/win/ClipboardWin.h:
(ClipboardWin):
* platform/wx/ClipboardWx.cpp:
(WebCore::ClipboardWx::types):
* platform/wx/ClipboardWx.h:
(ClipboardWx):
2012-10-06 Geoffrey Garen <ggaren@apple.com>
If Node X is reachable from JavaScript, all Nodes in the same tree should be kept alive
https://bugs.webkit.org/show_bug.cgi?id=88834
Reviewed by Gavin Barraclough.
Follow-up patch to address some comments by Darin Adler.
* bindings/js/JSNodeCustom.h:
(WebCore::willCreatePossiblyOrphanedTreeByRemoval): Save some space by
collapsing comment lines. Use Node::hasChildNodes() for brevity.
2012-10-06 Benjamin Poulain <benjamin@webkit.org>
Fix weird use of KURL's protocolIs
https://bugs.webkit.org/show_bug.cgi?id=98584
Reviewed by Adam Barth.
Converting a KURL to string is a bad idea.
Invalid URLs can return a string that pass the tests, while an
invalid URL will fail protocolIs().
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::removeClient):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::load):
* platform/network/DataURL.cpp:
(WebCore::handleDataURL):
2012-10-06 Dan Bernstein <mitz@apple.com>
WebCore part of <rdar://problem/12446507> [mac] WebKit clients cannot change the behavior of text-rendering: auto
https://bugs.webkit.org/show_bug.cgi?id=98601
Reviewed by Darin Adler.
* WebCore.exp.in: Exported Font::setDefaultTypesettingFeatures().
* platform/graphics/Font.cpp:
(WebCore::Font::s_defaultTypesettingFeatures): Defined this static.
(WebCore::Font::setDefaultTypesettingFeatures): Added this setter.
(WebCore::Font::defaultTypesettingFeatures): Added this getter.
* platform/graphics/Font.h:
(WebCore::Font::typesettingFeatures): Changed to use the value of the new static member
s_defaultTypesettingFeatures, rather than 0, if text-redering is set to auto.
2012-10-04 Geoffrey Garen <ggaren@apple.com>
If Node X is reachable from JavaScript, all Nodes in the same tree should be kept alive
https://bugs.webkit.org/show_bug.cgi?id=88834
Reviewed by Gavin Barraclough.
* bindings/js/JSNodeCustom.cpp:
(WebCore::isObservable): Clarified this comment, since it seems to have
misled some folks.
* bindings/js/JSNodeCustom.h:
(WebCore::willCreatePossiblyOrphanedTreeByRemoval): New helper function
to ensure that a disconnected tree is visible to JavaScript.
* bindings/js/ScriptState.cpp:
(WebCore::mainWorldScriptState): Need to check for null because a document's
frame can be null.
* dom/ContainerNode.cpp:
(WebCore::dispatchChildRemovalEvents): When we remove a subtree from the
document, we sever the reference that JavaScript previously held by
referencing its root. So, we give JavaScript an opportunity to establish
a reference to the new root.
2012-10-06 Byungwoo Lee <bw80.lee@samsung.com>
Fix build warning : -Wunused-parameter.
https://bugs.webkit.org/show_bug.cgi?id=98583
Reviewed by Kentaro Hara.
Use ASSERT_UNUSED() macro to remove build warning.
* plugins/PluginStream.cpp:
(WebCore::PluginStream::delayDeliveryTimerFired):
(WebCore::PluginStream::didReceiveResponse):
(WebCore::PluginStream::didReceiveData):
(WebCore::PluginStream::didFail):
(WebCore::PluginStream::didFinishLoading):
* plugins/PluginView.cpp:
(WebCore::PluginView::requestTimerFired):
(WebCore::PluginView::invalidateTimerFired):
2012-10-05 Adam Barth <abarth@webkit.org>
[V8] toV8(Node*, ...) does more work than needed (6% faster on dom-traverse)
https://bugs.webkit.org/show_bug.cgi?id=98567
Reviewed by Kentaro Hara.
This patch introduces toV8Fast for Node*. This function works a
differently from the existing toV8 function in two ways:
1) It uses the inline wrapper cache in Node to determine if we're
executing in the main world. This is faster both in the case when
isolated worlds exist because we don't need to retrieve any state
for the current context.
2) It doesn't attempt to inline the hash table lookup used to find the
wrapper in the isolated world. There isn't a big need to inline this
code since performance in the isolated world case is dominated by
the hash table lookup.
Because of these two changes, toV8Fast is small enough to inline into
each attribute getter profitably. Over time, I would like to convert
all the performance critical uses of toV8(Node*) to toV8Fast. At that
point, we can delete toV8 and rename toV8Slow to toV8.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
(GenerateNormalAttrGetter):
2012-10-05 Huang Dongsung <luxtella@company100.net>
[mac] REGRESSION (r122215): Animated GIF outside the viewport doesn't play when scrolled into view.
https://bugs.webkit.org/show_bug.cgi?id=94874
Reviewed by Simon Fraser.
Rollback previous patch because this patch caused two problems.
1. GIF animation is occasionally paused when tiled scrolling is enabled.
2. This change regressed Apple's Membuster benchmark by ~20% (80MB.)
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::shouldPauseAnimation):
* loader/cache/CachedImage.h:
(CachedImage):
* loader/cache/CachedResource.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResourcesToSize):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::willRenderImage):
2012-10-05 Xianzhu Wang <wangxianzhu@chromium.org>
OpenTypeVerticalData issue with DroidSansFallback.ttf on chromium-android and chromium-linux
https://bugs.webkit.org/show_bug.cgi?id=97824
Reviewed by Tony Chang.
The issue occurred when a font that contains vert GSUB table but doesn't have
a DFLT script and the first script doesn't have vert feature. Added logic to
handle the case.
Test: fast/writing-mode/vertical-subst-font-vert-no-dflt.html
* platform/graphics/opentype/OpenTypeVerticalData.cpp:
(FeatureList):
(WebCore::OpenType::FeatureList::findFeature): Added to find the matching feature in FeatureList.
(WebCore::OpenType::GSUBTable::feature): Added logic to handle the case of no DFLT script and no vert feature under the first script.
2012-10-05 Tony Chang <tony@chromium.org>
Form controls should always be horizontal
https://bugs.webkit.org/show_bug.cgi?id=98563
Reviewed by Ojan Vafai.
Fix a regression where we didn't force form controls to be horizontal.
Tests: fast/dom/HTMLMeterElement/meter-writing-mode.html
fast/dom/HTMLProgressElement/progress-writing-mode.html
fast/table/colspanMinWidth-vertical.html
* css/html.css:
(input, textarea, keygen, select, button, isindex, meter, progress):
2012-10-05 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130556 and r130564.
http://trac.webkit.org/changeset/130556
http://trac.webkit.org/changeset/130564
https://bugs.webkit.org/show_bug.cgi?id=98572
The patch wasn't reviewed by a reviewer and it is breaking
Chromium Windows (Requested by jchaffraix on #webkit).
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* css/mediaControls.css:
(video::-webkit-media-text-track-container):
(video::-webkit-media-text-track-past-nodes):
(video::-webkit-media-text-track-future-nodes):
(video::-webkit-media-text-track-display):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::attach):
(WebCore::HTMLMediaElement::userIsInterestedInThisLanguage):
(WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind):
(WebCore::HTMLMediaElement::setClosedCaptionsVisible):
(WebCore::HTMLMediaElement::updateClosedCaptionsControls):
* html/HTMLMediaElement.h:
(HTMLMediaElement):
* html/shadow/MediaControlElements.cpp:
(WebCore):
(WebCore::MediaControlTextTrackContainerElement::updateSizes):
* html/shadow/MediaControlElements.h:
(MediaControlTextTrackContainerElement):
* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::updateTextTrackDisplay):
* html/shadow/MediaControlRootElement.h:
(MediaControlRootElement):
* html/shadow/MediaControls.h:
(MediaControls):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::TextTrack):
(WebCore::TextTrack::isValidKindKeyword):
(WebCore::TextTrack::setKind):
(WebCore::TextTrack::setMode):
(WebCore::TextTrack::mode):
* html/track/TextTrack.h:
(WebCore::TextTrack::create):
(WebCore::TextTrack::kind):
(TextTrack):
(WebCore::TextTrack::label):
(WebCore::TextTrack::setLabel):
(WebCore::TextTrack::language):
(WebCore::TextTrack::setLanguage):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCueBox::TextTrackCueBox):
(WebCore::TextTrackCueBox::shadowPseudoId):
(WebCore):
(WebCore::TextTrackCue::updateDisplayTree):
* html/track/TextTrackCue.h:
(TextTrackCueBox):
(TextTrackCue):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* rendering/CaptionPreferencesChangedListener.h: Removed.
* rendering/RenderTheme.h:
(WebCore):
(RenderTheme):
* rendering/RenderThemeMac.h:
(RenderThemeMac):
* rendering/RenderThemeMac.mm:
(WebCore):
(WebCore::RenderThemeMac::RenderThemeMac):
(WebCore::RenderThemeMac::~RenderThemeMac):
2012-10-05 Tim Horton <timothy_horton@apple.com>
[cg] GraphicsContextCG should ask CG whether the shadow offset workaround is required
https://bugs.webkit.org/show_bug.cgi?id=98565
<rdar://problem/12436468>
Reviewed by Simon Fraser.
On Mountain Lion and above, CG can tell us whether we need to work around incorrect
shadow offsets. Prior to Mountain Lion, we should assume we need to apply the workaround.
No new tests, as this requires an obscure configuration to test.
* WebCore.exp.in:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::applyShadowOffsetWorkaroundIfNeeded):
(WebCore::GraphicsContext::setPlatformShadow):
* platform/mac/WebCoreSystemInterface.h: Add wkCGContextDrawsWithCorrectShadowOffsets.
* platform/mac/WebCoreSystemInterface.mm: Add wkCGContextDrawsWithCorrectShadowOffsets.
2012-10-05 Anders Carlsson <andersca@apple.com>
Try to fix the build.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::captionsWindowColor):
2012-10-05 Eric Seidel <eric@webkit.org>
Remove needless virtual calls and inline RenderStyle::logical* to make table layout faster
https://bugs.webkit.org/show_bug.cgi?id=98550
Reviewed by Andreas Kling.
This shaved another 5% (100ms) off of the runtime of resizecol.html microbenchmark:
http://www.robohornet.org/tests/resizecol.html
* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
* rendering/style/RenderStyle.cpp:
* rendering/style/RenderStyle.h:
2012-10-04 Eric Carlson <eric.carlson@apple.com>
Allow ports to override text track rendering style
https://bugs.webkit.org/show_bug.cgi?id=97800
<rdar://problem/12044964>
Reviewed by Silvia Pfeiffer.
* WebCore.exp.in: Export new WebkitSystemInterface functions.
* WebCore.xcodeproj/project.pbxproj: Add CaptionPreferencesChangedListener.h.
* css/mediaControls.css: Rearrange the caption CSS so it is possible to style the cue window,
background, and text independently.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_disableCaptions with theme->userPrefersCaptions().
(WebCore::HTMLMediaElement::attach): Register for caption preferences change callbacks.
(WebCore::HTMLMediaElement::detach): Unregister for caption preferences change callbacks.
(WebCore::HTMLMediaElement::userPrefersCaptions): Return theme->userPrefersCaptions().
(WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Consider userPrefersCaptions().
(WebCore::HTMLMediaElement::setClosedCaptionsVisible): Move the code that marks all tracks as
un-configured to markCaptionAndSubtitleTracksAsUnconfigured so it can be reused.
(WebCore::HTMLMediaElement::captionPreferencesChanged): New, force a reevaluation of all text tracks.
(WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): New, code moved from
setClosedCaptionsVisible
* html/HTMLMediaElement.h: Inherit from CaptionPreferencesChangedListener.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::userCaptionPreferencesChanged): New, if theme
has a captions style sheet override, inject it into the current page group, otherwise
remove injected sheet.
(WebCore::MediaControlTextTrackContainerElement::updateSizes): Get rid of unnecessary member
variable. Get caption font scale from theme instead of hard coding.
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::userCaptionPreferencesChanged): New.
(WebCore::MediaControlRootElement::updateTextTrackDisplay):
* html/shadow/MediaControlRootElement.h: Add userCaptionPreferencesChanged, minor cleanup.
* html/shadow/MediaControls.h:
(WebCore::MediaControls::userCaptionPreferencesChanged): New.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCueBox::TextTrackCueBox): Set the shadow pseudo id.
(WebCore::TextTrackCueBox::textTrackCueBoxShadowPseudoId): New, class method to return the
shadow pseudo id so it can be used elsewhere.
(WebCore::TextTrackCueBox::shadowPseudoId): Call textTrackCueBoxShadowPseudoId.
(WebCore::TextTrackCue::pastNodesShadowPseudoId): New, class method to return the
shadow pseudo id so it can be used elsewhere.
(WebCore::TextTrackCue::futureNodesShadowPseudoId): Ditto.
(WebCore::TextTrackCue::updateDisplayTree):
* html/track/TextTrackCue.h:
* platform/mac/WebCoreSystemInterface.h: Updated.
* platform/mac/WebCoreSystemInterface.mm: Ditto.
* rendering/CaptionPreferencesChangedListener.h: Added.
* rendering/RenderTheme.h:
(WebCore::RenderTheme::userPrefersCaptions): New, default do-nothing implementation.
(WebCore::RenderTheme::userHasCaptionPreferences): Ditto.
(WebCore::RenderTheme::captionFontSizeScale): Ditto.
(WebCore::RenderTheme::captionsStyleSheetOverride): Ditto.
(WebCore::RenderTheme::registerForCaptionPreferencesChangedCallbacks): Ditto.
(WebCore::RenderTheme::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::userCaptionPreferencesChangedNotificationCallback): New, receives preference changed notifications.
(WebCore::RenderThemeMac::RenderThemeMac): Initialize m_listeningForCaptionPreferenceNotifications.
(WebCore::RenderThemeMac::~RenderThemeMac): Unregister for notifications if necessary.
(WebCore::RenderThemeMac::userHasCaptionPreferences): New, passthrough to WKSI function.
(WebCore::RenderThemeMac::userPrefersCaptions): Ditto.
(WebCore::RenderThemeMac::captionsWindowColor): Return Color with user's caption window color preference.
(WebCore::RenderThemeMac::captionsBackgroundColor): Return Color with user's caption
background color preference.
(WebCore::RenderThemeMac::captionsTextColor): Return Color with user's caption text color preference.
(WebCore::RenderThemeMac::captionsEdgeColorForTextColor): Return Color for text edge effect.
(WebCore::RenderThemeMac::cssPropertyWithTextEdgeColor): Return String with CSS to set a text-shadow
or webkit-text-stroke property.
(WebCore::RenderThemeMac::cssColorProperty): Return a String with css to set a property
with a color value.
(WebCore::RenderThemeMac::captionsTextEdgeStyle): Return a String with css to style caption
text with the user's preferred text edge stye.
(WebCore::RenderThemeMac::captionsDefaultFont): Return a String with css to style caption
text with the user's preferred font.
(WebCore::RenderThemeMac::captionsStyleSheetOverride): Return a String with css to style captions
with the user's preferred style.
(WebCore::RenderThemeMac::captionFontSizeScale): Return the user's preferred caption font scale.
(WebCore::RenderThemeMac::captionPreferencesChanged): Notify listeners of caption preference change.
(WebCore::RenderThemeMac::registerForCaptionPreferencesChangedCallbacks): Add a caption preferences
changes listener.
(WebCore::RenderThemeMac::unregisterForCaptionPreferencesChangedCallbacks): Remove a caption preferences
changes listener.
2012-10-05 Takashi Sakamoto <tasak@google.com>
Inline continuations create :after generated content on style recalcs
https://bugs.webkit.org/show_bug.cgi?id=93170
Reviewed by Abhishek Arya.
The bug is caused by RenderInline::styleDidChange's setContinuation(0).
RenderObjectChildList uses continuation to know whether the given
renderer should have AFTER render object or not.
However, setContinuation(0) makes RenderObjectChildList to
misunderstand that all continuations are last continuation.
To avoid the misunderstanding, added a new flag to class
RenderObejctChildList to enable/disable updating :after content (and
also :before content).
Tests: fast/css-generated-content/after-with-inline-continuation.html
fast/css-generated-content/dynamic-apply-after-for-inline.html
* rendering/RenderInline.cpp:
(WebCore::RenderInline::styleDidChange):
Disable upating :after content for continuations which are not
the last one during setStyle just after setContinuation(0).
The setStyle invokes RenderInline::styleDidChange and also invokes
updateBeforeAfterContent via the styleDidChange. This means,
the last continuation's updateBeforeAfterContent is also invoked
after setContinuation(0). We have to update :after for the last
continuation.
* rendering/RenderObjectChildList.cpp:
(WebCore):
(WebCore::RenderObjectChildList::updateBeforeAfterContent):
If s_updateBeforeAfterContent is false, quickly exit
updateBeforeAfterContent.
* rendering/RenderObjectChildList.h:
(RenderObjectChildList):
Added a new flag s_enableUpdateBeforeAfterContent to enable/disable
updating :before or :after content.
2012-10-05 Simon Fraser <simon.fraser@apple.com>
Don't assume that TileCache layers are opaque
https://bugs.webkit.org/show_bug.cgi?id=98555
Reviewed by Dean Jackson.
TileCache previously set all its tile CALayers as opaque.
However, we will need non-opaque tile caches when we use this
tile cache for tiled layers, so add a member function to
control tile opacity.
RenderLayerBacking already calls m_graphicsLayer->setContentsOpaque()
using the FrameView's notion of opaqueness, so this change will
cause the main tile cache to be non-opaque if external forces have
set the FrameView to be non-opaque.
Also tweak the layer border widths on tiled layers.
* platform/graphics/ca/mac/TileCache.h:
(TileCache):
(WebCore::TileCache::tilesAreOpaque):
* platform/graphics/ca/mac/TileCache.mm:
(WebCore::TileCache::TileCache):
(WebCore::TileCache::setTilesOpaque):
(WebCore::TileCache::createTileLayer):
* platform/graphics/ca/mac/WebTileCacheLayer.mm:
(-[WebTileCacheLayer setOpaque:]):
(-[WebTileCacheLayer isOpaque]):
(-[WebTileCacheLayer setBorderWidth:]):
2012-10-05 Tony Chang <tony@chromium.org>
Fix margin box ascent computation in flexbox
https://bugs.webkit.org/show_bug.cgi?id=98540
Reviewed by Ojan Vafai.
The margin box ascent doesn't depend on the margin below the box.
Tests: css3/flexbox/flex-align.html: Fixed a test case and removed a FIXME.
css3/flexbox/flex-align-vertical-writing-mode.html: Similar test case.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::marginBoxAscentForChild):
2012-10-05 Ojan Vafai <ojan@chromium.org>
Deprecated flexboxes subtract scrollbar width/height twice
https://bugs.webkit.org/show_bug.cgi?id=98552
Reviewed by Tony Chang.
This is a regression from http://trac.webkit.org/changeset/119507.
The problem is that contentHeight subtracts the scrollbar and
RenderDeprecatedFlexbox subtracts the scrollbar.
-Make it so that we only access override sizes if one has been set.
I think this makes the calling code more clear.
-If we don't have one set, grab the height/width - borderAndPadding.
-Add a FIXME to change this all back to being borderbox sizes.
There's something trick with making table padding/border work right for that
though (noted in the original patch).
Test: fast/flexbox/flexing-overflow-scroll-item.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::overrideLogicalContentWidth):
(WebCore::RenderBox::overrideLogicalContentHeight):
(WebCore::RenderBox::availableLogicalHeightUsing):
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::contentWidthForChild):
(WebCore):
(WebCore::contentHeightForChild):
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
(WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
2012-10-05 Eric Seidel <eric@webkit.org>
Make tables which don't use col/row span much faster to layout
https://bugs.webkit.org/show_bug.cgi?id=98221
Reviewed by Julien Chaffraix.
My sense is that most tables on webpages do not use colspan/rowspan
so I stole another bit from RenderTableCell::m_column to avoid
having to re-parse the colSpan/rowSpan attributes for every cell
when doing table layout.
This made these symbols disappear from biggrid.html/redraw.html (dglazkov's spreadsheets benchmarks)
as well as moved our robohornet/resizecol.html number from an average of 3221ms to 2608ms (~20%!).
I removed m_hasHTMLTableCellElement (from http://trac.webkit.org/changeset/97691)
since it was attempting to do the same sort of optimization.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::RenderTableCell):
(WebCore::RenderTableCell::parseColSpanFromDOM):
(WebCore::RenderTableCell::parseRowSpanFromDOM):
(WebCore::RenderTableCell::layout):
* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::colSpan):
(WebCore::RenderTableCell::rowSpan):
(RenderTableCell):
2012-10-05 Oli Lan <olilan@chromium.org>
Allow EventHandler to handle longpress gestures, including longpress selection on Android.
https://bugs.webkit.org/show_bug.cgi?id=98173
Reviewed by Ryosuke Niwa.
Adds handling for GestureLongPress to EventHandler::handleGestureEvent, with a new
handleGestureLongPress method. On Android, this method selects the closest word
if the gesture event was over non-link text.
This is tested via a new chromium test WebViewTest.LongPressSelection.
* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestWordFromHitTestResult):
(WebCore::EventHandler::selectClosestWordFromMouseEvent):
(WebCore):
(WebCore::EventHandler::handleGestureEvent):
(WebCore::EventHandler::handleGestureLongPress):
* page/EventHandler.h:
(EventHandler):
2012-10-05 Tab Atkins <jackalmage@gmail.com>
<marquee> element forces itself to be at least 1em high, regardless of 'height' declaration
https://bugs.webkit.org/show_bug.cgi?id=18098
Reviewed by Eric Seidel.
This restriction originally existed to match IE, but IE changed some time ago to be normal instead.
We're the last browser, afaict, to still enforce this de-facto restriction.
This patch makes <marquee> instead act like a normal element.
Tests: fast/css/MarqueeLayoutTest.html (rewritten from the older, bad version)
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::updateMarqueeStyle):
2012-10-05 Joe Mason <jmason@rim.com>
[BlackBerry] Fix regression in proxy auth
https://bugs.webkit.org/show_bug.cgi?id=98533
Reviewed by Yong Li.
The proxy auth dialog gets the proxy address from
BlackBerry::Platform::Settings::proxyAddress, which returns
"host:port", but we try to parse it with a KURL, which expects
"scheme://host:port". Since this is an http proxy, add http:// to the
url to get it to parse.
PR 220567.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::sendRequestWithCredentials):
2012-10-05 Jer Noble <jer.noble@apple.com>
No autorelease pool in place, causing buildup of autoreleased objects.
https://bugs.webkit.org/show_bug.cgi?id=98522
<rdar://problem/11647950>
Reviewed by Alexey Proskuryakov.
Wrap each timer callback in an AutodrainPool, ensuring an autorelease
pool is present during calls from C/C++ into ObjC.
* platform/cf/RunLoopTimerCF.cpp:
(WebCore::timerFired):
2012-10-05 Ryosuke Niwa <rniwa@webkit.org>
Deleting across multiple paragraphs can change the style of surrounding text
https://bugs.webkit.org/show_bug.cgi?id=97266
Reviewed by Levi Weintraub.
Preserve editing styles from CSS rules in wrappingStyleForSerialization as well as inline styles
even when we're not annotating. We don't want to preserve all styles because it's against
the user expectation to keep borders, etc... when merging paragraphs. We also don't want to copy
styles from a mail blockquote because that's not a style the user has applied. See the comment
in EditingStyle::wrappingStyleForSerialization.
Test: editing/deleting/merge-paragraph-with-style-from-rule.html
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
(WebCore::EditingStyle::wrappingStyleForSerialization):
2012-10-05 Dan Bernstein <mitz@apple.com>
Reversing a GlyphBuffer needlessly queries its size multiple times
https://bugs.webkit.org/show_bug.cgi?id=98530
Reviewed by Simon Fraser.
No new tests because there is no change in behavior.
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::getGlyphsAndAdvancesForSimpleText): Replaced the condition
(i < glyphBuffer.size() / 2) with the equivalent test (i < end).
* platform/graphics/mac/FontComplexTextMac.cpp:
(WebCore::Font::getGlyphsAndAdvancesForComplexText): Ditto.
2012-10-05 José Dapena Paz <jdapena@igalia.com>
[GTK] Add support for creating EGL contexts
https://bugs.webkit.org/show_bug.cgi?id=77921
Reviewed by Martin Robinson.
This patch adds support for EGL, using OpenGL and OpenGL ES 2. Both
options are set up on compile time, with the configure options
--enable-egl and --enable-gles2.
The implementation only adds support for EGL on top of X11, to
isolate the changes to the minimum. More changes should come
later to enable EGL for other targets (as Wayland).
No new tests required, as existing WebGL and AC tests should cover
the cases.
* GNUmakefile.am:
* GNUmakefile.list.am:
* platform/graphics/GraphicsContext3D.h:
(GraphicsContext3D):
* platform/graphics/OpenGLESShims.h:
* platform/graphics/cairo/GLContext.cpp:
(WebCore):
(WebCore::GLContext::sharedX11Display):
(WebCore::GLContext::cleanupSharedX11Display):
(WebCore::activeContextList):
(WebCore::GLContext::addActiveContext):
(WebCore::GLContext::removeActiveContext):
(WebCore::GLContext::cleanupActiveContextsAtExit):
(WebCore::GLContext::createContextForWindow):
(WebCore::GLContext::createOffscreenContext):
* platform/graphics/cairo/GLContext.h:
(GLContext):
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::isGLES2Compliant):
* platform/graphics/cairo/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
* platform/graphics/clutter/GraphicsContext3DClutter.cpp:
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
* platform/graphics/egl/GLContextEGL.cpp: Added.
(WebCore):
(WebCore::sharedEGLDisplay):
(WebCore::getEGLConfig):
(WebCore::GLContextEGL::createWindowContext):
(WebCore::GLContextEGL::createPbufferContext):
(WebCore::GLContextEGL::createPixmapContext):
(WebCore::GLContextEGL::createContext):
(WebCore::GLContextEGL::GLContextEGL):
(WebCore::GLContextEGL::~GLContextEGL):
(WebCore::GLContextEGL::canRenderToDefaultFramebuffer):
(WebCore::GLContextEGL::defaultFrameBufferSize):
(WebCore::GLContextEGL::makeContextCurrent):
(WebCore::GLContextEGL::swapBuffers):
(WebCore::GLContextEGL::waitNative):
(WebCore::GLContextEGL::platformContext):
* platform/graphics/egl/GLContextEGL.h: Added.
(WebCore):
(GLContextEGL):
* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::GLContextGLX::createWindowContext):
(WebCore::GLContextGLX::createPbufferContext):
(WebCore::GLContextGLX::createPixmapContext):
(WebCore::GLContextGLX::createContext):
(WebCore::GLContextGLX::~GLContextGLX):
(WebCore::GLContextGLX::defaultFrameBufferSize):
(WebCore::GLContextGLX::makeContextCurrent):
(WebCore::GLContextGLX::swapBuffers):
(WebCore):
(WebCore::GLContextGLX::waitNative):
* platform/graphics/glx/GLContextGLX.h:
(GLContextGLX):
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::releaseShaderCompiler):
(WebCore):
* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::readPixels):
(WebCore::GraphicsContext3D::reshapeFBOs):
(WebCore::GraphicsContext3D::renderbufferStorage):
* platform/graphics/qt/GraphicsContext3DQt.cpp:
* platform/graphics/texmap/TextureMapper.h:
* platform/gtk/RedirectedXCompositeWindow.cpp:
(WebCore::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
(WebCore::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
(WebCore::RedirectedXCompositeWindow::resize):
* platform/gtk/RedirectedXCompositeWindow.h:
2012-10-04 Jon Lee <jonlee@apple.com>
Add a setting to enable plugin snapshotting
https://bugs.webkit.org/show_bug.cgi?id=98319
<rdar://problem/12426480>
Reviewed by Brady Eidson.
Add a new bit for this preference.
* page/Settings.cpp:
(WebCore::Settings::Settings): Preference is false by default.
* page/Settings.h: Added m_plugInSnapshottingEnabled bit.
(WebCore::Settings::setPlugInSnapshottingEnabled): Set the bit.
(WebCore::Settings::plugInSnapshottingEnabled): Return the bit.
2012-10-05 Vsevolod Vlasov <vsevik@chromium.org>
Unreviewed inspector front-end closure compilaiton fixes.
* inspector/InjectedScriptCanvasModuleSource.js:
* inspector/InjectedScriptExterns.js:
(InjectedScriptHost.prototype.getInternalProperties):
* inspector/front-end/DockController.js:
* inspector/front-end/externs.js:
(InspectorFrontendHostAPI.prototype.requestSetDockSide):
2012-10-05 Tab Atkins <jackalmage@gmail.com>
Replace uses of prefixed properties with unprefixed versions in the UA stylesheets
https://bugs.webkit.org/show_bug.cgi?id=98453
Reviewed by Ojan Vafai.
Switched 'border-radius' and 'box-shadow' to their unprefixed version in the UA stylesheets.
No new tests, because the unprefixed properties have the same behavior as the prefixed.
* css/fullscreenQuickTime.css:
(video:-webkit-full-screen::-webkit-media-controls-panel):
* css/html.css:
(keygen, select):
(select[size][multiple]):
(select[size="1"]):
(::-webkit-validation-bubble-message):
* css/themeBlackBerry.css:
(input, textarea):
* css/themeChromiumAndroid.css:
(select[size][multiple]):
* css/themeQtNoListboxes.css:
(select[size][multiple]):
* css/themeWin.css:
(select[size="1"]):
* css/view-source.css:
(.webkit-html-message-bubble):
2012-10-05 Kevin Ellis <kevers@chromium.org>
[chromium] Only inflate the height of rows in a popup menu when a touch device is detected.
https://bugs.webkit.org/show_bug.cgi?id=98515
Reviewed by Adam Barth.
Enforces a minimum row height for popup menus when a touch device is
detected. In a previous patch (r127597), the sizing of popup was
consolidated for touch and non-touch. Based on user feedback, reverting
to the old behavior for non-touch and only adding padding for touch
devices seems like a much safer strategy. This patch is not a direct
revert of r127567 since the padding previously used for touch is a bit
excessive.
Covered by existing tests.
* platform/chromium/PopupListBox.cpp:
(WebCore::PopupListBox::getRowHeight):
* platform/chromium/PopupMenuChromium.cpp:
(WebCore):
* platform/chromium/PopupMenuChromium.h:
(WebCore::PopupMenuChromium::optionRowHeightForTouch):
(WebCore::PopupMenuChromium::setOptionRowHeightForTouch):
(PopupMenuChromium):
2012-10-05 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: [Styles] Unable to edit properties in broken stylesheets
https://bugs.webkit.org/show_bug.cgi?id=98246
Reviewed by Vsevolod Vlasov.
Pop source data for invalid rules off the stack whenever we have consecutive CSSParser::markRuleHeaderStart() invocations.
Test: inspector/styles/parse-stylesheet-errors.html
* css/CSSParser.cpp:
(WebCore::CSSParser::popRuleData):
(WebCore::CSSParser::markRuleHeaderStart):
(WebCore::CSSParser::markRuleBodyStart):
* css/CSSParser.h:
(CSSParser):
2012-10-05 Gabor Rapcsanyi <rgabor@webkit.org>
Add ARM-NEON support to VectorMath in WebAudio
https://bugs.webkit.org/show_bug.cgi?id=98131
Reviewed by Zoltan Herczeg.
Speed up vector operations in WebAudio with NEON intrinsics.
* platform/audio/VectorMath.cpp:
(WebCore::VectorMath::vsma):
(WebCore::VectorMath::vsmul):
(WebCore::VectorMath::vadd):
(WebCore::VectorMath::vmul):
(WebCore::VectorMath::zvmul):
(WebCore::VectorMath::vsvesq):
(WebCore::VectorMath::vmaxmgv):
2012-10-05 Simon Hausmann <simon.hausmann@digia.com>
Unreviewed, rolling out r130495.
http://trac.webkit.org/changeset/130495
https://bugs.webkit.org/show_bug.cgi?id=98268
Made WK2 tests crash.
* Target.pri:
* platform/qt/QStyleFacade.cpp: Removed.
* platform/qt/QStyleFacade.h: Removed.
2012-10-05 Simon Hausmann <simon.hausmann@digia.com>
[Qt] Make RenderThemeQStyle/ScrollbarThemeQStyle compile without QStyle/QtWidgets
https://bugs.webkit.org/show_bug.cgi?id=98268
Reviewed by Tor Arne Vestbø.
Extracted QStyle/QWidget related code into a QWebStyle class that implements the QStyleFacade interface.
QStyleFacade is a pure interface that lives in WebCore/platform/qt
(next to RenderThemeQStyle and ScrollbarThemeQStyle) and provides a
minimal interface of what we need to draw with QStyle as well as basic
hit testing and metric retrieval. It also provides a
QStyleFacadeOption class that aggregates common meta-data for
rendering primitives, such as direction, rectangle, state (sunken,
enabled, etc.) or palette. It also provides some more slider/scrollbar
specific fields in a slider sub-structure.
RenderThemeQStyle/ScrollbarThemeQStyle used to instantiate specific QStyleOption sub-classes and populate
them with state information from render objects, before calling straight to QStyle. Most of the common code
was encapsulated in StylePainterQStyle.
The new RenderThemeQStyle/ScrolllbarThemeQStyle uses common code in
StylePainterQStyle to populate state into QStyleFacadeOption before
calling into QStyleFacade.
The style facade is then implemented by QStyleFacadeImp, which extracts
meta-data from QStyleFacadeOption arguments, populates style
primitive specific QStyleOption objects and then calls on QStyle.
RenderThemeQStyle/ScrollbarThemeQStyle can only use interface methods
from QStyleFacade. QStyleFacadeImp on the other hand will live in the
separate QtWebKitWidgets library in the future and therefore cannot use
any WebCore types.
* Target.pri:
* platform/qt/QStyleFacade.cpp: Added.
(WebCore):
(WebCore::QStyleFacade::styleForPage):
* platform/qt/QStyleFacade.h: Added.
(WebCore):
(QStyleFacade):
(WebCore::QStyleFacade::~QStyleFacade):
(WebCore::QStyleFacadeOption::QStyleFacadeOption):
(QStyleFacadeOption):
* platform/qt/RenderThemeQStyle.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp.
(WebCore):
(WebCore::RenderThemeQStyle::getStylePainter):
(WebCore::StylePainterQStyle::StylePainterQStyle):
(WebCore::StylePainterQStyle::init):
(WebCore::RenderThemeQStyle::create):
(WebCore::RenderThemeQStyle::setStyleFactoryFunction):
(WebCore::RenderThemeQStyle::styleFactory):
(WebCore::RenderThemeQStyle::RenderThemeQStyle):
(WebCore::RenderThemeQStyle::~RenderThemeQStyle):
(WebCore::RenderThemeQStyle::setPaletteFromPageClientIfExists):
(WebCore::RenderThemeQStyle::inflateButtonRect):
(WebCore::RenderThemeQStyle::computeSizeBasedOnStyle):
(WebCore::RenderThemeQStyle::adjustButtonStyle):
(WebCore::RenderThemeQStyle::setButtonPadding):
(WebCore::RenderThemeQStyle::paintButton):
(WebCore::RenderThemeQStyle::paintTextField):
(WebCore::RenderThemeQStyle::adjustTextAreaStyle):
(WebCore::RenderThemeQStyle::paintTextArea):
(WebCore::RenderThemeQStyle::setPopupPadding):
(WebCore::RenderThemeQStyle::colorPalette):
(WebCore::RenderThemeQStyle::paintMenuList):
(WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
(WebCore::RenderThemeQStyle::paintMenuListButton):
(WebCore::RenderThemeQStyle::animationDurationForProgressBar):
(WebCore::RenderThemeQStyle::paintProgressBar):
(WebCore::RenderThemeQStyle::paintSliderTrack):
(WebCore::RenderThemeQStyle::adjustSliderTrackStyle):
(WebCore::RenderThemeQStyle::paintSliderThumb):
(WebCore::RenderThemeQStyle::adjustSliderThumbStyle):
(WebCore::RenderThemeQStyle::paintSearchField):
(WebCore::RenderThemeQStyle::adjustSearchFieldDecorationStyle):
(WebCore::RenderThemeQStyle::paintSearchFieldDecoration):
(WebCore::RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle):
(WebCore::RenderThemeQStyle::paintSearchFieldResultsDecoration):
(WebCore::RenderThemeQStyle::paintInnerSpinButton):
(WebCore::RenderThemeQStyle::initializeCommonQStyleOptions):
(WebCore::RenderThemeQStyle::adjustSliderThumbSize):
* platform/qt/RenderThemeQStyle.h: Renamed from Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h.
(WebCore):
(RenderThemeQStyle):
(WebCore::RenderThemeQStyle::qStyle):
(StylePainterQStyle):
(WebCore::StylePainterQStyle::isValid):
(WebCore::StylePainterQStyle::paintButton):
(WebCore::StylePainterQStyle::paintTextField):
(WebCore::StylePainterQStyle::paintComboBox):
(WebCore::StylePainterQStyle::paintComboBoxArrow):
(WebCore::StylePainterQStyle::paintSliderTrack):
(WebCore::StylePainterQStyle::paintSliderThumb):
(WebCore::StylePainterQStyle::paintInnerSpinButton):
(WebCore::StylePainterQStyle::paintProgressBar):
(WebCore::StylePainterQStyle::paintScrollCorner):
(WebCore::StylePainterQStyle::paintScrollBar):
* platform/qt/ScrollbarThemeQStyle.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/ScrollbarThemeQStyle.cpp.
(WebCore):
(WebCore::ScrollbarThemeQStyle::ScrollbarThemeQStyle):
(WebCore::ScrollbarThemeQStyle::~ScrollbarThemeQStyle):
(WebCore::scPart):
(WebCore::scrollbarPart):
(WebCore::initSliderStyleOption):
(WebCore::ScrollbarThemeQStyle::paint):
(WebCore::ScrollbarThemeQStyle::hitTest):
(WebCore::ScrollbarThemeQStyle::shouldCenterOnThumb):
(WebCore::ScrollbarThemeQStyle::invalidatePart):
(WebCore::ScrollbarThemeQStyle::scrollbarThickness):
(WebCore::ScrollbarThemeQStyle::thumbPosition):
(WebCore::ScrollbarThemeQStyle::thumbLength):
(WebCore::ScrollbarThemeQStyle::trackPosition):
(WebCore::ScrollbarThemeQStyle::trackLength):
(WebCore::ScrollbarThemeQStyle::paintScrollCorner):
* platform/qt/ScrollbarThemeQStyle.h: Renamed from Source/WebKit/qt/WebCoreSupport/ScrollbarThemeQStyle.h.
(WebCore):
(ScrollbarThemeQStyle):
(WebCore::ScrollbarThemeQStyle::qStyle):
2012-10-05 Andrei Bucur <abucur@adobe.com>
Incomplete repaint of boxes with inset box-shadow and padding when resized
https://bugs.webkit.org/show_bug.cgi?id=59863
Reviewed by Simon Fraser.
The patch extends the repaint rectangle to include the inset shadow extent for renderers that resize and need to be repainted. The rectangle computations are also better fragmented and easier to read.
New Test: fast/repaint/box-shadow-inset-repaint.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintAfterLayoutIfNeeded):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::getShadowInsetExtent):
(WebCore):
* rendering/style/RenderStyle.h:
2012-10-04 Kent Tamura <tkent@chromium.org>
Fix sub-field width to the maximum width of a placeholder and the maximum value
https://bugs.webkit.org/show_bug.cgi?id=98481
Reviewed by Hajime Morita.
We can't assume a placeholder text is shorter than the width of
digits. The placeholder string for the year field of
input[type=week] is "----", but input[type=date] will have a
localized string for it.
We should set the 'width' CSS property to the maximum of the
placeholder width and the maximum value width in order to prevent
the field width from growing/narrowing.
Before this patch, we secured four digits space for a year field,
and allowed the field to grow its width when a larger year is
set. After this patch, we don't allow it to grow because the
'width' property is set to the maximum width.
Update week-multiple-fields-appearance-basic.html, and the
following tests are affected.
- fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-classes.html
- fast/forms/week-multiple-fields/week-multiple-fields-appearance-pseudo-elements.html
- fast/forms/week-multiple-fields/week-multiple-fields-appearance-style.html
* html/shadow/DateTimeNumericFieldElement.cpp:
(WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement):
Enable customStyleForRenderer.
(WebCore::DateTimeNumericFieldElement::customStyleForRenderer):
Added. The code is similar to DateTimeSymbolicFieldElement::customStyleForRenderer().
(WebCore::DateTimeNumericFieldElement::formatValue):
Made a function with the code in value(). This is used in
customStyleForRenderer() and value().
(WebCore::DateTimeNumericFieldElement::value): Use formatValue().
* html/shadow/DateTimeNumericFieldElement.h:
(DateTimeNumericFieldElement): Declare new functions.
2012-10-05 Kent Tamura <tkent@chromium.org>
Improve spelling and performance of Localizer.cpp
https://bugs.webkit.org/show_bug.cgi?id=98485
Reviewed by Kentaro Hara.
Some improvements pointed in webkit.org/b/98229#c5.
No new tests because of no behavior change.
* platform/text/Localizer.h:
(Localizer):
- Rename dateTimeFormatWithSecond to dateTimeFormatWithSeconds
- Rename dateTimeFormatWithoutSecond to dateTimeFormatWithoutSeconds
- Add data members: m_dateTimeFormatWithSeconds and m_dateTimeFormatWithoutSeconds.
* platform/text/Localizer.cpp:
(WebCore::Localizer::timeFormat): Check isNull instead of isEmpty
(WebCore::Localizer::shortTimeFormat): Ditto.
(WebCore::Localizer::dateTimeFormatWithSeconds):
- Renamed.
- Cache the concatenation result to a data member.
(WebCore::Localizer::dateTimeFormatWithoutSeconds): Ditto.
* html/DateTimeInputType.cpp:
(WebCore::DateTimeInputType::setupLayoutParameters): Follow the renaming.
* html/DateTimeLocalInputType.cpp:
(WebCore::DateTimeLocalInputType::setupLayoutParameters): Ditto.
2012-10-04 Kenichi Ishibashi <bashi@chromium.org>
[WebSocket] ExtensionParser should have its own file
https://bugs.webkit.org/show_bug.cgi?id=98475
Reviewed by Yuta Kitamura.
Factor out ExtensionParser from WebSocketExtensionDispatcher and rename it as WebSocketExtensionParser.
WebSocketExtensionParser has its own file.
No changes in behavior. Added a test case for parsing Sec-WebSocket-Extensions field as a chromium unit test.
* CMakeLists.txt: Added WebSocketExtensionParser.
* GNUmakefile.list.am: Ditto.
* Modules/websockets/WebSocketExtensionDispatcher.cpp:
(WebCore::WebSocketExtensionDispatcher::processHeaderValue):
Use WebSocketExtensionParser::parseExtension() to parser extension header value.
* Modules/websockets/WebSocketExtensionParser.cpp: Added.
(WebCore):
(WebCore::WebSocketExtensionParser::finished): Moved from ExtensionParser.
(WebCore::WebSocketExtensionParser::parsedSuccessfully): Ditto.
(WebCore::isSeparator): Ditto.
(WebCore::WebSocketExtensionParser::skipSpaces): Ditto.
(WebCore::WebSocketExtensionParser::consumeToken): Ditto.
(WebCore::WebSocketExtensionParser::consumeQuotedString): Ditto.
(WebCore::WebSocketExtensionParser::consumeQuotedStringOrToken): Ditto.
(WebCore::WebSocketExtensionParser::consumeCharacter): Ditto.
(WebCore::WebSocketExtensionParser::parseExtension): Moved from WebSocketExtensionDispatcher.
* Modules/websockets/WebSocketExtensionParser.h: Added.
(WebCore):
(WebSocketExtensionParser):
(WebCore::WebSocketExtensionParser::WebSocketExtensionParser):
(WebCore::WebSocketExtensionParser::currentToken):
* Target.pri: Added WebSocketExtensionParser.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
2012-10-04 Kunihiko Sakamoto <ksakamoto@chromium.org>
<input> size attribute should throw INDEX_SIZE_ERR when set to 0
https://bugs.webkit.org/show_bug.cgi?id=61675
Reviewed by Kent Tamura.
According to the spec, the size IDL attribute of input elements is limited
to only non-negative numbers greater than zero. It should throw INDEX_SIZE_ERR
exception when set to 0. New behavior matches both Firefox and IE.
Spec: http://www.w3.org/TR/html5/common-input-element-attributes.html#the-size-attribute
Test: fast/dom/HTMLInputElement/input-size-attribute.html
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setSize):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/HTMLInputElement.idl:
2012-10-04 Kent Tamura <tkent@chromium.org>
Fix font for date/time input types.
https://bugs.webkit.org/show_bug.cgi?id=98478
Reviewed by Kentaro Hara.
input[type=date] should use monospace font if
ENABLE_INPUT_MULTIPLE_FIELDS_UI && ENABLE_INPUT_TYPE_DATE.
For other date/time types, they should use monospace font only
if their types are enabled. input[type="foo"] matches input
element with type="foo" even if the foo type is not supported.
The input[type=date] change is covered by
fast/forms/date/calendar-picker-appearance.html,
platform/chromium/fast/forms/date/date-suggestion-picker-appearance*.html
* css/html.css:
(input[type="date"]):
(input[type="datetime"]):
(input[type="datetime-local"]):
(input[type="month"]):
(input[type="time"]):
2012-10-04 Hajime Morrita <morrita@google.com>
[Refactoring] Some classes in StyleResolver.cpp/h could have its own file.
https://bugs.webkit.org/show_bug.cgi?id=98469
Reviewed by Dimitri Glazkov.
This change extracts RuleData, RuleSet, RuleFeature and Featurs class
to its own file: RuleSet.h/cpp and RuleFeature.h/cpp
RuleFeature class is moved fro StyleResolver inner class to plain WebCore class.
Feaures class is renamed to RuleFeatureSet to avoid possible name conflict.
No new tests. Just splitting file and doing simple rename.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSAllInOne.cpp:
* css/RuleFeature.cpp: Added.
(WebCore):
(WebCore::RuleFeatureSet::add):
(WebCore::RuleFeatureSet::clear):
(WebCore::RuleFeatureSet::reportMemoryUsage):
* css/RuleFeature.h: Added.
(WebCore):
(RuleFeature):
(WebCore::RuleFeature::RuleFeature):
(RuleFeatureSet):
(WebCore::RuleFeatureSet::RuleFeatureSet):
* css/RuleSet.cpp: Added.
(WebCore):
(WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
(WebCore::selectorListContainsUncommonAttributeSelector):
(WebCore::isCommonAttributeSelectorAttribute):
(WebCore::containsUncommonAttributeSelector):
(WebCore::RuleData::RuleData):
(WebCore::RuleData::reportMemoryUsage):
(WebCore::reportAtomRuleMap):
(WebCore::RuleSet::reportMemoryUsage):
(WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
(WebCore::collectFeaturesFromSelector):
(WebCore::collectFeaturesFromRuleData):
(WebCore::RuleSet::addToRuleSet):
(WebCore::RuleSet::addRule):
(WebCore::RuleSet::addPageRule):
(WebCore::RuleSet::addRegionRule):
(WebCore::RuleSet::addRulesFromSheet):
(WebCore::RuleSet::addStyleRule):
(WebCore::shrinkMapVectorsToFit):
(WebCore::RuleSet::shrinkToFit):
* css/RuleSet.h: Added.
(WebCore):
(RuleData):
(WebCore::RuleData::position):
(WebCore::RuleData::rule):
(WebCore::RuleData::selector):
(WebCore::RuleData::selectorIndex):
(WebCore::RuleData::hasFastCheckableSelector):
(WebCore::RuleData::hasMultipartSelector):
(WebCore::RuleData::hasRightmostSelectorMatchingHTMLBasedOnRuleHash):
(WebCore::RuleData::containsUncommonAttributeSelector):
(WebCore::RuleData::specificity):
(WebCore::RuleData::linkMatchType):
(WebCore::RuleData::hasDocumentSecurityOrigin):
(WebCore::RuleData::isInRegionRule):
(WebCore::RuleData::descendantSelectorIdentifierHashes):
(SameSizeAsRuleData):
(RuleSet):
(WebCore::RuleSet::create):
(WebCore::RuleSet::disableAutoShrinkToFit):
(WebCore::RuleSet::features):
(WebCore::RuleSet::idRules):
(WebCore::RuleSet::classRules):
(WebCore::RuleSet::tagRules):
(WebCore::RuleSet::shadowPseudoElementRules):
(WebCore::RuleSet::linkPseudoClassRules):
(WebCore::RuleSet::focusPseudoClassRules):
(WebCore::RuleSet::universalRules):
(WebCore::RuleSet::pageRules):
(WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
(RuleSetSelectorPair):
(WebCore::RuleSet::RuleSet):
* css/StyleResolver.cpp:
(WebCore):
(WebCore::makeRuleSet):
(WebCore::StyleResolver::collectMatchingRulesForList):
* css/StyleResolver.h:
(StyleResolver):
2012-10-04 Adam Barth <abarth@webkit.org>
FeatureObserver should distinguish between legacy HTML and text notifications
https://bugs.webkit.org/show_bug.cgi?id=98441
Reviewed by Tony Chang.
We might be able to drop support for legacy HTML notifications before
we can drop support for legacy text notifications. We should measure
and find out.
* Modules/notifications/NotificationCenter.idl:
* page/FeatureObserver.h:
2012-10-04 Pravin D <pravind.2k4@gmail.com>
Removing the unused member variable m_wasMalformed from HTMLFormElement class and its related code frgment.
https://bugs.webkit.org/show_bug.cgi?id=98444
Reviewed by Eric Seidel.
The member variable m_wasMalformed of HTMLFormElement class was used to determine if the <form> tag was malformed or not.
This information was used elsewhere to decide if bottom margins have to be included for such a <form>.
However currently this member variable is not being set by any code following code refactoring in HTML parser class.
Code cleanup patch. No new tests required.
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::HTMLFormElement):
Removed m_wasMalformed initialization.
* html/HTMLFormElement.h:
(HTMLFormElement):
Removed m_wasMalformed variable.
Removed m_wasMalformed variable's setter and getter functions.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
Removed code fragment using/dependent on m_wasMalformed.
2012-10-04 Rik Cabanier <cabanier@adobe.com>
Turn Compositing on by default in WebKit build
https://bugs.webkit.org/show_bug.cgi?id=98315
Reviewed by Simon Fraser.
enable -webkit-blend-mode on trunk.
No new tests. Existing blending test were updated.
* Configurations/FeatureDefines.xcconfig:
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
2012-10-04 Hayato Ito <hayato@chromium.org>
[Refactoring] Introduce a traversal strategy in SelectorChecker
https://bugs.webkit.org/show_bug.cgi?id=97298
Reviewed by Antti Koivisto.
We extract DOM traversal code from SelectorChecker so that we can use another traversal strategy.
Another traversal strategy will be introduced in Bug 96990.
Since this code path is very hot, we were very careful not to regress performance.
We will use template specialization to change the traversal implementation.
We confirmed that this patch does not regress SelectorCheckerPerformance. I have checked the performance of
the added test in my Linux Box using run-perf-tests.
The performance of the added test before using this patch was:
RESULT CSS: PseudoClassSelectors= 3399.68308031 runs/s
median= 3404.48685564 runs/s, stdev= 37.3480114449 runs/s, min= 3272.64871114 runs/s, max= 3438.72385184 runs/s
When we used this patch, the performance was:
RESULT CSS: PseudoClassSelectors= 3367.74473886 runs/s
median= 3367.12072755 runs/s, stdev= 14.1464547639 runs/s, min= 3348.55881171 runs/s, max= 3395.98212857 runs/s
Test: PerformanceTests/CSS/PseudoClass-Selectors.html
* css/SelectorChecker.cpp:
(WebCore):
(WebCore::SelectorChecker::checkSelector): Make this a template method to accept another Context type.
Another Context type will be introduced in coming patch.
(WebCore::SelectorChecker::checkOneSelector):
(WebCore::SelectorChecker::DOMTraversalStrategy::isFirstChild):
(WebCore::SelectorChecker::DOMTraversalStrategy::isLastChild):
(WebCore::SelectorChecker::DOMTraversalStrategy::isFirstOfType):
(WebCore::SelectorChecker::DOMTraversalStrategy::isLastOfType):
(WebCore::SelectorChecker::DOMTraversalStrategy::countElementsBefore):
(WebCore::SelectorChecker::DOMTraversalStrategy::countElementsOfTypeBefore):
(WebCore::SelectorChecker::DOMTraversalStrategy::countElementsAfter):
(WebCore::SelectorChecker::DOMTraversalStrategy::countElementsOfTypeAfter):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
(SelectorCheckingContext):
(SelectorChecker):
(DOMTraversalStrategy): Extracted the DOM traversal code from SelectorChecker. Another traversal code
will be introduced the coming patch.
2012-10-04 Eric Seidel <eric@webkit.org>
SVGAttributeHashTranslator does not need to copy QualifiedName in the common case
https://bugs.webkit.org/show_bug.cgi?id=98473
Reviewed by Adam Barth.
I tested this using instruments on a test case which modified SVG attributes in a loop.
I believe pdr has some perf-tests in this area, but they weren't needed here. A simple sample showed this as a huge win,
since we're no longer creating a QualifiedName (and thus adding it to the hash) on each QualifiedName-based lookup in SVG.
* svg/SVGElement.h:
(WebCore::SVGAttributeHashTranslator::hash):
(WebCore::SVGAttributeHashTranslator::equal):
2012-10-04 Julien Chaffraix <jchaffraix@webkit.org>
Split the intrinsic padding update code out of RenderTableSection::layoutRows
https://bugs.webkit.org/show_bug.cgi?id=98454
Reviewed by Eric Seidel.
RenderTableSection::layoutRows is very long and it's difficult to see what's
going on. This change moves the intrinsic padding update code into RenderTableCell
for clarity. While at it, cleaned up a bit the code (renaming variables, functions).
Change covered by existing table tests.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeIntrinsicPadding):
Added this new function that does the update. Removed the 'default' case, replaced by
the explicit label BASELINE_MIDDLE.
* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::setIntrinsicPaddingBefore):
(WebCore::RenderTableCell::setIntrinsicPaddingAfter):
(WebCore::RenderTableCell::setIntrinsicPadding):
Moved those setters to the private section as we want other classes
to use computeIntrinsicPadding.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):
Replaced the code with a call to RenderTableCell::computeIntrinsicPadding.
Also moved 2 variables in the loop per our coding style.
* rendering/RenderTableSection.h:
(WebCore::RenderTableSection::rowBaseline):
Renamed to match our coding style.
2012-10-04 Nate Chapin <japhet@chromium.org>
Crash in EventHandler::mouseMoved().
https://bugs.webkit.org/show_bug.cgi?id=98460
Reviewed by Abhishek Arya.
No new tests, this fixes fast/events/mouse-moved-remove-frame-crash.html.
* page/EventHandler.cpp:
(WebCore::EventHandler::mouseMoved):
2012-10-04 Adam Barth <abarth@webkit.org>
[V8] NotificationCenter leaks because it uses buggy custom bindings
https://bugs.webkit.org/show_bug.cgi?id=98445
Reviewed by Tony Chang.
There's no reason to use custom bindings here. All they do is cause leaks..
* Modules/notifications/NotificationCenter.idl:
* bindings/v8/custom/V8NotificationCenterCustom.cpp:
2012-10-04 Tab Atkins <jackalmage@gmail.com>
Selector specificity categories "overflow" into higher categories
https://bugs.webkit.org/show_bug.cgi?id=98295
Reviewed by Eric Seidel.
This patch adds per-component overflow guards for CSS selector specificity.
Previously, we didn't guard against overflow.
Since we stored each component as a byte mapped into a single unsigned int for the whole specificity,
256 of a particular simple selector was equivalent to 1 of the next-higher-group selector.
This violated the Selectors specification,
which requires the components to be compared lexicographically.
Tests: /fast/selectors/specificity-overflow.html
* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificity):
2012-10-04 Enrica Casucci <enrica@apple.com>
Font::glyphDataAndPageForCharacter doesn't account for text orientation when using systemFallback on a cold cache.
https://bugs.webkit.org/show_bug.cgi?id=98452.
Reviewed by Dan Bernstein.
The text orientation was considered only when there is a cache hit.
This change moves the logic to handle text orientation to a separate
inline function that is called also when the glyph is added to the cache.
Test: fast/text/vertical-rl-rtl-linebreak.html
* platform/graphics/FontFastPath.cpp:
(WebCore::applyTextOrientationForCharacter): Added.
(WebCore::Font::glyphDataAndPageForCharacter): Modified to use the new function in
both cases of cold and warm cache.
2012-10-04 Adam Klein <adamk@chromium.org>
MutationRecord attributeName should be null for non attribute changes
https://bugs.webkit.org/show_bug.cgi?id=98438
Reviewed by Ojan Vafai.
Test: fast/mutation/mutation-record-nullity.html
* dom/MutationRecord.idl:
2012-10-04 Simon Fraser <simon.fraser@apple.com>
Final part of "sync" to "flush" renaming
https://bugs.webkit.org/show_bug.cgi?id=98430
Reviewed by Tim Horton.
Change method names on GraphicsLayer and GraphicsLayerClient that
refer to "sync" to use the term "flush" instead, to be consistent
with the rest of the code.
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::flushCompositingState):
(WebCore::GraphicsLayer::flushCompositingStateForThisLayerOnly):
* platform/graphics/GraphicsLayerClient.h:
(GraphicsLayerClient):
* platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
(WebCore::GraphicsLayerBlackBerry::notifyFlushRequired):
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::setNeedsCommit):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::flushCompositingState):
(WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
(WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
(WebCore::GraphicsLayerCA::positionForCloneRootLayer):
(WebCore::GraphicsLayerCA::noteLayerPropertyChanged):
* platform/graphics/ca/GraphicsLayerCA.h:
(GraphicsLayerCA):
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::notifyChange):
(WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
(WebCore::GraphicsLayerTextureMapper::flushCompositingState):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(GraphicsLayerTextureMapper):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::flushCompositingState):
(WebCore::TextureMapperLayer::flushCompositingStateSelf):
* platform/graphics/texmap/TextureMapperLayer.h:
(TextureMapperLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::notifyFlushRequired):
* rendering/RenderLayerBacking.h:
(RenderLayerBacking):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
* rendering/RenderLayerCompositor.h:
(WebCore::RenderLayerCompositor::notifyFlushRequired):
2012-10-04 Tab Atkins <tabatkins@google.com>
1ex should equal .5em when the font has no x-height metric
https://bugs.webkit.org/show_bug.cgi?id=80360
Reviewed by Eric Seidel.
Updated FontMetrics and CSSPrimitiveValue to have/use an explicit "hasXHeight" flag to determine how to size an 'ex' unit.
Updated a few of the platform font files to set the flag properly.
Patch cleanup by David Barr <davidbarr@chromium.org>.
Test: fast/css/ex-unit-with-no-x-height.html
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLengthDouble):
* platform/graphics/FontMetrics.h:
(WebCore::FontMetrics::FontMetrics):
(WebCore::FontMetrics::setXHeight):
(FontMetrics):
(WebCore::FontMetrics::hasXHeight):
(WebCore::FontMetrics::setHasXHeight):
(WebCore::FontMetrics::reset):
* platform/graphics/skia/SimpleFontDataSkia.cpp:
(WebCore::SimpleFontData::platformInit):
2012-10-04 Ryosuke Niwa <rniwa@webkit.org>
Build fix after r130411. Add the right offset.
Also use RefPtr instead of a raw pointer for next and previous pointers.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
2012-10-04 Alec Flett <alecflett@chromium.org>
IndexedDB: promote objectstore/index backend ids to the frontend
https://bugs.webkit.org/show_bug.cgi?id=97834
Reviewed by Tony Chang.
Expose int64-based database/objectStore/index ids to the renderer,
step 1 of 2. Support both styles of createObjectStore and
createIndex: those that take an explicit id, and those that take
-1, meaning to autogenerate an id on the backend. In part 2, after
the chromium side lands, support for the autogenerated ids will be
removed. (See https://bugs.webkit.org/show_bug.cgi?id=98085)
This is a part of larger refactoring work to ultimately make the interface
between the frontend and the backend simpler.
No new tests, extensive ASSERTs and existing tests cover correctness.
* Modules/indexeddb/IDBBackingStore.h:
(IDBBackingStore):
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::createObjectStore):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
(WebCore::IDBDatabaseBackendImpl::openInternal):
(WebCore::IDBDatabaseBackendImpl::metadata):
(WebCore::IDBDatabaseBackendImpl::createObjectStore):
(WebCore):
(WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
(WebCore::IDBDatabaseBackendImpl::loadObjectStores):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
(IDBDatabaseBackendImpl):
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
(IDBDatabaseBackendInterface):
* Modules/indexeddb/IDBIndexBackendImpl.cpp:
(WebCore::IDBIndexBackendImpl::metadata):
* Modules/indexeddb/IDBIndexBackendImpl.h:
(WebCore::IDBIndexBackendImpl::create):
(IDBIndexBackendImpl):
* Modules/indexeddb/IDBLevelDBBackingStore.cpp:
(WebCore):
(WebCore::getMaxObjectStoreId):
(WebCore::IDBLevelDBBackingStore::getIDBDatabaseMetaData):
(WebCore::IDBLevelDBBackingStore::deleteDatabase):
(WebCore::IDBLevelDBBackingStore::getObjectStores):
(WebCore::setMaxObjectStoreId):
(WebCore::IDBLevelDBBackingStore::createObjectStore):
(WebCore::getMaxIndexId):
(WebCore::setMaxIndexId):
(WebCore::IDBLevelDBBackingStore::createIndex):
* Modules/indexeddb/IDBLevelDBBackingStore.h:
(IDBLevelDBBackingStore):
* Modules/indexeddb/IDBMetadata.h:
(WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
(IDBDatabaseMetadata):
(WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata):
(IDBObjectStoreMetadata):
(WebCore::IDBIndexMetadata::IDBIndexMetadata):
(IDBIndexMetadata):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
(WebCore::IDBObjectStoreBackendImpl::metadata):
(WebCore::IDBObjectStoreBackendImpl::createIndex):
(WebCore):
(WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
* Modules/indexeddb/IDBObjectStoreBackendImpl.h:
(WebCore::IDBObjectStoreBackendImpl::create):
(IDBObjectStoreBackendImpl):
* Modules/indexeddb/IDBObjectStoreBackendInterface.h:
2012-10-04 Pravin D <pravind.2k4@gmail.com>
Layout broken after cloning and re-inserting a table with a misplaced <form>
https://bugs.webkit.org/show_bug.cgi?id=86746
Reviewed by Julien Chaffraix.
There is a concept of demotion for a <form> contained in a table. A <form> is demoted if its immediate parent
is either a <table>, table sections (tbody, etc) or a table row (tr). A renderer for such a <form> is created only
if its display is one of the table display types (TABLE, INLINE_TABLE, TABLE_FOOTER_GROUP, etc).
However when a <table> containing a demoted <form> is cloned, the <form> does not retain its demotion state and
results in the table getting improperly rendered.
Test: fast/table/form-with-non-table-display-inside-table-elements.html
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::copyNonAttributePropertiesFromElement):
Extended the virtual function for HTMLFormElement class specific implementation.
The function is used to copy any necessary state information(member variables) associated with
the <form> element being cloned to the current node.
For HTMLFormElement node the member variable can be classified into five groups based on the
information they hold:
1) Variables containing information regarding <form> subtree and elements associated with it.
These get updated as and when an element is added to the <form> subtree.
2) Variables containing <form> submit state information.
3) Flag to hold information if reset() has been called.
4) Flag(m_wasDemoted) that indicates whether the form is demoted or not, based on which it needs to
be handled differently during creation of its renderer.
This information is currently being updated only during the HTML tree construction phase.
5) Flag(m_wasMalformed) to hold information if the <form> is malformed or not.
Variables of group (1) will be updated as and when elements are added to the <form> subtree. Whereas,
(2) and (3) hold instance specific information, thus copying them is not required. Also (5) is currently not
being used(not set by any code).
On the other hand, (4) is required to be copied during cloning as this information cannot be accessed
during the cloning process.
(WebCore):
* html/HTMLFormElement.h:
Added copyNonAttributePropertiesFromElement() declaration.
2012-10-04 Dean Jackson <dino@apple.com>
Attribute and Uniform variable names need translation in shader
https://bugs.webkit.org/show_bug.cgi?id=70989
Reviewed by Tim Horton (and Darin Adler).
WebGL specifies some maximum lengths for variable names (attributes
and uniforms). Also, some GL drivers have issues with long names. For
that reason, ANGLE has an option to rewrite the shader, translating
long names into short names. Turning this on helps shaders compile,
but we need to keep a mapping between the original names and the
translated names, so that we bind to the right location from user code
(which won't ever see the translated source).
This provided an opportunity to clean up some other bits of code:
CSS Filters examined the uniform names after a compilation; It can
now use the variable name map. I also added a typedef for the
HashMaps that keep the shader, the source code and the variable name
mappings.
I also opened a followup bug to make sure these tables are deleted
when the associated shaders (or linked programs) go away:
https://bugs.webkit.org/show_bug.cgi?id=98204
Covered by existing tests (with some enhancements):
- fast/canvas/webgl/attrib-location-length-limits.html:
- fast/canvas/webgl/uniform-location-length-limits.html:
* platform/graphics/ANGLEWebKitBridge.cpp:
(WebCore::getSymbolInfo): Extracts all the information on symbols (either attributes
or uniforms) from the newly compiled shader.
(WebCore):
(WebCore::ANGLEWebKitBridge::compileShaderSource): New method name.
* platform/graphics/ANGLEWebKitBridge.h:
(WebCore::getUniforms): Deleted this method.
(WebCore::ANGLEShaderSymbol::isSampler): Make sure the symbol is a uniform.
(ANGLEWebKitBridge):
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo): A new object that
holds the size, type and translated name of a symbol from a WebGL shader.
(ShaderSourceEntry):
(WebCore::GraphicsContext3D::ShaderSourceEntry::ShaderSourceEntry): Now keeps track
of the translated source code and symbol mappings.
(WebCore::GraphicsContext3D::ShaderSourceEntry::symbolMap): Helper function to
get the member variable corresponding to the type of symbol you're asking fo.
* platform/graphics/filters/CustomFilterValidatedProgram.cpp:
(WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram): Calls new method
name which also produces a set of symbols to examine.
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): We now can pass
in some extra compile options to do translation of long symbol names. Also fill the
map of translated symbol names.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::compileShader):
(WebCore::GraphicsContext3D::mappedSymbolName): Returns the mapped name for
a shader symbol if it was translated during compilation.
(WebCore):
(WebCore::GraphicsContext3D::getAttribLocation):
(WebCore::GraphicsContext3D::getShaderiv):
(WebCore::GraphicsContext3D::getShaderInfoLog):
(WebCore::GraphicsContext3D::getShaderSource):
(WebCore::GraphicsContext3D::getUniformLocation):
2012-10-04 Alpha Lam <hclam@chromium.org>
[skia] Drawing a subrect of bitmap image is misaligned
https://bugs.webkit.org/show_bug.cgi?id=95121
Reviewed by Stephen White.
When drawing a subrect of BitmapImage and the subrect is not aligned
to integer boundaries, skia expands it to the closest enclosing integer
rectangle. This creates prominent rendering artifacts when an image
is used as background and its sub-regions are invalidated frequently.
This patch fixes the problem by doing alignment to integer boundaries
and clipping for both cases of RESAMPLE_AWESOME and RESAMPLE_LINEAR.
A clip rect is applied to the canvas using original destination
rectangle, while source and destination rectangles are enlarged
appropriately to ensure source rectangle is aligned.
This patch also fixes a closely related problem. In RESAMPLE_AWESOME
resampling mode the previous algorithm applies different approximated
scale factor for each scaled image fragment. This caused the stitched
image to look ugly.
Scale factor is approximated using entire image size, this gives a
more accurate approximation because of greater denominator and a
consistent scale factor across all fragments.
Changes in Skia enable caching of the scaled image and return the
scaled fragment because scale factor is now consistent for all
fragments.
Tests: fast/images/paint-subrect-grid.html
fast/images/paint-subrect.html
fast/images/repaint-subrect-grid.html
* platform/graphics/skia/ImageSkia.cpp:
(WebCore::computeResamplingMode): Use float for width and height.
(WebCore):
(WebCore::areBoundariesIntegerAligned):
(WebCore::computeBitmapDrawRects):
(WebCore::extractScaledImageFragment):
(WebCore::drawResampledBitmap): New algorithm for drawing scaled image fragment.
(WebCore::paintSkBitmap):
(WebCore::Image::drawPattern):
(WebCore::BitmapImage::draw): Use SkRect instead of SkIRect.
(WebCore::BitmapImageSingleFrameSkia::draw):
* platform/graphics/skia/NativeImageSkia.cpp:
Changing the algorithm for extracting a scaled image fragment.
A fragment is now identified by (scaledImageSize, scaledImageSubset).
(WebCore::NativeImageSkia::hasResizedBitmap):
(WebCore::NativeImageSkia::resizedBitmap):
(WebCore::NativeImageSkia::shouldCacheResampling):
(WebCore::NativeImageSkia::CachedImageInfo::CachedImageInfo):
(WebCore):
(WebCore::NativeImageSkia::CachedImageInfo::isEqual):
(WebCore::NativeImageSkia::CachedImageInfo::set):
(WebCore::NativeImageSkia::CachedImageInfo::rectInSubset):
* platform/graphics/skia/NativeImageSkia.h:
(NativeImageSkia):
(CachedImageInfo):
2012-10-03 Ryosuke Niwa <rniwa@webkit.org>
ReplaceSelectionCommand should merge text nodes
https://bugs.webkit.org/show_bug.cgi?id=98188
Reviewed by Levi Weintraub.
Added mergeTextNodesAroundPosition to ReplaceSelectionCommand to merge text nodes after the replace in
completeHTMLReplacement. Also fixed a bunch of bugs in other classes and functions to make this work.
This behavior change is tested by existing tests.
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply): When splitting a text node, place the insertionPosition
at the end of the first half. Leaving it at the beginning of the second half confuses the rest of the code in
the function. However, the logic to handle the "insignificant" white spaces needs the position at the start of
the second half. So keep this position.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply): Update visibleStart after inserting a paragraph separator so that
the logic to cleanup the nested div checks the right condition (right beneath it starting with a long comment).
(WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace): Insert a space for smart paste at the appropriate
offset instead of at the end of endNode. Also update the layout before obtaining startDownstream as we may have
modified the DOM by inserting a space for endNode. Finally, a non-breaking space should be treated like a space
isCharacterSmartReplaceExempt for the purpose of smart replace. e.g. if we're inserting "world" after
"hello&nbsp;", we shouldn't be inserting another space between "hello" and "world".
(WebCore::ReplaceSelectionCommand::completeHTMLReplacement):
(WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition): Added. Merge text nodes around position, and
adjust position and positionOnlyToBeUpdated accordingly. We need to call updatePositionForNodeRemoval when
positions were before or after the text node.
* editing/ReplaceSelectionCommand.h:
(ReplaceSelectionCommand):
2012-10-04 Tony Chang <tony@chromium.org>
Fix <input type="month"> tests
https://bugs.webkit.org/show_bug.cgi?id=98426
Reviewed by Ojan Vafai.
The month picker uses flexbox and assumes that it will be aligned with
the last line box. This looks visually correct. I will follow up on
www-style to see what the expected behavior is.
Tests: fast/forms/month-multiple-fields tests cover this.
* rendering/RenderFlexibleBox.cpp:
* rendering/RenderFlexibleBox.h:
2012-10-04 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130396.
http://trac.webkit.org/changeset/130396
https://bugs.webkit.org/show_bug.cgi?id=98421
This patch is causing crashes on 4 tests on Lion Debug and
Mountain Lion Debug (Requested by jernoble on #webkit).
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::calculateCompositedBounds):
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):
* rendering/RenderLayerCompositor.h:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
* testing/InternalSettings.h:
(Backup):
2012-10-04 Tony Chang <tony@chromium.org>
inline-flex baseline is sometimes wrong
https://bugs.webkit.org/show_bug.cgi?id=96188
Reviewed by Ojan Vafai.
Implement the necessary methods to get the proper baseline alignment of flexbox.
We were falling back to the inline-block behavior.
Test: css3/flexbox/flexbox-baseline.html
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::RenderFlexibleBox):
(WebCore::RenderFlexibleBox::baselinePosition): Used to get the baseline of the box.
Mostly just the first line box baseline.
(WebCore):
(WebCore::RenderFlexibleBox::lastLineBoxBaseline): This is used for getting the baseline when in an inline-block.
We actually don't want the last line, but the flexbox's baseline.
(WebCore::RenderFlexibleBox::firstLineBoxBaseline): Compute the baseline according to the rules in the spec.
(WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Keep track of the number of children on the
first line so we don't have to re-compute this when getting the baseline.
(WebCore::RenderFlexibleBox::crossAxisExtentForChild): Make const.
(WebCore::RenderFlexibleBox::mainAxisExtentForChild): Make const.
(WebCore::RenderFlexibleBox::hasAutoMarginsInCrossAxis): Make const.
* rendering/RenderFlexibleBox.h: Add a size_t to keep track of how many children are in the first line.
2012-10-04 Xianzhu Wang <wangxianzhu@chromium.org>
[Chromium] Should set unitsPerEm in SimpleFontDataSkia.cpp
https://bugs.webkit.org/show_bug.cgi?id=98100
Reviewed by Stephen White.
At least on chromium-linux and chromium-android, unitsPerEm was not set
according to the information in the font, causing at least problems in
OpenTypeVerticalData when calculating vertical advance.
Test: fast/writing-mode/vertical-font-vmtx-units-per-em.html
* platform/graphics/skia/SimpleFontDataSkia.cpp:
(WebCore::SimpleFontData::platformInit):
2012-10-04 Simon Fraser <simon.fraser@apple.com>
Standardize on "flush" terminology for compositing layer flushing/syncing
https://bugs.webkit.org/show_bug.cgi?id=98321
Reviewed by Simon Fraser.
Rename compositing-related methods that refer to "syncing" to instead
refer to "flushing".
* WebCore.exp.in:
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::scheduleCompositingLayerFlush):
* page/ChromeClient.h:
(ChromeClient):
* page/FrameView.cpp:
(WebCore::FrameView::flushCompositingStateForThisFrame):
(WebCore::FrameView::flushCompositingStateIncludingSubframes):
(WebCore::FrameView::paintContents):
* page/FrameView.h:
(FrameView):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::scheduleLayerFlush):
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2012-10-04 Peter Rybin <peter.rybin@gmail.com>
Web Inspector: expose object internal properties such as PrimitiveValue or BoundThis
https://bugs.webkit.org/show_bug.cgi?id=94397
Reviewed by Yury Semikhatsky.
Internal property access is built from Injected Script to V8 debug API. JSC binding
has a stub imlpementation. Protocol is updated to explicitly reflect internal properties.
Test: inspector-protocol/runtime-getProperties.html
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::getInternalProperties):
(WebCore):
* bindings/v8/DebuggerScript.js:
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::getInternalProperties):
(WebCore):
* bindings/v8/ScriptDebugServer.h:
(ScriptDebugServer):
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::V8InjectedScriptHost::getInternalPropertiesCallback):
(WebCore):
* inspector/InjectedScript.cpp:
(WebCore::InjectedScript::getInternalProperties):
(WebCore):
* inspector/InjectedScript.h:
(InjectedScript):
* inspector/InjectedScriptHost.idl:
* inspector/InjectedScriptSource.js:
(.):
* inspector/Inspector.json:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::getProperties):
* inspector/InspectorRuntimeAgent.h:
(InspectorRuntimeAgent):
2012-10-04 Sami Kyostila <skyostil@chromium.org>
Fixed position visibility check does not consider descendants
https://bugs.webkit.org/show_bug.cgi?id=98144
Reviewed by Simon Fraser.
The check against creating composition layers for invisible fixed positioned
elements is too aggressive in that it does not consider descendants of the
fixed positioned element that may be visible even though the element itself is
out of view.
Fix the problem by calculating the true composited bounds of the fixed
element instead of just using the size of the fixed layer. Because calculating
the true bounds may be expensive, it is only done if the fixed layer itself is
invisible.
Test: compositing/layer-creation/fixed-position-absolute-descendant.html
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::calculateCompositedBounds):
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):
* rendering/RenderLayerCompositor.h:
2012-10-04 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: When uiSourceCode content has diverged from VM script, call frames should be shown in temporary script based uiSourceCodes.
https://bugs.webkit.org/show_bug.cgi?id=98385
Reviewed by Pavel Feldman.
When javaScriptSource diverges from VM, ResourceScriptMapping now switches debugging
to temporary VM scripts based uiSourceCode with isDivergedReplacement property set.
Added hasDivergedFromVM and isDivergingFromVM properties to JavaScriptSource.
JavaScriptSourceFrame and ScriptSnippetsModel are updated to process breakpoint changes correctly.
* inspector/front-end/BreakpointManager.js:
(WebInspector.BreakpointManager.prototype.restoreBreakpoints):
(WebInspector.BreakpointManager.prototype._uiSourceCodeRemoved):
* inspector/front-end/JavaScriptSource.js:
(WebInspector.JavaScriptSource.prototype.workingCopyCommitted):
(WebInspector.JavaScriptSource.prototype.workingCopyChanged):
(WebInspector.JavaScriptSource.prototype.fireHasDivergedFromVMChanged):
* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame.prototype.commitEditing):
(WebInspector.JavaScriptSourceFrame.prototype._hasDivergedFromVM):
(WebInspector.JavaScriptSourceFrame.prototype.onTextChanged):
(WebInspector.JavaScriptSourceFrame.prototype._getBreakpointDecorations):
(WebInspector.JavaScriptSourceFrame.prototype._muteBreakpointsWhileEditing):
(WebInspector.JavaScriptSourceFrame.prototype._didEditContent):
(WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
(WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
* inspector/front-end/ResourceScriptMapping.js:
(WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
(WebInspector.ResourceScriptMapping.prototype._hasDivergedFromVMChanged):
(WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
(WebInspector.ResourceScriptMapping.prototype._getOrCreateTemporaryUISourceCode):
* inspector/front-end/ScriptSnippetModel.js:
(WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
(WebInspector.ScriptSnippetModel.prototype._restoreBreakpoints):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._revealExecutionLine):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode.prototype.formatted):
2012-10-04 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Scripts panel should not automatically switch to snippet evaluation when previously evaluated snippet is edited.
https://bugs.webkit.org/show_bug.cgi?id=98402
Reviewed by Pavel Feldman.
Scripts panel does not automatically switch to snippet evaluation when
one edits previously evaluated snippet.
* inspector/front-end/ScriptSnippetModel.js:
(WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._revealExecutionLine):
2012-10-04 Balazs Kelemen <kbalazs@webkit.org>
Don't allow to disable compositing in forced compositing mode
https://bugs.webkit.org/show_bug.cgi?id=98048
Reviewed by Jocelyn Turcotte.
Make forced compositing mode imply accelerated compositing. This will
avoid unexpected situations for platforms that don't want to support
the non-accelerated rendering path.
Covered by existing tests.
* WebCore.exp.in: Export Settings::setAcceleratedCompositingEnabled
because it has been deinlined.
* page/Settings.cpp:
(WebCore::Settings::setAcceleratedCompositingEnabled):
(WebCore::Settings::setForceCompositingMode):
(WebCore):
* page/Settings.h:
(Settings):
(WebCore::Settings::forceCompositingMode): Make it const as a side fix.
2012-10-04 Harald Alvestrand <hta@google.com>
Change RTCPeerConnection GetStats to use Date timestamp format
https://bugs.webkit.org/show_bug.cgi?id=98263
Reviewed by Yury Semikhatsky.
Tested by extension to RTCPeerConnection-stats test.
* Modules/mediastream/RTCStatsElement.cpp:
(WebCore::RTCStatsElement::create):
(WebCore::RTCStatsElement::RTCStatsElement):
* Modules/mediastream/RTCStatsElement.h: long -> double
(RTCStatsElement):
(WebCore::RTCStatsElement::timestamp):
* Modules/mediastream/RTCStatsElement.idl: long -> Date
* Modules/mediastream/RTCStatsReport.cpp:
(WebCore::RTCStatsReport::addElement):
* Modules/mediastream/RTCStatsReport.h:
(RTCStatsReport):
* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::RTCStatsResponse::addElement):
* Modules/mediastream/RTCStatsResponse.h:
(RTCStatsResponse):
* platform/chromium/support/WebRTCStatsResponse.cpp:
(WebKit::WebRTCStatsResponse::addElement):
* platform/mediastream/RTCStatsResponseBase.h:
(RTCStatsResponseBase):
2012-10-04 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130377.
http://trac.webkit.org/changeset/130377
https://bugs.webkit.org/show_bug.cgi?id=98392
Chromium Win compilation is broken (Requested by yurys on
#webkit).
* Modules/mediastream/RTCStatsElement.cpp:
(WebCore::RTCStatsElement::create):
(WebCore::RTCStatsElement::RTCStatsElement):
* Modules/mediastream/RTCStatsElement.h:
(RTCStatsElement):
(WebCore::RTCStatsElement::timestamp):
* Modules/mediastream/RTCStatsElement.idl:
* Modules/mediastream/RTCStatsReport.cpp:
(WebCore::RTCStatsReport::addElement):
* Modules/mediastream/RTCStatsReport.h:
(RTCStatsReport):
* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::RTCStatsResponse::addElement):
* Modules/mediastream/RTCStatsResponse.h:
(RTCStatsResponse):
* platform/chromium/support/WebRTCStatsResponse.cpp:
(WebKit::WebRTCStatsResponse::addElement):
* platform/mediastream/RTCStatsResponseBase.h:
(RTCStatsResponseBase):
2012-10-04 Harald Alvestrand <hta@google.com>
Change RTCPeerConnection GetStats to use Date timestamp format
https://bugs.webkit.org/show_bug.cgi?id=98263
Reviewed by Adam Barth.
Tested by extension to RTCPeerConnection-stats test.
* Modules/mediastream/RTCStatsElement.cpp:
(WebCore::RTCStatsElement::create):
(WebCore::RTCStatsElement::RTCStatsElement):
* Modules/mediastream/RTCStatsElement.h: long -> double
(RTCStatsElement):
(WebCore::RTCStatsElement::timestamp):
* Modules/mediastream/RTCStatsElement.idl: long -> Date
* Modules/mediastream/RTCStatsReport.cpp:
(WebCore::RTCStatsReport::addElement):
* Modules/mediastream/RTCStatsReport.h:
(RTCStatsReport):
* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::RTCStatsResponse::addElement):
* Modules/mediastream/RTCStatsResponse.h:
(RTCStatsResponse):
* platform/chromium/support/WebRTCStatsResponse.cpp:
(WebKit::WebRTCStatsResponse::addElement):
* platform/mediastream/RTCStatsResponseBase.h:
(RTCStatsResponseBase):
2012-10-05 Kent Tamura <tkent@chromium.org>
[Chromium] Enable the multiple fields UI for input[type=date]
https://bugs.webkit.org/show_bug.cgi?id=98351
Reviewed by Hajime Morita.
Touch files related to ENABLE_INPUT_TYPE_DATE_LEGACY_UI to avoid build
issues.
No new tests. Many tests will be landed shortly.
* html/DateInputType.cpp:
* html/DateInputType.h:
2012-10-04 Kent Tamura <tkent@chromium.org>
Add code for input[type=date] with the multiple fields UI
https://bugs.webkit.org/show_bug.cgi?id=98340
Reviewed by Hajime Morita.
The new code is available if !ENABLE(INPUT_TYPE_DATE_LEGACY_UI). At this
moment, there are no platforms enabling the new code. We're going to
enable it soon on desktop Chromium, and add tests. Then we're going to
remove the code for ENABLE(INPUT_TYPE_DATE_LEGACY_UI).
ENABLE(INPUT_TYPE_DATE_LEGACY_UI) means the current UI; input[type=date]
is represetnted as a kind of text field, and it has code to invoke a
calendar picker.
ENABLE(CALENDAR_PICKER) was used wrongly. It meant calendar picker
support + text field UI of input[type=date]. Now it means only calendar
picker support.
* html/DateInputType.h:
(WebCore): If ENABLE(INPUT_MULTIPLE_FIELDS_UI) &&
!ENABLE(INPUT_TYPE_DATE_LEGACY_UI), change the base class to the class
for multiple fields UI.
(DateInputType): Wrap the code for text fields behavior and calendar
picker UI with ENABLE(INPUT_TYPE_DATE_LEGACY_UI). Add functions for
ENABLE(INPUT_MULTIPLE_FIELDS_UI)
* html/DateInputType.cpp:
(WebCore::DateInputType::DateInputType):
Change the flag name; CALENDAR_PICKER -> INPUT_TYPE_DATE_LEGACY_UI
(WebCore): ditto.
(WebCore::DateInputType::formatDateTimeFieldsState):
A callback for multiple fields UI. This constructs a string value from
each of values of multiple fields.
Note that we don't need to do +1 to month().
(WebCore::DateInputType::setupLayoutParameters):
A callback for multiple fields UI. Passes information to build UI.
* html/BaseMultipleFieldsDateAndTimeInputType.h:
(BaseMultipleFieldsDateAndTimeInputType):
Add m_pickerIndicatorIsAlwaysVisible member, wrap some members with flags.
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
Initialize m_pickerIndicatorIsAlwaysVisible.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
If a type supports calendar picker, we should always show the picker
indicator. We introduce m_pickerIndicatorIsAlwaysVisible flag, and ask
RenderTheme for support status of each of types.
Add a local variable 'document' to avoid multiple element()->document().
(WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility):
- If m_pickerIndicatorIsAlwaysVisible, don't hide the picker indicator element.
- Wrap the code with appropriate flags.
* rendering/RenderTheme.h:
(WebCore::RenderTheme::supportsCalendarPicker): Added.
* rendering/RenderThemeChromiumMac.h: Override supportsCalendarPicker.
* rendering/RenderThemeChromiumMac.mm:
(WebCore::RenderThemeChromiumMac::supportsCalendarPicker):
Added. Delegate to RenderThemeChromiumCommon.
* rendering/RenderThemeChromiumSkia.h: Override supportsCalendarPicker.
* rendering/RenderThemeChromiumSkia.cpp:
(WebCore::RenderThemeChromiumSkia::supportsCalendarPicker):
Added. Delegate to RenderThemeChromiumCommon.
* rendering/RenderThemeChromiumCommon.h:
(RenderThemeChromiumCommon): Declare supportsCalendarPicker.
* rendering/RenderThemeChromiumCommon.cpp:
(WebCore::RenderThemeChromiumCommon::supportsCalendarPicker):
Returns true if the type is "date."
* html/DateTimeFieldsState.h:
(DateTimeFieldsState): Add a comment for the m_month field.
2012-10-04 Kent Tamura <tkent@chromium.org>
DateTimeYearFieldElement should respect min/max values specified by page authors
https://bugs.webkit.org/show_bug.cgi?id=98227
Reviewed by Hajime Morita.
Before this patch, we always set 1 to the minimum limit and 275760 to
the maximum limit for a year field, and a user can specify any year
regardless of min/max attributes. Such wide range is unnecessary for
normal applications and we should provide a way to limit the range.
Test: fast/forms/month-multiple-fields/month-multiple-fields-keyboard-events.html
* html/shadow/DateTimeFieldElements.h:
To add four constructor arguments, introduce Parameters struct.
Actually, we add the followings;
- minimum year in UI
- maximum year in UI
- min attribute is specified
- max attribute is specified
(Parameters):
(WebCore::DateTimeYearFieldElement::Parameters::Parameters):
(DateTimeYearFieldElement):
* html/shadow/DateTimeFieldElements.cpp:
(WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement): ditto.
(WebCore::DateTimeYearFieldElement::create): ditto.
(WebCore::DateTimeYearFieldElement::clampValueForHardLimits):
Override DateTimeNumericFieldElement::clampValueForHardLimits.
By this, we allow to set out-of-range year values.
(WebCore::currentFullYear): A helper to get the current year.
(WebCore::DateTimeYearFieldElement::defaultValueForStepDown):
If the field has no value and step down operation occurs,
- the field has the current year if the max attribute is not specified.
- the field has the maximum value otherwise.
(WebCore::DateTimeYearFieldElement::defaultValueForStepUp): Similar change.
* html/shadow/DateTimeNumericFieldElement.h:
(DateTimeNumericFieldElement): Declare clampValueForHardLimits.
* html/shadow/DateTimeNumericFieldElement.cpp:
(WebCore::DateTimeNumericFieldElement::clampValueForHardLimits):
(WebCore::DateTimeNumericFieldElement::setValueAsInteger):
Call clampValueForHardLimits instead of clampValue in order to
distinguish limits for UI and limits for internal value update.
* html/shadow/DateTimeEditElement.h:
(LayoutParameters): Add minimumYear and maximumYear members.
(WebCore::DateTimeEditElement::LayoutParameters::LayoutParameters):
Initialize minimumYear and maximumYear.
(WebCore::DateTimeEditElement::LayoutParameters::undefinedYear):
Represents 'undefined' value for minimumYear and maximumYear.
* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditBuilder::visitField):
Preparas DateTimeYearField::Parameters and pass it to the DateTimeYearField factory.
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::fullYear):
A helper to get a year value from an attribute value string.
* html/BaseMultipleFieldsDateAndTimeInputType.h:
(BaseMultipleFieldsDateAndTimeInputType): Add fullYear().
* html/DateTimeInputType.cpp:
(WebCore::DateTimeInputType::setupLayoutParameters):
Set LayoutParameters::minimumYear and maximumYear.
* html/DateTimeLocalInputType.cpp:
(WebCore::DateTimeLocalInputType::setupLayoutParameters): ditto.
* html/MonthInputType.cpp:
(WebCore::MonthInputType::setupLayoutParameters): ditto.
* html/WeekInputType.cpp:
(WebCore::WeekInputType::setupLayoutParameters): ditto.
2012-10-03 Adam Barth <abarth@webkit.org>
Unreviewed. Fix parse error in vcproj file.
* WebCore.vcproj/WebCore.vcproj:
2012-10-03 Keishi Hattori <keishi@webkit.org>
Implement localizeValue for TimeInputType
https://bugs.webkit.org/show_bug.cgi?id=98237
Reviewed by Kent Tamura.
We want to localize time values for the suggestion picker.
DateTimeStringBuilder parses a format and creates a formatted string.
Added chromium unit test LocaleMacTest.formatTime
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldHaveSecondField): Moved from LayoutParameters because we want to use it inside localizeValue.
(WebCore):
* html/BaseMultipleFieldsDateAndTimeInputType.h:
(BaseMultipleFieldsDateAndTimeInputType):
* html/DateTimeInputType.cpp:
(WebCore::DateTimeInputType::setupLayoutParameters):
* html/DateTimeLocalInputType.cpp:
(WebCore::DateTimeLocalInputType::setupLayoutParameters):
* html/TimeInputType.cpp:
(WebCore::TimeInputType::localizeValue):
(WebCore):
(WebCore::TimeInputType::setupLayoutParameters):
* html/TimeInputType.h:
(TimeInputType):
* html/shadow/DateTimeEditElement.cpp:
(WebCore):
* html/shadow/DateTimeEditElement.h:
(WebCore::DateTimeEditElement::LayoutParameters::LayoutParameters):
* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::formatDateTime): Calls Localizer::formatDateTime if the date component is not a date.
* platform/text/LocaleICU.h:
(LocaleICU):
* platform/text/LocaleWin.cpp:
(WebCore::LocaleWin::formatDateTime): Calls Localizer::formatDateTime if the date component is not a date.
* platform/text/LocaleWin.h:
(LocaleWin):
* platform/text/LocaleNone.cpp:
(LocaleNone):
(WebCore::LocaleNone::formatDateTime):
* platform/text/Localizer.cpp:
(DateTimeStringBuilder):
(WebCore):
(WebCore::DateTimeStringBuilder::DateTimeStringBuilder): Takes a
Localizer pointer. This is used inside the Localizer so the Localizer
will out live the DateTimeStringBuilder.
(WebCore::DateTimeStringBuilder::build): Builds a localized string for the given format.
(WebCore::DateTimeStringBuilder::zeroPadString):
(WebCore::DateTimeStringBuilder::appendNumber): Appends a number with left zero padding to match width.
(WebCore::DateTimeStringBuilder::visitField):
(WebCore::DateTimeStringBuilder::visitLiteral):
(WebCore::DateTimeStringBuilder::toString): Returns the localized string.
(WebCore::Localizer::formatDateTime):
* platform/text/Localizer.h:
* platform/text/mac/LocaleMac.h:
(LocaleMac):
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::formatDateTime): Calls Localizer::formatDateTime if the date component is not a date.
2012-10-03 Douglas Stockwell <dstockwell@chromium.org>
Chromium needs support for border radius clipping
https://bugs.webkit.org/show_bug.cgi?id=69866
Reviewed by Stephen White.
Changes to make this suitably efficient have already landed upstream in skia:
http://code.google.com/p/skia/source/detail?r=2924
Covered by existing tests.
* rendering/RenderLayer.cpp:
2012-10-03 Benjamin Poulain <bpoulain@apple.com>
Simplify attribute access in Element::computeInheritedLanguage
https://bugs.webkit.org/show_bug.cgi?id=98327
Reviewed by Andreas Kling.
* dom/Element.cpp:
(WebCore::Element::computeInheritedLanguage):
By using Element::fastGetAttribute(), we check for the existence of attributeData twice
and do a bunch of useless operation on AtomicString.
By using ElementAttributeData directly, we can cut it to the two important branch.
2012-10-03 Kangil Han <kangil.han@samsung.com>
Fix unused parameter compile warnings.
https://bugs.webkit.org/show_bug.cgi?id=98243
Reviewed by Alexey Proskuryakov.
Fixed unused parameter compile warning by removing parameter names and adding UNUSED_PARAM usage.
* plugins/PluginDebug.cpp:
(WebCore::prettyNameForNPPVariable):
* plugins/npapi.cpp:
(NPN_MemFlush):
(NPN_RequestRead):
(NPN_GetJavaPeer):
2012-10-03 Adam Barth <abarth@webkit.org>
Measure the usage of WebSQLDatabase
https://bugs.webkit.org/show_bug.cgi?id=98330
Reviewed by Ojan Vafai.
WebKit is the only engine that implements WebSQLDatabase. This patch
causes us to measure its usage so we can see how quickly web sites move
to IndexedDB.
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* page/FeatureObserver.h:
2012-10-03 Arnaud Renevier <a.renevier@sisa.samsung.com>
[soup] WebKit crashes when doing a http request
https://bugs.webkit.org/show_bug.cgi?id=98055
Reviewed by Martin Robinson.
On i386, (d->m_firstRequest.timeoutInterval() * 1000) results in 0 if
timeoutInterval() is INT_MAX. So, set default timeout to 0 to avoid
calling soup_add_timeout with a 0 value.
Also, if resource handle is deleted before "request-started" signal is
emitted, soupMessage handle points to a deleted object, and a crash
occurs. So, reset soupMessage handle data in
cleanupSoupRequestOperation so it won't happen anymore.
Lastly, if timeout occurs before request is completed, handle is
deleted, and crash occurs in sendRequestCallback due to an early
destroyed handle. To avoid that, call handle->cancel in
requestTimeoutCallback. There is no need to call
cleanupSoupRequestOperation anymore since handle->cancel will trigger
sendRequestCallback, and as handle is deleted,
cleanupSoupRequestOperation will be called automatically.
No new tests yet, tests will be added with the patch in bug 74802.
* platform/network/ResourceRequestBase.cpp:
(WebCore):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::cleanupSoupRequestOperation):
(WebCore::ResourceHandle::platformSetDefersLoading):
(WebCore::requestTimeoutCallback):
2012-10-03 Adam Barth <abarth@webkit.org>
Remove support for ENABLE(LEGACY_WEBKIT_BLOB_BUILDER)
https://bugs.webkit.org/show_bug.cgi?id=98301
Reviewed by Eric Seidel.
According to anonymous usage statistics, the APIs guarded by
ENABLE(LEGACY_WEBKIT_BLOB_BUILDER) are used on approximately 0.006% of
web pages. Given that this feature is only enabled in GTK and Chromium,
it seems likely that we should remove it.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.features.am:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* fileapi/WebKitBlobBuilder.idl: Removed.
* page/DOMWindow.idl:
2012-10-03 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=98313
ScrollingStateNode should keep a Vector of children instead of child
pointers
Reviewed by Simon Fraser.
This patch re-names ScrollingStateNode::cloneNode() to
ScrollingStateNode::cloneAndResetNode(). The new function resets the
change properties of the current node after cloning it, and it also
takes care of cloning children, which the old function did not do.
m_firstChild and m_nextSibling are gone. Use the m_children Vector
instead.
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::cloneAndResetChildNodes):
(WebCore::ScrollingStateNode::appendChild):
* page/scrolling/ScrollingStateNode.h:
(ScrollingStateNode):
(WebCore::ScrollingStateNode::parent):
(WebCore::ScrollingStateNode::setParent):
Reset the change properties and clone children in cloneAndResetNode()
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::cloneAndResetNode):
* page/scrolling/ScrollingStateScrollingNode.h:
Yay, this function can be vastly simplified now that we don't have
those messy child and sibling pointers.
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::commit):
2012-10-03 Ojan Vafai <ojan@chromium.org>
Replace uses of -webkit-box-sizing with box-sizing
https://bugs.webkit.org/show_bug.cgi?id=98312
Reviewed by Tony Chang.
No need to use the prefixed version when the unprefixed works the same.
No new tests since there's no change in behavior..
* css/html.css:
2012-10-03 Joshua Bell <jsbell@chromium.org>
IndexedDB: Don't do full commit for empty transactions
https://bugs.webkit.org/show_bug.cgi?id=89239
Reviewed by Tony Chang.
Don't bother creating a leveldb write batch if there's nothing in the transaction
to commit. Note that a read-only transaction may still have index cleanup so may
not be an empty transaction.
This cuts the Lookup2 benchmark in http://reyesr.github.com/html5-storage-benchmark/
from 70s to 2s.
Covered by existing tests, e.g. storage/indexeddb/transaction-basics.html
* platform/leveldb/LevelDBTransaction.cpp:
(WebCore::LevelDBTransaction::commit):
2012-10-03 Adam Klein <adamk@chromium.org>
Remove bogus FIXME from Document.idl
https://bugs.webkit.org/show_bug.cgi?id=98302
Reviewed by Adam Barth.
The FIXME claimed that document.body throwing an exception was not
specced, but in fact it is:
http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-body
* dom/Document.idl:
2012-10-03 Joshua Bell <jsbell@chromium.org>
IndexedDB: Memory leak when deleting object stores with indexes
https://bugs.webkit.org/show_bug.cgi?id=98292
Reviewed by Tony Chang.
Reference cycles between IDBObjectStore and IDBIndex instances are explicitly
broken when the transaction completes (and the spec allows traversal to fail).
Deleted stores need to have the reference cycle broken too.
Caught by running valgrind over: storage/indexeddb/keypath-basics.html
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::objectStoreDeleted): Add store to set.
(WebCore::IDBTransaction::dispatchEvent): Notify stores in set.
* Modules/indexeddb/IDBTransaction.h: Add set of deleted stores.
2012-10-03 Adam Barth <abarth@webkit.org>
CSSNamespace.h is empty and should be deleted
https://bugs.webkit.org/show_bug.cgi?id=98304
Reviewed by Eric Seidel.
There's no reason to have this file in the repository.
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSNamespace.h: Removed.
2012-10-03 Arnaud Renevier <a.renevier@sisa.samsung.com>
Build failure with css filters enabled and accelerated compositing disabled
https://bugs.webkit.org/show_bug.cgi?id=95908
Reviewed by Tony Chang.
Do not try to setBackingNeedsRepaint when building without accelerated
compositing.
Also, allow painting with filter (paintsWithFilters returns true if
renderer has filter) when accelerated compositing is not enabled.
No functional change, so no new tests.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::styleChanged):
2012-10-03 Emil A Eklund <eae@chromium.org>
Round image sizes when zooming
https://bugs.webkit.org/show_bug.cgi?id=98205
Reviewed by Eric Seidel.
We currently floor image sizes when zooming which can result in
images being rendered at one pixel less than the actual size.
This is especially likely to happen for very large images.
Test: fast/sub-pixel/zoomed-image-tiles.html
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer):
2012-10-03 Hugo Parente Lima <hugo.lima@openbossa.org>
[WK2] PageViewportController.cpp is supposed to be a generic WebKit2 file but only works with Qt port.
https://bugs.webkit.org/show_bug.cgi?id=98186
Reviewed by Noam Rosenthal.
Remove the implicit conversion from WebCore::FloatSize to QSize.
* platform/graphics/FloatSize.h:
(FloatSize):
2012-10-03 Levi Weintraub <leviw@chromium.org>
[Sub-pixel layout] incorrect rendering when painting sub-layers as their own root
https://bugs.webkit.org/show_bug.cgi?id=97484
Reviewed by Eric Seidel.
When in compositing mode, layer painting can be triggered through the backing store. When this
happens, a non-top-level RenderLayer is called to paint as its own root. Normally, we attempt to preserve
the proper sub-pixel accumulation through layers to their children, but since we're not
starting with the top-level layer, we haven't properly accumulated one, and convertToLayerCoords,
another source of correctly getting the sub-pixel offset for a layer, also avoids crawling
past the listed root layer.
When painting a root layer, we're aligned to the surface we're painting to, so we round our
offset to avoid moving objects around.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):
2012-10-03 Jeff Timanus <twiz@chromium.org>
[chromium] Expose settings value to conditionally enable pinch-zoom scaling in the Chromium compositor. The
flag defaults to disabled, so this change should be a no-op for scaling/scrolling behaviour.
https://bugs.webkit.org/show_bug.cgi?id=93292
Reviewed by James Robinson.
Tests: Existing page-scale layout tests.
* page/Frame.cpp:
(WebCore::Frame::frameScaleFactor):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setApplyPageScaleFactorInCompositor):
(WebCore::Settings::applyPageScaleFactorInCompositor):
(Settings):
2012-10-03 Stephen Chenney <schenney@chromium.org>
Font data is purged while fonts are still using it
https://bugs.webkit.org/show_bug.cgi?id=93640
Reviewed by Eric Seidel.
Move the handling of custom font pruning from Document to FontFallbackList.
The previous inplementation allowed fonts to be removed before all their
clients were done. This change moves handling of custom font purging to the
FontFallbackList class, which is the shared object that is only removed
when all clients of a font are done with it. This fixes a crash in Angry
Birds due to a seamless iframe and some failing tests in fast/frames/seamless.
The specific element that causes problems is:
<iframe id="ingame_frame0" name="ingame_frame0" frameborder="0" seamless="true"
src="http://chrome.angrybirds.com/ingame_graphic.html"
onload="this.style.opacity = 1; parent.adLoaded();" scrolling="no"
style="opacity: 1; -webkit-transition: opacity 1s ease-in-out 0s;
position: absolute; border: 0px; width: 312px; height: 320px; z-index:
300; overflow: hidden; visibility: visible;"></iframe>
The source document uses the same font as the embedding document.
Tests: fast/frames/seamless/seamless-custom-font-pruning-crash.html
fast/frames/seamless/seamless-nested-crash.html
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData): Remove code to register the font with the document.
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::getFontData): Remove code to register the font with the document.
* dom/Document.cpp:
(WebCore::Document::~Document): Remove code that records and purges custom fonts.
(WebCore):
(WebCore::Document::reportMemoryUsage): Remove reference to non-existent objects.
* dom/Document.h:
(WebCore):
(Document): Remove method declarations for custom font handling.
* platform/graphics/FontFallbackList.h:
(FontFallbackList): Moved some code around and made non-copyable.
(WebCore::FontFallbackList::setGlyphPageZero): Moved.
(WebCore::FontFallbackList::setGlyphPages): Moved.
* platform/graphics/GlyphPageTreeNode.cpp:
(WebCore::GlyphPageTreeNode::pruneFontData): Removed unnecessary null check.
* platform/graphics/SegmentedFontData.cpp:
(WebCore::SegmentedFontData::~SegmentedFontData): Added code to prune the Glyph pages when this is deleted.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::~SimpleFontData): Added code to prune the Glyph pages when this is deleted.
2012-10-03 Adam Barth <abarth@webkit.org>
Crash when calling document.open during unload
https://bugs.webkit.org/show_bug.cgi?id=98287
Reviewed by Nate Chapin.
Calling document.open results in us nulling out m_documentLoader. This
code doesn't properly handle that case and crashes.
Test: fast/parser/document-open-in-unload.html
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
2012-10-03 Benjamin Poulain <bpoulain@apple.com>
Element::computeInheritedLanguage: evaluate the while() condition after fetching the string
https://bugs.webkit.org/show_bug.cgi?id=98220
Reviewed by Andreas Kling.
* dom/Element.cpp:
(WebCore::Element::computeInheritedLanguage):
The condition is never false on the first execution. Move the condition to the
end of the loop for fun and profit.
2012-10-03 Hans Wennborg <hans@chromium.org>
Speech JavaScript API: Add SpeechRecognition.interimResults attribute
https://bugs.webkit.org/show_bug.cgi?id=98279
Reviewed by Adam Barth.
Add the interimResults attribute and pass it to the embedder. It was
added to the spec draft in
http://dvcs.w3.org/hg/speech-api/rev/d25fea0d029c
Tested in fast/speech/scripted/basics.html
* Modules/speech/SpeechRecognition.cpp:
(WebCore::SpeechRecognition::start):
(WebCore::SpeechRecognition::SpeechRecognition):
* Modules/speech/SpeechRecognition.h:
(WebCore::SpeechRecognition::interimResults):
(WebCore::SpeechRecognition::setInterimResults):
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionClient.h:
(SpeechRecognitionClient):
* Modules/speech/SpeechRecognitionController.h:
(WebCore::SpeechRecognitionController::start):
2012-10-03 Hans Wennborg <hans@chromium.org>
Speech JavaScript API: Remove resultdeleted event
https://bugs.webkit.org/show_bug.cgi?id=98272
Reviewed by Adam Barth.
Remove the resultdeleted event. This was never used, and was removed
from the spec draft in
http://dvcs.w3.org/hg/speech-api/rev/f9d53ab8b449
The fast/speech/scripted/basics.html test is updated to reflect this.
* Modules/speech/SpeechRecognition.cpp:
* Modules/speech/SpeechRecognition.h:
(SpeechRecognition):
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionEvent.cpp:
* Modules/speech/SpeechRecognitionEvent.h:
(SpeechRecognitionEvent):
* dom/EventNames.h:
(WebCore):
2012-09-16 Mark Hahnenberg <mhahnenberg@apple.com>
Delayed structure sweep can leak structures without bound
https://bugs.webkit.org/show_bug.cgi?id=96546
Reviewed by Geoffrey Garen.
This patch gets rid of the separate Structure allocator in the MarkedSpace and adds two new destructor-only
allocators. We now have separate allocators for our three types of objects: those objects with no destructors,
those objects with destructors and with immortal structures, and those objects with destructors that don't have
immortal structures. All of the objects of the third type (destructors without immortal structures) now
inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores
the ClassInfo for these classes at a fixed offset for safe retrieval during sweeping/destruction.
No new tests.
* ForwardingHeaders/runtime/JSDestructableObject.h: Added.
* bindings/js/JSDOMWrapper.h: Inherits from JSDestructibleObject.
(JSDOMWrapper):
(WebCore::JSDOMWrapper::JSDOMWrapper):
* bindings/scripts/CodeGeneratorJS.pm: Add finalizers to anything that inherits from JSGlobalObject,
e.g. JSDOMWindow and JSWorkerContexts. For those classes we also need to define needsDestruction as true.
(GenerateHeader):
* bridge/objc/objc_runtime.h: Inherit from JSDestructibleObject.
(ObjcFallbackObjectImp):
* bridge/objc/objc_runtime.mm:
(Bindings):
(JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
* bridge/runtime_array.cpp: Use a finalizer so that JSArray isn't forced to inherit from JSDestructibleObject.
(JSC):
(JSC::RuntimeArray::destroy):
* bridge/runtime_array.h:
(JSC::RuntimeArray::create):
(JSC):
* bridge/runtime_object.cpp: Inherit from JSDestructibleObject.
(Bindings):
(JSC::Bindings::RuntimeObject::RuntimeObject):
* bridge/runtime_object.h:
(RuntimeObject):
2012-10-02 Anders Carlsson <andersca@apple.com>
Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory
https://bugs.webkit.org/show_bug.cgi?id=98217
Reviewed by Andreas Kling.
* WebCore.exp.in:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
2012-10-03 Joshua Bell <jsbell@chromium.org>
IndexedDB: Optimize encodeString/decodeString
https://bugs.webkit.org/show_bug.cgi?id=97794
Reviewed by Tony Chang.
Optimize string encoding/decoding, which showed up as a CPU hot spot during profiling.
The backing store uses big-endian ordering of 16-bit code unit strings, so a memcopy
isn't sufficient, but the code used StringBuilder::append() character-by-character
and custom byte-swapping which was slow.
Ran a test w/ DumpRenderTree (to avoid multiprocess overhead) taking a 10k character string
and putting it 20k times and getting it 20k times. On my test box, mean time before the
patch was 8.2s, mean time after the patch was 4.6s.
Tested by Chromium's webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.*String*'
* Modules/indexeddb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::encodeString):
(WebCore::IDBLevelDBCoding::decodeString):
2012-10-03 Keishi Hattori <keishi@webkit.org>
Implement DataList UI for input type time on chromium
https://bugs.webkit.org/show_bug.cgi?id=98240
Reviewed by Kent Tamura.
This adds datalist UI for input type time. We add the picker indicator to
BaseMultipleFieldsDateAndTimeInputType. We enclose the dateTimeEdit element
and picker indicator inside a new div element so we can position the picker
indicator in the same place as input type=date.
Tests: platform/chromium/fast/forms/time/time-suggestion-picker-appearance-rtl.html
platform/chromium/fast/forms/time/time-suggestion-picker-appearance-with-scroll-bar.html
platform/chromium/fast/forms/time/time-suggestion-picker-appearance.html
platform/chromium/fast/forms/time/time-suggestion-picker-key-operations.html
platform/chromium/fast/forms/time/time-suggestion-picker-mouse-operations.html
* css/html.css:
(input::-webkit-date-and-time-container):
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree): Creates a picker indicator.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent): Open the picker on Alt+Down.
(WebCore):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::listAttributeTargetChanged): Updates picker visibility.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility): In the future, DateInputType can override
this so the picker indicator is always visible.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::hidePickerIndicator):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::showPickerIndicator):
* html/BaseMultipleFieldsDateAndTimeInputType.h:
(WebCore):
(BaseMultipleFieldsDateAndTimeInputType):
* html/shadow/DateTimeFieldElement.cpp:
(WebCore::DateTimeFieldElement::defaultKeyboardEventHandler): Ignore Alt+down because it should trigger the picker to open.
* rendering/RenderThemeChromiumCommon.cpp:
(WebCore::RenderThemeChromiumCommon::supportsDataListUI): Add time to the list.
2012-10-03 Andreas Kling <kling@webkit.org>
Give CSSValueList backing vector an inline capacity.
<http://webkit.org/b/98266>
<rdar://problem/12421425>
Reviewed by Anders Carlsson.
Set an inline capacity of 4 on the CSSValue vector backing CSSValueList. This avoids an extra heap allocation
in the common case, and reduces total memory use across the board, since the majority of CSSValueLists have
at least 1 item, and the Vector will bump from 0 to 16 capacity on the first append.
394kB progression on Membuster3.
* css/CSSValueList.h:
(CSSValueList):
2012-10-03 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: instrument NativeImageSkia.
https://bugs.webkit.org/show_bug.cgi?id=96277
Reviewed by Yury Semikhatsky.
* platform/graphics/skia/NativeImageSkia.cpp:
(WebCore::NativeImageSkia::reportMemoryUsage):
(WebCore::reportMemoryUsage):
2012-10-03 Pavel Feldman <pfeldman@chromium.org>
Web Inspector: remember the last dock option so that user could toggle between dock to bottom and right
https://bugs.webkit.org/show_bug.cgi?id=98255
Reviewed by Vsevolod Vlasov.
- Introduced DockController.js that covers the dock mechanics
- Removed dock orientation from the settings
- Storing the last dock option to present it as default
- Simplified the multi-option status bar button
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/DockController.js: Added.
(WebInspector.DockController):
(WebInspector.DockController.prototype.get element):
(WebInspector.DockController.prototype.setDocked.set if):
(WebInspector.DockController.prototype.setDocked):
(WebInspector.DockController.prototype.setDockingUnavailable):
(WebInspector.DockController.prototype._updateUI.get states):
(WebInspector.DockController.prototype._updateUI):
(WebInspector.DockController.prototype._decorateButtonForTargetState):
(WebInspector.DockController.prototype._createDockOptions):
(WebInspector.DockController.prototype._toggleDockState):
(WebInspector.DockController.prototype.isCompactMode):
(WebInspector.DockController.prototype.setCompactMode):
* inspector/front-end/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setAttachedWindow):
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.requestAttachWindow):
(.WebInspector.InspectorFrontendHostStub.prototype.requestDetachWindow):
* inspector/front-end/Settings.js:
* inspector/front-end/SettingsScreen.js:
(WebInspector.GenericSettingsTab):
* inspector/front-end/StatusBarButton.js:
(WebInspector.StatusBarButton):
* inspector/front-end/Toolbar.js:
(WebInspector.Toolbar):
(WebInspector.Toolbar.prototype.setCompactMode):
(WebInspector.Toolbar.prototype._toolbarDragStart):
(WebInspector.Toolbar.prototype._toolbarDrag):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/externs.js:
(WebInspector.toggleSearchingForNode):
* inspector/front-end/inspector.css:
(body.undocked.platform-mac-snowleopard #toolbar):
(body.undocked.platform-mac-snowleopard #toolbar-dropdown):
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
(WebInspector._createGlobalStatusBarItems):
(windowLoaded):
(WebInspector.setDockingUnavailable):
* inspector/front-end/inspectorCommon.css:
(body.dock-to-right:not(.undocked)):
(body.dock-to-right.inactive:not(.undocked)):
2012-10-03 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: UISourceCode commitWorkingCopy should not fail when original script had syntax error.
https://bugs.webkit.org/show_bug.cgi?id=97272
Reviewed by Pavel Feldman.
This patch is based on patch by John J. Barton.
* inspector/front-end/JavaScriptSource.js:
(WebInspector.JavaScriptSource.prototype.workingCopyCommitted): added rawLocation null check.
2012-10-03 Alexander Pavlov <apavlov@chromium.org>
Web Inspector: After "Edit as HTML", any click outside box should stop editing
https://bugs.webkit.org/show_bug.cgi?id=98258
Reviewed by Vsevolod Vlasov.
Make the DOM tree OL span the entire height of its container in the Elements panel to catch mouse events.
* inspector/front-end/elementsPanel.css:
(#elements-content > ol):
2012-10-03 Dongwoo Joshua Im <dw.im@samsung.com>
[EFL] Skeleton code of File system API.
https://bugs.webkit.org/show_bug.cgi?id=91187
Reviewed by Gyuyoung Kim.
Add skeleton code of File System API on EFL port.
Implementation patches will be created later.
No new tests because this is just skeleton code.
* CMakeLists.txt: Add new files which created by other patches in Modules/filesystem/ directory.
* PlatformEfl.cmake: Add AsyncFileSystemEfl.cpp.
* platform/AsyncFileSystem.cpp:
(WebCore):
* platform/efl/AsyncFileSystemEfl.cpp: Added.
* platform/efl/AsyncFileSystemEfl.h: Added.
2012-10-03 Andreas Kling <kling@webkit.org>
Shrink ElementRareData by moving bool flags to NodeRareData.
<http://webkit.org/b/98225>
Reviewed by Antti Koivisto.
Move all bool flags from ElementRareData to the bitfield in its base class NodeRareData.
This shrinks ElementRareData by 8 bytes (on 64-bit) and saves a whopping 58kB on Membuster3.
Also removed some double raredata hash lookups.
* dom/Element.cpp:
(WebCore::Element::detach):
(WebCore::Element::recalcStyle):
(WebCore::Element::ensureShadow):
(WebCore::Element::setStyleAffectedByEmpty):
(WebCore::Element::styleAffectedByEmpty):
(WebCore::Element::setIsInCanvasSubtree):
(WebCore::Element::isInCanvasSubtree):
(WebCore::Element::containsFullScreenElement):
(WebCore::Element::setContainsFullScreenElement):
* dom/ElementRareData.h:
(ElementRareData):
(WebCore::ElementRareData::ElementRareData):
* dom/NodeRareData.h:
(WebCore::NodeRareData::styleAffectedByEmpty):
(WebCore::NodeRareData::setStyleAffectedByEmpty):
(WebCore::NodeRareData::isInCanvasSubtree):
(WebCore::NodeRareData::setIsInCanvasSubtree):
(NodeRareData):
(WebCore::NodeRareData::containsFullScreenElement):
(WebCore::NodeRareData::setContainsFullScreenElement):
2012-10-03 Jussi Kukkonen <jussi.kukkonen@intel.com>
getComputedStyle perspective-origin is based on the wrong bounding box
https://bugs.webkit.org/show_bug.cgi?id=98027
Reviewed by Simon Fraser.
perspective-origin for ComputedStyleDeclaration is currently calculated using the
wrong bounding box (sizingBox() which ends up as the contentbox).
Start using borderbox for ComputedStyleDeclaration perspective-origin, similar to
what transform-origin already does.
Test: fast/css/getComputedStyle/getComputedStyle-origin-percentage.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2012-10-03 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r130160.
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::glyphDataAndPageForCharacter):
2012-10-03 Tommy Widenflycht <tommyw@google.com>
MediaStream API: RTCPeerConnection should send down its handler via the FrameLoaderClient directly after creation.
https://bugs.webkit.org/show_bug.cgi?id=98149
Reviewed by Adam Barth.
The chromium implementation needs to know which Frame created a PeerConnection so
that the right housekeeping can take place correctly.
Not testable in DRT, but have verified the change manually and with our pyautotests.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection):
* loader/FrameLoaderClient.h:
(WebCore):
(FrameLoaderClient):
(WebCore::FrameLoaderClient::dispatchWillStartUsingPeerConnectionHandler):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
(WebCore::RTCPeerConnectionHandlerChromium::toWebRTCPeerConnectionHandler):
(WebCore):
(WebCore::RTCPeerConnectionHandlerChromium::RTCPeerConnectionHandlerChromium):
(WebCore::RTCPeerConnectionHandlerChromium::initialize):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
(RTCPeerConnectionHandlerChromium):
2012-10-03 Eugene Klyuchnikov <eustas.bug@gmail.com>
Web Inspector: Profiles: taking heap snapshot causes error message in console.
https://bugs.webkit.org/show_bug.cgi?id=97890
Reviewed by Yury Semikhatsky.
Actual problem is that proxy loader is closed twice.
"_snapshotReceived" should never try to close receiver,
because it is a callback fired by close.
Also minor glitches fixed:
- taking snapshot shows "Loading..." status first,
and then "Saving xxx%";
- after all chunks are sent "Parsing" status is set and
then is replaced with "Saving 100%";
- removed dead code in proxy;
- proxy was ignoring callback parameter;
- "Loading %d\%" is not localized.
* English.lproj/localizedStrings.js: Added missing "Loading %d%" string.
* inspector/front-end/HeapSnapshotProxy.js: Removed dead code.
(WebInspector.HeapSnapshotLoaderProxy):
(WebInspector.HeapSnapshotLoaderProxy.prototype.write): Make this method
interface-conformant.
* inspector/front-end/HeapSnapshotView.js:
(WebInspector.HeapProfileHeader): Fixed update-status and
finish-transfer logic.
2012-10-03 Jochen Eisinger <jochen@chromium.org>
Make sure that user gestures can't be consumed twice
https://bugs.webkit.org/show_bug.cgi?id=97483
Reviewed by Adam Barth.
Instead of a simple counter, use a ref counted token to track how many
user gestures happened and where consumed. When creating a timer that
is supposed to forward the user gesture, take a reference to this token
and reinstantiate the UserGestureIndicator with that token when the
timer is triggered.
Tests: platform/chromium/fast/events/popup-forwarded-gesture-blocked.html
platform/chromium/fast/events/popup-forwarded-gesture.html
* dom/UserGestureIndicator.cpp:
(WebCore):
(WebCore::UserGestureIndicator::UserGestureIndicator):
(WebCore::UserGestureIndicator::~UserGestureIndicator):
(WebCore::UserGestureIndicator::processingUserGesture):
(WebCore::UserGestureIndicator::consumeUserGesture):
(WebCore::UserGestureIndicator::currentToken):
* dom/UserGestureIndicator.h:
(Token):
(WebCore::UserGestureIndicator::Token::~Token):
(UserGestureIndicator):
* page/DOMTimer.cpp:
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::fired):
* page/DOMTimer.h:
(DOMTimer):
2012-10-03 Dominic Mazzoni <dmazzoni@google.com>
AX: Heap-use-after-free when deleting a ContainerNode with an AX object
https://bugs.webkit.org/show_bug.cgi?id=98073
Reviewed by Hajime Morita.
Calls axObjectCache()->remove(this) in ~ContainerNode so that the AX tree
doesn't try to access the container node while walking up the parent chain
from one of the container node's children.
Test: accessibility/container-node-delete-causes-crash.html
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::~ContainerNode):
* dom/Node.cpp:
(WebCore::Node::~Node):
* dom/Node.h:
(WebCore::Node::document):
(WebCore::Node::documentInternal):
2012-10-03 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: SourceURL should be taken from debugger agent when possible.
https://bugs.webkit.org/show_bug.cgi?id=98239
Reviewed by Yury Semikhatsky.
Removed a check that sourceURL coming from js engine is the same as the one parsed by debugger agent.
Alwys use the one from debugger agent now.
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::didParseSource):
2012-10-03 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed. Touch FrameView.cpp file for fixing mac bot compilation.
* page/FrameView.cpp:
(WebCore):
2012-10-02 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: "Load profile..." context menu item has to be shown only for left column with the list of profiles.
https://bugs.webkit.org/show_bug.cgi?id=98163
Reviewed by Yury Semikhatsky.
The text was changed to "Load Heap Snapshot..."
Also I changed "Save profile..." to "Save Heap Snapshot..." because other profiles don't support Save/Load operations yet.
The Load context menu item will appear only when the user clicked in sidebar the tree empty space or a profile.
* English.lproj/localizedStrings.js:
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
(WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
2012-10-03 Harald Alvestrand <hta@google.com>
Add data passing to the GetStats interface of RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=98003
Reviewed by Adam Barth.
Added an RTCStatsResponseBase interface to platform, and let the
RTCStatsRequestImpl class produce an implementation of it that's returned
to WebCore.
Tested by extension of the RTCPeerConnection-stats.html test.
* Modules/mediastream/RTCStatsElement.cpp:
(WebCore::RTCStatsElement::addStatistic):
(WebCore):
* Modules/mediastream/RTCStatsElement.h:
(RTCStatsElement):
* Modules/mediastream/RTCStatsReport.cpp:
(WebCore):
(WebCore::RTCStatsReport::addElement):
(WebCore::RTCStatsReport::addStatistic):
* Modules/mediastream/RTCStatsReport.h:
(RTCStatsReport):
* Modules/mediastream/RTCStatsRequestImpl.cpp:
(WebCore::RTCStatsRequestImpl::createResponse):
(WebCore):
(WebCore::RTCStatsRequestImpl::requestSucceeded):
* Modules/mediastream/RTCStatsRequestImpl.h:
(RTCStatsRequestImpl):
* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::RTCStatsResponse::create):
(WebCore::RTCStatsResponse::addReport):
(WebCore):
(WebCore::RTCStatsResponse::addElement):
(WebCore::RTCStatsResponse::addStatistic):
* Modules/mediastream/RTCStatsResponse.h:
(RTCStatsResponse):
* WebCore.gypi:
* platform/chromium/support/WebRTCStatsRequest.cpp:
(WebKit::WebRTCStatsRequest::response):
(WebKit):
(WebKit::WebRTCStatsRequest::requestSucceeded):
* platform/chromium/support/WebRTCStatsResponse.cpp: Added.
(WebKit):
(WebKit::WebRTCStatsResponse::WebRTCStatsResponse):
(WebKit::WebRTCStatsResponse::assign):
(WebKit::WebRTCStatsResponse::reset):
(WebKit::WebRTCStatsResponse::operator WTF::PassRefPtr<WebCore::RTCStatsResponseBase>):
(WebKit::WebRTCStatsResponse::addReport):
(WebKit::WebRTCStatsResponse::addElement):
(WebKit::WebRTCStatsResponse::addStatistic):
* platform/mediastream/RTCStatsRequest.h:
(WebCore):
(RTCStatsRequest):
* platform/mediastream/RTCStatsResponseBase.h: Added.
(WebCore):
(RTCStatsResponseBase):
(WebCore::RTCStatsResponseBase::~RTCStatsResponseBase):
2012-10-02 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add API to get the web view that initiated a custom URI request to WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=97895
Reviewed by Martin Robinson.
* platform/network/NetworkingContext.h:
(NetworkingContext): Add initiatingPageID().
* platform/network/ResourceHandle.h:
(ResourceHandle): Add static method
getSoupRequestInitiaingPageID().
* platform/network/ResourceHandleInternal.h:
(ResourceHandleInternal): Add initiatingPageID().
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandleInternal::initiatingPageID): Get the
initiating page ID of the resource handle networking context.
(WebCore::setSoupRequestInitiaingPageID): Helper function to
attach a page ID to a SoupRequest.
(WebCore::startHTTPRequest): Call setSoupRequestInitiaingPageID()
to attch the initiating page ID to the SoupRequest.
(WebCore::startNonHTTPRequest): Ditto.
(WebCore::ResourceHandle::getSoupRequestInitiaingPageID): Static
method to get the page ID attached to a SoupRequest.
2012-10-03 Kent Tamura <tkent@chromium.org>
Introduce DateComponents::minimumYear and maximumYear
https://bugs.webkit.org/show_bug.cgi?id=98230
Reviewed by Kentaro Hara.
Share same difinitions in DateComponents.cpp and DateTimeFieldElements.cpp.
No new tests. This doesn't change any bahevior.
* platform/DateComponents.h:
(WebCore::DateComponents::minimumYear): Moved from DateComponents.cpp.
(WebCore::DateComponents::maximumYear): ditto.
* platform/DateComponents.cpp:
(WebCore): Move out static minimumYear and maximumYear.
(WebCore::DateComponents::parseYear): Use DateCompnents::minimumYear and/or maximumYear.
(WebCore::withinHTMLDateLimits): ditto.
(WebCore::DateComponents::parseWeek): ditto.
(WebCore::DateComponents::setMonthsSinceEpoch): ditto.
(WebCore::DateComponents::setMillisecondsSinceEpochForWeek): ditto.
* html/shadow/DateTimeFieldElements.cpp:
(WebCore): Remove minimumYear and maximumYear.
(WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement):
Use DateComponents::minimumYear and maximumYear.
2012-10-02 Arko Saha <arko@motorola.com>
Microdata: itemprop names must not override builtin properties.
https://bugs.webkit.org/show_bug.cgi?id=98025
Reviewed by Kentaro Hara.
We should look in the prototype for functions before assuming it as
an item's name. Return false if the prototype of the object has a
property (function) with propertyName.
Named properties Spec: http://dev.w3.org/2006/webapi/WebIDL/#idl-named-properties
Named property visibility algorithm:
http://dev.w3.org/2006/webapi/WebIDL/#indexed-and-named-properties
...
7. If the result of calling the [[HasProperty]] internal method on
prototype with property name P is true, then return false.
...
Also [OverrideBuiltins] is not declared for any of the properties,
hence no overriding is allowed in this case.
Test: fast/dom/MicroData/itemprop-names-override-builtin-properties.html
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateGetOwnPropertyDescriptorBody):
2012-10-02 Keishi Hattori <keishi@webkit.org>
REGRESSION (r129738): Suggestion picker label is placed in the wrong location
https://bugs.webkit.org/show_bug.cgi?id=98094
Reviewed by Kent Tamura.
We needed to reverse padding-left/right when rtl.
No new tests. Covered by date-suggestion-picker-appearance.html.
* Resources/pagepopups/suggestionPicker.css:
(.suggestion-list-entry .label):
(.rtl .suggestion-list-entry .label):
2012-10-02 Yury Semikhatsky <yurys@chromium.org>
Provide memory instrumentation for HashCountedSet
https://bugs.webkit.org/show_bug.cgi?id=98138
Reviewed by Pavel Feldman.
Replaced addHashCountedSet calls with addMember that now automatically
detects HashCountedSet and calls appropriate routine.
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
* loader/cache/CachedResource.cpp:
2012-10-02 Nandor Huszka <hnandor@inf.u-szeged.hu>
Buildfix after r130235.
Reviewed by Csaba Osztrogonác.
systemAllowsMultisamplingOnATICards was deleted from GraphicsContext3D,
but function body remained in GraphicsContext3DOpenGLES. Delete method body.
* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2012-10-02 Kent Tamura <tkent@chromium.org>
Fix assertion failures on Chromium Debug bots for datetime/datetime-local input types.
* html/shadow/DateTimeFieldElements.cpp:
If a placeholder stirng is empty, use a sequence of "-".
(WebCore::DateTimeDayFieldElement::create):
(WebCore::DateTimeMonthFieldElement::create):
(WebCore::DateTimeYearFieldElement::create):
2012-10-02 MORITA Hajime <morrita@google.com>
https://bugs.webkit.org/show_bug.cgi?id=98134
[Refactoring] StyleResolver::matchScopedAuthorRules() could be simpler.
Reviewed by Dimitri Glazkov.
matchScopedAuthorRules() did have some optimization which only
makes sense for heavily nested shadow tree. However, we don't see
such type of usage of Shadow DOM and this looks premature
optimization. This change unified its triple for loop into one,
which makes the code much simpler.
No new tests. Covered by existing tests.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::matchScopedAuthorRules):
2012-10-02 Kent Tamura <tkent@chromium.org>
Introduce Localizer::dateTimeFormatWithSecond and dateTimeFormatWithoutSecond
https://bugs.webkit.org/show_bug.cgi?id=98229
Reviewed by Kentaro Hara.
Unify identical code in DateTimeInputType and DateTimeLocalInputType as
Localizer member functions.
They still have some common code. We'll address it later.
No new tests. This doesn't change any behavior.
* platform/text/Localizer.h:
(Localizer): Add dateTimeFormatWithSecond and dateTimeFormatWithoutSecond.
* platform/text/Localizer.cpp:
(WebCore::Localizer::dateTimeFormatWithSecond):
Implemented. Just concatenating dateFormat, a space, and timeFormat.
(WebCore::Localizer::dateTimeFormatWithoutSecond):
Implemented. Just concatenating dateFormat, a space, and shortTimeFormat.
* html/DateTimeInputType.cpp:
(WebCore::DateTimeInputType::setupLayoutParameters):
Use dateTimeFormatWithSecond and dateTimeFormatWithoutSecond.
* html/DateTimeLocalInputType.cpp:
(WebCore::DateTimeLocalInputType::setupLayoutParameters): ditto.
2012-10-03 Kent Tamura <tkent@chromium.org>
Refactoring: DateTimeEditBuilder had better hold LayoutParameters
https://bugs.webkit.org/show_bug.cgi?id=98228
Reviewed by Kentaro Hara.
Stop copying multiple members of LayoutParameters in DateTimeEditBuilder
constructor. This change improves code size and runtime cost.
No new tests. This doesn't change user-visible behavior.
* html/shadow/DateTimeEditElement.cpp:
(DateTimeEditBuilder): Add a comment about lifetime of objects.
(WebCore::DateTimeEditBuilder::stepRange):
Added. A helper to access m_parameters.stepRange.
(WebCore::DateTimeEditBuilder::DateTimeEditBuilder):
Remove m_stepRange, m_localizer, m_placeholderFor* members.
Add m_parameters.
(WebCore::DateTimeEditBuilder::needMillisecondField):
Use stepRange() instead of m_stepRange.
(WebCore::DateTimeEditBuilder::visitField):
Use m_parameters.placeholderFor*.
(WebCore::DateTimeEditBuilder::shouldMillisecondFieldReadOnly):
Use stepRange() instead of m_stepRange.
(WebCore::DateTimeEditBuilder::shouldMinuteFieldReadOnly): ditto.
(WebCore::DateTimeEditBuilder::shouldSecondFieldReadOnly): ditto.
2012-10-02 Kent Tamura <tkent@chromium.org>
Implement LocaleICU::dateFormat
https://bugs.webkit.org/show_bug.cgi?id=98118
Reviewed by Hajime Morita.
http://trac.webkit.org/changeset/130127 introduced
Localizer::dateFormat, and this is its implementation for LocaleICU
classs. The code is going to be used when
ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.
No new tests. The function is not used yet.
* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::dateFormat):
Implemented. Note that m_shortDateFormat is a UDateFormat object, which
knows various format information.
* platform/text/LocaleICU.h:
(LocaleICU): Add m_dateFormat to cache the format string.
2012-10-02 Kent Tamura <tkent@chromium.org>
[Mac][Chromium-Mac] Implement LocaleMac::dateFormat
https://bugs.webkit.org/show_bug.cgi?id=98116
Reviewed by Hajime Morita.
http://trac.webkit.org/changeset/130127 introduced
Localizer::dateFormat, and this is its implementation for LocaleICU
classs. The code is going to be used when
ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.
No new tests. The function is not used yet.
* platform/text/mac/LocaleMac.h:
(LocaleMac): Declare m_dateFormat.
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::dateFormat): Implemented.
2012-10-02 Kent Tamura <tkent@chromium.org>
[Chromium-Win] Implement LocaleWin::dateFormat
https://bugs.webkit.org/show_bug.cgi?id=98117
Reviewed by Kentaro Hara.
http://trac.webkit.org/changeset/130127 introduced
Localizer::dateFormat, and this is its implementation for LocaleICU
classs. The code is going to be used when
ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.
Tests: Added a new test to WebKit/chromium/tests/LocaleWinTest.cpp.
* platform/text/LocaleWin.cpp:
(WebCore::parseDateFormat):
Fix a continuous apostrophes parsing bug; "abc''''def" produced "abc'''def"
(WebCore::appendAsLDMLLiteral):
A helper function to make a literal string for LDML.
(WebCore::convertWindowsDateFormatToLDML):
Creates an LDML format from a parsed date format tokens.
(WebCore::LocaleWin::dateFormat):
Implemented. This uses convertWindowsDateFormatToLDML.
(WebCore::LocaleWin::dateFormat):
Added for testing. The source windows format is specified as a function
argument.
* platform/text/LocaleWin.h:
(LocaleWin): Declare m_dateFormat and dateFormat().
2012-10-02 Ian Vollick <vollick@chromium.org>
[chromium] Fix spelling of isNVIDIA override in Extensions3DChromium
https://bugs.webkit.org/show_bug.cgi?id=98219
Reviewed by Dean Jackson.
The override in Extensions3dChromium should have been spelled isNVIDIA, not isNVidia.
No new tests. No change in functionality.
* platform/graphics/chromium/Extensions3DChromium.h:
(WebCore::Extensions3DChromium::isNVIDIA):
2012-10-02 Anders Carlsson <andersca@apple.com>
Try to fix the Snow Leopard build.
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2012-10-02 Joshua Bell <jsbell@chromium.org>
Add htons/htonl definitions and implementations
https://bugs.webkit.org/show_bug.cgi?id=98054
Reviewed by Darin Adler.
Update users of htons and friends to use new wtf/ByteOrder.h header.
No new tests - just refactoring.
* platform/graphics/WOFFFileFormat.cpp:
* platform/graphics/chromium/VDMXParser.cpp:
== Rolled over to ChangeLog-2012-10-02 ==