blob: 9547170e6f042cf6e6502e2b85dce79eec8f54ed [file] [log] [blame]
2013-05-15 Joe Mason <>
[BlackBerry] When HTTP auth fails, only purge credentials that match the failed credentials
Reviewed by Rob Buis.
Internal PR: 338490
Internally Reviewed By: Lyon Chen
When there are multiple HTTP requests in flight with the same bad credentials (common with
proxy auth if the user mistyped their password), the first 407 that's received will cause
the credentials to be purged and the password dialog to open for new credentials. This means
that all 407's received after this should only purge the credentials if they have not
already been updated from the dialog; otherwise they will be wiping out credentials that
haven't failed yet.
* platform/network/blackberry/NetworkJob.cpp:
2013-05-15 Chris Fleizach <>
AX: Use caching when requesting children object on iOS
Reviewed by David Kilzer.
Building up the children list in the AX hierarchy can be time consuming. On iOS, this
is now much more noticeable (I believe due to the way tables calculate their AX ignored flag).
We can speed everything up if we just cache the isIgnored() attribute while building up children.
* accessibility/AXObjectCache.cpp:
* accessibility/AXObjectCache.h:
* accessibility/ios/
(-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
(-[WebAccessibilityObjectWrapper accessibilityElementCount]):
(-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
(-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
(-[WebAccessibilityObjectWrapper accessibilityContainer]):
2013-05-15 Anders Carlsson <>
Remove WebSocketHandshakeRequest class
Reviewed by Andreas Kling.
Turns out WebSocketHandshakeRequest is just used by the web inspector, and there's no reason
why we can't just use a ResourceRequest instead.
* CMakeLists.txt:
* Modules/websockets/WebSocketChannel.cpp:
* Modules/websockets/WebSocketHandshake.cpp:
* Modules/websockets/WebSocketHandshake.h:
* Modules/websockets/WebSocketHandshakeRequest.cpp: Removed.
* Modules/websockets/WebSocketHandshakeRequest.h: Removed.
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorInstrumentation.h:
* inspector/InspectorResourceAgent.cpp:
* inspector/InspectorResourceAgent.h:
* platform/network/HTTPRequest.cpp:
2013-05-15 Darin Adler <>
Try to fix iOS build.
* platform/Pasteboard.h: Fix #if so that we don't try to compile pasteboard name code
on iOS.
2013-05-13 Anders Carlsson <>
Frame::editor() should return a reference
Reviewed by Darin Adler.
A frame's editor can never be null. Change Frame::editor() to return a reference to reflect this.
Also, make Frame::m_editor a const member variable so nobody will accidentally set it to null.
* accessibility/AccessibilityObject.cpp:
* accessibility/mac/
* dom/ContainerNode.cpp:
* dom/Document.cpp:
* editing/AlternativeTextController.cpp:
* editing/CompositeEditCommand.cpp:
* editing/DeleteButton.cpp:
* editing/DeleteButtonController.cpp:
* editing/DeleteButtonController.h:
* editing/DeleteSelectionCommand.cpp:
* editing/EditCommand.cpp:
* editing/EditingStyle.cpp:
* editing/Editor.cpp:
* editing/EditorCommand.cpp:
* editing/FrameSelection.cpp:
* editing/InsertTextCommand.cpp:
* editing/SpellChecker.cpp:
* editing/SpellingCorrectionCommand.cpp:
* editing/TypingCommand.cpp:
* editing/htmlediting.cpp:
* editing/mac/
* editing/markup.cpp:
* html/HTMLInputElement.cpp:
* html/HTMLTextAreaElement.cpp:
* html/TextFieldInputType.cpp:
* loader/FrameLoader.cpp:
* page/ContextMenuController.cpp:
* page/DOMWindow.cpp:
* page/DragController.cpp:
* page/EventHandler.cpp:
* page/FocusController.cpp:
* page/Frame.cpp:
* page/Frame.h:
* page/Page.cpp:
* platform/mac/
* platform/mac/
* platform/mac/
* rendering/HitTestResult.cpp:
* rendering/InlineTextBox.cpp:
* rendering/RenderBlock.cpp:
* testing/Internals.cpp:
2013-05-15 Darin Adler <>
[Mac] Make Clipboard class no longer polymorphic by removing the last virtual functions
Reviewed by Anders Carlsson.
* Add ~Clipboard since it's no longer a virtual function, but to the
non-iOS section, since iOS is still using the legacy version of Clipboard.
* dom/Clipboard.h: Mark items non-virtual, too. It's not implemented on Mac yet.
2013-05-15 Dongseong Hwang <>
Remove an overloaded strokeRect in <canvas>
Reviewed by Benjamin Poulain.
The canvas spec [1] does not define strokeRect with 5 arguments, so this issue
remains only strokeRect with 4 arguments.
Covered by existing tests: canvas/philip/tests/2d.missingargs.html
* html/canvas/CanvasRenderingContext2D.cpp:
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/CanvasRenderingContext2D.idl:
2013-05-15 Bruno de Oliveira Abinader <>
[css3-text] text-decoration-line now accepts "blink" as valid value
Reviewed by Andreas Kling.
As of November 13th 2012, the W3C specification has been updated to
accept "blink" as a valid property value in text-decoration-line. Though
accepting the value as valid, it is ignored as CSS Level 1
text-decoration property currently does.
Updated related layout tests to reflect changes in specification.
* css/CSSParser.cpp:
2013-05-14 Simon Fraser <>
It introduced unwanted behavioral differences between
Retina and non-Retina Mac hardware.
* platform/graphics/ca/GraphicsLayerCA.cpp:
2013-05-15 Darin Adler <>
[Mac] Remove the ClipboardMac class and header file
Reviewed by Anders Carlsson.
* WebCore.xcodeproj/project.pbxproj: Remove ClipboardMac.h.
* editing/mac/ Import Clipboard.h rather than ClipboardMac.h.
* page/mac/ Ditto.
* platform/mac/ClipboardMac.h: Removed.
* platform/mac/ Import Clipboard.h rather than ClipboardMac.h.
Deleted ClipboardMac constructor.
2013-05-15 Darin Adler <>
[Mac] Change Clipboard::create functions so they don't use ClipboardMac::create any more
Reviewed by Anders Carlsson.
* dom/Clipboard.h: Made the file drag boolean default to false, better for most callers.
* platform/mac/ Remove #if ENABLE(DRAG_SUPPORT); that's always on for Mac
and it's not helpful to have the conditionals in here. It's helpful in cross-platform
source files.
(WebCore::Clipboard::create): Create a Pasteboard and then create a Clipboard with new.
Later could refactor to have the Pasteboard creation be platform-specific, and make these
functions platform-independent.
(WebCore::Clipboard::createForDragAndDrop): Ditto.
(WebCore::Clipboard::createForCopyAndPaste): Ditto.
2013-05-15 Darin Adler <>
[Mac] Remove call to ClipboardMac::create from Editor::newGeneralClipboard
Reviewed by Andreas Kling.
* dom/Clipboard.h: Add createForCopyAndPaste function.
* editing/mac/
(WebCore::Editor::newGeneralClipboard): Call createForCopyAndPaste.
* platform/mac/
(WebCore::Clipboard::createForCopyAndPaste): Added. Moved code here from
2013-05-15 Darin Adler <>
[Mac] Remove call to ClipboardMac::create from EventHandler::createDraggingClipboard
Reviewed by Andreas Kling.
* dom/Clipboard.h: Added createForDragAndDrop function.
* page/mac/
(WebCore::EventHandler::createDraggingClipboard): Changed to use new Clipboard function
instead of ClipboardMac::create.
* platform/mac/
(WebCore::Clipboard::createForDragAndDrop): Added. For now it does exactly what the
EventHandler::createDraggingClipboard function did, soon to be refactored better.
2013-05-15 Darin Adler <>
[Mac] Thin out the ClipboardMac class and header file to prepare for deleting them
Reviewed by Andreas Kling.
* dom/Clipboard.h:
(WebCore::Clipboard::pasteboard): Added. For clients that have a DOM clipboard
object and need to get to the Pasteboard platform abstraction.
* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent): Call writePasteboard instead of writeClipboard.
Our long term plan is to delete writeClipboard.
* platform/Pasteboard.h: Added writePasteboard function.
(WebCore::Pasteboard::name): Made this const.
* platform/mac/ClipboardMac.h: Deleted unneeded includes and forward declarations.
Deleted all the data members and the virtual destructor.
* platform/mac/ Deleted the many includes that are no longer needed.
Deleted the destructor, since it's now automatically generated. Deleted the comment
on an #endif since it's only a few source lines away from the #if.
(WebCore::ClipboardMac::ClipboardMac): Deleted the code to set the data members,
since they are no longer used.
* platform/mac/ Changed include to Clipboard.h instead of ClipboardMac.h.
(WebCore::Pasteboard::writePasteboard): Replaced writeClipboard with this.
2013-05-15 Seokju Kwon <>
Web Inspector: Get rid of addNativeSnapshotChunk and HeapSnapshotChunk from Memory domain
Reviewed by Timothy Hatcher.
No new tests, no behavior change.
* inspector/Inspector.json:
2013-05-15 Jocelyn Turcotte <>
[Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
Reviewed by Allan Sandfeld Jensen.
The previous fix only moved the crash location from WebKit down to QNetworkReplyHttpImpl
which expects its QNetworkAccessManager to still be alive.
Fix it by watching the QNetworkReply's destroyed() signal and avoid the dangling pointer
instead. The QNetworkReply doesn't need to be aborted in this case anyway.
* platform/network/qt/QNetworkReplyHandler.cpp:
Rename resetConnections to stopForwarding since not all connections are related
to data forwarding to the client anymore.
* platform/network/qt/QNetworkReplyHandler.h:
2013-05-15 Darin Adler <>
[Mac] Make Clipboard::declareAndWriteDragImage non-virtual
Reviewed by Anders Carlsson.
* dom/Clipboard.h: Make declareAndWriteDragImage non-virtual for non-legacy.
* platform/Pasteboard.h:
(WebCore::Pasteboard::name): Added. Can be used in Mac platform code to do
pasteboard operations directly instead of through the Pasteboard class
functions. Not sure if we'll need it long term or not.
* platform/mac/ClipboardMac.h: Removed declareAndWriteDragImage function.
* platform/mac/
(WebCore::Clipboard::declareAndWriteDragImage): Made this function a Clipboard
member instead of ClipboardMac.
2013-05-15 Peter Gal <>
[curl] Remove version #if guards
Reviewed by Brent Fulgham.
No tests required.
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::platformSetDefersLoading): Removed version guard.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::writeCallback): Ditto.
(WebCore::headerCallback): Ditto.
(WebCore::readCallback): Ditto.
(WebCore::ResourceHandleManager::dispatchSynchronousJob): Ditto.
(WebCore::ResourceHandleManager::initializeHandle): Ditto.
2013-05-15 David Kilzer <>
BUILD FIX (r150089): Make WebCoreTestShim build for iOS
* Configurations/WebCoreTestShim.xcconfig: Exclude
WebCoreTestShimLibrary.cpp when building for iOS.
2013-05-15 Radu Stavila <>
[CSSRegions] Implement offsetParent for elements inside named flow
In the offsetParent algorithm, the nearest ancestor search skips from the topmost named flow elements directly to the body element.
As a result of this change, the DumpRenderTree tool would crash in
WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent when running the selecting-text-through-different-region-flows.html
test. The RenderObjects inside a flow are attached to the RenderFlowThread. However, the RenderFlowThread is attached to the
RenderView directly, meaning that we are going to bypass the <body>'s RenderObject while iterating the parents.
Reviewed by Darin Adler.
Tests: fast/regions/offsetParent-body-in-flow-thread.html
* rendering/RenderBoxModelObject.cpp:
* rendering/RenderObject.cpp:
2013-05-15 Darin Adler <>
[Mac] Make Clipboard::createDragImage non-virtual
Reviewed by Benjamin Poulain.
* dom/Clipboard.h: Made createDragImage non-virtual for non-legacy.
* platform/mac/ClipboardMac.h: Removed frame argument from create function
and constructor. Removed createDragImage and dragNSImage. Removed m_frame
data member.
* platform/mac/
(WebCore::ClipboardMac::ClipboardMac): Removed frame argument and code
to initialize m_frame.
(WebCore::Clipboard::createDragImage): Merged the createDragImage and
dragNSImage functions, since they were the same thing. Changed code to get
the frame from the drag image element. Made the createDragImage function
a Clipboard member instead of ClipboardMac.
2013-05-15 Patrick Gansterer <>
[WINCE] Fix calls to GlyphPage::setGlyphDataForIndex()
Reviewed by Andreas Kling.
Use zero for the glyp when the fontData pointer is null.
This aligns GlyphPageTreeNodeWinCE with the other implementations
and makes all ASSERT() pass in setGlyphDataForIndex().
* platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp:
2013-05-15 Benjamin Poulain <>
Do not bloat HTMLTokenizer with a giant inline InputStreamPreprocessor::peek
Reviewed by Ryosuke Niwa.
On x86_64, this removes 40kb from the binary. On my machine it is completely neutral on performance.
* html/parser/InputStreamPreprocessor.h:
2013-05-14 Carlos Garcia Campos <>
Reviewed by Darin Adler.
* Modules/webdatabase/DatabaseManager.cpp:
* dom/ContainerNode.cpp:
* dom/VisitedLinkState.cpp:
* loader/CookieJar.cpp:
* loader/FrameLoader.cpp:
* loader/HistoryController.cpp:
* loader/LoaderStrategy.cpp:
* loader/LoaderStrategy.h:
* loader/ResourceLoadScheduler.cpp:
* loader/ResourceLoader.cpp:
* loader/cache/CachedResource.cpp:
* loader/cache/CachedResourceLoader.cpp:
* platform/CookiesStrategy.h:
* platform/DatabaseStrategy.cpp:
* platform/DatabaseStrategy.h:
* platform/PasteboardStrategy.h:
* platform/PlatformStrategies.cpp:
* platform/PlatformStrategies.h:
* platform/VisitedLinkStrategy.h:
* platform/mac/
* platform/network/BlobRegistry.cpp:
* plugins/PluginData.cpp:
* plugins/PluginStrategy.h:
* storage/StorageNamespace.cpp:
* storage/StorageStrategy.cpp:
* storage/StorageStrategy.h:
* workers/SharedWorkerStrategy.h:
2013-05-15 Dávid Szabolcs <>
[curl] Add support for HttpOnly cookies
Reviewed by Brent Fulgham.
* platform/network/curl/CookieJarCurl.cpp:
2013-05-14 Carlos Garcia Campos <>
REGRESSION(r147548): Broken comboboxes
Reviewed by Gustavo Noronha Silva.
The problem is that r147548 made the popup to be closed when a
blur event is received. Right before showing the popup the input
element is focused, so that after the the popup is shown the focus
event is emitted and the event handler is called again hiding the
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::menuListDefaultEventHandler): Check
element has lost the focus before closing the popup menu.
2013-05-14 Darin Adler <>
[Mac] Move setDragImage from ClipboardMac to PasteboardMac
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::~Clipboard): Stop loading the drag image when
the clipboard object is deallocated. It would be better if there was
a more-well-defined time to stop the load.
(WebCore::Clipboard::setDragImage): Added. Sets up a drag image
based on a CachedImage. This tells the image loader to load the image
and updates the drag image when the image arrives. Copied from the
code in ClipboardMac, but refactored to use a separate loader object.
(WebCore::Clipboard::setDragImageElement): Added. Sets up a drag image
based on an element.
(WebCore::Clipboard::updateDragImage): Added. Common code to update
drag image when a new one is set or when a drag image load completes.
(WebCore::DragImageLoader::create): Added.
(WebCore::DragImageLoader::DragImageLoader): Ditto.
(WebCore::DragImageLoader::startLoading): Ditto.
(WebCore::DragImageLoader::stopLoading): Ditto.
(WebCore::DragImageLoader::imageChanged): Ditto.
* dom/Clipboard.h: Made setDragImage and setDragImageElement non-virtual
for non-legacy. Added updateDragImage and m_dragImageLoader.
* platform/Pasteboard.h: Added setDragImage function.
* platform/mac/ClipboardMac.h: Removed CachedImageClient as a base class
for ClipboardMac. Removed setDragImage and setDragImageElement.
* platform/mac/ Removed setDragImage and setDragImageElement.
(WebCore::ClipboardMac::~ClipboardMac): Removed code to remove self as
client loading the drag image. This is now in the Clipboard base class.
* platform/mac/
(WebCore::Pasteboard::setDragImage): Added. Contains code moved here
from ClipboardMac.
2013-05-14 Ryosuke Niwa <>
Use ElementTraversal in SelectorDataList::execute
Reviewed by Darin Adler.
Use ElementTraversal::firstWithin and ElementTraversal::next to simplify the code.
* dom/SelectorQuery.cpp:
2013-05-14 Tim Horton <>
[wk2] Not updating tiled backing coverage when main frame scrollability changes
Reviewed by Simon Fraser.
Export FrameView::adjustTiledBackingCoverage.
2013-05-14 Alexey Proskuryakov <>
[Mac] Add a testing shim for secure event input functions
Reviewed by Mark Rowe.
Added a new target with a dynamic library that interposes secure event input functions.
We need this to avoid interfering with user session state.
* Configurations/WebCoreTestShim.xcconfig: Added.
* WebCore.xcodeproj/project.pbxproj:
* platform/mac/DynamicLinkerInterposing.h: Moved from Source/WebKit2/Shared/mac/DyldInterpose.h.
* testing/WebCoreTestShimLibrary.cpp: Added.
2013-05-14 Benjamin Poulain <>
Get rid of Gradient::getColor()
Reviewed by Andreas Kling.
This code is now useless, remove it.
* html/canvas/CanvasGradient.h:
* platform/graphics/Gradient.cpp:
* platform/graphics/Gradient.h:
2013-05-14 David Hyatt <>
REGRESSION: has overlapping elements and is broken by flex box changes.
The new flexbox spec says that flex-basis omitted in the flex shorthand defaults to
0 when flex-grow/shrink are set. This has undesirable behavior when objects don't
end up flexing at all, and it's something the spec is going to eventually address.
For now, though, to fix the regression, I'm making a targeted "hack" to deliberately
violate the spec, but to do so as minimally as possible. This hack detects if there
is infinite available space on a line, and if so, it treats a flex-basis of 0 like
This means that when height is constrained and set by a container, flexing will do
the right thing. Basically any time you end up actually flexing, the spec behavior
should happen. If you're just laying out at intrinsic sizes, though, and no flexing
is going to occur, we ignore a flex-basis of 0 and just use the child's normal size.
Note that widths don't have to be patched because the preferred logical widths
algorithm is broken right now and not checking flex-basis. If it did, we'd have seen
the same bug in the width direction.
This width issue is covered by
Reviewed by Simon Fraser.
Added fast/flexbox/auto-height-with-flex.html
* rendering/RenderFlexibleBox.cpp:
Make sure we return LayoutUnit::max when you have infinite free space and not
max - borderPadding.
Only clear override size if it was set. Only mark for relayout if we did
an override size clear (i.e., if we were actually flexed). Add a new parameter,
hasInfiniteLineLength, that - if set - causes us to special case flex-basis:0
and treat it like flex-basis:auto.
Define hasInfiniteLineLength and pass it to all the functions that need it.
Remove the code that marks for layout and does a layout so early. This code
is moving (and changing) to preferredMainAxisContentExtentForChild.
Computes whether or not we have infinite line length now.
Propagate hasInfiniteLineLength through to preferredMainAxisContentExtentForChild.
* rendering/RenderFlexibleBox.h:
Add hasInfiniteLineLength parameter to a bunch of functions.
2013-05-14 Andreas Kling <>
Assertion failure in GlyphPage::setGlyphDataForIndex: (!glyph || fontData == m_fontDataForAllGlyphs)
Reviewed by Dan Bernstein.
If we're filling a full GlyphPage with a SimpleFontData that is actually a composite font reference,
we need to make sure we have per-glyph font data pointers, since it may end up using them.
Added GlyphPage::mayUseMixedFontDataWhenFilling() which can be implemented by the platform to let
GlyphPageTreeNode know that it should allocate a full-sized GlyphPage for mixed font data pointers
in case the font is a composite font reference, or if there are CJK ideographs in the text.
This code can be made smarter, but that's outside the scope of this change.
Fixes heavy asserting on bots running unreleased software.
* platform/graphics/GlyphPage.h:
* platform/graphics/GlyphPageTreeNode.cpp:
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
2013-05-14 Bem Jones-Bey <>
Heap-use-after-free in WebCore::RenderBox::exclusionShapeOutsideInfo
Reviewed by David Hyatt.
When a portion of the render tree is being detached, anonymous blocks
will be combined as their children are deleted. In this process, the
anonymous block later in the tree is merged into the one preceeding it.
It can happen that the later block contains floats that the previous
block did not contain, and thus are not in the floating objects list for
the new block. This can result in the new block containing floats that
are not in it's floating objects list, but are in the floating objects
lists of siblings and parents. This can cause problems when the float
itself is deleted, since the deletion code assumes that if a float is not
in it's containing block's floating objects list, it isn't in any
floating objects list, causing dangling pointers in the floating objects
lists of the siblings and parents. In order to preserve this condition
(removing it has serious performance implications), we need to copy the
floating objects from the old block to the new block. The float's
metrics will likely all be wrong, but since the new block is already
marked for layout, this will get fixed before anything gets displayed.
Test: fast/block/float/float-append-child-crash.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo): Copy
floating objects list in addition to children.
(WebCore::RenderBlock::FloatingObject::clone): Added.
(WebCore::RenderBlock::removeChild): Use new method to copy children.
* rendering/RenderBlock.h:
(RenderBlock): Add method.
2013-05-14 Commit Queue <>
Unreviewed, rolling out r150023.
Causes table layout issues (Bug 116118) and crashes on
buildbot waterfall pages. (Requested by ddkilzer on #webkit).
* rendering/RenderTableSection.cpp:
* rendering/RenderTableSection.h:
2013-05-14 Antoine Quint <>
Snapshotted plug-ins shadow tree should reset style inheritance
Reset the styles such that only injected user-agent stylesheets affect
the rendering of snapshotted plug-ins' shadow content.
Reviewed by Darin Adler.
* html/HTMLPlugInImageElement.cpp:
2013-05-14 Mihnea Ovidenie <>
[CSSRegions] Improve hit testing for empty regions
Reviewed by David Hyatt.
As a better follow up after WebKit bug,
we can improve the code by not doing hit testing on the render flow thread object when
we are trying to hit test the render flow thread background. In this case, we should just bail out.
No new tests, covered by existing regions tests.
* rendering/RenderFlowThread.cpp:
* rendering/RenderFlowThread.h:
2013-05-14 Carlos Garcia Campos <>
[BlackBerry] Handle network errors when starting a new job
Reviewed by Rob Buis.
Make startJob() return a network status that can be used by the
caller to create a network error.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::initialize): createNetworkStream() should
always return a valid pointer so use an ASSERT instead of an early
return to make sure we have a valid stream.
(WebCore::NetworkJob::startNewJobWithRequest): Only return true if
the network job was started successfully.
* platform/network/blackberry/NetworkJob.h:
(NetworkJob): Make initialize method void instead of bool since it
can't fail.
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob): Return a network error or
* platform/network/blackberry/NetworkManager.h:
* platform/network/blackberry/ResourceHandleBlackBerry.cpp:
(WebCore::ResourceHandle::start): Return true if job was started
Check return value of startJob and fill the ResourceError with the
network status returned to finish the load.
2013-05-14 Antoine Quint <>
[Mac] captions menu is not positioned correctly in full-screen
Update the positioning properties of the captions menu in full-screen
following the fix for
Reviewed by Darin Adler.
* css/fullscreenQuickTime.css:
Add 50px to the bottom position since we're now positioned relative to the
media element, and use a calc() command to be right-aligned to the captions
icon in the media controller. The max-width and max-height properties follow
the same technique used for the non-full-screen mode.
2013-05-14 Zan Dobersek <>
[GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into libPlatform
Reviewed by Gustavo Noronha Silva.
No new tests - no new functionality.
* Add platform_cppflags to the list of CPPFLAGS for libWebCoreSVG, libWebCore,
libWebCorePlatform, libWebCoreGtk. Remove generation rules for ColorData.cpp and WebKitFontFamilyNames.(cpp|h).
* Include the ColorData.cpp and WebKitFontFamilyNames.(cpp|h) build targers under
* bindings/gobject/ Add platform_cppflags to the list of libWebCoreDOM CPPFLAGS.
2013-05-14 Zan Dobersek <>
[GTK] libPlatform, libPlatformGtk must depend on the related GNUmakefiles
Reviewed by Martin Robinson.
No new tests - no new functionality.
* Fix typos in two libraries' names - Webcore -> WebCore.
2013-05-13 Ryosuke Niwa <>
Removing Attr can delete a wrong Attribute in ElementData
Reviewed by Benjamin Poulain.
after simplifying and renaming functions to be more WebKit style.
The XML parser can produce elements with attributes whose names have
distinct prefixes, but the same expanded name. When one of these
attributes is put up for adoption, it may be its similarly named
sibling that is removed from its owner element. As a result the
original owner hangs onto the adopted attribute, despite the fact that
it is now in a different document. Sometimes it's just hard to let go.
Test: fast/dom/adopt-attribute-crash.svg
* dom/Element.cpp:
* dom/Element.h:
2013-05-14 Antti Koivisto <>
Remove ::-webkit-distributed()
Reviewed by Andreas Kling.
This experimental Shadow DOM selector code is unused and has no owner.
* css/
* css/CSSParser.cpp:
* css/CSSParser.h:
* css/CSSParserValues.cpp:
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
* css/CSSSelector.h:
* css/CSSSelectorList.cpp:
* css/CSSSelectorList.h:
* css/DocumentRuleSets.cpp:
* css/DocumentRuleSets.h:
* css/ElementRuleCollector.cpp:
* css/ElementRuleCollector.h:
* css/RuleSet.cpp:
* css/SelectorChecker.cpp:
* css/SelectorFilter.cpp:
* html/shadow/InsertionPoint.cpp:
* html/shadow/InsertionPoint.h:
2013-05-14 Daker Fernandes Pinheiro <>
Remove RenderTheme::supportsCalendarPicker
Reviewed by Benjamin Poulain.
No new tests needed because it doesn't affect behaviour.
This method was never overrided by any platform
and always leaded to the same behaviour.
The code which depended on it was also removed.
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
* html/BaseMultipleFieldsDateAndTimeInputType.h:
* page/ChromeClient.h:
* rendering/RenderTheme.h:
2013-04-30 Balazs Kelemen <>
[GStreamer] cannot seek after video finished
Reviewed by Philippe Normand.
Test: media/video-seek-after-end.html
Reland without wrong assertion. If seek is called after didEnd the pipeline
state will not be in GST_STATE_NULL yet but it is not a problem because we handle that.
Rework the seeking logic to be able to seek after reseting the pipeline.
In addition to solve the actual problem this patch supposed to make seeking
more robust and correct.
The previous implementation tried to hide the complexity of asynchronous operations
on the pipeline. It did not handle the GST_MESSAGE_ASYNC_DONE message from the bus
but instead reported the seek as finished when it saw an asynchronous pending state
(GST_STATE_CHANGE_ASYNC) which could happen way before the seek is really done.
Now we pay attention to the GST_MESSAGE_ASYNC_DONE message to track the status of seeks.
Seeks are not the only operations executed asynchronously, changing the pipeling state is
similar. It means a seek can overlap with onother ongoing asynchronous operation.
This change address this by introducing an invariant for seeks, which is that we only request
a seek if there are no other ongoing asynchronous operations and the pipeline state is either
paused or playing (which is recommended anyway according to GStreamer's documentation).
This way we can be sure that the time when we get the next GST_MESSAGE_ASYNC_DONE message the
seek has been completed.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::toGstClockTime): Factored time conversation into a helper.
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition): The position might not be available
if the pipeline still has a pending state. As a workaround, if we are right after a seek we can
use the seek time. Avoiding this situation would be possible by not allowing any asynchronous
operation to overlap. I believe it would add a lot more complexity so I decided to rather introduce
this workaround. Otherwise those overlapping operations are handled fine by GStreamer.
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Do not reset internal state variables.
This function called when there is an intent to restart playback but it does not actually restart it.
(WebCore::MediaPlayerPrivateGStreamer::currentTime): Just removed a staling newline.
(WebCore::MediaPlayerPrivateGStreamer::seek): Take a look to the pipeline state and act upon that.
If there is an ongoing asynchronous operation make the seek pending, otherwise do it now.
Now we handle overlapping seeks as well because I saw that it can happen in some tests.
Added an early return for live streams as it doesn't makes sense to try seeking in them.
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Handle GST_MESSAGE_ASYNC_DONE and some refactoring.
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Only handle seeks in the pending case, the rest is
now handled in asyncStateChangeDone.
(WebCore::MediaPlayerPrivateGStreamer::cacheDuration): Do not reset the m_mediaDurationKnown if the pipeline
has an asynchronous pending state because it would fail. It does actually happen when we get a duration message
after restarting the pipeline and it would result in restarting playback from the start. It seems to be a bug
in GStreamer that it sends the duration message too early. Also sanitized this function by merging redundant branches.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2013-05-14 Zalan Bujtas <>
Ellipsis text is placed to wrong position, when the truncated text is fully cut off in RTL direction.
Reviewed by Darin Adler.
Take text direction into account to calculate ellipsis position in case of
full truncation.
Test: fast/css/text-overflow-ellipsis-full-truncate-rtl.html
* rendering/InlineTextBox.cpp:
2013-05-14 Carlos Garcia Campos <>
[BlackBerry] Implement platform strategies
Reviewed by Rob Buis.
This is just a refactoring, covered by existing tests.
* CMakeLists.txt: Move PlatformStrategies.cpp from platform
specific makefiles to the global one now that all platforms using
cmake implement platform strategies.
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformWinCE.cmake:
* loader/CookieJar.cpp: Remove the preprocessor error that is not
needed anymore.
* loader/blackberry/CookieJarBlackBerry.cpp: Removed.
* platform/network/blackberry/CookieJarBlackBerry.cpp: Added.
* plugins/blackberry/PluginDataBlackBerry.cpp: Removed.
2013-05-14 Jocelyn Turcotte <>
[Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
Reviewed by Simon Hausmann.
Reproduced with arora which does destroy the QNetworkAccessManager in some situations.
The problem is that PingLoader can still be pending meanwhile, holding a ResourceHandle
with a dangling pointer to a QNetworkReply destroyed with the QNetworkAccessManager.
* platform/network/qt/QNetworkReplyHandler.cpp:
Set the parent to 0 like we did before the introduction of QNetworkReplyWrapper.
2013-05-13 Eric Carlson <>
[Mac] update in-band caption attributes
Reviewed by Dean Jackson.
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::updateCueFromCueData): Copy highlight color.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): "highlight" color sets the cue
background, "background" color sets the cue container background.
* html/track/TextTrackCueGeneric.h:
* platform/graphics/InbandTextTrackPrivateClient.h:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Process "highlight" color.
2013-05-13 David Kilzer <>
BUILD FIX (r150049): Fix RetainPtr<> type in
* platform/ios/
(WebCore::Pasteboard::writeImage): Use RetainPtr<CFStringRef>
instead of RetainPtr<NSString>.
2013-05-13 Benjamin Poulain <>
Remove platform/graphic's Generator
Reviewed by Darin Adler.
The Generator no longer abstract anything useful, its only
implementation is Gradient.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/GeneratedImage.h:
* platform/graphics/Generator.h: Removed.
* platform/graphics/GeneratorGeneratedImage.cpp:
* platform/graphics/GeneratorGeneratedImage.h:
* platform/graphics/Gradient.h:
* platform/graphics/GraphicsContext.cpp:
* platform/graphics/GraphicsContext.h:
2013-05-13 David Kilzer <>
Upstream iOS Clipboard and Pasteboard changes
Reviewed by Darin Adler.
* WebCore.xcodeproj/project.pbxproj:
* dom/Clipboard.h:
* platform/Pasteboard.h:
* platform/ios/ClipboardIOS.h: Added.
* platform/ios/ Added.
* platform/ios/ Added.
2013-05-13 Huang Dongsung <>
[Mac] Use pageScaleFactor * deviceScaleFactor in requiresTiledLayer() and computePixelAlignment() of GraphicsLayerCA.
Reviewed by Darin Adler.
Currently GraphicsLayerCA uses pageScaleFactor in requiresTiledLayer() and
computePixelAlignment(), but we must use pageScaleFactor * deviceScaleFactor in
It is because:
1. requiresTiledLayer() uses the scale to compute an actual layer size in the device
pixel unit.
2. computePixelAlignment() uses the scale to compute an aligned layer position
in the device pixel unit.
No new tests. We can not test about requiresTiledLayer() because it depends on
gpu. computePixelAlignment() is correct now because fortunately Mac uses
only 2 (for retina display) as a deviceScaleFactor.
* platform/graphics/ca/GraphicsLayerCA.cpp:
2013-05-13 Christophe Dumez <>
Rename BarInfo to BarProp and remove [NoInterfaceObject]
Reviewed by Andreas Kling.
Rename BarInfo to BarProp and remove [NoInterfaceObject] extended attribute from
the IDL interface to match the specification:
The new behavior also matches Firefox and Blink.
No new tests, covered by LayoutTests/fast/js/global-constructors-attributes.html.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* Target.pri:
* WebCore.order:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/
* page/BarProp.cpp: Renamed from Source/WebCore/page/BarInfo.cpp.
* page/BarProp.h: Renamed from Source/WebCore/page/BarInfo.h.
* page/BarProp.idl: Renamed from Source/WebCore/page/BarInfo.idl.
* page/DOMWindow.cpp:
* page/DOMWindow.h:
* page/DOMWindow.idl:
2013-05-13 Anders Carlsson <>
Remove ChromeClient::willPopupMenu
Reviewed by Andreas Kling.
Remove ChromeClient::willPopupMenu.
* page/ChromeClient.h:
2013-05-13 Beth Dakin <>
Headers and footers should be pinned to the left edge of the window when scrolling
-and corresponding-
Reviewed by Simon Fraser.
The scrolling thread will need to know about the header and footer layers in order
the implement this custom scrolling behavior.
These getters will fetch the header or footer layer from the FrameView as
* page/scrolling/ScrollingCoordinator.cpp:
* page/scrolling/ScrollingCoordinator.h:
When we’re scrolling on the main thread, adjust the position of the header and
footer layers here.
ScrollingStateScrollingNode now stores GraphicsLayers and PlatformLayers for the
header and footer, just like it already does for the counterScrollingLayer.
* page/scrolling/ScrollingStateScrollingNode.cpp:
* page/scrolling/ScrollingStateScrollingNode.h:
Setters for the new layers.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/
These setters and getters mirror the existing one for counterScrollingLayer.
* page/scrolling/mac/
And the ScrollingTree will store CALayers for the header and footer.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
* page/scrolling/mac/
This is where the magic happens when we are scrolling on the scrolling thread.
Adjust the horizontal position the behave like a fixed object, but keep the
vertical position what it was when layer was created.
RenderLayerCompositor must now provide getters for the header and footer.
* rendering/RenderLayerCompositor.h:
* rendering/RenderLayerCompositor.cpp:
Set the anchor point for when we adjust the position later on. Also call
frameViewRootLayerDidChange() to get the new layers picked up and sent to the
scrolling tree.
2013-05-12 Timothy Hatcher <>
Add support for updating the Web Inspector toolbar height.
Reviewed by Joseph Pecoraro and Benjamin Poulain.
* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendHost.cpp:
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* testing/Internals.cpp:
2013-05-13 Dean Jackson <>
toDataURL can return an empty image in some cases
Reviewed by Darin Adler.
In some accelerated rendering cases, calling toDataURL on
an off-screen canvas produced an empty image. The solution
was to force a CGContextFlush before extracting the data
for image generation.
While here, I collected the flushing code from other methods
into a single place. Also we were getting into a situation where
we called flush two times in a row.
Test: fast/canvas/toDataURL-not-empty.html
* platform/graphics/ImageBuffer.h:
(ImageBuffer): Define two new methods flushContext and flushContextIfNecessary.
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::context): Call flushContextIfNecessary.
(WebCore::ImageBuffer::flushContextIfNecessary): Moved the 10.7 code in here.
(WebCore::ImageBuffer::flushContext): Calls CGContextFlush.
(WebCore::ImageBuffer::getUnmultipliedImageData): Call new helper.
(WebCore::ImageBuffer::getPremultipliedImageData): Call new helper.
(WebCore::ImageBuffer::toDataURL): Flush the CG context.
2013-05-13 David Hyatt <>
Regressions in flexbox layout caused by the flexing optimizations.
Reviewed by Beth Dakin.
Roll out the flex-related changes from r149597 so that the layout
algorithm goes back to the way it was. Leave the repainting optimizations
in place though.
* rendering/RenderDeprecatedFlexibleBox.cpp:
2013-05-13 Philippe Normand <>
Unreviewed, rolling out r150014.
Broke video playback on WK2 and some webgl tests
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2013-05-13 Christophe Dumez <>
Unreviewed, rolling out r150022.
Causes assertions in media tests
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2013-05-13 Bem Jones-Bey <>
Floats should not overhang from flex items
Reviewed by David Hyatt.
Allowing floats to overhand from flex items is not only against the
spec, it causes bad bugs. Fix this by having flex items properly avoid
Test: fast/block/float/float-not-removed-crash2.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::avoidsFloats): Add flex items to avoid floats.
* rendering/RenderBox.h:
(WebCore::RenderBox::isFlexItemIncludingDeprecated): Determine if the current box is a
flex item or deprecated flex item.
2013-05-13 Zoltan Horvath <>
[CSS Regions][CSS Exclusions] Shape-inside on regions should respect region borders and paddings
Reviewed by David Hyatt.
I refactored the computation logic of shape-inside on regions by removing access to RenderFlowThread from ExclusionShapeInfo's logicalTopOffset
function, this means all the logic is now existing in RenderBlockLineLayout.cpp. By modifying the logicalTopOffset it turned out that the borders
and padding hadn't worked correctly, since borders and paddings were counted twice in the shape-inside's computation. This patch adds the necessary
modifications to let it respect the borders and padding in the correct way. I created 2 new helper functions to prevent increasing the code size of
the layoutRunsAndFloatsInRange function.
I introduced 7 new tests to test for testing the correct behavior.
Tests: fast/regions/shape-inside/shape-inside-on-first-region-block-content.html
* rendering/ExclusionShapeInfo.cpp:
(WebCore): Remove FlowThread logic from logicalTopOffset move definition to header.
* rendering/ExclusionShapeInfo.h:
(WebCore::ExclusionShapeInfo::logicalTopOffset): Moved from cpp.
(WebCore::ExclusionShapeInfo::logicalLeftOffset): Add condition for RenderRegions.
* rendering/RenderBlock.h:
(RenderBlock): Add definition to the new helper members.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutExclusionShapeInsideInfo): Modified the flow thread case to return the appropriate region.
(WebCore::RenderBlock::updateLineBoundariesForExclusions): Added new helper function. Modify the shape-inside on regions
line boundaries and position computation logic.
(WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): Added new helper function which handles the flow thread case also.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Modified the code to use the helper functions.
2013-05-13 Bear Travis <>
[css exclusions] Enable CSS Exclusions by default when CSS_EXCLUSIONS is set
Reviewed by Dean Jackson.
Change the RuntimeEnabledFeatures::isCSSExclusionsEnabled boolean to default
to true. CSS Exclusions can still be enabled / disabled in platforms by
setting the CSS_EXCLUSIONS compile flag in one of the FeatureDefine files.
Test: fast/exclusions/css-exclusions-enabled.html
* bindings/generic/RuntimeEnabledFeatures.cpp:
2013-05-13 Suchit Agrawal <>
Cell heights are disproportional when a row-spanning cell contains a block element that determines the height of the rows
Reviewed by David Hyatt.
Cells heights are not proper when rowspan cell have its own height and rowspan height
is more than the height of the rows present in rowspan.
After calculating logical height of the rows in the table, we are recalculating the height
of the rows present in rowspan. Based on the ratio of row's logical height, we are
distributing rowspan cell height in rows.
Test: fast/table/table-rowspan-height-distribution-in-rows.html
* rendering/RenderTableSection.cpp:
Update the logical height of the rows based on rowspan cell height.
It calculates logical height of the rows in the table.
Added new private API to distribute rowSpan cell height in rows.
* rendering/RenderTableSection.h:
2013-04-30 Balazs Kelemen <>
[GStreamer] cannot seek after video finished
Reviewed by Philippe Normand.
Test: media/video-seek-after-end.html
Rework the seeking logic to be able to seek after reseting the pipeline.
In addition to solve the actual problem this patch supposed to make seeking
more robust and correct.
The previous implementation tried to hide the complexity of asynchronous operations
on the pipeline. It did not handle the GST_MESSAGE_ASYNC_DONE message from the bus
but instead reported the seek as finished when it saw an asynchronous pending state
(GST_STATE_CHANGE_ASYNC) which could happen way before the seek is really done.
Now we pay attention to the GST_MESSAGE_ASYNC_DONE message to track the status of seeks.
Seeks are not the only operations executed asynchronously, changing the pipeling state is
similar. It means a seek can overlap with onother ongoing asynchronous operation.
This change address this by introducing an invariant for seeks, which is that we only request
a seek if there are no other ongoing asynchronous operations and the pipeline state is either
paused or playing (which is recommended anyway according to GStreamer's documentation).
This way we can be sure that the time when we get the next GST_MESSAGE_ASYNC_DONE message the
seek has been completed.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::toGstClockTime): Factored time conversation into a helper.
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition): The position might not be available
if the pipeline still has a pending state. As a workaround, if we are right after a seek we can
use the seek time. Avoiding this situation would be possible by not allowing any asynchronous
operation to overlap. I believe it would add a lot more complexity so I decided to rather introduce
this workaround. Otherwise those overlapping operations are handled fine by GStreamer.
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Do not reset internal state variables.
This function called when there is an intent to restart playback but it does not actually restart it.
(WebCore::MediaPlayerPrivateGStreamer::currentTime): Just removed a staling newline.
(WebCore::MediaPlayerPrivateGStreamer::seek): Take a look to the pipeline state and act upon that.
If there is an ongoing asynchronous operation make the seek pending, otherwise do it now.
Now we handle overlapping seeks as well because I saw that it can happen in some tests.
Added an early return for live streams as it doesn't makes sense to try seeking in them.
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Handle GST_MESSAGE_ASYNC_DONE and some refactoring.
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Only handle seeks in the pending case, the rest is
now handled in asyncStateChangeDone.
(WebCore::MediaPlayerPrivateGStreamer::cacheDuration): Do not reset the m_mediaDurationKnown if the pipeline
has an asynchronous pending state because it would fail. It does actually happen when we get a duration message
after restarting the pipeline and it would result in restarting playback from the start. It seems to be a bug
in GStreamer that it sends the duration message too early. Also sanitized this function by merging redundant branches.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2013-05-12 Darin Adler <>
[Mac] Move writeRange/PlainText/URL from ClipboardMac to PasteboardMac
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::writeRange): Added. Moved from ClipboardMac,
but added some FIXMEs.
(WebCore::Clipboard::writePlainText): Ditto.
(WebCore::Clipboard::writeURL): Ditto.
* dom/Clipboard.h: Made writeURL, writeRange, and writePlainText
non-virtual in non-legacy clipboard implementations.
* platform/mac/ClipboardMac.h: Removed writeRange, writeURL, and
* platform/mac/ Ditto.
2013-05-13 Noam Rosenthal <>
[CoordGfx] requestAnimationFrame performance issues
Reviewed by Jocelyn Turcotte.
Removed current requestAnimationFrame logic from CoordinatedGraphics. The new logic
is entirely in WebKit2 CoordinatedLayerTreeHost.
Covered by existing tests in fast/animations.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2013-05-13 Víctor Manuel Jáquez Leal <>
[texmap][GStreamer] Composited Video support
Reviewed by Philippe Normand.
Enable the video accelerated compositing using the WebKit's
This patch does not use hardware accelerated video decoding. It
provides a generic path for system memory buffers.
No new tests, already covered by existing tests.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): update the
texture content with the new received video buffer.
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): choose to
use the accelerated compositing or the normal code path
(WebCore::MediaPlayerPrivateGStreamerBase::paint): if accelerated
compositing is used this method is halted.
(WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper): get
a texture from the pool and draws it if it is already available.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
(WebCore::MediaPlayerPrivateGStreamerBase::platformLayer): returns itself
returns true
2013-05-13 Andreas Kling <>
Document: Use a DeferrableOneShotTimer to throw out StyleResolver when unused.
Reviewed by Anders Carlsson.
Nothing exciting here, just replacing a rickety-looking punting mechanism with a proper
DeferrableOneShotTimer. Note that the timeout changes from 60 to 30 seconds because DOST
works by punting a full interval on next timeout.
* dom/Document.cpp:
* dom/Document.h:
2013-05-13 Andreas Kling <>
REGRESSION(r149287): FoldingText only shows me half of my text.
Reviewed by Antti Koivisto.
Check if the FrameView geometry changed post-layout, and send a resize event if needed.
This brings us closer to the original resize event behavior, with the exception that
setFrameRect() still fires an event right away if possible. This means we are still
guarded from FOUC's but frames that layout via [WebHTMLView layoutToMinimumPageWidth]
also get resize events like they used to.
No new tests, because I don't know how to test this.
* page/FrameView.h:
* page/FrameView.cpp:
Factor out the resize event logic from setFrameRect() so we can call it from both
there and performPostLayoutTasks(). sendResizeEventIfNeeded() only sends an event
if view geometry or zoom factor has changed since last time it was called.
2013-05-13 Antti Koivisto <>
Remove unneeded counters from ScopeContentDistribution.
Reviewed by Andreas Kling.
They don't do much.
* dom/ShadowRoot.cpp:
* dom/ShadowRoot.h:
No need for registration code anymore.
* html/shadow/ContentDistributor.cpp:
Default m_insertionPointListIsValid to true to avoid crawling when there are no InsertionPoints.
* html/shadow/ContentDistributor.h:
Remove distributeNodeChildrenTo, it was only used by the older/younger shadow root code.
* testing/Internals.cpp:
* testing/Internals.h:
* testing/Internals.idl:
2013-05-13 Seokju Kwon <>
Web Inspector: Remove unused references from projects in Visual Studio
Reviewed by Csaba Osztrogonác.
nativeMemoryProfiler.css and NativeMemorySnapshotView.js were removed in r149807.
No new tests, no behavior change.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-05-13 Zalan Bujtas <>
WebProcess consuming very high CPU on
Reviewed by Andreas Kling.
Turn off window.performance and Some JS frameworks expect
additional Web Timing APIs, when is available.
* Configurations/FeatureDefines.xcconfig:
* dom/
* page/DOMWindow.cpp:
* page/DOMWindow.h:
* page/DOMWindow.idl:
* page/Performance.cpp:
* page/Performance.h:
* page/Performance.idl:
2013-05-12 Eric Carlson <>
REGRESSION (r149749): Video becomes invisible when it starts playing at
Reviewed by Dean Jackson.
Test: media/video-remove-insert-repaints.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::insertedInto): Set m_inActiveDocument when inserted into a document.
(WebCore::HTMLMediaElement::removedFrom): Fix logging.
2013-05-12 David Kilzer <>
Move sudden termination symbols to the Mac-only section
* Move the sudden termination symbols to the
!PLATFORM(IOS) section for reals this time.
2013-05-12 Darin Adler <>
Fix Mac build.
* platform/mac/ Add back include of ClipboardMac.h
that was removed by accident a couple of patches back.
2013-05-12 Darin Adler <>
[Mac] Moved files function from ClipboardMac to PasteboardMac
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::files): Added. Moved the DOM-depdendent and
platform-independent part of the files function in ClipboardMac here.
* dom/Clipboard.h: Made files function non-virtual in non-legacy case.
* platform/Pasteboard.h: Removed static member function
absoluteURLsFromPasteboardFilenames since it can now be private to
PasteboardMac. Added member function readFilenames.
* platform/mac/ClipboardMac.h: Removed function member files and also
now-unused data member m_clipboardContents.
* platform/mac/ Removed files function.
(WebCore::ClipboardMac::ClipboardMac): Removed code to initialize
* platform/mac/
(WebCore::absoluteURLsFromPasteboardFilenames): Changed from a static
member function to a file-local function.
(WebCore::absoluteURLsFromPasteboard): Changed to call the function
above in its new location.
(WebCore::Pasteboard::readFilenames): Added. Code from ClipboardMac,
minus the DOM-specific parts. Added a FIXME about the peculiar round
trip through NSURL this code takes.
2013-05-12 Anders Carlsson <>
Fix WebKit2 build.
Put WebCore::disableSuddenTermination and WebCore::enableSuddenTermination symbols in the right section.
2013-05-12 Darin Adler <>
[Mac] Move types function from ClipboardMac to PasteboardMac
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::types): Added. Calls through to Pasteboard
after doing checks needed at this level.
* dom/Clipboard.h: Made types function non-virtual in non-legacy case,
and removed non-helpful comment.
* platform/Pasteboard.h: Updated includes and comments at the top of
the file a bit. Removed static member function addHTMLClipboardTypesForCocoaType,
since it can now be private to PasteboardMac. Added member function types.
* platform/mac/ClipboardMac.h: Removed types function.
* platform/mac/ Ditto.
* platform/mac/
(WebCore::addHTMLClipboardTypesForCocoaType): Made this a file-local
function instead of a static member function.
(WebCore::Pasteboard::types): Added. Moved from ClipboardMac.
2013-05-12 Darin Adler <>
[Mac] Move setData from ClipboardMac to PasteboardMac
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::setData): Added. Calls through to Pasteboard
after doing checks needed at this level.
* dom/Clipboard.h: Made setData non-virtual in non-legacy case.
* platform/Pasteboard.h: Updated includes and forward declarations.
Removed static member function cocoaTypeFromHTMLClipboardType, since
it can now be private to PasteboardMac. Added static member function
addHTMLClipboardTypesForCocoaType, which is shared between the
ClipboardMac and PasteboardMac files for now. Added writeString.
* platform/mac/ClipboardMac.h: Removed setData.
* platform/mac/ Removed utiTypeFromCocoaType,
addHTMLClipboardTypesForCocoaType, and setData.
(WebCore::ClipboardMac::types): Call addHTMLClipboardTypesForCocoaType
as a Pasteboard static member function, for now.
* platform/mac/
(WebCore::cocoaTypeFromHTMLClipboardType): Added. Moved from ClipboardMac.
(WebCore::Pasteboard::readString): Changed to call
cocoaTypeFromHTMLClipboardType as a file-local function, not a member
function (in fact, we didn't need to repeat the class name before, either,
so this is just removing something we didn't need).
(WebCore::utiTypeFromCocoaType): Added. Moved from ClipboardMac.
(WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType): Ditto.
(WebCore::Pasteboard::writeString): Ditto.
2013-05-12 Darin Adler <>
[Mac] Move getData from ClipboardMac to PasteboardMac
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::Clipboard): Added a new boolean argument, forFileDrag,
to the constructor. Maybe we can find a better way to do this once we move
all the platforms over, but this boolean seems a good way to do it for now.
(WebCore::Clipboard::getData): Added. Calls through to Pasteboard after
doing the canReadData check, which is part of DOM rules, not the platform.
Also checks for the file drag case like the old ClipboardMac code did.
* dom/Clipboard.h: Made getData non-virtual in non-legacy case.
* platform/Pasteboard.h: Added a static member function named
absoluteURLsFromPasteboardFilenames, temporary so it can be shared between
ClipboardMac and PasteboardMac. Added a readString public function member,
and a m_changeCount data member. The type of m_changeCount is long since
that can always hold an NSInteger but yet is a type we can compile without
including the header file that defines NSInteger.
* platform/mac/ClipboardMac.h: Removed getData.
* platform/mac/ Removed getData.
(WebCore::ClipboardMac::ClipboardMac): Added code to pass in the new
forFileDrag boolean.
(WebCore::ClipboardMac::files): Call absoluteURLsFromPasteboardFilenames
as a static member function in Pasteboard since we moved it there.
* platform/mac/
(WebCore::Pasteboard::Pasteboard): Initialize the change count, so later
pasteboard operations can check it.
(WebCore::Pasteboard::absoluteURLsFromPasteboardFilenames): Added. Moved
here from ClipboardMac.
(WebCore::absoluteURLsFromPasteboard): Ditto.
(WebCore::Pasteboard::readString): Added. Moved here from ClipboardMac.
2013-05-12 Anders Carlsson <>
Stop including UnusedParam.h
Reviewed by Sam Weinig.
UnusedParam.h is empty now so there's no need to include it anymore.
* Modules/encryptedmedia/
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
* Modules/indexeddb/IDBObjectStore.cpp:
* Modules/webdatabase/DatabaseServer.cpp:
* Modules/webdatabase/DatabaseThread.cpp:
* bindings/js/JSDOMWindowBase.cpp:
* bindings/objc/
* css/CSSCursorImageValue.cpp:
* css/DeprecatedStyleBuilder.cpp:
* dom/EventDispatcher.cpp:
* dom/Node.cpp:
* editing/AlternativeTextController.h:
* editing/Editor.cpp:
* html/HTMLPlugInElement.cpp:
* html/canvas/CanvasRenderingContext2D.cpp:
* html/canvas/OESVertexArrayObject.h:
* html/parser/HTMLConstructionSite.cpp:
* html/parser/HTMLTokenizer.cpp:
* html/track/InbandTextTrack.cpp:
* inspector/InspectorCanvasInstrumentation.h:
* inspector/InspectorConsoleInstrumentation.h:
* inspector/InspectorController.cpp:
* inspector/InspectorCounters.h:
* inspector/InspectorDatabaseInstrumentation.h:
* inspector/InspectorInstrumentation.h:
* loader/DocumentThreadableLoader.cpp:
* loader/PingLoader.cpp:
* loader/appcache/ApplicationCacheGroup.cpp:
* loader/cache/CachedResourceLoader.cpp:
* loader/mac/DocumentLoaderMac.cpp:
* page/ChromeClient.h:
* page/Console.cpp:
* page/FrameView.cpp:
* page/PageConsole.cpp:
* page/animation/AnimationController.cpp:
* page/animation/ImplicitAnimation.cpp:
* page/animation/KeyframeAnimation.cpp:
* platform/LocalizedStrings.cpp:
* platform/ScrollAnimator.h:
* platform/ThreadGlobalData.cpp:
* platform/blackberry/AsyncFileSystemBlackBerry.cpp:
* platform/graphics/Font.cpp:
* platform/graphics/GlyphBuffer.h:
* platform/graphics/Gradient.cpp:
* platform/graphics/ShadowBlur.cpp:
* platform/graphics/SimpleFontData.cpp:
* platform/graphics/SimpleFontData.h:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
* platform/graphics/avfoundation/objc/
* platform/graphics/avfoundation/objc/
* platform/graphics/avfoundation/objc/
* platform/graphics/blackberry/GradientBlackBerry.cpp:
* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
* platform/graphics/ca/mac/
* platform/graphics/ca/mac/
* platform/graphics/ca/mac/
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/cg/ImageBufferCG.cpp:
* platform/graphics/cg/ImageSourceCG.cpp:
* platform/graphics/clutter/PlatformClutterAnimation.cpp:
* platform/graphics/filters/ValidatedCustomFilterOperation.cpp:
* platform/graphics/gstreamer/GStreamerVersioning.cpp:
* platform/graphics/mac/
* platform/graphics/mac/
* platform/graphics/mac/
* platform/graphics/mac/
* platform/graphics/mac/
* platform/graphics/mac/
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
* platform/graphics/qt/GraphicsContext3DQt.cpp:
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/wince/ImageBufferWinCE.cpp:
* platform/mac/
* platform/mac/
* platform/mac/
* platform/mac/
* platform/mac/
* platform/mac/
* platform/mac/
* platform/mac/
* platform/mac/
* platform/mac/
* platform/mac/
* platform/network/blackberry/CredentialStorageBlackBerry.cpp:
* platform/network/cf/ResourceErrorCF.cpp:
* platform/network/mac/
* platform/network/mac/
* platform/network/win/ResourceHandleWin.cpp:
* platform/text/TextEncodingDetectorICU.cpp:
* rendering/RenderFlowThread.h:
* rendering/RenderImage.cpp:
* rendering/RenderLayer.cpp:
* rendering/RenderObject.cpp:
* rendering/RenderTreeAsText.cpp:
* rendering/svg/RenderSVGResourceClipper.cpp:
* rendering/svg/RenderSVGResourceFilter.cpp:
* rendering/svg/RenderSVGResourceGradient.cpp:
* rendering/svg/RenderSVGResourceMasker.cpp:
* rendering/svg/SVGRenderSupport.cpp:
* rendering/svg/SVGTextLayoutEngineSpacing.cpp:
* workers/WorkerContext.cpp:
* workers/WorkerScriptLoader.cpp:
* xml/XMLHttpRequest.cpp:
* xml/parser/XMLDocumentParserLibxml2.cpp:
2013-05-12 Darin Adler <>
[Mac] Move clearAllData from ClipboardMac to PasteboardMac
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::clearAllData): Added. Calls through to Pasteboard after
doing the canWriteData check, which is part of DOM rules, not the platform.
* dom/Clipboard.h: Made clearAllData non-virtual in non-legacy case.
* platform/mac/ClipboardMac.h: Removed clearAllData.
* platform/mac/ Ditto.
2013-05-12 Darin Adler <>
[Mac] Move clearData from ClipboardMac to PasteboardMac
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::clearData): Added. Calls through to Pasteboard after
doing the canWriteData check, which is part of DOM rules, not the platform.
* dom/Clipboard.h: Made clearData non-virtual in non-legacy case.
* platform/Pasteboard.h: Added an overload of the clear function that takes
a single type and clears only that type. Also temporarily exported the
cocoaTypeFromHTMLClipboardType function as a static member so it can be used
in both ClipboardMac and PasteboardMac during the transition.
* platform/mac/ClipboardMac.h: Removed clearData.
* platform/mac/ Removed clearData.
(WebCore::ClipboardMac::getData): Changed to call cocoaTypeFromHTMLClipboardType
as a Pasteboard class static member function.
(WebCore::ClipboardMac::setData): Ditto.
* platform/mac/
(WebCore::Pasteboard::cocoaTypeFromHTMLClipboardType): Moved here from
(WebCore::Pasteboard::clear): Added. Moved here from ClipboardMac.
2013-05-12 Darin Adler <>
[Mac] Move hasData from ClipboardMac to PasteboardMac
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::hasData): Added. Calls through to Pasteboard.
* dom/Clipboard.h: Added LEGACY_VIRTUAL and LEGACY_PURE macros,
only for within this header file. These help us keep many functions
as pure virtual in the legacy style Clipboard class, but have them
be non-virtual in the normal/future style. Use LEGACY_VIRTUAL and
LEGACY_PURE to make the hasData member non-virtual.
* platform/Pasteboard.h: Added hasData, and added some blank lines and a FIXME.
* platform/mac/ClipboardMac.h: Removed hasData override.
* platform/mac/ Ditto.
* platform/mac/
(WebCore::Pasteboard::hasData): Added. Moved code here from ClipboardMac.
2013-05-12 David Kilzer <>
BUILD FIX (r149971): sudden termination is a Mac-only concept
* Move sudden termination symbols to Mac-only
2013-05-12 Andreas Kling <>
Node: Use FINAL instead of the non-virtual shadowing hack.
Reviewed by Anders Carlsson.
Decorate Element/Attr implementations of prefix/localName/namespaceURI getters with FINAL
so that call sites with a more specific pointer type than Node* can avoid the virtual dispatch.
* dom/Attr.h:
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
2013-05-11 Darin Adler <>
[Mac] Give every Clipboard an underlying Pasteboard
Reviewed by Andreas Kling.
This is the first step in Clipboard and Pasteboard refactoring
to fix the overlap and many layering violations.
* dom/Clipboard.cpp:
(WebCore::Clipboard::Clipboard): Add an m_pasteboard data member,
Mac-only for now, but eventually for all platforms.
(WebCore::Clipboard::~Clipboard): No longer inline the destructor.
flag, currently true for all non-Mac platforms. Make the constructor
no longer inline. Added a PassOwnPtr<Pasteboard> argument to the
constructor and an OwnPtr<Pasteboard> data member.
* platform/Pasteboard.h: Added a create function to make it easy
to create a pasteboard given a pasteboard name.
* platform/mac/
(WebCore::ClipboardMac::ClipboardMac): Create a pasteboard and pass
it to the Clipboard constructor.
* platform/mac/
(WebCore::Pasteboard::create): Added.
2013-05-12 Andreas Kling <>
Unload event listeners should prevent Safari from insta-killing the web process on last tab close.
Reviewed by Anders Carlsson.
Add two methods to Chrome (and ChromeClient):
- enableSuddenTermination()
- disableSuddenTermination()
..and call these from DOMWindow instead of the free global functions.
For WebKit1, it just calls the NSProcessInfo methods to keep behavior the same.
For WebKit2, the new methods plumb through the information to the UI process.
Also updated the DOMWindow logic to think in terms of per-DOMWindow sudden termination counters
instead of a process-global one, since that gets confusing in a WK2 world.
When a DOMWindow transitions between having/not having unload/beforeunload event listeners,
we send a notification to the Chrome.
* WebCore.xcodeproj/project.pbxproj:
* page/Chrome.h:
* page/ChromeClient.h:
* page/DOMWindow.cpp:
* page/DOMWindow.h:
2013-05-12 Anders Carlsson <>
Remove Complex.h from WTF
Reviewed by Beth Dakin.
Replace Complex declarations with std::complex<double>. Pass by value since the struct
is small enough to go into two registers on X86-64.
* Modules/webaudio/RealtimeAnalyser.cpp:
* platform/audio/Biquad.cpp:
* platform/audio/Biquad.h:
* platform/audio/FFTFrame.cpp:
2013-05-12 Simon Fraser <>
Dropdowns on don't show anything
Reviewed by Dan Bernstein.
We can't optimize away the backing store of a layer by saying that
it paints into a composited ancestor if its composited bounds are not contained
by that ancestor.
Test: compositing/backing/no-backing-for-clip-overhang.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Pass in our
previously computed composited bounds relative to our composited ancestor,
and its composited bounds.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresOwnBackingStore): If the ancestor's
composited bounds don't contain the layer's composited bounds, the layer
needs its own backing store.
* rendering/RenderLayerCompositor.h:
2013-05-12 Commit Queue <>
Unreviewed, rolling out r149955.
Broke lots of tests (Requested by smfr on #webkit).
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.h:
* rendering/RenderApplet.h:
* rendering/RenderBR.h:
* rendering/RenderBlock.h:
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.h:
* rendering/RenderButton.h:
* rendering/RenderCombineText.h:
* rendering/RenderCounter.h:
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderDetailsMarker.h:
* rendering/RenderEmbeddedObject.h:
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFlowThread.h:
* rendering/RenderFrame.h:
* rendering/RenderFrameSet.h:
* rendering/RenderFullScreen.cpp:
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.h:
* rendering/RenderHTMLCanvas.h:
* rendering/RenderIFrame.h:
* rendering/RenderImage.h:
* rendering/RenderInline.h:
* rendering/RenderLayerModelObject.h:
* rendering/RenderListBox.h:
* rendering/RenderListItem.h:
* rendering/RenderListMarker.h:
* rendering/RenderMedia.h:
* rendering/RenderMediaControlElements.h:
* rendering/RenderMenuList.h:
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnBlock.h:
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderPart.h:
* rendering/RenderProgress.h:
* rendering/RenderRegion.h:
* rendering/RenderRegionSet.h:
* rendering/RenderReplaced.h:
* rendering/RenderReplica.h:
* rendering/RenderRuby.h:
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.h:
* rendering/RenderRubyText.h:
* rendering/RenderScrollbarPart.h:
* rendering/RenderSearchField.h:
* rendering/RenderSlider.h:
* rendering/RenderSnapshottedPlugIn.h:
* rendering/RenderTable.h:
* rendering/RenderTableCaption.h:
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.h:
* rendering/RenderText.h:
* rendering/RenderTextControl.h:
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.h:
* rendering/RenderTextFragment.h:
* rendering/RenderTextTrackCue.h:
* rendering/RenderVideo.h:
* rendering/RenderView.h:
* rendering/RenderWidget.h:
* rendering/RenderWordBreak.h:
* rendering/RootInlineBox.h:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/svg/RenderSVGBlock.h:
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGHiddenContainer.h:
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInline.h:
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGModelObject.h:
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceGradient.h:
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.h:
* rendering/svg/RenderSVGTSpan.h:
* rendering/svg/RenderSVGText.h:
* rendering/svg/RenderSVGTextPath.h:
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.h:
2013-05-12 Anders Carlsson <>
Simplify AutodrainedPool
Reviewed by Andreas Kling.
Remove calls to AutodrainedPool::cycle as well as the iteration counter passed to the constructor.
Instead, just declare RAII pools where it seems necessary.
* Modules/webdatabase/DatabaseThread.cpp:
* fileapi/FileThread.cpp:
* loader/icon/IconDatabase.cpp:
2013-05-12 Andreas Kling <>
Apply FINAL to the Node hierarchy.
Mostly from Blink r149454 by <>
A couple of the stable DOM/ microbenchmarks are perf positive on Linux clang:
- CloneNodes time reduced from 162.4 to 156.5 ms.
- CreateNodes time reduced from 113.9 to 104.9 ms.
* dom/: Beat things with the FINAL stick.
* html/: Ditto.
* svg/: Ditto.
2013-05-12 Andreas Kling <>
Devirtualize some things on Document.
From Blink r149967 by <>
Several methods on Document are virtual but don't override a super class method
and don't need to be virtual. This patch devirtualizes:
- createElementNS()
- finishedParsing()
- suspendScriptedAnimationControllerCallbacks()
- resumeScriptedAnimationControllerCallbacks()
It also removes the suspend and resume callbacks from ScriptExecutionContext
since they didn't need to be there.
* dom/Document.h:
* dom/ScriptExecutionContext.h:
2013-05-12 Andreas Kling <>
Remove redundant call to removeAllEventListeners() in Document::open().
From Blink r150175 by <>
Document::open() already calls Document::removeAllEventListeners(), which
removes the event listeners from the DOMWindow it's attached to, so
there's no need to do it manually here as well.
* dom/Document.cpp:
2013-05-12 Andreas Kling <>
Apply FINAL to the RenderObject hierarchy.
Mostly from Blink r148795 by <>
* rendering/: Beat things with the FINAL stick.
* Export a now-needed symbol.
2013-05-12 Carlos Garcia Campos <>
[GTK] Remove unnecessary GTK_CHECK_VERSION #ifdefs
Reviewed by Martin Robinson.
* platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
* platform/gtk/GtkVersioning.c:
* platform/gtk/GtkVersioning.h:
* platform/gtk/WidgetRenderingContext.cpp:
* plugins/gtk/gtk2xtbin.c:
2013-05-11 Brent Fulgham <>
[Windows] Unreviewed build fix after r149932
* make-export-file-generator: Don't attempt to import
(or use) non-existent cxxabi functions on Windows.
2013-05-11 Simon Fraser <>
Add more info to compositing log channel output
Reviewed by Dean Jackson.
Add to compositing log channel output whether a layer paints
into its compositing ancestor.
* rendering/RenderLayerCompositor.cpp:
2013-05-10 Simon Fraser <>
REGRESSION: Fixed background on scrolls
Reviewed by Beth Dakin.
The logic for painting the fixed root background into its own layer was
broken when the document element's layer was composited. This could be caused
by a negative z-index child of the body, or by an explicit compositing-causing
style on the <html>.
There were two issues. First, when painting the layer for the fixed root
background, we would simply short-circuit the fixed background paint in
RenderLayer::paintLayer(), when checking for a composited layer. We have
to continue to paint through the composited <html> layer to get the root
background in this case.
Secondly, RenderLayerBacking::paintIntoLayer() would only set the PaintLayerPaintingSkipRootBackground
flag if this RenderLayerBacking had a m_backgroundLayer. However, when the <html> is
composited, we need to skip painting the root layer for both the RenderView's backing,
and for the <html>'s backing. Checking whether there is *any* layer that paints
the fixed root background (i.e. checking compositor()->fixedRootBackgroundLayer())
is a simple way to fix this test.
Tests: platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-composited-html.html
* rendering/RenderLayer.cpp:
* rendering/RenderLayerBacking.cpp:
2013-05-11 Simon Fraser <>
Possible crash when going Back while loading PDF
Reviewed by Dan Bernstein.
It's possible for m_frame to be null when Document::findUnsafeParentScrollPropagationBoundary()
is called, so null-check currentFrame.
* dom/Document.cpp:
2013-05-11 Alexey Proskuryakov <>
<rdar://problem/13823864> TextCodecICU complains about ambiguous codec names with current ICU release
Reviewed by Darin Adler.
Store and use canonical converter name to create converters.
As a side effect, we now actually reuse cached converters - previously we would compare
a standard encoding name to internal canonical one, which rarely match.
* platform/text/TextCodecICU.h:
* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::create): Pass canonical ICU converter name to constructor.
- Updated terminology.
- Added a comment that special cases should be kept in sync between registerEncodingNames
and registerCodecs.
- Moved maccyrillic alias to a correct section. It's not present in ICU even today.
- Changed a few aliases to actually map to standard name, not to an overridden one
(this doesn't change behavior since addToTextEncodingNameMap looks up canonical
name, but is clearer).
(WebCore::TextCodecICU::registerCodecs): Store a converter name to use with each
canonical encoding name.
(WebCore::TextCodecICU::TextCodecICU): Ditto.
(WebCore::TextCodecICU::releaseICUConverter): Reset the converter to remove any
leftover data.
- Compare converter name to converter name, not to another alias name.
- Use proper string comparison instead of pointer comparison.
- When creating a converter, assert that the name is not ambigous - canonical
converter names should never be, otherwise there would be no way to create
the converter without ambiguity.
2013-05-11 Antoine Quint <>
[Mac] The captions menu should not use a canned max-width and max-height
Reviewed by Eric Carlson.
Use more real estate to display the captions menu should the caption names
be long.
* css/mediaControlsQuickTime.css:
Make the captions menu scale to a max-width and max-height to allow 4px
above and below the menu, except on the right where it always aligns with
the captions icon in the media controller.
* html/shadow/MediaControlsApple.cpp:
Move the captions menu element to be a child of the controls instead of
the panel such that it may scale relative to the controls when using %
CSS values.
2013-05-11 Jochen Eisinger <>
Disallow a window to focus itself via javascript URLs or using target _self
Reviewed by Geoffrey Garen.
Test: fast/dom/Window/window-focus-self.html
* loader/FrameLoader.cpp:
* page/DOMWindow.cpp:
2013-05-11 Christophe Dumez <>
Fix several style warnings in generated bindings
Reviewed by Kentaro Hara.
Fix several style errors in the bindings generated under
No new tests, no behavior change.
* bindings/scripts/
* bindings/scripts/
* bindings/scripts/
* bindings/scripts/test/CPP/WebDOMFloat64Array.cpp:
* bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.cpp:
* bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
* bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.cpp:
* bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp:
* bindings/scripts/test/CPP/WebDOMTestEventTarget.cpp:
* bindings/scripts/test/CPP/WebDOMTestException.cpp:
* bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
* bindings/scripts/test/CPP/WebDOMTestMediaQueryListListener.cpp:
* bindings/scripts/test/CPP/WebDOMTestNamedConstructor.cpp:
* bindings/scripts/test/CPP/WebDOMTestNode.cpp:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
* bindings/scripts/test/CPP/WebDOMTestOverloadedConstructors.cpp:
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/ObjC/DOMFloat64ArrayInternal.h:
* bindings/scripts/test/ObjC/DOMTestActiveDOMObjectInternal.h:
* bindings/scripts/test/ObjC/DOMTestCallbackInternal.h:
* bindings/scripts/test/ObjC/DOMTestCustomNamedGetterInternal.h:
* bindings/scripts/test/ObjC/DOMTestEventConstructorInternal.h:
* bindings/scripts/test/ObjC/DOMTestEventTargetInternal.h:
* bindings/scripts/test/ObjC/DOMTestExceptionInternal.h:
* bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h:
* bindings/scripts/test/ObjC/DOMTestMediaQueryListListenerInternal.h:
* bindings/scripts/test/ObjC/DOMTestNamedConstructorInternal.h:
* bindings/scripts/test/ObjC/DOMTestNodeInternal.h:
* bindings/scripts/test/ObjC/DOMTestObjInternal.h:
* bindings/scripts/test/ObjC/DOMTestOverloadedConstructorsInternal.h:
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterfaceInternal.h:
* bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h:
2013-05-11 Anders Carlsson <>
Make it a build error to put invalid C++ symbol names in
Reviewed by Andreas Kling.
While invalid C++ symbols will eventually show up as a link error since the symbol won't be found,
this makes it easier to catch invalid symbols inside of #ifdefs.
* make-export-file-generator:
Try to demangle C++ symbols before printing them.
2013-05-11 David Kilzer <>
BUILD FIX (r149718): Move exported symbol into ENABLE(FULLSCREEN_API) section
Fixes the following build failure when ENABLE(FULLSCREEN_API) is
Undefined symbols for architecture i386:
"__ZNK7WebCore7Element25containsFullScreenElementEv", referenced from:
-exported_symbol[s_list] command line option
* Move the symbol.
2013-05-11 Robert Hogan <>
Unreviewed, remove some lint accidentally left in r149929.
* rendering/InlineFlowBox.cpp:
2013-03-17 Robert Hogan <>
Text flow broken in elements with vertical align top/bottom and inline elements taller than line-height
Reviewed by Ryosuke Niwa.
Per 'vertical-align' only applies to inline and table-cell
Test: fast/css/vertical-align-block-elements.html
* rendering/InlineFlowBox.cpp:
2013-05-11 Benjamin Poulain <>
Make CanvasStyle a plain object instead of an RefCounted object
Reviewed by Andreas Kling.
CanvasStyle is just 2 words wide. We do not gain anything from allocating
it on the heap. Change the object to be just a type and some data.
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
* html/HTMLCanvasElement.cpp:
* html/canvas/CanvasRenderingContext2D.cpp:
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/CanvasStyle.cpp:
* html/canvas/CanvasStyle.h:
2013-05-11 Benjamin Poulain <>
Gradient::platformGradient: Vector reserveCapacity -> reserveInitialCapacity
Reviewed by Andreas Kling.
* platform/graphics/cg/GradientCG.cpp:
(WebCore::Gradient::platformGradient): Clang is surprisingly smart at removing
all the branches of this function. Remove two more with reserveInitialCapacity.
2013-05-10 Alexey Proskuryakov <>
<rdar://problem/13666412> Clean up some edge cases of URL parsing.
Reviewed by Darin Adler.
Test: fast/url/segments-userinfo-vs-host.html
* page/SecurityOrigin.cpp:
Updated function name and comments (host is not the same as authority). We still
need this check - KURL can still produce http URLs with an empty host (even as this
patch reduces the number of such cases). So can Gecko and current draft of URL
It would be good to have a guarantee that such useless URLs can not come out of
URL parser, as relying on downstream code re-parsing the URL correctly would be fragile.
* platform/KURL.cpp:
(WebCore::hostPortIsEmptyButCredentialsArePresent): Updated an argument name for
1. Reverted behavior changes from <> - I could
find no reason to allow "@" in hostnames, and having a URL like this re-parsed by
a different parser would likely produce different results. It's better to just treat
these edge case URLs as invalid.
2. When hostname component is a lone colon, preserve it in parsed URL string,
as otherwise path would get pushed in its place when re-parsing.
3. When authority component is a lone colon, don't forget to "//" after scheme, too.
4. Added some assertions about contents of authority component, to catch potential
mis-parsing earlier.
2013-05-10 Alexey Proskuryakov <>
Make TextCodecICU not depend on TextEncoding
Reviewed by Darin Adler.
* platform/text/TextCodecICU.cpp:
* platform/text/TextCodecICU.h:
Use a plain encoding string in platform encoder wrapper, not a higher level concept.
2013-05-10 Laszlo Gombos <>
Remove Mac OS X Leopard (10.5) support
Reviewed by Ryosuke Niwa.
Removed the code for 10.5 and removed if-def for 10.6.
No new tests, covered by existing tests.
* platform/LocalizedStrings.cpp:
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/mac/EmptyProtocolDefinitions.h:
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/WebCoreSystemInterface.h:
* platform/text/mac/
2013-05-10 Laszlo Gombos <>
Reviewed by Darin Adler.
Remove the USE(OS_RANDOMNESS) guard as it is turned on for all
No new tests as this is covered by existing tests.
* page/Crypto.cpp:
* platform/UUID.cpp:
2013-05-10 Christophe Dumez <>
Remove [NoInterfaceObject] from several WebAudio IDL interfaces
Reviewed by Darin Adler.
Several WebAudio IDL interfaces had [NoInterfaceObject] extended attribute set,
meaning that there was no corresponding attribute on the global window object.
This behavior is not according to the specification:
This patch removes the [NoInterfaceObject] extended attribute where needed to
match the specification.
No new tests, already covered by existing tests.
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioDestinationNode.idl:
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webaudio/AudioParam.idl:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/ChannelMergerNode.idl:
* Modules/webaudio/ChannelSplitterNode.idl:
* Modules/webaudio/ConvolverNode.idl:
* Modules/webaudio/DelayNode.idl:
* Modules/webaudio/DynamicsCompressorNode.idl:
* Modules/webaudio/GainNode.idl:
* Modules/webaudio/MediaElementAudioSourceNode.idl:
* Modules/webaudio/MediaStreamAudioDestinationNode.idl:
* Modules/webaudio/MediaStreamAudioSourceNode.idl:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/ScriptProcessorNode.idl:
* Modules/webaudio/WaveShaperNode.idl:
* Modules/webaudio/WaveTable.idl:
2013-05-10 Simon Fraser <>
REGRESSION (r145680): No box shadow rendered on element with positioned child that obscures it
Reviewed by Antti Koivisto.
In r107836, we moved some box-shadow painting into the paintFillLayer code for performance.
However, in r145680 we started to skip background painting when we know the background is
obscured. This broke shadow painting in some cases.
Fix by always painting the background fill layers if we know that they will also
paint the shadow.
Test: fast/box-shadow/box-shadow-obscured-backgrounds.html
* rendering/RenderBox.cpp:
2013-05-10 Simon Fraser <>
REGRESSION (r143626): Element shows as garbage in image gallery
Reviewed by Antti Koivisto.
RenderLayer::backgroundIsKnownToBeOpaqueInRect() used hasVisibleContent()
to check whether the layer's content was hidden via the visibility property.
However, this assumed that a passing hasVisibleContent() check meant that the
entire area was covered by the renderers and layers checked layer.
This is not always true. It's possible to have a visibility:hidden layer
with a non-covering visbility:visible child, or even a single RenderText
child that happens to have visibility:visible style. In these situations,
hasVisibleContent() returns true but the entire area is not painted.
So we have to fall back to on a more conservative check using the
visibility style, which will give is a reliable answer for the current layer.
Tests: compositing/contents-opaque/hidden-with-visible-child.html
* rendering/RenderLayer.cpp:
2013-05-10 Simon Fraser <>
Garbage down left side of page (if subscriber)
Reviewed by Antti Koivisto.
RenderLayer::backgroundIsKnownToBeOpaqueInRect() would incorrectly return true
for layers where the given rect wasn't contained in the background rect, but
where some child layer obscured the rect, even though clipping hid part
of that child layer.
So bail from RenderLayer::backgroundIsKnownToBeOpaqueInRect() if we have
any overflow clipping. This could be enhanced in future to test whether child
layers obscure the clipping rect, but that would be more expensive.
Test: compositing/contents-opaque/overflow-hidden-child-layers.html
* rendering/RenderLayer.cpp:
2013-05-10 Eric Carlson <>
In-band captions not visible immediately after track mode change
Reviewed by Dean Jackson.
Test: media/track/track-in-band-mode.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::textTrackModeChanged): Add cues for all loaded tracks, regardless
of track type.
2013-05-10 Timothy Hatcher <>
Web Inspector: determine the resource type in InspectorResourceAgent::willSendRequest.
This allows the Network timeline and Resources sidebar to filter Resources earlier,
before the server sends a response. Useful for long polling (comet) XHRs.
Reviewed by Joseph Pecoraro.
* inspector/Inspector.json:
(Network.requestWillBeSent): Added.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendRequest): Send the type if it isn't Other along in requestWillBeSent.
(WebCore::InspectorResourceAgent::didReceiveResponse): Don't determine the type here anymore. Clear the CachedResource
if isNotModified like the old code path did by not setting cachedResource if !isNotModified.
2013-05-10 Laszlo Gombos <>
[CMake] Consolidate list of files to build for WebCore plugin support
Reviewed by Rob Buis.
Move the common files to support plugins and the logic for disabling
plugins) to CMakeLists.txt from PlatformXXX.cmake.
No new tests as there is no new functionality.
* CMakeLists.txt:
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformWinCE.cmake:
2013-05-10 Robert Hogan <>
REGRESSION(r148121): Empty Span does not get a linebox when it's in an anonymous block
Reviewed by David Hyatt.
r148121 only worried about split inlines inside anonymous blocks - it ought to have
catered for empty inlines, with no continuations, inside a single solitary anonymous block too.
Test: fast/inline/anonymous-block-with-empty-inline.html
* rendering/RenderBlockLineLayout.cpp:
2013-05-10 Zan Dobersek <>
[GTK] Remove unnecessary includes in WidgetGtk.cpp
Reviewed by Andreas Kling.
No new tests - no new functionality.
* platform/gtk/WidgetGtk.cpp: Remove the unnecessary includes of the Chrome.h, Frame.h, FrameView.h,
Page.h and RenderObject.h headers as the included declarations are not used anywhere. ScrollView.h is
included instead as it is required and was previously included by one of the removed header inclusions.
2013-05-10 Zan Dobersek <>
[Cairo] Remove the unnecessary ImageData.h include in ImageBufferCairo.cpp
Reviewed by Carlos Garcia Campos.
No new tests - no new functionality.
* platform/graphics/cairo/ImageBufferCairo.cpp: Remove the ImageData.h include
as the included declarations are not used anywhere.
2013-05-10 Zan Dobersek <>
[Cairo] Remove the unnecessary CSSParser.h include in GradientCairo.cpp
Reviewed by Laszlo Gombos.
No new tests - no new functionality.
* platform/graphics/cairo/GradientCairo.cpp: Remove the CSSParser.h include
as the included declarations are not used anywhere.
2013-05-10 Dean Jackson <>
Include tab character as a word end for kerning
Reviewed by Enrica Casucci.
This is a follow-up to
which only looked for a space character as a word end. It should
look for tab characters too.
Test: fast/text/word-space-with-kerning-4.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun): Look for '\t'.
2013-05-10 Anders Carlsson <>
Remove EventTracer
Reviewed by Sam Weinig.
EventTracer is dead code, remove it.
* CMakeLists.txt:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/EventTracer.cpp: Removed.
* platform/EventTracer.h: Removed.
2013-05-10 Zan Dobersek <>
[GTK] Generated files are regenerated always
Reviewed by Carlos Garcia Campos.
No new tests - no change in functionality.
* Don't treat the window constructors IDL file as a dependency of the JavaScriptCore bindings.
The file is generated during the IDL preprocessing, and the JSC bindings already depend on that step through
the idl_supplemental_dependencies file. Because of that the window constructors IDL file has a phony target
which seems to confuse the bindings generation rule into thinking that a complete regeration of the bindings is required.
2013-05-10 Andreas Kling <>
Caching of generated images in CSS should be smarter.
Reviewed by Antti Koivisto.
Add an IntSize => GeneratorGeneratedImage cache at the CSSImageGeneratorValue level.
CSSGradientValue is currently the only CSSImageGeneratorValue subclass that makes use of the cache.
Generated images are kept for 3 seconds after last use.
The main problem with the previous approach was that background renderers (e.g <body>, <tr>, etc)
would be passed to multiple CSSImageGeneratorValue::getImage() calls with different sizes requested
for each of the descendent renderers that inherit their background from the same parent.
The cache wasn't smart enough for this, it just thought the background renderer was changing size
a lot, and would regenerate the image over and over.
We already had caching of intermediate image buffers for GeneratorGeneratedImage::drawPattern().
This removes the eviction timer from that cache so that the intermediate images can live a bit longer.
Renamed from getImage() and putImage().
Let the CachedGeneratedImage throw itself out from cache when the timer fires.
* css/CSSImageGeneratorValue.h:
Exactly what it sounds like. These go into CSSImageGeneratorValue::m_images with the size
as the hash key.
* platform/graphics/GeneratorGeneratedImage.cpp:
* platform/graphics/GeneratorGeneratedImage.h:
Keep the intermediate image for drawPattern() until destruction instead of dropping it on
a timer. These objects are now evicted by the CSSImageGeneratorValue's image cache
after 3 seconds of disuse rather than kept for the lifetime of the renderer.
* css/CSSCanvasValue.cpp:
* css/CSSCrossfadeValue.cpp:
* rendering/style/StyleGeneratedImage.cpp:
* css/CSSImageGeneratorValue.cpp:
CSSImageGeneratorValue::m_clients is now a HashCountedSet<RenderObject*>, tweak accordingly.
2013-05-10 Anders Carlsson <>
Remove MemoryUsageSupport class
Reviewed by Andreas Kling.
MemoryUsageSupport was just used by a single call site in InspectorTimelineAgent,
and the function called always returns zero on all platforms! Remove it.
* CMakeLists.txt:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorMemoryAgent.cpp:
* inspector/InspectorTimelineAgent.cpp:
* platform/MemoryUsageSupport.cpp: Removed.
* platform/MemoryUsageSupport.h: Removed.
* platform/qt/MemoryUsageSupportQt.cpp: Removed.
2013-05-10 Ryosuke Niwa <>
REGRESSION (r149652): Videos do not play on, just black box
Reviewed by Antti Koivisto.
The bug was caused by window and document named item maps counting the same element twice
when it has the same id and name attribute values. Fixed the bug by avoiding to add or remove
an element per id and name attribute updates when it had already been added or removed by
name and id attribute updates respectively.
We do this by checking whether the other attribute affects the element's precense in window
and document named item maps and avoiding to add or remove the attribute when they do and
the other attribute is present in updateId and updateName.
Consider a scenario when an object element has id "foo", and name attribute is about to be also
set to "foo". If the id attribute doesn't affect element's presense in window or document
named item maps, we're done. If it does, then the maps already have this element so we don't
want to add it again. Conversely, if the element already has id and name attributes set to
"foo", and we're moving the id attribute, then we want to remove the element from the maps only
if the id doesn't affect the presence of the element in the maps.
Unfortuntely, this logic doesn't work when we're inserting or removing an element on its entirely
because updateId and updateName are called when both id and name attributes are present so skip
this step (AlwaysUpdateHTMLDocumentNamedItemMaps) for the id attribute to break the symmetry.
Test: fast/dom/HTMLDocument/image-with-same-id-and-name.html
* dom/Element.cpp:
(WebCore::Element::insertedInto): Call updateId and updateName with
(WebCore::Element::removedFrom): Ditto.
(WebCore::Element::updateName): Don't add or remove this element if the id attribute has already
done so except when we're inserting, removing, or cloning an element.
(WebCore::Element::updateId): Ditto for the name attribute.
(WebCore::Element::cloneAttributesFromElement): Added a comment and assert that we never call this
function when this element is in the document. We can't update window and documemt named item
maps here because image element's id attribute value, for example, is present in the document's
named item map if it has a name attribute. Since this function calls updateId and updateName
before updating attributes, this check is going to fail in DocumentNameCollection's
nodeMatchesIfIdAttributeMatch and bad things will happen.
* dom/Element.h:
* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::swapInNodePreservingAttributesAndChildren): Clone children and attributes before
inserting the swapped span to avoid hitting the assertion in cloneAttributesFromElement we added.
* html/HTMLImageElement.cpp:
* html/HTMLObjectElement.cpp:
2013-05-09 Dean Jackson <>
Don't trust character widths for internal OS X fonts in form controls
Reviewed by Darin Adler.
We ignore the character width for a bunch of fonts when predicting
the width of a form control. Some of the internal fonts in OS X are
not in the ignored list. Rather than add them, simply test for
fonts whose family begins with a period character ".".
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::hasValidAvgCharWidth): Return false for
any family that starts with "."
2013-05-10 Carlos Garcia Campos <>
[GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
Reviewed by Martin Robinson.
* bindings/gobject/WebKitDOMEventTarget.cpp:
* platform/gtk/GtkVersioning.c:
* platform/gtk/GtkVersioning.h:
2013-05-10 Zoltan Arvai <>
Unreviewed. Fix the ENABLE(SHARED_WORKERS) build after r149864.
* workers/SharedWorkerThread.cpp: include "SecurityOrigin.h"
2013-05-10 Claudio Saavedra <>
Fix build after r149864.
Unreviewed build fix.
* loader/ThreadableLoader.h: include <wtf/text/AtomicString.h>
when building with RESOURCE_TIMING enabled.
2013-05-10 Anders Carlsson <>
Fix build.
* bindings/js/ScriptController.cpp:
2013-05-10 Anders Carlsson <>
Remove ScriptInstance.h
Reviewed by Andreas Kling.
Remove yet another abstraction now that we don't support V8.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptController.h:
* bindings/js/
* bindings/js/ScriptInstance.h: Removed.
* html/HTMLPlugInElement.cpp:
* html/HTMLPlugInElement.h:
* platform/graphics/wince/MediaPlayerProxy.h:
* rendering/RenderEmbeddedObject.cpp:
* rendering/RenderSnapshottedPlugIn.cpp:
2013-05-10 Anders Carlsson <>
Unreviewed, rolling out r149866.
Broke tests
* dom/Document.cpp:
* page/SecurityOrigin.cpp:
* page/SecurityOrigin.h:
2013-05-10 Andrei Bucur <>
Remove overflow dead code
Reviewed by Antti Koivisto.
The patch removes unused public overflow accesor functions from RenderOverflow and InlineFlowBox.
Tests: no tests, code cleanup.
* rendering/InlineFlowBox.h: Removed logicalLeftLayoutOverflow and logicalRightLayoutOverflow.
* rendering/RenderOverflow.h: Removed setMinYLayoutOverflow, setMaxYLayoutOverflow,
setMinXLayoutOverflow, setMaxXLayoutOverflow, setMinYVisualOverflow, setMaxYVisualOverflow,
setMinXVisualOverflow and setMaxXVisualOverflow.
2013-05-10 Anders Carlsson <>
Begin making SecurityOrigin immutable
Reviewed by Andreas Kling.
Replace SecurityOrigin::setDomainFromDOM and SecurityOrigin::grantUniversalAccess with
member functions that return new SecurityOrigin objects.
* dom/Document.cpp:
Update the security origin to one returned by copyWithDomainSetFromDOM.
Set the security origin to one returned by copyWithUniversalAccessGranted().
* page/SecurityOrigin.cpp:
Add a new constructor that takes all the member variables as parameters. This is a little unwieldy at the moment,
but all the boolean parameters could be replaced by a bitmask of flags.
Call the new constructor.
Return a new security origin with m_domainWasSetInDOM set to true and the domain updated.
Return a new security origin with m_universalAccess set to true.
2013-05-10 Anders Carlsson <>
Remove ScriptController::updateSecurityOrigin
Reviewed by Antti Koivisto.
ScriptController::updateSecurityOrigin is just dead code now that the V8 bindings are gone.
* bindings/js/ScriptController.cpp:
* bindings/js/ScriptController.h:
* dom/Document.cpp:
* dom/Document.h:
* dom/SecurityContext.cpp:
* dom/SecurityContext.h:
2013-05-10 Anders Carlsson <>
Stop including SecurityOrigin.h where unnecessary
Reviewed by Antti Koivisto.
Move rarely called functions out of line so headers don't have to include SecurityOrigin.h
* Modules/indexeddb/IDBFactoryBackendImpl.h:
* Modules/webdatabase/DatabaseBackendBase.cpp:
* Modules/webdatabase/DatabaseBackendBase.h:
* Modules/webdatabase/DatabaseSync.h:
* bindings/js/JSDOMWindowCustom.h:
* html/parser/XSSAuditor.cpp:
* loader/ThreadableLoader.cpp:
* loader/ThreadableLoader.h:
* loader/WorkerThreadableLoader.cpp:
* workers/DedicatedWorkerContext.cpp:
* workers/DedicatedWorkerThread.cpp:
* workers/SharedWorkerContext.cpp:
* workers/WorkerThread.cpp:
* workers/WorkerThread.h:
2013-05-10 Carlos Garcia Campos <>
Unreviewed. Fix GTK+ build after r149839.
* platform/gtk/RenderThemeGtk3.cpp:
2013-05-09 Chris Fleizach <>
AX: VoiceOver is no longer seeing items in poorly formed tables
Reviewed by Darin Adler.
In case the author didn't include the rows of a table as the
direct children, a table needs to dive down its descendant chain
until the rows are found.
I also took the opportunity to clean up a bit around what the different
meanings of table are in the accessibility classes.
Test: accessibility/poorly-formed-aria-table.html
* accessibility/AccessibilityARIAGrid.cpp:
* accessibility/AccessibilityARIAGrid.h:
* accessibility/AccessibilityARIAGridRow.cpp:
* accessibility/AccessibilityARIAGridRow.h:
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityTable.h:
* accessibility/AccessibilityTableRow.cpp:
2013-05-09 Yael Aharon <>
REGRESSION: Disabled multiline select element now responds to (certain) clicks
Reviewed by Kent Tamura.
After, select elements can scroll whether they
are disabled or not. While they scroll, they also change the selected item.
This patch allows the select element to scroll, but does not change the selection
if the select element is disabled.
Test: fast/forms/select/listbox-disabled-scroll-no-onchange.html
Test: fast/forms/select/listbox-disabled-no-autoscroll.html
* rendering/RenderListBox.cpp:
* rendering/RenderListBox.cpp:
2013-05-09 Anders Carlsson <>
Clean up SecurityOrigin::databaseIdentifier
Reviewed by Beth Dakin.
Remove m_encodedHost and just call encodeHost from databaseIdentifier().
Also, use a StringBuilder when constructing the database identifier to avoid allocating
temporary String objects over and over.
* page/SecurityOrigin.cpp:
* page/SecurityOrigin.h:
2013-05-09 Anders Carlsson <>
Remove m_securityOrigin from XMLHttpRequest
Reviewed by Alexey Proskuryakov.
The security origin passed to XMLHttpRequest::create was always null, so just get rid of the member variable completely.
* xml/XMLHttpRequest.cpp:
* xml/XMLHttpRequest.h:
2013-05-09 Christophe Dumez <>
[NoInterfaceObject] extended attribute should be removed for several interfaces
Reviewed by Benjamin Poulain.
Remove [NoInterfaceObject] extended attribute from the following Web IDL
interfaces: SecurityPolicy, History, Location, Navigator, Performance,
PerformanceEntry, PerformanceMark, PerformanceMeasure, PerformanceNavigation,
PerformanceResourceTiming, PerformanceTiming and Screen.
These interfaces should not have the [NoInterfaceObject] extended attribute
according to their respective specifications:
The new behavior is consistent with the specifications, Firefox and soon Blink.
No new tests, already covered by existing tests.
* page/DOMSecurityPolicy.idl:
* page/History.idl:
* page/Location.idl:
* page/Navigator.idl:
* page/Performance.idl:
* page/PerformanceEntry.idl:
* page/PerformanceMark.idl:
* page/PerformanceMeasure.idl:
* page/PerformanceNavigation.idl:
* page/PerformanceResourceTiming.idl:
* page/PerformanceTiming.idl:
* page/Screen.idl:
2013-05-09 Robert Hogan <>
REGRESSION (Safari 3-Safari 4): Replaced element with percent height in table has incorrect height
Reviewed by David Hyatt.
Text controls or any object that has scrollable content should not flex inside a table cell.
This makes our behaviour the same as IE, FF and Opera (Presto).
* rendering/RenderTableSection.cpp:
2013-05-09 Anders Carlsson <>
Build fix.
2013-05-09 Anders Carlsson <>
Add a StorageStrategy hook for creating transient local storage namespaces
Reviewed by Geoffrey Garen.
Export symbol needed by WebKit2.
* dom/Document.cpp:
* dom/Document.h:
* dom/ScriptExecutionContext.h:
* workers/WorkerContext.h:
Remove const qualifier from topOrigin() to avoid ugly const_casts when assigning into a RefPtr<SecurityOrigin> variable.
* page/PageGroup.cpp:
Do a single hash lookup instead of three and use the SecurityOrigin itself as the hash key instead of a string representation of it.
* page/PageGroup.h:
Update HashMap declaration.
* storage/StorageNamespace.cpp:
Add new implementation that will optionally call out to the storage strategy.
* storage/StorageNamespaceImpl.cpp:
Move the default implementation here from PageGroup.
* storage/StorageStrategy.cpp:
Call the default implementation.
2013-05-09 Enrica Casucci <>
A change in system environment should force all CSS properties to be recomputed.
Reviewed by Antti Koivisto.
When a change in the global environment occurs, for example system colors,
we need to make sure all the CSS properties are recomputed and not fetched
from the cache. For this reason we invalidate the properties cache.
I've also renamed the function to give it a more meaningful name.
* page/Page.cpp:
* page/Page.h:
* rendering/RenderTheme.cpp:
2013-05-09 Antti Koivisto <>
Reoptimize free-standing :focus/link/visited/-webkit-any-link selectors.
Reviewed by Darin Adler.
Common pseudo selectors should go into their respective rule buckets instead of ending up in the universal one.
* css/RuleSet.cpp:
Check tag selectors with * local name (usually created for namespace) for a suitable narrower bucket too.
2013-05-09 Darin Adler <>
RenderQuote has giant function for language to quotes map
Reviewed by Anders Carlsson.
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::RenderQuote): Updated for m_isAttached name change.
(WebCore::RenderQuote::~RenderQuote): Updated for name change, and also split
assertion with && in it into two separate assertions.
(WebCore::checkNumberOfDistinctQuoteCharacters): Added. Helper function that is used
to check that the number of distinct quote characters is small enough to fit into
our fixed size array below.
(WebCore::quotesForLanguage): Replaces the old quotesDataLanguageMap function.
Returns a pointer to a struct that contains the four quote characters. This new
function doesn't have the massive amount of code that the old one did. We use the
standard library bsearch function to do a binary search.
(WebCore::stringForQuoteCharacter): Added. This returns a string for a given quote
character; one string for any given character.
(WebCore::quotationMarkString): Added. Returns the string for the quotation mark.
(WebCore::apostropheStringImpl): Added. Returns the string for the apostrophe.
(WebCore::RenderQuote::originalText): Rewrote this to include all the logic that
used to be in the quotesData function.
(WebCore::RenderQuote::attachQuote): Tweak assertions as above. Removed unneeded
special case for the first quote in a RenderView; sharing the code is better and
there is no significant performance difference. Also use m_isAttached directly
when looking at predecessores so there is no need for an isAttached function.
(WebCore::RenderQuote::detachQuote): Updated assertions and for name change.
(WebCore::RenderQuote::updateDepth): Ditto.
* rendering/RenderQuote.h: Removed unneeded includes. Marked the class FINAL since
we call the originalText function in the class and we don't want to do a virtual
function dispatch for that. Removed uneeded const from an argument. Removed a
stray semicolon. Removed the quotesData and isAttached functions, since they are no
longer needed. Renamed m_attached to m_isAttached.
* rendering/style/QuotesData.cpp: Removed the overload of QuotesData::create that
takes four quote strings. This was only used to build up the quotes table.
* rendering/style/QuotesData.h: Ditto.
2013-05-09 Max Feil <>
shouldUsePluginDocument() needs to be respected when a document is created
Reviewed by Rob Buis.
In DOMImplementation::createDocument() we should create
a PluginDocument for mime types that return "true" for
shouldAlwaysUsePluginDocument(), even if there is no pluginData
for them. This lets a client choose plugins for which the "missing
plugin" text or icon should appear more consistently. Otherwise
plugins referenced by iFrames will be treated as an HTMLDocument,
possibly resulting in binary files rendered as gibberish text.
Layout test platform/blackberry/plugins/swf-as-src-of-iframe.html
* dom/DOMImplementation.cpp:
2013-05-09 Timothy Hatcher <>
Fix an exception when hovering native functions while paused in the debugger.
Reviewed by Darin Adler and Joseph Pecoraro.
* inspector/InjectedScriptSource.js:
(InjectedScript.prototype.getFunctionDetails): Return an error if the details
is null or undefined.
2013-05-09 Darin Adler <>
[Mac] CFError leak under Objective-C garbage collection
Reviewed by Benjamin Poulain.
* platform/network/mac/
(WebCore::ResourceError::nsError): Use adoptCF instead of adoptNS since
the CFError needs a CFRelease, not an -[NSObject release].
2013-05-09 Alberto Garcia <>
BlackBerry: fix call to PluginLayerWebKitThread::setHolePunchRect()
Reviewed by Rob Buis.
data->layer needs a cast in order to call setHolePunchRect().
* plugins/blackberry/NPCallbacksBlackBerry.cpp:
2013-05-09 Mike Fenton <>
[BlackBerry] Style updates required based on new check-webkit-style
Reviewed by Rob Buis.
Update WebCore/platform/graphics BlackBerry sources
to match check-webkit-style updates.
Internally reviewed by Jakob Petsovits.
* platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
* platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
* platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
* platform/graphics/blackberry/IntRectBlackBerry.cpp:
* platform/graphics/blackberry/LayerCompositingThread.h:
* platform/graphics/blackberry/LayerFilterRenderer.cpp:
* platform/graphics/blackberry/LayerRenderer.cpp:
* platform/graphics/blackberry/LayerWebKitThread.cpp:
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
* platform/image-decoders/blackberry/JPEGImageDecoder.cpp:
2013-05-09 Mike Fenton <>
[BlackBerry] Style updates required based on new check-webkit-style
Reviewed by Rob Buis.
Update WebCore/platform/network/blackberry
to match check-webkit-style updates.
* platform/network/blackberry/NetworkJob.cpp:
* platform/network/blackberry/NetworkJob.h:
* platform/network/blackberry/NetworkManager.cpp:
* platform/network/blackberry/rss/RSSFilterStream.cpp:
2013-05-09 Mike Fenton <>
[BlackBerry] Style updates required based on new check-webkit-style
Reviewed by Rob Buis.
Update WebCore/platform/blackberry to match check-webkit-style updates.
No functional changes.
* platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
* platform/blackberry/CookieManager.cpp:
* platform/blackberry/CookieMap.h:
* platform/blackberry/CookieParser.cpp:
* platform/blackberry/LoggingBlackBerry.cpp:
* platform/blackberry/PageClientBlackBerry.h:
* platform/blackberry/ParsedCookie.cpp: