[WebGL] Vertex attribute binding validation method
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-08-16  Przemyslaw Szymanski  <p.szymanski3@samsung.com>
2
3         [WebGL] Vertex attribute binding validation method
4         https://bugs.webkit.org/show_bug.cgi?id=119515
5
6         This patch refactors WebGLRenderingContext code by moving the vertex
7         attribute binding validation to a separate method. It is now
8         possible to use that validation in other parts of the code. The
9         code is more clear now. 
10
11         Reviewed by Christophe Dumez.
12
13         No new tests. Covered by existing tests. No behaviour changed.
14         LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/gl-drawelements.html
15         LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/draw-elements-out-of-bounds.html
16         LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/draw-arrays-out-of-bounds.html
17
18         * html/canvas/WebGLRenderingContext.cpp:
19         (WebCore::WebGLRenderingContext::validateVertexAttributes):
20         * html/canvas/WebGLVertexArrayObjectOES.h:
21         (WebCore::WebGLVertexArrayObjectOES::VertexAttribState::isBound):
22         (WebCore::WebGLVertexArrayObjectOES::VertexAttribState::validateBinding):
23
24 2013-08-15  Antti Koivisto  <antti@apple.com>
25
26         <https://webkit.org/b/119865> Parent pointer and shadow root host pointer should not be shared
27
28         Reviewed by Andreas Kling.
29
30         Node::m_parentOrShadowHostNode is currently used both as the parent pointer for regular nodes and as the host
31         pointer for ShadowRoots. This is confusing. It is also slow as it introduces a branch to all code paths that 
32         want to traverse ancestors normally, without leaving the shadow trees. This is much more popular than
33         traversing through.
34         
35         This patch makes the Node have a pure parent pointer only and adds the host element pointer as a separate
36         member in ShadowRoot. This eliminates the ShadowRoot test branch from Node::parentNode() as the pointer is
37         now always null in the root node.
38         
39         ShadowRoot grows by a pointer. This is not significant as there are few ShadowRoots compared to Nodes.
40
41         * css/StyleResolver.cpp:
42         (WebCore::StyleResolver::pushParentShadowRoot):
43         (WebCore::StyleResolver::popParentShadowRoot):
44         * dom/Attr.cpp:
45         (WebCore::Attr::createTextChild):
46         * dom/ComposedShadowTreeWalker.cpp:
47         (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
48         * dom/ContainerNode.cpp:
49         (WebCore::ContainerNode::insertBeforeCommon):
50         (WebCore::ContainerNode::removeBetween):
51         * dom/ContainerNodeAlgorithms.cpp:
52         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
53         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
54         * dom/ContainerNodeAlgorithms.h:
55         (WebCore::appendChildToContainer):
56         (WebCore::Private::addChildNodesToDeletionQueue):
57         * dom/Document.h:
58         (WebCore::Node::Node):
59         * dom/Element.cpp:
60         (WebCore::Element::addShadowRoot):
61         (WebCore::Element::removeShadowRoot):
62         * dom/ElementRareData.h:
63         (WebCore::ElementRareData::releasePseudoElement):
64         * dom/EventPathWalker.cpp:
65         (WebCore::EventPathWalker::moveToParent):
66         * dom/EventRetargeter.cpp:
67         (WebCore::determineDispatchBehavior):
68         * dom/EventRetargeter.h:
69         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
70         * dom/Node.cpp:
71         (WebCore::Node::shadowHost):
72         (WebCore::Node::deprecatedShadowAncestorNode):
73         (WebCore::Node::parentOrShadowHostElement):
74         * dom/Node.h:
75         (WebCore::Node::hasTreeSharedParent):
76         
77             Shadow host elements refs the ShadowRoot. There is no reason to use TreeShared to keep it alive.
78
79         (WebCore::Node::setParentNode):
80         (WebCore::Node::parentNode):
81         (WebCore::Node::parentNodeGuaranteedHostFree):
82         * dom/PseudoElement.cpp:
83         (WebCore::PseudoElement::PseudoElement):
84         * dom/ShadowRoot.cpp:
85         (WebCore::ShadowRoot::ShadowRoot):
86         (WebCore::ShadowRoot::setInnerHTML):
87         (WebCore::ShadowRoot::setApplyAuthorStyles):
88         (WebCore::ShadowRoot::setResetStyleInheritance):
89         * dom/ShadowRoot.h:
90         
91             Rename host() -> hostElement() for clarity.
92
93         (WebCore::Node::parentOrShadowHostNode):
94         * dom/Text.cpp:
95         (WebCore::isSVGShadowText):
96         * dom/TreeScope.cpp:
97         (WebCore::TreeScope::focusedElement):
98         * html/shadow/ContentDistributor.cpp:
99         (WebCore::ContentDistributor::ensureDistribution):
100         * html/shadow/InsertionPoint.cpp:
101         (WebCore::InsertionPoint::insertedInto):
102         (WebCore::InsertionPoint::removedFrom):
103         (WebCore::InsertionPoint::parseAttribute):
104         * page/DragController.cpp:
105         (WebCore::asFileInput):
106         * page/EventHandler.cpp:
107         (WebCore::EventHandler::handleMousePressEvent):
108         (WebCore::instanceAssociatedWithShadowTreeElement):
109         * page/FocusController.cpp:
110         (WebCore::FocusNavigationScope::owner):
111         * rendering/RenderBlock.cpp:
112         (WebCore::RenderBlock::hasLineIfEmpty):
113         * rendering/RenderLayer.cpp:
114         (WebCore::rendererForScrollbar):
115         * svg/SVGElementInstance.h:
116         (WebCore::SVGElementInstance::setParentNode):
117             
118             Renamed so it works with appendChildToContainer template.
119
120         * svg/SVGStyledElement.cpp:
121         (WebCore::SVGStyledElement::title):
122
123 2013-08-13  Darin Adler  <darin@apple.com>
124
125         [iOS] Get iOS port off legacy clipboard
126         https://bugs.webkit.org/show_bug.cgi?id=116412
127
128         Reviewed by Daniel Bates.
129
130         * dom/Clipboard.h: Turn off legacy style clipboard for iOS.
131         Next patch will be able to remove legacy style entirely!
132
133         * editing/Editor.cpp:
134         (WebCore::Editor::dispatchCPPEvent): Attach the frame to the
135         pasteboard directly explicitly. This is a layering violation, but
136         is needed until we change how iOS pasteboard communicates with the
137         host to use platform strategies instead of the editor client.
138
139         * editing/ios/EditorIOS.mm: Removed Editor::newGeneralClipboard and
140         the include of ClipboardIOS.h.
141
142         * platform/Pasteboard.h: Added the setFrame function (iOS-only) and
143         frame and change count data members.
144
145         * platform/ios/ClipboardIOS.h: Emptied out. Later we can remove this.
146         * platform/ios/ClipboardIOS.mm: Ditto.
147
148         * platform/ios/PasteboardIOS.mm:
149         (WebCore::Pasteboard::Pasteboard): Initialize m_frame to zero.
150         (WebCore::Pasteboard::createForCopyAndPaste): Added.
151         (WebCore::Pasteboard::createPrivate): Added.
152         (WebCore::Pasteboard::writePasteboard): Added. Empty function, like
153         writeClipboard. Eventually need to remove or implement this.
154         (WebCore::Pasteboard::setFrame): Added. Sets frame and change count.
155         (WebCore::Pasteboard::hasData): Moved here from ClipboardIOS.
156         (WebCore::utiTypeFromCocoaType): Ditto.
157         (WebCore::cocoaTypeFromHTMLClipboardType): Ditto.
158         (WebCore::Pasteboard::clear): Ditto.
159         (WebCore::Pasteboard::readString): Ditto.
160         (WebCore::addHTMLClipboardTypesForCocoaType): Ditto.
161         (WebCore::Pasteboard::writeString): Ditto.
162         (WebCore::Pasteboard::types): Ditto.
163         (WebCore::Pasteboard::readFilenames): Ditto.
164
165         * WebCore.exp.in: Move Clipboard destructor from Mac-only section to
166         common section shared by Mac and iOS.
167
168 2013-08-15  Ryuan Choi  <ryuan.choi@samsung.com>
169
170         [EFL] Unreviewed build fix after r154142 and r154144.
171
172         * platform/efl/ErrorsEfl.cpp: Follow the changes of r154142.
173         (WebCore::printError):
174         (WebCore::printerNotFoundError):
175         (WebCore::invalidPageRangeToPrint):
176
177 2013-08-15  Hans Muller  <hmuller@adobe.com>
178
179         [CSS Shapes] Add support for shape-outside image values
180         https://bugs.webkit.org/show_bug.cgi?id=119809
181
182         Added minimal support for shape-outside image values. A new method that computes
183         the excluded intervals for a horizontal line segment was added to the RasterIntervals
184         class. The stub RasterShape getExcludedIntervals() method has been replaced by
185         one that uses the new method.
186
187         Image shapes are represented by a RasterIntervals object, which just encapsulates a
188         Region object. The new getExcludedIntervals() method computes the excluded intervals
189         for a horizontal line segment between y1 and y2. To find the excluded intervals we
190         vertically expand each of the image shape Region's rectangles that fall within the line
191         segment, so that they begin at y1 and have height = y2 - y1. The union of the expanded
192         rectangles produces a new Region whose horizontal projection defines the excluded intervals.
193
194         Reviewed by Alexandru Chiculita.
195
196         Tests: fast/shapes/shape-outside-floats/shape-outside-floats-image-001.html
197                fast/shapes/shape-outside-floats/shape-outside-floats-image-002.html
198
199         * rendering/shapes/RasterShape.cpp:
200         (WebCore::RasterShapeIntervals::getExcludedIntervals): See above.
201         (WebCore::RasterShape::getExcludedIntervals): Stub method has been replaced by one that uses RasterShapeIntervals::getExcludedIntervals().
202         * rendering/shapes/RasterShape.h:
203         * rendering/shapes/ShapeOutsideInfo.cpp:
204         (WebCore::ShapeOutsideInfo::isEnabledFor): Enable Image valued shapes.
205
206 2013-08-15  Simon Fraser  <simon.fraser@apple.com>
207
208         <https://webkit.org/b/119871> Flash of garbage pixels when playing a show on Hulu
209
210         Reviewed by Tim Horton.
211         
212         When starting a show on Hulu, there's a layer that gets marked as
213         opaque because it has a child RenderLayer whose background fills the
214         compositing layer. That child RenderLayer was recently position:fixed
215         but outside the viewport, so its viewportConstrainedNotCompositedReason
216         was set to a non-zero value.
217         
218         However, we failed to clear the viewportConstrainedNotCompositedReason
219         when the layer became non-fixed. This caused painting the opaque
220         layer to bail in RenderLayer::paintLayer(), leaving garbage.
221
222         Test: compositing/contents-opaque/fixed-to-nonfixed.html
223
224         * rendering/RenderLayer.cpp:
225         (WebCore::RenderLayer::paintLayer): Add an assertion to catch this error in future.
226         * rendering/RenderLayerCompositor.cpp:
227         (WebCore::RenderLayerCompositor::updateBacking): Make sure we clear the
228         ViewportConstrainedNotCompositedReason if the layer is no longer fixed.
229
230 2013-08-15  Brent Fulgham  <bfulgham@apple.com>
231
232         [Windows] Consolidate WebKit Bundle Handling
233         https://bugs.webkit.org/show_bug.cgi?id=119869
234
235         Reviewed by Tim Horton.
236
237         * WebCore.vcxproj/WebCore.vcxproj: Add new WebCoreBundleWin files.
238         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
239         * platform/network/curl/ResourceHandleManager.cpp:
240         (WebCore::certificatePath): Use correct bundle handling logic.
241         * platform/win/LocalizedStringsWin.cpp: Move bundle implementation to
242         new WebCoreBundleWin.cpp file.
243         * platform/win/WebCoreBundleWin.cpp: Added.
244         (WebCore::createWebKitBundle):
245         (WebCore::webKitBundle):
246         * platform/win/WebCoreBundleWin.h: Added.
247
248 2013-08-15  Anders Carlsson  <andersca@apple.com>
249
250         <https://webkit.org/b/119859> Frame::loader() should return a reference
251
252         Reviewed by Andreas Kling.
253
254         * Modules/websockets/WebSocketChannel.cpp:
255         (WebCore::WebSocketChannel::willOpenSocketStream):
256         * WebCore.xcodeproj/project.pbxproj:
257         * accessibility/AccessibilityObject.cpp:
258         (WebCore::AccessibilityObject::press):
259         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
260         (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
261         * bindings/ScriptControllerBase.cpp:
262         (WebCore::ScriptController::canExecuteScripts):
263         * bindings/js/ScriptController.cpp:
264         (WebCore::ScriptController::initScript):
265         * css/CSSFontSelector.cpp:
266         (WebCore::CSSFontSelector::beginLoadTimerFired):
267         * dom/DOMImplementation.cpp:
268         (WebCore::DOMImplementation::createDocument):
269         * dom/Document.cpp:
270         (WebCore::Document::Document):
271         (WebCore::Document::setVisualUpdatesAllowed):
272         (WebCore::Document::updateTitle):
273         (WebCore::Document::open):
274         (WebCore::Document::explicitClose):
275         (WebCore::Document::implicitClose):
276         (WebCore::Document::userAgent):
277         (WebCore::Document::canNavigate):
278         (WebCore::Document::processHttpEquiv):
279         (WebCore::Document::referrer):
280         (WebCore::Document::documentDidResumeFromPageCache):
281         (WebCore::Document::openSearchDescriptionURL):
282         (WebCore::Document::finishedParsing):
283         (WebCore::Document::addIconURL):
284         (WebCore::Document::initSecurityContext):
285         (WebCore::Document::updateURLForPushOrReplaceState):
286         (WebCore::Document::loadEventDelayTimerFired):
287         (WebCore::Document::loader):
288         (WebCore::Document::decrementActiveParserCount):
289         * history/CachedFrame.cpp:
290         (WebCore::CachedFrameBase::CachedFrameBase):
291         (WebCore::CachedFrameBase::restore):
292         (WebCore::CachedFrame::CachedFrame):
293         (WebCore::CachedFrame::open):
294         (WebCore::CachedFrame::destroy):
295         * history/PageCache.cpp:
296         (WebCore::logCanCacheFrameDecision):
297         (WebCore::logCanCachePageDecision):
298         (WebCore::PageCache::canCachePageContainingThisFrame):
299         (WebCore::PageCache::canCache):
300         * html/HTMLAnchorElement.cpp:
301         (WebCore::HTMLAnchorElement::handleClick):
302         * html/HTMLAppletElement.cpp:
303         (WebCore::HTMLAppletElement::updateWidget):
304         * html/HTMLElement.cpp:
305         (WebCore::HTMLElement::rendererIsNeeded):
306         * html/HTMLEmbedElement.cpp:
307         (WebCore::HTMLEmbedElement::updateWidget):
308         * html/HTMLFormElement.cpp:
309         (WebCore::HTMLFormElement::prepareForSubmission):
310         (WebCore::HTMLFormElement::submit):
311         * html/HTMLFrameElementBase.cpp:
312         (WebCore::HTMLFrameElementBase::openURL):
313         * html/HTMLFrameOwnerElement.cpp:
314         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
315         * html/HTMLFrameSetElement.cpp:
316         (WebCore::HTMLFrameSetElement::insertedInto):
317         (WebCore::HTMLFrameSetElement::removedFrom):
318         * html/HTMLHtmlElement.cpp:
319         (WebCore::HTMLHtmlElement::insertedByParser):
320         * html/HTMLMediaElement.cpp:
321         (WebCore::HTMLMediaElement::createRenderer):
322         (WebCore::HTMLMediaElement::attach):
323         (WebCore::HTMLMediaElement::loadResource):
324         (WebCore::HTMLMediaElement::getPluginProxyParams):
325         (WebCore::HTMLMediaElement::createMediaPlayerProxy):
326         (WebCore::HTMLMediaElement::updateWidget):
327         (WebCore::HTMLMediaElement::mediaPlayerReferrer):
328         (WebCore::HTMLMediaElement::mediaPlayerUserAgent):
329         * html/HTMLObjectElement.cpp:
330         (WebCore::HTMLObjectElement::parametersForPlugin):
331         (WebCore::HTMLObjectElement::updateWidget):
332         * html/HTMLPlugInImageElement.cpp:
333         (WebCore::HTMLPlugInImageElement::isImageType):
334         (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
335         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
336         * html/HTMLVideoElement.cpp:
337         (WebCore::HTMLVideoElement::setDisplayMode):
338         * html/ImageDocument.cpp:
339         (WebCore::ImageDocumentParser::appendBytes):
340         (WebCore::ImageDocumentParser::finish):
341         (WebCore::ImageDocument::createDocumentStructure):
342         * html/MediaDocument.cpp:
343         (WebCore::MediaDocumentParser::createDocumentStructure):
344         * html/PluginDocument.cpp:
345         (WebCore::PluginDocumentParser::createDocumentStructure):
346         (WebCore::PluginDocumentParser::appendBytes):
347         (WebCore::PluginDocument::detach):
348         (WebCore::PluginDocument::cancelManualPluginLoad):
349         * html/canvas/WebGLRenderingContext.cpp:
350         (WebCore::WebGLRenderingContext::create):
351         (WebCore::WebGLRenderingContext::loseContextImpl):
352         (WebCore::WebGLRenderingContext::maybeRestoreContext):
353         * html/parser/HTMLConstructionSite.cpp:
354         (WebCore::HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded):
355         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
356         * html/parser/HTMLParserOptions.cpp:
357         (WebCore::HTMLParserOptions::HTMLParserOptions):
358         * html/parser/XSSAuditor.cpp:
359         (WebCore::XSSAuditor::init):
360         * html/parser/XSSAuditorDelegate.cpp:
361         (WebCore::XSSAuditorDelegate::generateViolationReport):
362         (WebCore::XSSAuditorDelegate::didBlockScript):
363         * inspector/InspectorApplicationCacheAgent.cpp:
364         (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
365         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
366         * inspector/InspectorFrontendClientLocal.cpp:
367         (WebCore::InspectorFrontendClientLocal::openInNewTab):
368         * inspector/InspectorFrontendHost.cpp:
369         (WebCore::InspectorFrontendHost::loadResourceSynchronously):
370         * inspector/InspectorOverlay.cpp:
371         (WebCore::InspectorOverlay::overlayPage):
372         * inspector/InspectorPageAgent.cpp:
373         (WebCore::InspectorPageAgent::mainResourceContent):
374         (WebCore::InspectorPageAgent::reload):
375         (WebCore::InspectorPageAgent::navigate):
376         (WebCore::allResourcesURLsForFrame):
377         (WebCore::InspectorPageAgent::searchInResource):
378         (WebCore::InspectorPageAgent::assertDocumentLoader):
379         (WebCore::InspectorPageAgent::buildObjectForFrame):
380         * inspector/InspectorResourceAgent.cpp:
381         (WebCore::InspectorResourceAgent::didFailLoading):
382         * loader/CookieJar.cpp:
383         (WebCore::networkingContext):
384         * loader/DocumentLoader.cpp:
385         (WebCore::DocumentLoader::frameLoader):
386         (WebCore::DocumentLoader::document):
387         (WebCore::DocumentLoader::stopLoading):
388         (WebCore::DocumentLoader::removeSubresourceLoader):
389         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
390         (WebCore::DocumentLoader::iconLoadDecisionAvailable):
391         (WebCore::DocumentLoader::continueIconLoadWithDecision):
392         * loader/DocumentThreadableLoader.cpp:
393         (WebCore::DocumentThreadableLoader::didReceiveResponse):
394         (WebCore::DocumentThreadableLoader::didFinishLoading):
395         (WebCore::DocumentThreadableLoader::didFail):
396         (WebCore::DocumentThreadableLoader::preflightFailure):
397         (WebCore::DocumentThreadableLoader::loadRequest):
398         * loader/DocumentWriter.cpp:
399         (WebCore::DocumentWriter::replaceDocument):
400         (WebCore::DocumentWriter::createDocument):
401         (WebCore::DocumentWriter::begin):
402         * loader/FrameLoader.cpp:
403         (WebCore::FrameLoader::~FrameLoader):
404         (WebCore::FrameLoader::allChildrenAreComplete):
405         (WebCore::FrameLoader::allAncestorsAreComplete):
406         (WebCore::FrameLoader::loadURLIntoChildFrame):
407         (WebCore::FrameLoader::outgoingReferrer):
408         (WebCore::FrameLoader::setOpener):
409         (WebCore::FrameLoader::completed):
410         (WebCore::FrameLoader::started):
411         (WebCore::FrameLoader::loadFrameRequest):
412         (WebCore::FrameLoader::loadURL):
413         (WebCore::FrameLoader::load):
414         (WebCore::FrameLoader::loadWithDocumentLoader):
415         (WebCore::FrameLoader::stopAllLoaders):
416         (WebCore::FrameLoader::closeOldDataSources):
417         (WebCore::FrameLoader::subframeIsLoading):
418         (WebCore::FrameLoader::subresourceCachePolicy):
419         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
420         (WebCore::FrameLoader::detachChildren):
421         (WebCore::FrameLoader::checkLoadComplete):
422         (WebCore::FrameLoader::detachFromParent):
423         (WebCore::FrameLoader::loadPostRequest):
424         (WebCore::FrameLoader::loadResourceSynchronously):
425         (WebCore::FrameLoader::shouldClose):
426         (WebCore::FrameLoader::handleBeforeUnloadEvent):
427         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
428         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
429         (WebCore::createWindow):
430         * loader/HistoryController.cpp:
431         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
432         (WebCore::HistoryController::restoreScrollPositionAndViewState):
433         (WebCore::HistoryController::saveDocumentState):
434         (WebCore::HistoryController::saveDocumentAndScrollState):
435         (WebCore::isAssociatedToRequestedHistoryItem):
436         (WebCore::HistoryController::restoreDocumentState):
437         (WebCore::HistoryController::shouldStopLoadingForHistoryItem):
438         (WebCore::HistoryController::goToItem):
439         (WebCore::HistoryController::updateForBackForwardNavigation):
440         (WebCore::HistoryController::updateForReload):
441         (WebCore::HistoryController::updateForStandardLoad):
442         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
443         (WebCore::HistoryController::updateForClientRedirect):
444         (WebCore::HistoryController::updateForCommit):
445         (WebCore::HistoryController::recursiveUpdateForCommit):
446         (WebCore::HistoryController::updateForSameDocumentNavigation):
447         (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
448         (WebCore::HistoryController::initializeItem):
449         (WebCore::HistoryController::createItemTree):
450         (WebCore::HistoryController::recursiveSetProvisionalItem):
451         (WebCore::HistoryController::recursiveGoToItem):
452         (WebCore::HistoryController::updateBackForwardListClippedAtTarget):
453         (WebCore::HistoryController::updateCurrentItem):
454         (WebCore::HistoryController::pushState):
455         (WebCore::HistoryController::replaceState):
456         * loader/ImageLoader.cpp:
457         (WebCore::pageIsBeingDismissed):
458         * loader/MixedContentChecker.cpp:
459         (WebCore::MixedContentChecker::client):
460         * loader/NavigationScheduler.cpp:
461         (WebCore::ScheduledURLNavigation::fire):
462         (WebCore::ScheduledURLNavigation::didStartTimer):
463         (WebCore::ScheduledURLNavigation::didStopTimer):
464         (WebCore::ScheduledRedirect::shouldStartTimer):
465         (WebCore::ScheduledRedirect::fire):
466         (WebCore::ScheduledRefresh::fire):
467         (WebCore::ScheduledHistoryNavigation::fire):
468         (WebCore::ScheduledFormSubmission::fire):
469         (WebCore::ScheduledFormSubmission::didStartTimer):
470         (WebCore::ScheduledFormSubmission::didStopTimer):
471         (WebCore::NavigationScheduler::mustLockBackForwardList):
472         (WebCore::NavigationScheduler::scheduleLocationChange):
473         (WebCore::NavigationScheduler::scheduleFormSubmission):
474         (WebCore::NavigationScheduler::scheduleRefresh):
475         (WebCore::NavigationScheduler::schedule):
476         * loader/PingLoader.cpp:
477         (WebCore::PingLoader::loadImage):
478         (WebCore::PingLoader::sendPing):
479         (WebCore::PingLoader::sendViolationReport):
480         (WebCore::PingLoader::PingLoader):
481         * loader/PolicyChecker.cpp:
482         (WebCore::PolicyChecker::checkNavigationPolicy):
483         (WebCore::PolicyChecker::checkNewWindowPolicy):
484         (WebCore::PolicyChecker::checkContentPolicy):
485         (WebCore::PolicyChecker::cancelCheck):
486         (WebCore::PolicyChecker::stopCheck):
487         (WebCore::PolicyChecker::cannotShowMIMEType):
488         (WebCore::PolicyChecker::continueLoadAfterWillSubmitForm):
489         (WebCore::PolicyChecker::continueAfterNavigationPolicy):
490         (WebCore::PolicyChecker::continueAfterNewWindowPolicy):
491         (WebCore::PolicyChecker::handleUnimplementablePolicy):
492         * loader/ProgressTracker.cpp:
493         (WebCore::ProgressTracker::progressStarted):
494         (WebCore::ProgressTracker::progressCompleted):
495         (WebCore::ProgressTracker::finalProgressComplete):
496         (WebCore::ProgressTracker::incrementProgress):
497         (WebCore::ProgressTracker::progressHeartbeatTimerFired):
498         * loader/ResourceLoadNotifier.cpp:
499         (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
500         (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
501         (WebCore::ResourceLoadNotifier::willSendRequest):
502         (WebCore::ResourceLoadNotifier::didFailToLoad):
503         (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
504         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
505         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
506         (WebCore::ResourceLoadNotifier::dispatchDidReceiveData):
507         (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
508         (WebCore::ResourceLoadNotifier::dispatchDidFailLoading):
509         * loader/ResourceLoader.cpp:
510         (WebCore::ResourceLoader::ResourceLoader):
511         (WebCore::ResourceLoader::start):
512         (WebCore::ResourceLoader::frameLoader):
513         (WebCore::ResourceLoader::willSendRequest):
514         * loader/SubframeLoader.cpp:
515         (WebCore::SubframeLoader::pluginIsLoadable):
516         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
517         (WebCore::SubframeLoader::createJavaAppletWidget):
518         (WebCore::SubframeLoader::loadOrRedirectSubframe):
519         (WebCore::SubframeLoader::loadSubframe):
520         (WebCore::SubframeLoader::allowPlugins):
521         (WebCore::SubframeLoader::shouldUsePlugin):
522         (WebCore::SubframeLoader::loadPlugin):
523         * loader/appcache/ApplicationCacheGroup.cpp:
524         (WebCore::ApplicationCacheGroup::selectCache):
525         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
526         (WebCore::ApplicationCacheGroup::update):
527         (WebCore::ApplicationCacheGroup::createResourceHandle):
528         (WebCore::ApplicationCacheGroup::didReceiveResponse):
529         (WebCore::ApplicationCacheGroup::didFinishLoading):
530         (WebCore::ApplicationCacheGroup::didFail):
531         (WebCore::ApplicationCacheGroup::addEntry):
532         (WebCore::CallCacheListenerTask::performTask):
533         (WebCore::ApplicationCacheGroup::postListenerTask):
534         * loader/appcache/DOMApplicationCache.cpp:
535         (WebCore::DOMApplicationCache::applicationCacheHost):
536         * loader/archive/cf/LegacyWebArchive.cpp:
537         (WebCore::LegacyWebArchive::create):
538         (WebCore::LegacyWebArchive::createFromSelection):
539         * loader/cache/CachedResource.cpp:
540         (WebCore::CachedResource::addAdditionalRequestHeaders):
541         (WebCore::CachedResource::load):
542         * loader/cache/CachedResourceLoader.cpp:
543         (WebCore::CachedResourceLoader::requestImage):
544         (WebCore::CachedResourceLoader::checkInsecureContent):
545         (WebCore::CachedResourceLoader::canRequest):
546         (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
547         (WebCore::CachedResourceLoader::requestResource):
548         (WebCore::CachedResourceLoader::clientDefersImage):
549         (WebCore::CachedResourceLoader::cachePolicy):
550         (WebCore::CachedResourceLoader::loadDone):
551         * loader/icon/IconController.cpp:
552         (WebCore::IconController::commitToDatabase):
553         (WebCore::IconController::startLoader):
554         (WebCore::IconController::continueLoadWithDecision):
555         * loader/icon/IconLoader.cpp:
556         (WebCore::IconLoader::startLoading):
557         (WebCore::IconLoader::notifyFinished):
558         * page/Chrome.cpp:
559         (WebCore::canRunModalIfDuringPageDismissal):
560         * page/ContextMenuController.cpp:
561         (WebCore::openNewWindow):
562         (WebCore::ContextMenuController::contextMenuItemSelected):
563         (WebCore::ContextMenuController::populate):
564         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
565         * page/DOMWindow.cpp:
566         (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
567         (WebCore::DOMWindow::postMessageTimerFired):
568         (WebCore::DOMWindow::close):
569         (WebCore::DOMWindow::print):
570         (WebCore::DOMWindow::stop):
571         (WebCore::DOMWindow::setName):
572         (WebCore::DOMWindow::opener):
573         (WebCore::DOMWindow::dispatchLoadEvent):
574         (WebCore::DOMWindow::setLocation):
575         (WebCore::DOMWindow::createWindow):
576         (WebCore::DOMWindow::open):
577         * page/DOMWindowExtension.cpp:
578         (WebCore::DOMWindowExtension::disconnectFrameForPageCache):
579         (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
580         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
581         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInFrame):
582         (WebCore::DOMWindowExtension::willDetachGlobalObjectFromFrame):
583         * page/DragController.cpp:
584         (WebCore::DragController::performDrag):
585         * page/EventHandler.cpp:
586         (WebCore::EventHandler::handleMousePressEvent):
587         (WebCore::EventHandler::keyEvent):
588         * page/Frame.cpp:
589         (WebCore::Frame::~Frame):
590         (WebCore::Frame::setView):
591         (WebCore::Frame::injectUserScripts):
592         (WebCore::Frame::willDetachPage):
593         * page/Frame.h:
594         (WebCore::Frame::loader):
595         * page/FrameView.cpp:
596         (WebCore::FrameView::mediaType):
597         (WebCore::FrameView::setFixedVisibleContentRect):
598         (WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
599         (WebCore::FrameView::performPostLayoutTasks):
600         (WebCore::FrameView::autoSizeIfEnabled):
601         (WebCore::FrameView::scrollTo):
602         (WebCore::FrameView::shouldSuspendScrollAnimations):
603         (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
604         (WebCore::FrameView::wheelEvent):
605         (WebCore::FrameView::firePaintRelatedMilestones):
606         * page/History.cpp:
607         (WebCore::History::stateInternal):
608         (WebCore::History::stateObjectAdded):
609         * page/Location.cpp:
610         (WebCore::Location::setLocation):
611         * page/Navigator.cpp:
612         (WebCore::Navigator::userAgent):
613         * page/Page.cpp:
614         (WebCore::Page::goToItem):
615         (WebCore::Page::refreshPlugins):
616         (WebCore::Page::setDefersLoading):
617         (WebCore::Page::setMemoryCacheClientCallsEnabled):
618         (WebCore::Page::addRelevantRepaintedObject):
619         * page/Performance.cpp:
620         (WebCore::Performance::now):
621         * page/PerformanceNavigation.cpp:
622         (WebCore::PerformanceNavigation::type):
623         (WebCore::PerformanceNavigation::redirectCount):
624         * page/PerformanceResourceTiming.cpp:
625         (WebCore::monotonicTimeToDocumentMilliseconds):
626         * page/mac/PageMac.cpp:
627         (WebCore::Page::addSchedulePair):
628         (WebCore::Page::removeSchedulePair):
629         * platform/ios/PasteboardIOS.mm:
630         (WebCore::documentFragmentWithImageResource):
631         (WebCore::documentFragmentWithRTF):
632         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
633         * platform/mac/HTMLConverter.mm:
634         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
635         (-[WebHTMLConverter _loadFromDOMRange]):
636         * platform/mac/PasteboardMac.mm:
637         (WebCore::documentFragmentWithImageResource):
638         (WebCore::documentFragmentWithRTF):
639         (WebCore::fragmentFromWebArchive):
640         * plugins/DOMMimeType.cpp:
641         (WebCore::DOMMimeType::enabledPlugin):
642         * rendering/RenderLayer.cpp:
643         (WebCore::RenderLayer::scrollTo):
644         * svg/SVGAElement.cpp:
645         (WebCore::SVGAElement::defaultEventHandler):
646         * svg/graphics/SVGImage.cpp:
647         (WebCore::SVGImage::~SVGImage):
648         (WebCore::SVGImage::dataChanged):
649         * testing/Internals.cpp:
650         (WebCore::Internals::formControlStateOfPreviousHistoryItem):
651         (WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
652         (WebCore::Internals::getReferencedFilePaths):
653         (WebCore::Internals::forceReload):
654         * xml/XSLTProcessorLibxslt.cpp:
655         (WebCore::docLoaderFunc):
656         * xml/parser/XMLDocumentParserLibxml2.cpp:
657         (WebCore::openFunc):
658         (WebCore::XMLDocumentParser::startElementNs):
659
660 2013-08-15  Daniel Bates  <dabates@apple.com>
661
662         <https://webkit.org/b/119863> [iOS] Upstream WebCore/editing/ios
663
664         Reviewed by David Kilzer.
665
666         Use the same UUIDs for EditorIOS.mm and the group ios as in the iOS tree
667         so as to make it straightforward to merge changes to the WebCore Xcode
668         project file on WebKit.org with changes to the same file in the iOS tree.
669
670         * WebCore.xcodeproj/project.pbxproj:
671
672 2013-08-15  Brent Fulgham  <bfulgham@apple.com>
673
674         [Windows] Unreviewed build fix after r15417.
675
676         * DerivedSources.cpp: Remove classes that now live in JSC.
677         * WebCore.vcxproj/WebCore.vcxproj: Remove classes no longer included in WebCore.
678         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
679         * bindings/js/WebCoreTypedArrayController.cpp: Add explicit namespace to avoid conflict
680         with Windows 'Unknown' type.
681         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
682         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
683
684 2013-08-15  Daniel Bates  <dabates@apple.com>
685
686         <https://webkit.org/b/119863> [iOS] Upstream WebCore/editing/ios
687
688         Reviewed by David Kilzer.
689
690         * WebCore.xcodeproj/project.pbxproj:
691         * editing/ios/EditorIOS.mm: Added.
692         (WebCore::Editor::newGeneralClipboard):
693         (WebCore::Editor::showFontPanel):
694         (WebCore::Editor::showStylesPanel):
695         (WebCore::Editor::showColorPanel):
696         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
697         (WebCore::Editor::insertParagraphSeparatorInQuotedContent):
698         (WebCore::styleForSelectionStart):
699         (WebCore::Editor::fontForSelection):
700         (WebCore::Editor::fontAttributesForSelectionStart):
701         (WebCore::Editor::removeUnchangeableStyles):
702
703 2013-08-15  Dirk Schulze  <krit@webkit.org>
704
705         Implement CSS Image filter() function
706         https://bugs.webkit.org/show_bug.cgi?id=119845
707
708         Reviewed by Dean Jackson.
709
710         The Filter Effects specification defines a new CSS Image function called
711         filter(). This function takes another CSS Image as well as a filter function
712         list as input and can be used by various CSS properties.
713
714         Example:
715
716             background-image: -webkit-filter(url(image.png), brightness(0.5))
717
718         This patch implements the current definition of filter() based on other
719         image generation classes like CSSCrossfadeValue.
720         A new class called CSSFilterImageValue was added together with an
721         image observer.
722
723         The function is implemented prefixed and behind the compiler flag CSS_FILTERS.
724
725         Tests: fast/filter-image/filter-image.html
726                fast/filter-image/parse-filter-image.html
727
728         * CMakeLists.txt: Added new files to build systems.
729         * GNUmakefile.list.am:
730         * Target.pri:
731         * WebCore.vcxproj/WebCore.vcxproj:
732         * WebCore.xcodeproj/project.pbxproj:
733         * css/CSSAllInOne.cpp:
734         * css/CSSCrossfadeValue.cpp: Share code together with CSSFilterImageValue
735             in CSSImageGeneratorValue.cpp.
736         (WebCore::CSSCrossfadeValue::isPending):
737         (WebCore::CSSCrossfadeValue::loadSubimages):
738         * css/CSSFilterImageValue.cpp: Added.
739         (WebCore::CSSFilterImageValue::~CSSFilterImageValue):
740         (WebCore::CSSFilterImageValue::customCssText):
741         (WebCore::CSSFilterImageValue::fixedSize):
742         (WebCore::CSSFilterImageValue::isPending):
743         (WebCore::CSSFilterImageValue::knownToBeOpaque):
744         (WebCore::CSSFilterImageValue::loadSubimages):
745         (WebCore::CSSFilterImageValue::image):
746         (WebCore::CSSFilterImageValue::filterImageChanged):
747         (WebCore::CSSFilterImageValue::createFilterOperations):
748         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::imageChanged):
749         (WebCore::CSSFilterImageValue::hasFailedOrCanceledSubresources):
750         (WebCore::CSSFilterImageValue::equals):
751         * css/CSSFilterImageValue.h: Added.
752         (WebCore::CSSFilterImageValue::create):
753         (WebCore::CSSFilterImageValue::isFixedSize):
754         (WebCore::CSSFilterImageValue::CSSFilterImageValue):
755         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::FilterSubimageObserverProxy):
756         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::~FilterSubimageObserverProxy):
757         (WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::setReady):
758         * css/CSSImageGeneratorValue.cpp: Shared code between CSSCrossfadeValue and
759             CSSFilterImageValue.
760         (WebCore::CSSImageGeneratorValue::image):
761         (WebCore::CSSImageGeneratorValue::isFixedSize):
762         (WebCore::CSSImageGeneratorValue::fixedSize):
763         (WebCore::CSSImageGeneratorValue::isPending):
764         (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
765         (WebCore::CSSImageGeneratorValue::loadSubimages):
766         (WebCore::CSSImageGeneratorValue::subimageIsPending):
767         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
768         * css/CSSImageGeneratorValue.h:
769         * css/CSSParser.cpp: Added parsing information for new image function.
770         (WebCore::CSSParser::parseValue):
771         (WebCore::CSSParser::isGeneratedImageValue):
772         (WebCore::CSSParser::parseGeneratedImage):
773         (WebCore::CSSParser::parseFilterImage):
774         (WebCore::CSSParser::parseFilter):
775         * css/CSSParser.h:
776         * css/CSSValue.cpp:
777         (WebCore::CSSValue::hasFailedOrCanceledSubresources):
778         (WebCore::CSSValue::equals):
779         (WebCore::CSSValue::cssText):
780         (WebCore::CSSValue::destroy):
781         * css/CSSValue.h:
782         (WebCore::CSSValue::isFilterImageValue):
783         * css/StyleResolver.cpp:
784         (WebCore::StyleResolver::applyProperty):
785         (WebCore::StyleResolver::generatedOrPendingFromValue):
786         (WebCore::StyleResolver::createFilterOperations):
787         * css/StyleResolver.h: StyleResolver needs to be passed to
788             CSSFilterImageValue in order to resolve blur() and
789             drop-shadow() function. Both needs to be resolved together
790             with all other properties and can't be done earlier or later.
791         * rendering/FilterEffectRenderer.cpp:
792         (WebCore::FilterEffectRenderer::build): Pass an argument whether the
793             intermediate filter results should be clipped or not. The filter
794             property for instance doesn't clip but scales the intermediate
795             image sizes.
796         * rendering/FilterEffectRenderer.h:
797
798 2013-08-15  Filip Pizlo  <fpizlo@apple.com>
799
800         Unreviewed, fix bindings tests after http://trac.webkit.org/changeset/154127
801
802         * bindings/scripts/test/JS/JSTestCallback.cpp:
803         (WebCore::JSTestCallback::callbackWithArrayParam):
804         * bindings/scripts/test/JS/JSTestCallback.h:
805         * bindings/scripts/test/JS/JSTestObj.cpp:
806         (WebCore::setJSTestObjTypedArrayAttr):
807         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
808         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
809         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
810         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
811         * bindings/scripts/test/ObjC/DOMFloat64Array.mm:
812         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
813         * bindings/scripts/test/TestTypedArray.idl: Removed.
814
815 2013-08-15  Ryosuke Niwa  <rniwa@webkit.org>
816
817         Qt minimum build fix after r154116.
818
819         * page/FrameView.cpp:
820         (WebCore::FrameView::sendResizeEventIfNeeded):
821
822 2013-08-14  Filip Pizlo  <fpizlo@apple.com>
823
824         Typed arrays should be rewritten
825         https://bugs.webkit.org/show_bug.cgi?id=119064
826
827         Reviewed by Oliver Hunt.
828
829         Typed arrays are now implemented in JavaScriptCore, and WebCore is merely a
830         client of them. There is only one layering violation: WebCore installs a
831         WebCoreTypedArrayController on VM, which makes the
832         ArrayBuffer<->JSArrayBuffer relationship resemble DOM wrappers. By default,
833         JSC makes the ownership go one way; the JSArrayBuffer keeps the ArrayBuffer
834         alive but if ArrayBuffer is kept alive from native code then the
835         JSArrayByffer may die. WebCoreTypedArrayController will keep the
836         JSArrayBuffer alive if the ArrayBuffer is in the opaque root set.
837         
838         To make non-JSDOMWrappers behave like DOM wrappers, a bunch of code is
839         changed to make most references to wrappers refer to JSObject* rather than
840         JSDOMWrapper*.
841         
842         Array buffer views are now transient; the JS array buffer view wrappers
843         don't own them or keep them alive. This required a bunch of changes to make
844         bindings code use RefPtr<ArrayBufferView> to hold onto their views.
845         
846         Also there is a bunch of new code to make JSC-provided array buffers and
847         views obey the toJS/to<ClassName> idiom for wrapping and unwrapping.
848         
849         Finally, the DataView API is now completely different: the JSDataView
850         provides the same user-visible JS API but using its own internal magic; the
851         C++ code that uses DataView now uses a rather different API that is not
852         aware of usual DOM semantics, since it's in JSC and not WebCore. It's
853         equally useful for all of WebCore's purposes, but some code had to change
854         to adapt the new conventions.
855         
856         Some tests have been changed or rebased due to changes in behavior, that
857         bring us into conformance with where the standards are going and allow us to
858         match Firefox behavior.
859
860         Automake work and some additional GTK changes courtesy of
861         Zan Dobersek <zdobersek@igalia.com>.
862         
863         Additional Qt changes courtesy of Arunprasad Rajkumar <arurajku@cisco.com>.
864
865         * CMakeLists.txt:
866         * DerivedSources.make:
867         * ForwardingHeaders/runtime/DataView.h: Added.
868         * ForwardingHeaders/runtime/JSArrayBuffer.h: Added.
869         * ForwardingHeaders/runtime/JSArrayBufferView.h: Added.
870         * ForwardingHeaders/runtime/JSDataView.h: Added.
871         * ForwardingHeaders/runtime/JSTypedArrays.h: Added.
872         * ForwardingHeaders/runtime/TypedArrayController.h: Added.
873         * ForwardingHeaders/runtime/TypedArrayInlines.h: Added.
874         * ForwardingHeaders/runtime/TypedArrays.h: Added.
875         * GNUmakefile.list.am:
876         * Modules/webaudio/RealtimeAnalyser.h:
877         * Target.pri:
878         * UseJSC.cmake:
879         * WebCore.exp.in:
880         * WebCore.vcxproj/WebCore.vcxproj:
881         * WebCore.xcodeproj/project.pbxproj:
882         * bindings/js/DOMWrapperWorld.h:
883         * bindings/js/JSArrayBufferCustom.cpp: Removed.
884         * bindings/js/JSArrayBufferViewHelper.h: Removed.
885         * bindings/js/JSAudioContextCustom.cpp:
886         * bindings/js/JSBindingsAllInOne.cpp:
887         * bindings/js/JSBlobCustom.cpp:
888         * bindings/js/JSCSSRuleCustom.cpp:
889         (WebCore::toJS):
890         * bindings/js/JSCSSValueCustom.cpp:
891         (WebCore::toJS):
892         * bindings/js/JSCryptoCustom.cpp:
893         (WebCore::JSCrypto::getRandomValues):
894         * bindings/js/JSDOMBinding.h:
895         (WebCore::wrapperOwner):
896         (WebCore::wrapperContext):
897         (WebCore::getInlineCachedWrapper):
898         (WebCore::setInlineCachedWrapper):
899         (WebCore::clearInlineCachedWrapper):
900         (WebCore::getCachedWrapper):
901         (WebCore::cacheWrapper):
902         (WebCore::uncacheWrapper):
903         (WebCore::wrap):
904         (WebCore::toJS):
905         (WebCore::toArrayBufferView):
906         (WebCore::toInt8Array):
907         (WebCore::toInt16Array):
908         (WebCore::toInt32Array):
909         (WebCore::toUint8Array):
910         (WebCore::toUint8ClampedArray):
911         (WebCore::toUint16Array):
912         (WebCore::toUint32Array):
913         (WebCore::toFloat32Array):
914         (WebCore::toFloat64Array):
915         (WebCore::toDataView):
916         * bindings/js/JSDataViewCustom.cpp: Removed.
917         * bindings/js/JSDictionary.cpp:
918         * bindings/js/JSDictionary.h:
919         * bindings/js/JSDocumentCustom.cpp:
920         (WebCore::JSDocument::location):
921         (WebCore::toJS):
922         * bindings/js/JSEventCustom.cpp:
923         (WebCore::toJS):
924         * bindings/js/JSFileReaderCustom.cpp:
925         * bindings/js/JSHTMLCollectionCustom.cpp:
926         (WebCore::toJS):
927         * bindings/js/JSHTMLTemplateElementCustom.cpp:
928         (WebCore::JSHTMLTemplateElement::content):
929         * bindings/js/JSImageDataCustom.cpp:
930         (WebCore::toJS):
931         * bindings/js/JSInjectedScriptHostCustom.cpp:
932         * bindings/js/JSMessageEventCustom.cpp:
933         * bindings/js/JSMessagePortCustom.cpp:
934         * bindings/js/JSSVGPathSegCustom.cpp:
935         (WebCore::toJS):
936         * bindings/js/JSStyleSheetCustom.cpp:
937         (WebCore::toJS):
938         * bindings/js/JSTrackCustom.cpp:
939         (WebCore::toJS):
940         * bindings/js/JSWebGLRenderingContextCustom.cpp:
941         * bindings/js/JSXMLHttpRequestCustom.cpp:
942         (WebCore::JSXMLHttpRequest::send):
943         * bindings/js/SerializedScriptValue.cpp:
944         (WebCore::SerializedScriptValue::transferArrayBuffers):
945         * bindings/js/WebCoreJSClientData.h:
946         (WebCore::initNormalWorldClientData):
947         * bindings/js/WebCoreTypedArrayController.cpp: Added.
948         (WebCore::WebCoreTypedArrayController::WebCoreTypedArrayController):
949         (WebCore::WebCoreTypedArrayController::~WebCoreTypedArrayController):
950         (WebCore::WebCoreTypedArrayController::toJS):
951         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
952         (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
953         * bindings/js/WebCoreTypedArrayController.h: Added.
954         (WebCore::WebCoreTypedArrayController::wrapperOwner):
955         * bindings/scripts/CodeGenerator.pm:
956         (ForAllParents):
957         (ParseInterface):
958         (SkipIncludeHeader):
959         (IsTypedArrayType):
960         (IsWrapperType):
961         * bindings/scripts/CodeGeneratorJS.pm:
962         (AddIncludesForType):
963         (GenerateHeader):
964         (GenerateImplementation):
965         (GenerateParametersCheck):
966         (GetNativeType):
967         (JSValueToNative):
968         (NativeToJSValue):
969         (GenerateConstructorDefinition):
970         (GenerateConstructorHelperMethods):
971         * fileapi/WebKitBlobBuilder.cpp:
972         (WebCore::BlobBuilder::append):
973         * fileapi/WebKitBlobBuilder.h:
974         * html/canvas/ArrayBuffer.idl: Removed.
975         * html/canvas/ArrayBufferView.idl: Removed.
976         * html/canvas/DataView.cpp: Removed.
977         * html/canvas/DataView.h: Removed.
978         * html/canvas/DataView.idl: Removed.
979         * html/canvas/Float32Array.idl: Removed.
980         * html/canvas/Float64Array.idl: Removed.
981         * html/canvas/Int16Array.idl: Removed.
982         * html/canvas/Int32Array.idl: Removed.
983         * html/canvas/Int8Array.idl: Removed.
984         * html/canvas/Uint16Array.idl: Removed.
985         * html/canvas/Uint32Array.idl: Removed.
986         * html/canvas/Uint8Array.idl: Removed.
987         * html/canvas/Uint8ClampedArray.idl: Removed.
988         * html/canvas/WebGLRenderingContext.cpp:
989         (WebCore::WebGLRenderingContext::readPixels):
990         (WebCore::WebGLRenderingContext::validateTexFuncData):
991         * page/Crypto.cpp:
992         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
993         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
994         (WebCore::MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData):
995         * platform/graphics/filters/FECustomFilter.h:
996         * platform/graphics/filters/FEGaussianBlur.cpp:
997         * platform/graphics/filters/FilterEffect.cpp:
998         * testing/MockCDM.cpp:
999
1000 2013-08-15  Chris Fleizach  <cfleizach@apple.com>
1001
1002         <https://webkit.org/b/119824> AX: WKView does not become first responder when the voiceover cursor lands on it
1003
1004         Reviewed by Darin Adler.
1005
1006         Incorporate review feedback from Darin.
1007
1008         * accessibility/AccessibilityScrollView.cpp:
1009         (WebCore::AccessibilityScrollView::canSetFocusAttribute):
1010         (WebCore::AccessibilityScrollView::isFocused):
1011         * accessibility/AccessibilityScrollView.h:
1012
1013 2013-08-15  Andreas Kling  <akling@apple.com>
1014
1015         <https://webkit.org/b/119826> Page::focusController() should return a reference.
1016
1017         Reviewed by Anders Carlsson.
1018
1019         Page::focusController() is never null so make it return a reference.
1020         Some unnecessary checks were removed as a result.
1021
1022 2013-08-15  Rob Buis  <rwlbuis@webkit.org>
1023
1024         ASSERTION FAILED: !m_adoptionIsRequired in void WebCore::TreeShared<NodeType>::ref()
1025         https://bugs.webkit.org/show_bug.cgi?id=116979
1026
1027         Reviewed by Alexey Proskuryakov.
1028
1029         Make constructors private since only ::create should use them.
1030
1031         * html/shadow/MeterShadowElement.h:
1032         * html/shadow/ProgressShadowElement.h:
1033
1034 2013-08-15  Tim Horton  <timothy_horton@apple.com>
1035
1036         FrameView should have an isMainFrameView()
1037         https://bugs.webkit.org/show_bug.cgi?id=119435
1038
1039         Reviewed by Simon Fraser.
1040
1041         No new tests, just refactoring.
1042
1043         * page/FrameView.cpp:
1044         (WebCore::FrameView::FrameView):
1045         (WebCore::FrameView::isMainFrameView):
1046         (WebCore::FrameView::setFrameRect):
1047         (WebCore::FrameView::createScrollbar):
1048         (WebCore::FrameView::applyOverflowToViewport):
1049         (WebCore::FrameView::setHeaderHeight):
1050         (WebCore::FrameView::setFooterHeight):
1051         (WebCore::FrameView::minimumScrollPosition):
1052         (WebCore::FrameView::maximumScrollPosition):
1053         (WebCore::FrameView::performPostLayoutTasks):
1054         (WebCore::FrameView::sendResizeEventIfNeeded):
1055         (WebCore::FrameView::pagination):
1056         (WebCore::FrameView::visibleContentScaleFactor):
1057         (WebCore::FrameView::setVisibleScrollerThumbRect):
1058         (WebCore::FrameView::scrollbarStyleChanged):
1059         (WebCore::FrameView::paintScrollCorner):
1060         (WebCore::FrameView::paintScrollbar):
1061         (WebCore::FrameView::paintOverhangAreas):
1062         * page/FrameView.h:
1063         Add isMainFrameView and adopt it wherever we were previously checking if
1064         the FrameView's frame was the same as its page's main frame.
1065
1066 2013-08-15  Andy Estes  <aestes@apple.com>
1067
1068         <https://webkit.org/b/119853> REGRESSION (r139343): WebKit crashes when canceling a load inside webView:resource:didFinishLoadingFromDataSource:
1069
1070         Reviewed by Brady Eidson.
1071
1072         A client implementing webView:resource:didFinishLoadingFromDataSource:
1073         might decide to call stopLoading: for the identifier that just finished
1074         loading. If this happens we re-enter the loader and attempt to cancel a
1075         load that has already finished and been removed from the set of active
1076         loaders. Prevent this by clearing DocumentLoader's
1077         m_identifierForLoadWithoutResourceLoader before calling
1078         dispatchDidFinishLoading().
1079
1080         New API test: WebKit1.StopLoadingFromDidFinishLoading.
1081
1082         * loader/DocumentLoader.cpp:
1083         (WebCore::DocumentLoader::finishedLoading): Set
1084         m_identifierForLoadWithoutResourceLoader to 0 before calling
1085         dispatchDidFinishLoading().
1086
1087 2013-08-15  Eric Carlson  <eric.carlson@apple.com>
1088
1089         [Mac] Remove "legacy" media UI
1090         https://bugs.webkit.org/show_bug.cgi?id=119752
1091
1092         Reviewed by Jer Noble.
1093
1094         * WebCore.exp.in: Remove _wkMediaControllerThemeAvailable.
1095
1096         * platform/mac/WebCoreSystemInterface.h: Update for API change.
1097         * platform/mac/WebCoreSystemInterface.mm: Ditto.
1098
1099         * rendering/RenderThemeMac.h: Don't override hasOwnDisabledStateHandlingFor.
1100         * rendering/RenderThemeMac.mm:
1101         (WebCore::RenderThemeMac::adjustMediaSliderThumbSize): Remove code to deal with legacy theme.
1102         (WebCore::getUnzoomedRectAndAdjustCurrentContext): Ditto.
1103         (WebCore::RenderThemeMac::paintMediaFullscreenButton): wkDrawMediaUIPart doesn't need to know
1104             the current theme.
1105         (WebCore::RenderThemeMac::paintMediaMuteButton): Ditto.
1106         (WebCore::RenderThemeMac::paintMediaPlayButton): Ditto.
1107         (WebCore::RenderThemeMac::paintMediaSeekBackButton): Ditto.
1108         (WebCore::RenderThemeMac::paintMediaSeekForwardButton): Ditto.
1109         (WebCore::RenderThemeMac::paintMediaSliderTrack): Ditto.
1110         (WebCore::RenderThemeMac::paintMediaSliderThumb): Ditto.
1111         (WebCore::RenderThemeMac::paintMediaRewindButton): Ditto.
1112         (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto.
1113         (WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto.
1114         (WebCore::RenderThemeMac::paintMediaCurrentTime): Ditto.
1115         (WebCore::RenderThemeMac::paintMediaTimeRemaining): Ditto.
1116         (WebCore::RenderThemeMac::paintMediaVolumeSliderContainer): Ditto.
1117         (WebCore::RenderThemeMac::paintMediaVolumeSliderTrack): Ditto.
1118         (WebCore::RenderThemeMac::paintMediaVolumeSliderThumb): Ditto.
1119         (WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderTrack): Ditto.
1120         (WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderThumb): Ditto.
1121         (WebCore::RenderThemeMac::extraMediaControlsStyleSheet): We only have one theme.
1122         (WebCore::RenderThemeMac::extraFullScreenStyleSheet): Ditto.
1123         (WebCore::RenderThemeMac::usesMediaControlStatusDisplay): Ditto.
1124
1125 2013-08-15  Antti Koivisto  <antti@apple.com>
1126
1127         <https://webkit.org/b/119834> Remove ElementShadow
1128
1129         Reviewed by Anders Carlsson.
1130
1131         It is 1:1 with ShadowRoot and has virtually no functionality. What little there is can be moved to ShadowRoot or Element.
1132
1133         * CMakeLists.txt:
1134         * GNUmakefile.list.am:
1135         * Target.pri:
1136         * WebCore.exp.in:
1137         * WebCore.xcodeproj/project.pbxproj:
1138         * css/StyleResolver.cpp:
1139         (WebCore::StyleResolver::locateCousinList):
1140         * css/StyleScopeResolver.cpp:
1141         (WebCore::StyleScopeResolver::styleSharingCandidateMatchesHostRules):
1142         (WebCore::StyleScopeResolver::matchHostRules):
1143         * dom/ComposedShadowTreeWalker.cpp:
1144         (WebCore::nodeCanBeDistributed):
1145         (WebCore::ComposedShadowTreeWalker::traverseChild):
1146         * dom/ContainerNode.cpp:
1147         (WebCore::childAttachedAllowedWhenAttachingChildren):
1148         * dom/ContainerNodeAlgorithms.cpp:
1149         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
1150         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
1151         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
1152         (WebCore::assertConnectedSubrameCountIsConsistent):
1153         * dom/ContainerNodeAlgorithms.h:
1154         (WebCore::ChildFrameDisconnector::collectFrameOwners):
1155         * dom/DOMAllInOne.cpp:
1156         * dom/Document.cpp:
1157         * dom/Element.cpp:
1158         (WebCore::Element::~Element):
1159         (WebCore::Element::attach):
1160         (WebCore::Element::detach):
1161         (WebCore::Element::shadowRoot):
1162         (WebCore::Element::didAffectSelector):
1163         (WebCore::Element::addShadowRoot):
1164         (WebCore::Element::removeShadowRoot):
1165         
1166             Move addShadowRoot and removeShadowRoot here from ElementShadow.
1167
1168         (WebCore::Element::createShadowRoot):
1169         (WebCore::Element::authorShadowRoot):
1170         (WebCore::Element::userAgentShadowRoot):
1171         (WebCore::Element::ensureUserAgentShadowRoot):
1172         (WebCore::Element::childrenChanged):
1173         (WebCore::Element::removeAllEventListeners):
1174         * dom/Element.h:
1175         (WebCore::isShadowHost):
1176         * dom/ElementRareData.h:
1177         (WebCore::ElementRareData::clearShadowRoot):
1178         (WebCore::ElementRareData::shadowRoot):
1179         (WebCore::ElementRareData::setShadowRoot):
1180         (WebCore::ElementRareData::~ElementRareData):
1181         * dom/ElementShadow.cpp: Removed.
1182         * dom/ElementShadow.h: Removed.
1183         * dom/EventDispatcher.cpp:
1184         * dom/EventPathWalker.cpp:
1185         (WebCore::EventPathWalker::moveToParent):
1186         * dom/Node.cpp:
1187         (WebCore::Node::needsShadowTreeWalkerSlow):
1188         * dom/NodeRenderingContext.cpp:
1189         * dom/NodeRenderingContext.h:
1190         * dom/ShadowRoot.cpp:
1191         (WebCore::ShadowRoot::attach):
1192         (WebCore::ShadowRoot::detach):
1193         
1194             Move attached() tests from ElementShadow.
1195
1196         (WebCore::ShadowRoot::childrenChanged):
1197         (WebCore::ShadowRoot::removeAllEventListeners):
1198         
1199             Move here from ElementShadow.
1200
1201         * dom/ShadowRoot.h:
1202         (WebCore::Node::shadowRoot):
1203         * dom/TreeScopeAdopter.cpp:
1204         * html/ColorInputType.cpp:
1205         (WebCore::ColorInputType::createShadowSubtree):
1206         * html/FileInputType.cpp:
1207         (WebCore::FileInputType::createShadowSubtree):
1208         (WebCore::FileInputType::disabledAttributeChanged):
1209         (WebCore::FileInputType::multipleAttributeChanged):
1210         * html/HTMLFormControlElement.cpp:
1211         * html/HTMLImageElement.cpp:
1212         (WebCore::HTMLImageElement::canStartSelection):
1213         * html/HTMLInputElement.cpp:
1214         (WebCore::HTMLInputElement::updateType):
1215         * html/HTMLKeygenElement.cpp:
1216         * html/HTMLMediaElement.cpp:
1217         * html/HTMLTextAreaElement.cpp:
1218         * html/InputType.cpp:
1219         * html/RangeInputType.cpp:
1220         (WebCore::RangeInputType::handleMouseDownEvent):
1221         (WebCore::RangeInputType::createShadowSubtree):
1222         * html/TextFieldInputType.cpp:
1223         (WebCore::TextFieldInputType::createShadowSubtree):
1224         * html/ValidationMessage.cpp:
1225         * html/shadow/ContentDistributor.cpp:
1226         (WebCore::ContentDistributor::distribute):
1227         (WebCore::ContentDistributor::ensureDistribution):
1228         * html/shadow/ContentDistributor.h:
1229         (WebCore::ContentDistributor::isValid):
1230         * html/shadow/InsertionPoint.cpp:
1231         (WebCore::InsertionPoint::childrenChanged):
1232         (WebCore::InsertionPoint::insertedInto):
1233         (WebCore::InsertionPoint::removedFrom):
1234         (WebCore::resolveReprojection):
1235         * html/shadow/InsertionPoint.h:
1236         (WebCore::shadowRootOfParentForDistribution):
1237         * html/shadow/SliderThumbElement.cpp:
1238         * inspector/InspectorDOMAgent.cpp:
1239         (WebCore::InspectorDOMAgent::unbind):
1240         (WebCore::InspectorDOMAgent::buildObjectForNode):
1241         * page/FocusController.cpp:
1242         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
1243         * rendering/RenderFileUploadControl.cpp:
1244         (WebCore::RenderFileUploadControl::uploadButton):
1245         * rendering/RenderTheme.cpp:
1246         * style/StyleResolveTree.cpp:
1247         (WebCore::Style::resolveTree):
1248         * svg/SVGTRefElement.cpp:
1249         (WebCore::SVGTRefElement::updateReferencedText):
1250         (WebCore::SVGTRefElement::detachTarget):
1251         * svg/SVGUseElement.cpp:
1252         (WebCore::SVGUseElement::clearResourceReferences):
1253         (WebCore::SVGUseElement::buildShadowAndInstanceTree):
1254         (WebCore::SVGUseElement::buildShadowTree):
1255         * testing/Internals.cpp:
1256         (WebCore::Internals::ensureShadowRoot):
1257         (WebCore::Internals::shadowRoot):
1258
1259 2013-08-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1260
1261         [Qt] memory leak in WebCore::FontCache::getLastResortFallbackFont
1262         https://bugs.webkit.org/show_bug.cgi?id=118532
1263
1264         Reviewed by Jocelyn Turcotte.
1265
1266         We don't need to allocate FontPlatformData on the heap
1267         since getCachedFontData makes a deep copy anyway.
1268
1269         * platform/graphics/qt/FontCacheQt.cpp:
1270         (WebCore::FontCache::getLastResortFallbackFont):
1271
1272 2013-08-15  Rob Buis  <rwlbuis@webkit.org>
1273
1274         ASSERTION FAILED: !m_adoptionIsRequired in void WebCore::TreeShared<NodeType>::ref()
1275         https://bugs.webkit.org/show_bug.cgi?id=116979
1276
1277         Reviewed by Antti Koivisto.
1278
1279         Make sure adoptRef is called before calling setPseudo, for all progress shadow elements.
1280
1281         * html/shadow/ProgressShadowElement.cpp:
1282         (WebCore::ProgressInnerElement::ProgressInnerElement):
1283         (WebCore::ProgressBarElement::ProgressBarElement):
1284         (WebCore::ProgressValueElement::ProgressValueElement):
1285         * html/shadow/ProgressShadowElement.h:
1286         (WebCore::ProgressInnerElement::create):
1287         (WebCore::ProgressBarElement::create):
1288         (WebCore::ProgressValueElement::create):
1289
1290 2013-08-14  Ryuan Choi  <ryuan.choi@samsung.com>
1291
1292         <https://webkit.org/b/119786> [EFL] decoration of search type is different from other platforms
1293
1294         Reviewed by Gyuyoung Kim.
1295
1296         Other platforms except EFL port draw a magnifying icon for
1297         -webkit-search-results-button and -webkit-search-results-decoration in search field,
1298         but Efl port draws it for -webkit-search-decoration.
1299
1300         This patch makes Efl port draw icon in first two cases like other ports.
1301
1302         Tests: fast/css/input-search-padding.html
1303            fast/css/text-input-with-webkit-border-radius.html
1304            fast/css/text-overflow-input.html
1305            fast/forms/box-shadow-override.html
1306            fast/forms/control-restrict-line-height.html
1307            fast/forms/input-appearance-height.html
1308            fast/forms/placeholder-position.html
1309            fast/forms/placeholder-pseudo-style.html
1310            fast/forms/search-cancel-button-style-sharing.html
1311            fast/forms/search-display-none-cancel-button.html
1312            fast/forms/search-rtl.html
1313            fast/forms/search-vertical-alignment.html
1314            fast/forms/searchfield-heights.html
1315            fast/repaint/search-field-cancel.html
1316
1317         * platform/efl/DefaultTheme/widget/search/cancel/search_cancel.edc:
1318         Moved results_button alias to search_decoration.edc
1319         * platform/efl/DefaultTheme/widget/search/decoration/search_decoration.edc:
1320         * platform/efl/RenderThemeEfl.cpp:
1321         Updated size of ResultsButtonStyle and ResultsDecorationStyle to show icon.
1322         In addition, removed adjustSearchFieldResultsButtonStyle and paintSearchFieldDecoration.
1323         (WebCore::toEdjeGroup): Removed decoration group.
1324         (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
1325         (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationStyle):
1326         * platform/efl/RenderThemeEfl.h:
1327
1328 2013-08-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1329
1330         [CSS] Introduce new structure to pass image orientation values.
1331         https://bugs.webkit.org/show_bug.cgi?id=119418
1332
1333         Reviewed by Beth Dakin.
1334
1335         Add a ImageOrientationDescription struct in order to reduce count of argument for
1336         image orientation.
1337
1338         No new tests, no behavior change.
1339
1340         * html/HTMLCanvasElement.cpp:
1341         (WebCore::HTMLCanvasElement::paint):
1342         * page/DragController.cpp:
1343         (WebCore::DragController::doImageDrag):
1344         * page/Frame.cpp:
1345         (WebCore::Frame::nodeImage):
1346         (WebCore::Frame::dragImageForSelection):
1347         * platform/DragImage.h:
1348         * platform/blackberry/DragImageBlackBerry.cpp:
1349         (WebCore::createDragImageFromImage):
1350         * platform/efl/DragImageEfl.cpp:
1351         (WebCore::createDragImageFromImage):
1352         * platform/graphics/BitmapImage.cpp:
1353         (WebCore::BitmapImage::updateSize):
1354         * platform/graphics/BitmapImage.h:
1355         * platform/graphics/GraphicsContext.cpp:
1356         (WebCore::GraphicsContext::drawImage):
1357         * platform/graphics/GraphicsContext.h:
1358         * platform/graphics/Image.cpp:
1359         (WebCore::Image::draw):
1360         * platform/graphics/Image.h:
1361         * platform/graphics/ImageOrientation.h:
1362         (WebCore::ImageOrientationDescription::ImageOrientationDescription):
1363         (WebCore::ImageOrientationDescription::respectImageOrientation):
1364         (WebCore::ImageOrientationDescription::imageOrientation):
1365         * platform/graphics/ImageSource.cpp:
1366         (WebCore::ImageSource::size):
1367         (WebCore::ImageSource::frameSizeAtIndex):
1368         * platform/graphics/ImageSource.h:
1369         * platform/graphics/blackberry/ImageBlackBerry.cpp:
1370         (WebCore::BitmapImage::draw):
1371         * platform/graphics/cairo/BitmapImageCairo.cpp:
1372         (WebCore::BitmapImage::draw):
1373         * platform/graphics/cairo/ImageBufferCairo.cpp:
1374         (WebCore::ImageBuffer::draw):
1375         * platform/graphics/cg/BitmapImageCG.cpp:
1376         (WebCore::BitmapImage::draw):
1377         * platform/graphics/cg/ImageSourceCG.cpp:
1378         (WebCore::ImageSource::frameSizeAtIndex):
1379         (WebCore::ImageSource::size):
1380         (WebCore::ImageSource::frameBytesAtIndex):
1381         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1382         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1383         * platform/graphics/qt/ImageBufferQt.cpp:
1384         (WebCore::ImageBuffer::draw):
1385         * platform/graphics/wince/ImageBufferWinCE.cpp:
1386         (WebCore::ImageBuffer::draw):
1387         * platform/gtk/ClipboardGtk.cpp:
1388         (WebCore::Clipboard::createDragImage):
1389         * platform/gtk/DragImageGtk.cpp:
1390         (WebCore::createDragImageFromImage):
1391         * platform/mac/DragImageMac.mm:
1392         (WebCore::createDragImageFromImage):
1393         * platform/qt/ClipboardQt.cpp:
1394         (WebCore::Clipboard::createDragImage):
1395         * platform/qt/DragImageQt.cpp:
1396         (WebCore::createDragImageFromImage):
1397         * platform/win/ClipboardWin.cpp:
1398         (WebCore::Clipboard::createDragImage):
1399         * platform/win/DragImageCGWin.cpp:
1400         (WebCore::createDragImageFromImage):
1401         * platform/win/DragImageCairoWin.cpp:
1402         (WebCore::createDragImageFromImage):
1403         * rendering/RenderEmbeddedObject.cpp:
1404         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
1405         * rendering/RenderImage.cpp:
1406         (WebCore::RenderImage::paintReplaced):
1407         (WebCore::RenderImage::paintIntoRect):
1408         * rendering/RenderSnapshottedPlugIn.cpp:
1409         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
1410
1411 2013-08-14  Sam Weinig  <sam@webkit.org>
1412
1413         Update binding test results.  Follow up fix for <https://webkit.org/b/119664>
1414
1415         * bindings/scripts/test/JS/JSTestCallback.cpp:
1416         (WebCore::JSTestCallback::JSTestCallback):
1417         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1418         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
1419
1420 2013-08-14  Joseph Pecoraro  <pecoraro@apple.com>
1421
1422         <https://webkit.org/b/119810> [Mac] No AutoreleasePool leaks when dragging image out of WebView
1423
1424         Reviewed by Dan Bernstein.
1425
1426         This code was just running a block of code asynchronously using a
1427         pthread. Convert this to use a dispatch block, which does provide
1428         an autorelease pool so there are no leaks and ends up much simpler.
1429
1430         * platform/mac/FileSystemMac.mm:
1431         (WebCore::setMetadataURL):
1432
1433 2013-08-14  Tim Horton  <timothy_horton@apple.com>
1434
1435         Un-inline dataLog dumpers for IntSize and IntPoint
1436         https://bugs.webkit.org/show_bug.cgi?id=119697
1437
1438         Reviewed by Sam Weinig.
1439
1440         Avoid regressing build performance by moving IntSize::dump and IntPoint::dump elsewhere.
1441
1442         * CMakeLists.txt:
1443         * GNUmakefile.list.am:
1444         * Target.pri:
1445         * WebCore.vcxproj/WebCore.vcxproj:
1446         * WebCore.vcxproj/WebCore.vcxproj.filters:
1447         * WebCore.xcodeproj/project.pbxproj:
1448         * platform/graphics/IntPoint.cpp: Added.
1449         (WebCore::IntPoint::dump):
1450         * platform/graphics/IntPoint.h:
1451         * platform/graphics/IntSize.cpp: Added.
1452         (WebCore::IntSize::dump):
1453         * platform/graphics/IntSize.h:
1454
1455 2013-08-14  Chris Fleizach  <cfleizach@apple.com>
1456
1457         <https://webkit.org/b/119824> AX: WKView does not become first responder when the voiceover cursor lands on it
1458
1459         Reviewed by Tim Horton.
1460
1461         VoiceOver lands on Scroll views by default. It expects that the scroll view will be able to handle the focus calls. 
1462         We should forward scroll view focus requests to the web area to handle, which will trigger a becomeFirstResponder on WKView.
1463
1464         There's not a great way to test this unfortunately, since it requires having focus comes from outside the webview into the webview.
1465
1466         * accessibility/AccessibilityScrollView.cpp:
1467         (WebCore::AccessibilityScrollView::canSetFocusAttribute):
1468         (WebCore::AccessibilityScrollView::isFocused):
1469         (WebCore::AccessibilityScrollView::setFocused):
1470         * accessibility/AccessibilityScrollView.h:
1471
1472 2013-08-14  Hans Muller  <hmuller@adobe.com>
1473
1474         [CSS Exclusions] Minimal support for using an image to define a shape
1475         https://bugs.webkit.org/show_bug.cgi?id=116643
1476
1477         Reviewed by Alexandru Chiculita.
1478
1479         This is a first small step towards supporting CSS shapes defined by an
1480         image URL and a alpha channel threshold. To keep the patch as small as
1481         possible, there are many limitations and remaining work items. For
1482         example images are currently restricted to same-origin, although CORS
1483         should be supported. See https://bugs.webkit.org/show_bug.cgi?id=116348
1484         for the current list.
1485
1486         Test: fast/exclusions/shape-inside/shape-inside-image-001.html
1487         Test: fast/exclusions/shape-inside/shape-inside-image-002.html
1488
1489         * CMakeLists.txt:
1490         * GNUmakefile.list.am:
1491         * Target.pri:
1492         * WebCore.vcxproj/WebCore.vcxproj:
1493         * WebCore.xcodeproj/project.pbxproj:
1494         * rendering/RenderBlock.cpp:
1495         (WebCore::RenderBlock::imageChanged): When the image has finished loading, request a layout.
1496         * rendering/RenderBlock.h:
1497         * rendering/RenderObject.cpp:
1498         (WebCore::RenderObject::setStyle): Add notify clients for shape images.
1499         (WebCore::RenderObject::updateShapeImage):
1500         (WebCore::removeShapeImageClient):
1501         (WebCore::RenderObject::arenaDelete): Remove notify clients for shape images.
1502         * rendering/RenderObject.h:
1503         * rendering/shapes/RasterShape.cpp: Added. A Shape defined by thresholding an image's alpha channel.
1504         (WebCore::RasterShapeIntervals::bounds):
1505         (WebCore::RasterShapeIntervals::addInterval): Add a single run to the shape.
1506         (WebCore::alignedRect):
1507         (WebCore::RasterShapeIntervals::getIntervals): Return the shape's runs that fall within a horizonal box.
1508         (WebCore::RasterShape::marginIntervals): Internal representation of the shape with shape-margin factored in.  Currently only a stub.
1509         (WebCore::RasterShape::paddingIntervals): Internal representation of the shape with shape-padding factored in.  Currently only a stub.
1510         (WebCore::RasterShape::getExcludedIntervals):
1511         (WebCore::RasterShape::getIncludedIntervals):
1512         (WebCore::RasterShape::firstIncludedIntervalLogicalTop):
1513         * rendering/shapes/RasterShape.h:
1514         (WebCore::RasterShapeIntervals::RasterShapeIntervals): Internal run length encoded representation of a RasterShape.
1515         (WebCore::RasterShapeIntervals::isEmpty):
1516         (WebCore::RasterShape::RasterShape):
1517         * rendering/shapes/Shape.cpp:
1518         (WebCore::Shape::createShape): Support for creating a Shape based on a RasterShapeIntervals object.
1519         * rendering/shapes/Shape.h:
1520         * rendering/shapes/ShapeInfo.cpp:
1521         (WebCore::::computedShape): Added support for the Image ShapeValue type.
1522         * rendering/shapes/ShapeInsideInfo.cpp:
1523         (WebCore::ShapeInsideInfo::isEnabledFor): Added support for the Image ShapeValue type.
1524         * rendering/shapes/ShapeOutsideInfo.cpp:
1525         (WebCore::ShapeOutsideInfo::isEnabledFor): Added support for the Image ShapeValue type.
1526         * rendering/style/ShapeValue.h:
1527         (WebCore::ShapeValue::isImageValid): True if the shape's image is ready to be be processed.
1528
1529 2013-08-14  Alexandru Chiculita  <achicu@adobe.com>
1530
1531         [CSS Regions] RenderRegions should have a RenderLayer+Backing when they contain a Composited RenderLayer
1532         https://bugs.webkit.org/show_bug.cgi?id=117365
1533
1534         Reviewed by David Hyatt.
1535
1536         After the RenderFlowThread has a new layout we need to check if any of the children layers
1537         had been moved to a new render region. We are only checking for the first level of layers,
1538         as they are the only ones supported right now. Also, added code to make Regions require a layer
1539         based on the layers that fit in their clipping area.
1540
1541         Tests: fast/regions/layers/dynamic-layer-added-with-no-layout.html
1542                fast/regions/layers/dynamic-layer-removed-with-no-layout.html
1543                fast/regions/layers/float-region-promoted-to-layer.html
1544                fast/regions/layers/regions-promoted-to-layers-horizontal-bt.html
1545                fast/regions/layers/regions-promoted-to-layers-vertical-lr.html
1546                fast/regions/layers/regions-promoted-to-layers-vertical-rl.html
1547                fast/regions/layers/regions-promoted-to-layers.html
1548
1549         * rendering/FlowThreadController.cpp:
1550         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded): Iterate on all the flow threads and updateLayerToRegionMappings if needed. 
1551         * rendering/FlowThreadController.h:
1552         * rendering/RenderBlock.cpp:
1553         (WebCore::RenderBlock::updateLocalFloatingObjectsForPaintingContainer): Checks if the FloatingObject
1554         needs to be painted by the current block or not.
1555         (WebCore::RenderBlock::updateFloatingObjectsPaintingContainer): Helper function to lookup what is the right
1556         container that would need to paint a FloatingObject.
1557         (WebCore::RenderBlock::updateAllDescendantsFloatingObjectsPaintingContainer):
1558         * rendering/RenderBlock.h:
1559         * rendering/RenderBox.cpp:
1560         (WebCore::RenderBox::outermostBlockContainingFloatingObject): Looks up the ancestor RenderBlock that contains all
1561         the FloatingObjects of a float.
1562         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists): Extracted the code for outermostBlockContainingFloatingObject
1563         into its own method.
1564         (WebCore::RenderBox::updatePaintingContainerForFloatingObject): Helper method to update the "m_shouldPaint" flag
1565         of all the FloatingObjects created for a floating RenderObject. Normally, that flag is maintained during layout,
1566         but we need to patch it for the floating RenderRegions after the layout is already finished.
1567         (WebCore::RenderBox::updateLayerIfNeeded): Overwrite of the RenderLayerModelObject::updateLayerIfNeeded that is also
1568         calling updatePaintingContainerForFloatingObject if a new layer was created or destroyed.
1569         * rendering/RenderBox.h:
1570         * rendering/RenderFlowThread.cpp:
1571         (WebCore::RenderFlowThread::layout): Added code to call updateLayerToRegionMappings when needed.
1572         (WebCore::RenderFlowThread::regionForCompositedLayer): Looks up the first RenderRegion to display a specific layer.
1573         It only cares about the top most point of the element and ignores transforms.
1574         (WebCore::RenderFlowThread::updateRegionForRenderLayer): Helper method to update the mapped region of a layer.
1575         (WebCore::RenderFlowThread::updateLayerToRegionMappings): Iterates all the first level layers of the flow thread
1576         and updates the region. Will return true if there was any change.
1577         * rendering/RenderFlowThread.h:
1578         * rendering/RenderLayer.cpp:
1579         (WebCore::RenderLayer::dirtyZOrderLists): When new layers are added or removed we need to update the layer map in the flow thread.
1580         (WebCore::RenderLayer::dirtyNormalFlowList):
1581         (WebCore::RenderLayer::shouldBeNormalFlowOnly): CSS Regions might become layers because they contain RenderLayers,
1582         but they should not become stacking contexts for that reason. This will prevent the RenderRegions from rendering
1583         in front of other layers.
1584         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
1585         * rendering/RenderLayerCompositor.cpp:
1586         (WebCore::RenderLayerCompositor::updateCompositingLayers): Call updateRenderFlowThreadLayersIfNeeded when there's a layer hierarchy update.
1587         (WebCore::RenderLayerCompositor::updateRenderFlowThreadLayersIfNeeded): Update the render flow thread layer maps when they are dirty.
1588         * rendering/RenderLayerCompositor.h:
1589         * rendering/RenderLayer.h:
1590         (WebCore::RenderLayer::isDirtyRenderFlowThread): Used to check if the RenderLayers had changed their order,
1591         so that we can update the list of layers associated with a region. In a following patch we will need to 
1592         rebuild the composited layers.
1593         * rendering/RenderLayerModelObject.cpp:
1594         (WebCore::RenderLayerModelObject::updateLayerIfNeeded): Adds or removes a layer when the "requiresLayer" changes
1595         after the styleDidChange already happened. This is needed for Regions as we only know if they still require a layer,
1596         only after the content of the flow thread is computed.
1597         * rendering/RenderLayerModelObject.h:
1598         * rendering/RenderRegion.cpp:
1599         (WebCore::RenderRegion::RenderRegion):
1600         (WebCore::RenderRegion::setRequiresLayerForCompositing):
1601         * rendering/RenderRegion.h:
1602         (WebCore::RenderRegion::requiresLayer):
1603         * rendering/RenderTreeAsText.cpp:
1604         (WebCore::writeRenderRegionList): Updated the output to print the fact that the layer has a layer.
1605
1606 2013-08-14  Bem Jones-Bey  <bjonesbe@adobe.com>
1607
1608         Finish making FloatingObject a real class with private members
1609         https://bugs.webkit.org/show_bug.cgi?id=119807
1610
1611         This is a port from Blink of
1612         http://src.chromium.org/viewvc/blink?view=revision&revision=155964
1613         Original patch by Eric Seidel.
1614
1615         From his comments on the Blink change:
1616
1617         Previously FloatingObject was in a half-done state where it had
1618         accessors for many members, but also many members were public.
1619
1620         This CL makes all members private and adds the necessary remaining
1621         accessors.
1622
1623         Reviewed by David Hyatt.
1624
1625         No new tests, no behavior change.
1626
1627         * rendering/RenderBlock.cpp:
1628         (WebCore::RenderBlock::deleteLineBoxTree):
1629         (WebCore::RenderBlock::addOverflowFromFloats):
1630         (WebCore::RenderBlock::repaintOverhangingFloats):
1631         (WebCore::RenderBlock::paintFloats):
1632         (WebCore::RenderBlock::selectionGaps):
1633         (WebCore::RenderBlock::insertFloatingObject):
1634         (WebCore::RenderBlock::removeFloatingObject):
1635         (WebCore::RenderBlock::removeFloatingObjectsBelow):
1636         (WebCore::RenderBlock::positionNewFloats):
1637         (WebCore::RenderBlock::clearFloats):
1638         (WebCore::RenderBlock::addOverhangingFloats):
1639         (WebCore::RenderBlock::addIntrudingFloats):
1640         (WebCore::RenderBlock::hitTestFloats):
1641         (WebCore::RenderBlock::adjustForBorderFit):
1642         * rendering/RenderBlock.h:
1643         (WebCore::RenderBlock::FloatingObject::paginationStrut):
1644         (WebCore::RenderBlock::FloatingObject::setPaginationStrut):
1645         (WebCore::RenderBlock::FloatingObject::setRenderer):
1646         (WebCore::RenderBlock::FloatingObject::originatingLine):
1647         (WebCore::RenderBlock::FloatingObject::setOriginatingLine):
1648         (WebCore::RenderBlock::FloatingObjectHashFunctions::hash):
1649         (WebCore::RenderBlock::FloatingObjectHashFunctions::equal):
1650         (WebCore::RenderBlock::FloatingObjectHashTranslator::equal):
1651         * rendering/RenderBlockLineLayout.cpp:
1652         (WebCore::RenderBlock::appendFloatingObjectToLastLine):
1653         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
1654         (WebCore::RenderBlock::linkToEndLineIfNeeded):
1655         (WebCore::RenderBlock::determineStartPosition):
1656         (WebCore::RenderBlock::positionNewFloatOnLine):
1657
1658 2013-08-14  Rob Buis  <rwlbuis@webkit.org>
1659
1660         Assertion failure in RenderObject::drawLineForBoxSide
1661         https://bugs.webkit.org/show_bug.cgi?id=108187
1662
1663         Reviewed by David Hyatt.
1664
1665         Don't draw the outline if the rectangle to draw is empty.
1666
1667         Test: fast/css/outline-negative.html
1668
1669         * rendering/RenderInline.cpp:
1670         (WebCore::RenderInline::paintOutlineForLine):
1671
1672 2013-08-13  Chris Fleizach  <cfleizach@apple.com>
1673
1674         AX: Headings not longer have an AXTitle if they have a link as the only child
1675         https://bugs.webkit.org/show_bug.cgi?id=119699
1676
1677         Reviewed by Anders Carlsson.
1678
1679         Normally, focusable content is not incuded when looking at the visible text of an element.
1680         One case where we need an exception is with headings, where there is usually link content inside the heading
1681         that we want to be used as the visible text.
1682
1683         Test: accessibility/heading-title-includes-links.html
1684
1685         * accessibility/AccessibilityNodeObject.cpp:
1686         (WebCore::AccessibilityNodeObject::visibleText):
1687         (WebCore::shouldUseAccessiblityObjectInnerText):
1688         (WebCore::AccessibilityNodeObject::title):
1689         * accessibility/AccessibilityNodeObject.h:
1690         * accessibility/AccessibilityObject.h:
1691         (WebCore::AccessibilityTextUnderElementMode::AccessibilityTextUnderElementMode):
1692         (WebCore::AccessibilityObject::textUnderElement):
1693         * accessibility/AccessibilityRenderObject.cpp:
1694         (WebCore::AccessibilityRenderObject::textUnderElement):
1695         * accessibility/AccessibilityRenderObject.h:
1696
1697 2013-08-14  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1698
1699         Move id attribute to parent Element interface
1700         https://bugs.webkit.org/show_bug.cgi?id=119706
1701
1702         Reviewed by Ryosuke Niwa.
1703
1704         Move id attribute from SVGElement / HTMLElement to their Element parent
1705         interface to match the latest DOM specification and avoid duplication:
1706         http://dom.spec.whatwg.org/#dom-element-id
1707
1708         There is no web-exposed behavior change because we haven't moved
1709         properties from instances to their prototype, as per the Web IDL
1710         specification (http://dev.w3.org/2006/webapi/WebIDL/#es-attributes).
1711
1712         Firefox already exposes the id property of Element's prototype.
1713
1714         This patch also drops the comment about returning the empty string when
1715         no id is present (introduced in http://trac.webkit.org/changeset/4417).
1716         This comment is redundant since the id property is already marked to
1717         "reflect" the id attribute. Returning the empty string when the
1718         attribute is not present is the normal behavior when reflecting:
1719         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#reflect
1720
1721         No new test, no web-exposed behavior change.
1722
1723         * dom/Element.idl:
1724         * html/HTMLElement.idl:
1725         * svg/SVGElement.idl:
1726
1727 2013-08-14  Arpita Bahuguna  <a.bah@samsung.com>
1728
1729         createAttribute/setAttributeNode does not properly normalize case
1730         https://bugs.webkit.org/show_bug.cgi?id=90341
1731
1732         Reviewed by Darin Adler.
1733
1734         setAttributeNode() verifies for existing attributes in a case sensitive
1735         manner. Thus, it would add another attribute if specified in a case
1736         different from the existing one. Instead, like setAttribute(), it too
1737         should modify the existing attribute's value.
1738
1739         Tests: fast/dom/Element/setAttributeNode-case-insensitivity-xhtml.xhtml
1740                fast/dom/Element/setAttributeNode-case-insensitivity.html
1741
1742         * dom/Element.cpp:
1743         (WebCore::Element::setAttributeNode):
1744         Passing the second param (shouldIgnoreAttributeCase) to
1745         findAttributeIndexByNameForAttributeNode() method. We are now letting
1746         findAttributeIndexByNameForAttributeNode() handle the case-sensitive/insensitive
1747         checking.
1748
1749         (WebCore::ElementData::findAttributeIndexByNameForAttributeNode):
1750         * dom/Element.h:
1751         Added shouldIgnoreAttributeCase boolean param to the method. It passes
1752         this on to QualifiedName::matchesIgnoringCaseForLocalName() method.
1753
1754         * dom/QualifiedName.h:
1755         (WebCore::QualifiedName::matchesIgnoringCaseForLocalName):
1756         New method added for doing a case-insensitive comparison based on the
1757         shouldIgnoreCase param passed to this method.
1758
1759 2013-08-14  Gabor Abraham  <abrhm@inf.u-szeged.hu>
1760
1761         [CMake] Fix building with bison-3.0.
1762         https://bugs.webkit.org/show_bug.cgi?id=119788
1763
1764         Reviewed by Zoltan Herczeg.
1765
1766         No new tests, just build fix.
1767
1768         * CMakeLists.txt:
1769
1770 2013-08-14  Rob Buis  <rwlbuis@webkit.org>
1771
1772         ASSERTION FAILED: resultAnimationElement->m_animatedType in WebCore::SVGAnimateElement::calculateAnimatedValue
1773         https://bugs.webkit.org/show_bug.cgi?id=119748
1774
1775         Reviewed by Dirk Schulze.
1776
1777         Avoid animation when attributeType="CSS" is used on an animateTransform.
1778
1779         Tests: svg/animations/animateTransform-translate-attributetype-auto.html
1780                svg/animations/animateTransform-translate-invalid-attributetype.html
1781
1782         * svg/SVGAnimateTransformElement.cpp:
1783         (WebCore::SVGAnimateTransformElement::hasValidAttributeType):
1784
1785 2013-08-14  Antti Koivisto  <antti@apple.com>
1786
1787         Try to fix Qt build.
1788         
1789         Not reviewed.
1790
1791         * xml/parser/XMLDocumentParserQt.cpp:
1792         (WebCore::XMLDocumentParser::parseProcessingInstruction):
1793         (WebCore::XMLDocumentParser::parseCdata):
1794         (WebCore::XMLDocumentParser::parseComment):
1795
1796 2013-08-13  Antti Koivisto  <antti@apple.com>
1797
1798         Remove Node::attach() and ContainerNode::attach()
1799         https://bugs.webkit.org/show_bug.cgi?id=119698
1800
1801         Reviewed by Andreas Kling.
1802
1803         Currently attach() is a virtual function on Node. However only Elements have style and so a corresponding 
1804         independent render object. Attaching should be made Element level concept.
1805         
1806         This patch merges Node::attach() and ContainerNode::attach() to Element::attach(). Other related functions
1807         (detach(), reattach(), etc) move similarly.
1808         
1809         Next step here is to make attach non-virtual in common case and move it out from the DOM tree.
1810
1811         * dom/ContainerNode.cpp:
1812         (WebCore::attachChild):
1813         (WebCore::detachChild):
1814         
1815             Temporary helpers. Further refactoring should get rid of these.
1816
1817         (WebCore::ContainerNode::takeAllChildrenFrom):
1818         (WebCore::ContainerNode::removeBetween):
1819         (WebCore::updateTreeAfterInsertion):
1820         * dom/ContainerNode.h:
1821         * dom/Document.cpp:
1822         (WebCore::Document::attach):
1823         (WebCore::Document::detach):
1824         
1825             Copy the relevant parts of the code from base class attach/detach here. It is not much.
1826
1827         * dom/Document.h:
1828         * dom/Element.cpp:
1829         (WebCore::Element::~Element):
1830         
1831             Node destructor no longer detaches.
1832
1833         (WebCore::Element::attachChildren):
1834         (WebCore::Element::attach):
1835         
1836             Combine Node::attach(), ContainerNode::attach() and Element::attach().
1837
1838         (WebCore::Element::detachChildren):
1839         (WebCore::Element::detach):
1840         
1841             Combine Node::detach(), ContainerNode::detach() and Element::detach().
1842
1843         (WebCore::Element::reattach):
1844         (WebCore::Element::reattachIfAttached):
1845         (WebCore::Element::lazyReattach):
1846         (WebCore::Element::lazyAttach):
1847         
1848             This stuff moves from ContainerNode/Node.
1849
1850         * dom/Element.h:
1851         (WebCore::Element::AttachContext::AttachContext):
1852         * dom/ElementShadow.cpp:
1853         (WebCore::ElementShadow::removeShadowRoot):
1854         (WebCore::ElementShadow::attach):
1855         (WebCore::ElementShadow::detach):
1856         * dom/ElementShadow.h:
1857         * dom/Node.cpp:
1858         (WebCore::Node::~Node):
1859         
1860             Assert that we are not attached at this point.
1861
1862         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
1863         * dom/Node.h:
1864         (WebCore::Node::setAttached):
1865         (WebCore::Node::setStyleChange):
1866         
1867             Make available.
1868
1869         * dom/NodeRenderingContext.cpp:
1870         (WebCore::NodeRenderingContext::NodeRenderingContext):
1871         * dom/NodeRenderingContext.h:
1872         * dom/ShadowRoot.cpp:
1873         (WebCore::ShadowRoot::attach):
1874         (WebCore::ShadowRoot::detach):
1875         * dom/ShadowRoot.h:
1876         * dom/Text.cpp:
1877         (WebCore::Text::~Text):
1878         
1879             Node destructor no longer detaches. Add destructor.
1880
1881         (WebCore::Text::createTextRenderersForSiblingsAfterAttachIfNeeded):
1882         
1883             Factor the code that updates sibling text renderers after attach into a function.
1884
1885         (WebCore::Text::attachText):
1886         (WebCore::Text::detachText):
1887         
1888             Text::attachText/detachText replace virtual Node::attach/detach. They do the part of the work text nodes actually ended up doing.
1889
1890         (WebCore::Text::updateTextRenderer):
1891         * dom/Text.h:
1892         * html/HTMLViewSourceDocument.cpp:
1893         (WebCore::HTMLViewSourceDocument::addText):
1894         * html/PluginDocument.cpp:
1895         (WebCore::PluginDocument::detach):
1896         * html/PluginDocument.h:
1897         * html/parser/HTMLConstructionSite.cpp:
1898         (WebCore::executeTask):
1899         * html/shadow/ContentDistributor.cpp:
1900         (WebCore::ContentDistributor::invalidateDistribution):
1901         * html/shadow/InsertionPoint.cpp:
1902         (WebCore::InsertionPoint::attach):
1903         (WebCore::InsertionPoint::detach):
1904         * loader/PlaceholderDocument.cpp:
1905         (WebCore::PlaceholderDocument::attach):
1906         * loader/PlaceholderDocument.h:
1907         * style/StyleResolveTree.cpp:
1908         (WebCore::Style::resolveLocal):
1909         (WebCore::Style::updateTextStyle):
1910         * xml/parser/XMLDocumentParser.cpp:
1911         (WebCore::XMLDocumentParser::exitText):
1912         * xml/parser/XMLDocumentParserLibxml2.cpp:
1913         (WebCore::XMLDocumentParser::processingInstruction):
1914         (WebCore::XMLDocumentParser::cdataBlock):
1915         (WebCore::XMLDocumentParser::comment):
1916         
1917             No need to attach non-rendered nodes.
1918
1919 2013-08-14  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1920
1921         ASSERT(m_frame->view() == this) fails
1922         https://bugs.webkit.org/show_bug.cgi?id=119015
1923
1924         Reviewed by Simon Fraser.
1925
1926         Introduced the method fixedLayoutSizeChanged and made it chack if the view
1927         is attached to the frame before issuing contentsResized.
1928
1929         * page/FrameView.cpp:
1930         (WebCore::FrameView::fixedLayoutSizeChanged):
1931         * page/FrameView.h:
1932         * platform/ScrollView.cpp:
1933         (WebCore::ScrollView::setFixedLayoutSize):
1934         (WebCore::ScrollView::setUseFixedLayout):
1935         (WebCore::ScrollView::fixedLayoutSizeChanged):
1936         * platform/ScrollView.h:
1937
1938 2013-08-13  Sergio Villar Senin  <svillar@igalia.com>
1939
1940         [CSS Grid Layout] Align our grid-line handling with the updated specification
1941         https://bugs.webkit.org/show_bug.cgi?id=113546
1942
1943         Reviewed by Andreas Kling.
1944
1945         From Blink r148091 by <jchaffraix@chromium.org>
1946
1947         This change makes us match the updated specification by making
1948         grid line numbers to always resolve against the
1949         grid-{column|row}-start edge (the previous code would resolve
1950         grid-{column|row}-end grid lines against the grid-{column|row}-end
1951         edge).
1952
1953         To keep feature parity, negative numbers resolve against the
1954         grid-{column|row}-end edge of the 'explicit grid'.
1955
1956         Test: fast/css-grid-layout/grid-item-negative-integer-explicit-grid-resolution.html
1957
1958         * rendering/RenderGrid.cpp:
1959         (WebCore::estimatedGridSizeForPosition):
1960         (WebCore::RenderGrid::explicitGridColumnCount): New utility function.
1961         (WebCore::RenderGrid::explicitGridRowCount): Ditto.
1962         (WebCore::RenderGrid::maximumIndexInDirection): Use explicitGridXXXCount().
1963         (WebCore::RenderGrid::resolveGridPositionsFromStyle): Check that row-end > row-start.
1964         (WebCore::RenderGrid::resolveGridPositionFromStyle): Clamp negative values to the first line.
1965         * rendering/RenderGrid.h:
1966         * rendering/style/GridPosition.h:
1967
1968 2013-08-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1969
1970         Add toSVGTextPathElement(), and use it
1971         https://bugs.webkit.org/show_bug.cgi?id=119783
1972
1973         Reviewed by Ryosuke Niwa.
1974
1975         As a step to clean-up static_cast<SVGXXX>, static_cast<SVGTextPathElement*> can
1976         be changed with toSVGTextPathElement().
1977
1978         * rendering/svg/RenderSVGTextPath.cpp:
1979         (WebCore::RenderSVGTextPath::layoutPath):
1980         (WebCore::RenderSVGTextPath::startOffset):
1981         (WebCore::RenderSVGTextPath::exactAlignment):
1982         (WebCore::RenderSVGTextPath::stretchMethod):
1983         * svg/SVGTextPathElement.h:
1984         (WebCore::toSVGTextPathElement):
1985
1986 2013-08-14  Jinwoo Jeong  <jw00.jeong@samsung.com>
1987
1988         FEComponentTransfer could be faster.
1989         https://bugs.webkit.org/show_bug.cgi?id=119671
1990
1991         Reviewed by Christophe Dumez.
1992
1993         Use direct writing to target data instead of calling Uint8ClampedArray::set() function.
1994         This change reduces at least 80% time in the loop of that function.
1995
1996         The Uint8ClampedArray::set() function has index checking code, value checking code and value casting code.
1997         But the index is managed by for loop condition, the value is generated by transferFunction.
1998         And the value is already defined as unsigned char.
1999         Thus all works in Uint8ClampedArray::set() function is redundant.
2000         Removing the call to Uint8ClampedArray::set() function does not reduce stability but improves performance.
2001
2002         * platform/graphics/filters/FEComponentTransfer.cpp:
2003         (WebCore::FEComponentTransfer::platformApplySoftware):
2004
2005 2013-08-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2006
2007         The length of scheme is at least five characters even when the scheme has 'web+' prefix
2008         https://bugs.webkit.org/show_bug.cgi?id=119779
2009
2010         Reviewed by Ryosuke Niwa.
2011
2012         The content-scheme handler specification requires that it is SecurityError if the length of
2013         scheme isn't five characters at least, including 'web+' prefix. Thus, we need to check the length
2014         of scheme on the 'web+' scheme.
2015
2016         Spec: http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers
2017
2018         No new tests, just modify existing tests.
2019
2020         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
2021         (WebCore::verifyProtocolHandlerScheme):
2022
2023 2013-08-13  Filip Pizlo  <fpizlo@apple.com>
2024
2025         Foo::s_info should be Foo::info(), so that you can change how the s_info is actually linked
2026         https://bugs.webkit.org/show_bug.cgi?id=119770
2027
2028         Reviewed by Mark Hahnenberg.
2029
2030         No new tests because no new behavior.
2031
2032         * bindings/js/IDBBindingUtilities.cpp:
2033         (WebCore::createIDBKeyFromValue):
2034         * bindings/js/JSAttrCustom.cpp:
2035         (WebCore::JSAttr::visitChildren):
2036         * bindings/js/JSAudioTrackCustom.cpp:
2037         (WebCore::JSAudioTrack::visitChildren):
2038         * bindings/js/JSAudioTrackListCustom.cpp:
2039         (WebCore::JSAudioTrackList::visitChildren):
2040         * bindings/js/JSBlobCustom.cpp:
2041         (WebCore::JSBlobConstructor::constructJSBlob):
2042         * bindings/js/JSCSSRuleCustom.cpp:
2043         (WebCore::JSCSSRule::visitChildren):
2044         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2045         (WebCore::JSCSSStyleDeclaration::visitChildren):
2046         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
2047         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2048         (WebCore::toHTMLCanvasStyle):
2049         * bindings/js/JSCanvasRenderingContextCustom.cpp:
2050         (WebCore::JSCanvasRenderingContext::visitChildren):
2051         * bindings/js/JSDOMBinding.cpp:
2052         (WebCore::valueToDate):
2053         * bindings/js/JSDOMBinding.h:
2054         (WebCore::DOMConstructorObject::createStructure):
2055         (WebCore::getDOMStructure):
2056         (WebCore::toRefPtrNativeArray):
2057         (WebCore::getStaticValueSlotEntryWithoutCaching):
2058         * bindings/js/JSDOMFormDataCustom.cpp:
2059         (WebCore::toHTMLFormElement):
2060         (WebCore::JSDOMFormData::append):
2061         * bindings/js/JSDOMGlobalObject.cpp:
2062         (WebCore::JSDOMGlobalObject::finishCreation):
2063         (WebCore::JSDOMGlobalObject::scriptExecutionContext):
2064         (WebCore::JSDOMGlobalObject::visitChildren):
2065         * bindings/js/JSDOMGlobalObject.h:
2066         (WebCore::JSDOMGlobalObject::info):
2067         (WebCore::JSDOMGlobalObject::createStructure):
2068         (WebCore::getDOMConstructor):
2069         * bindings/js/JSDOMStringListCustom.cpp:
2070         (WebCore::toDOMStringList):
2071         * bindings/js/JSDOMWindowBase.cpp:
2072         (WebCore::JSDOMWindowBase::finishCreation):
2073         (WebCore::toJSDOMWindow):
2074         * bindings/js/JSDOMWindowBase.h:
2075         (WebCore::JSDOMWindowBase::createStructure):
2076         * bindings/js/JSDOMWindowCustom.cpp:
2077         (WebCore::JSDOMWindow::visitChildren):
2078         (WebCore::JSDOMWindow::getOwnPropertySlot):
2079         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
2080         (WebCore::toDOMWindow):
2081         * bindings/js/JSDOMWindowShell.cpp:
2082         (WebCore::JSDOMWindowShell::finishCreation):
2083         * bindings/js/JSDOMWindowShell.h:
2084         (WebCore::JSDOMWindowShell::createStructure):
2085         * bindings/js/JSEventTargetCustom.cpp:
2086         (WebCore::toEventTarget):
2087         * bindings/js/JSHistoryCustom.cpp:
2088         (WebCore::JSHistory::getOwnPropertySlotDelegate):
2089         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
2090         * bindings/js/JSImageConstructor.cpp:
2091         (WebCore::JSImageConstructor::finishCreation):
2092         * bindings/js/JSImageConstructor.h:
2093         (WebCore::JSImageConstructor::createStructure):
2094         * bindings/js/JSInjectedScriptHostCustom.cpp:
2095         (WebCore::JSInjectedScriptHost::isHTMLAllCollection):
2096         (WebCore::JSInjectedScriptHost::type):
2097         (WebCore::JSInjectedScriptHost::functionDetails):
2098         * bindings/js/JSInspectorFrontendHostCustom.cpp:
2099         (WebCore::populateContextMenuItems):
2100         * bindings/js/JSLocationCustom.cpp:
2101         (WebCore::JSLocation::getOwnPropertySlotDelegate):
2102         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
2103         (WebCore::JSLocation::putDelegate):
2104         * bindings/js/JSMessageChannelCustom.cpp:
2105         (WebCore::JSMessageChannel::visitChildren):
2106         * bindings/js/JSMessagePortCustom.cpp:
2107         (WebCore::JSMessagePort::visitChildren):
2108         * bindings/js/JSNodeCustom.cpp:
2109         (WebCore::JSNode::pushEventHandlerScope):
2110         (WebCore::JSNode::visitChildren):
2111         * bindings/js/JSNodeFilterCustom.cpp:
2112         (WebCore::JSNodeFilter::visitChildren):
2113         (WebCore::toNodeFilter):
2114         * bindings/js/JSNodeIteratorCustom.cpp:
2115         (WebCore::JSNodeIterator::visitChildren):
2116         * bindings/js/JSPluginElementFunctions.h:
2117         (WebCore::pluginElementCustomGetOwnPropertySlot):
2118         (WebCore::pluginElementCustomGetOwnPropertyDescriptor):
2119         * bindings/js/JSSVGElementInstanceCustom.cpp:
2120         (WebCore::JSSVGElementInstance::visitChildren):
2121         * bindings/js/JSSharedWorkerCustom.cpp:
2122         (WebCore::JSSharedWorker::visitChildren):
2123         * bindings/js/JSStyleSheetCustom.cpp:
2124         (WebCore::JSStyleSheet::visitChildren):
2125         * bindings/js/JSTextTrackCueCustom.cpp:
2126         (WebCore::JSTextTrackCue::visitChildren):
2127         * bindings/js/JSTextTrackCustom.cpp:
2128         (WebCore::JSTextTrack::visitChildren):
2129         * bindings/js/JSTextTrackListCustom.cpp:
2130         (WebCore::JSTextTrackList::visitChildren):
2131         * bindings/js/JSTrackCustom.cpp:
2132         (WebCore::toTrack):
2133         * bindings/js/JSTreeWalkerCustom.cpp:
2134         (WebCore::JSTreeWalker::visitChildren):
2135         * bindings/js/JSVideoTrackCustom.cpp:
2136         (WebCore::JSVideoTrack::visitChildren):
2137         * bindings/js/JSVideoTrackListCustom.cpp:
2138         (WebCore::JSVideoTrackList::visitChildren):
2139         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2140         (WebCore::JSWebGLRenderingContext::visitChildren):
2141         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
2142         (WebCore::JSWebGLRenderingContext::getProgramParameter):
2143         (WebCore::JSWebGLRenderingContext::getShaderParameter):
2144         (WebCore::JSWebGLRenderingContext::getUniform):
2145         (WebCore::dataFunctionf):
2146         (WebCore::dataFunctioni):
2147         (WebCore::dataFunctionMatrix):
2148         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2149         (WebCore::JSWorkerGlobalScopeBase::finishCreation):
2150         (WebCore::toJSDedicatedWorkerGlobalScope):
2151         (WebCore::toJSSharedWorkerGlobalScope):
2152         * bindings/js/JSWorkerGlobalScopeBase.h:
2153         (WebCore::JSWorkerGlobalScopeBase::createStructure):
2154         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
2155         (WebCore::JSWorkerGlobalScope::visitChildren):
2156         * bindings/js/JSXMLHttpRequestCustom.cpp:
2157         (WebCore::JSXMLHttpRequest::visitChildren):
2158         (WebCore::JSXMLHttpRequest::send):
2159         * bindings/js/JSXPathResultCustom.cpp:
2160         (WebCore::JSXPathResult::visitChildren):
2161         * bindings/js/ScriptDebugServer.cpp:
2162         (WebCore::ScriptDebugServer::dispatchDidPause):
2163         * bindings/js/ScriptState.cpp:
2164         (WebCore::domWindowFromScriptState):
2165         (WebCore::scriptExecutionContextFromScriptState):
2166         * bindings/js/SerializedScriptValue.cpp:
2167         (WebCore::CloneSerializer::isArray):
2168         (WebCore::CloneSerializer::dumpArrayBufferView):
2169         (WebCore::CloneSerializer::dumpIfTerminal):
2170         (WebCore::CloneSerializer::serialize):
2171         (WebCore::CloneDeserializer::CloneDeserializer):
2172         (WebCore::CloneDeserializer::readArrayBufferView):
2173         * bindings/objc/DOM.mm:
2174         (+[DOMNode _nodeFromJSWrapper:]):
2175         * bindings/objc/DOMUtility.mm:
2176         (JSC::createDOMWrapper):
2177         * bindings/objc/WebScriptObject.mm:
2178         (+[WebScriptObject _convertValueToObjcValue:JSC::originRootObject:rootObject:]):
2179         * bindings/scripts/CodeGeneratorJS.pm:
2180         (GenerateGetOwnPropertySlotBody):
2181         (GenerateGetOwnPropertyDescriptorBody):
2182         (GenerateHeader):
2183         (GenerateParametersCheckExpression):
2184         (GenerateImplementation):
2185         (GenerateParametersCheck):
2186         (GenerateConstructorDeclaration):
2187         (GenerateConstructorHelperMethods):
2188         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2189         (WebCore::JSFloat64ArrayConstructor::finishCreation):
2190         (WebCore::JSFloat64Array::finishCreation):
2191         (WebCore::JSFloat64Array::getOwnPropertySlot):
2192         (WebCore::JSFloat64Array::getOwnPropertyDescriptor):
2193         (WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
2194         (WebCore::JSFloat64Array::put):
2195         (WebCore::JSFloat64Array::putByIndex):
2196         (WebCore::JSFloat64Array::getOwnPropertyNames):
2197         (WebCore::jsFloat64ArrayPrototypeFunctionFoo):
2198         (WebCore::jsFloat64ArrayPrototypeFunctionSet):
2199         (WebCore::JSFloat64Array::getByIndex):
2200         (WebCore::toFloat64Array):
2201         * bindings/scripts/test/JS/JSFloat64Array.h:
2202         (WebCore::JSFloat64Array::createStructure):
2203         (WebCore::JSFloat64ArrayPrototype::createStructure):
2204         (WebCore::JSFloat64ArrayConstructor::createStructure):
2205         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2206         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
2207         (WebCore::JSTestActiveDOMObject::finishCreation):
2208         (WebCore::JSTestActiveDOMObject::getOwnPropertySlot):
2209         (WebCore::JSTestActiveDOMObject::getOwnPropertyDescriptor):
2210         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
2211         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
2212         (WebCore::toTestActiveDOMObject):
2213         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2214         (WebCore::JSTestActiveDOMObject::createStructure):
2215         (WebCore::JSTestActiveDOMObjectPrototype::createStructure):
2216         (WebCore::JSTestActiveDOMObjectConstructor::createStructure):
2217         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2218         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
2219         (WebCore::JSTestCustomNamedGetter::finishCreation):
2220         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
2221         (WebCore::JSTestCustomNamedGetter::getOwnPropertyDescriptor):
2222         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
2223         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
2224         (WebCore::toTestCustomNamedGetter):
2225         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2226         (WebCore::JSTestCustomNamedGetter::createStructure):
2227         (WebCore::JSTestCustomNamedGetterPrototype::createStructure):
2228         (WebCore::JSTestCustomNamedGetterConstructor::createStructure):
2229         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2230         (WebCore::JSTestEventConstructorConstructor::finishCreation):
2231         (WebCore::JSTestEventConstructor::finishCreation):
2232         (WebCore::JSTestEventConstructor::getOwnPropertySlot):
2233         (WebCore::JSTestEventConstructor::getOwnPropertyDescriptor):
2234         (WebCore::toTestEventConstructor):
2235         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2236         (WebCore::JSTestEventConstructor::createStructure):
2237         (WebCore::JSTestEventConstructorPrototype::createStructure):
2238         (WebCore::JSTestEventConstructorConstructor::createStructure):
2239         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2240         (WebCore::JSTestEventTargetConstructor::finishCreation):
2241         (WebCore::JSTestEventTarget::finishCreation):
2242         (WebCore::JSTestEventTarget::getOwnPropertySlot):
2243         (WebCore::JSTestEventTarget::getOwnPropertyDescriptor):
2244         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
2245         (WebCore::JSTestEventTarget::getOwnPropertyNames):
2246         (WebCore::jsTestEventTargetPrototypeFunctionItem):
2247         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
2248         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
2249         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
2250         (WebCore::JSTestEventTarget::visitChildren):
2251         (WebCore::JSTestEventTarget::indexGetter):
2252         (WebCore::toTestEventTarget):
2253         * bindings/scripts/test/JS/JSTestEventTarget.h:
2254         (WebCore::JSTestEventTarget::createStructure):
2255         (WebCore::JSTestEventTargetPrototype::createStructure):
2256         (WebCore::JSTestEventTargetConstructor::createStructure):
2257         * bindings/scripts/test/JS/JSTestException.cpp:
2258         (WebCore::JSTestExceptionConstructor::finishCreation):
2259         (WebCore::JSTestException::finishCreation):
2260         (WebCore::JSTestException::getOwnPropertySlot):
2261         (WebCore::JSTestException::getOwnPropertyDescriptor):
2262         (WebCore::toTestException):
2263         * bindings/scripts/test/JS/JSTestException.h:
2264         (WebCore::JSTestException::createStructure):
2265         (WebCore::JSTestExceptionPrototype::createStructure):
2266         (WebCore::JSTestExceptionConstructor::createStructure):
2267         * bindings/scripts/test/JS/JSTestInterface.cpp:
2268         (WebCore::JSTestInterfaceConstructor::finishCreation):
2269         (WebCore::JSTestInterface::finishCreation):
2270         (WebCore::JSTestInterface::getOwnPropertySlot):
2271         (WebCore::JSTestInterface::getOwnPropertyDescriptor):
2272         (WebCore::JSTestInterface::put):
2273         (WebCore::JSTestInterface::putByIndex):
2274         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
2275         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
2276         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3):
2277         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
2278         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
2279         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod3):
2280         (WebCore::toTestInterface):
2281         * bindings/scripts/test/JS/JSTestInterface.h:
2282         (WebCore::JSTestInterface::createStructure):
2283         (WebCore::JSTestInterfacePrototype::createStructure):
2284         (WebCore::JSTestInterfaceConstructor::createStructure):
2285         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2286         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
2287         (WebCore::JSTestMediaQueryListListener::finishCreation):
2288         (WebCore::JSTestMediaQueryListListener::getOwnPropertySlot):
2289         (WebCore::JSTestMediaQueryListListener::getOwnPropertyDescriptor):
2290         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
2291         (WebCore::toTestMediaQueryListListener):
2292         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2293         (WebCore::JSTestMediaQueryListListener::createStructure):
2294         (WebCore::JSTestMediaQueryListListenerPrototype::createStructure):
2295         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
2296         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2297         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
2298         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
2299         (WebCore::JSTestNamedConstructor::finishCreation):
2300         (WebCore::JSTestNamedConstructor::getOwnPropertySlot):
2301         (WebCore::JSTestNamedConstructor::getOwnPropertyDescriptor):
2302         (WebCore::toTestNamedConstructor):
2303         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2304         (WebCore::JSTestNamedConstructor::createStructure):
2305         (WebCore::JSTestNamedConstructorPrototype::createStructure):
2306         (WebCore::JSTestNamedConstructorConstructor::createStructure):
2307         (WebCore::JSTestNamedConstructorNamedConstructor::createStructure):
2308         * bindings/scripts/test/JS/JSTestNode.cpp:
2309         (WebCore::JSTestNodeConstructor::finishCreation):
2310         (WebCore::JSTestNode::finishCreation):
2311         (WebCore::JSTestNode::getOwnPropertySlot):
2312         (WebCore::JSTestNode::getOwnPropertyDescriptor):
2313         (WebCore::JSTestNode::visitChildren):
2314         * bindings/scripts/test/JS/JSTestNode.h:
2315         (WebCore::JSTestNode::createStructure):
2316         (WebCore::JSTestNodePrototype::createStructure):
2317         (WebCore::JSTestNodeConstructor::createStructure):
2318         * bindings/scripts/test/JS/JSTestObj.cpp:
2319         (WebCore::JSTestObjConstructor::finishCreation):
2320         (WebCore::JSTestObj::finishCreation):
2321         (WebCore::JSTestObj::getOwnPropertySlot):
2322         (WebCore::JSTestObj::getOwnPropertyDescriptor):
2323         (WebCore::JSTestObj::put):
2324         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
2325         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
2326         (WebCore::jsTestObjPrototypeFunctionByteMethod):
2327         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
2328         (WebCore::jsTestObjPrototypeFunctionOctetMethod):
2329         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
2330         (WebCore::jsTestObjPrototypeFunctionLongMethod):
2331         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
2332         (WebCore::jsTestObjPrototypeFunctionObjMethod):
2333         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
2334         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
2335         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
2336         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
2337         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
2338         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
2339         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
2340         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
2341         (WebCore::jsTestObjPrototypeFunctionCustomMethod):
2342         (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
2343         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
2344         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
2345         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
2346         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
2347         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
2348         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
2349         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
2350         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
2351         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
2352         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
2353         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
2354         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
2355         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
2356         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
2357         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
2358         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
2359         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
2360         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
2361         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
2362         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
2363         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
2364         (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
2365         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
2366         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
2367         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
2368         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
2369         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
2370         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
2371         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
2372         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
2373         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
2374         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
2375         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
2376         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
2377         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
2378         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
2379         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
2380         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
2381         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
2382         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
2383         (WebCore::jsTestObjPrototypeFunctionConvert1):
2384         (WebCore::jsTestObjPrototypeFunctionConvert2):
2385         (WebCore::jsTestObjPrototypeFunctionConvert4):
2386         (WebCore::jsTestObjPrototypeFunctionConvert5):
2387         (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
2388         (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
2389         (WebCore::jsTestObjPrototypeFunctionOrange):
2390         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
2391         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
2392         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
2393         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
2394         (WebCore::JSTestObj::visitChildren):
2395         (WebCore::toTestObj):
2396         * bindings/scripts/test/JS/JSTestObj.h:
2397         (WebCore::JSTestObj::createStructure):
2398         (WebCore::JSTestObjPrototype::createStructure):
2399         (WebCore::JSTestObjConstructor::createStructure):
2400         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2401         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors):
2402         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2403         (WebCore::JSTestOverloadedConstructors::finishCreation):
2404         (WebCore::JSTestOverloadedConstructors::getOwnPropertySlot):
2405         (WebCore::JSTestOverloadedConstructors::getOwnPropertyDescriptor):
2406         (WebCore::toTestOverloadedConstructors):
2407         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2408         (WebCore::JSTestOverloadedConstructors::createStructure):
2409         (WebCore::JSTestOverloadedConstructorsPrototype::createStructure):
2410         (WebCore::JSTestOverloadedConstructorsConstructor::createStructure):
2411         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2412         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
2413         (WebCore::JSTestSerializedScriptValueInterface::finishCreation):
2414         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot):
2415         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertyDescriptor):
2416         (WebCore::JSTestSerializedScriptValueInterface::put):
2417         (WebCore::JSTestSerializedScriptValueInterface::visitChildren):
2418         (WebCore::toTestSerializedScriptValueInterface):
2419         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2420         (WebCore::JSTestSerializedScriptValueInterface::createStructure):
2421         (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure):
2422         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
2423         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2424         (WebCore::JSTestTypedefsConstructor::finishCreation):
2425         (WebCore::JSTestTypedefs::finishCreation):
2426         (WebCore::JSTestTypedefs::getOwnPropertySlot):
2427         (WebCore::JSTestTypedefs::getOwnPropertyDescriptor):
2428         (WebCore::JSTestTypedefs::put):
2429         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
2430         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
2431         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
2432         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
2433         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
2434         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
2435         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
2436         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
2437         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
2438         (WebCore::toTestTypedefs):
2439         * bindings/scripts/test/JS/JSTestTypedefs.h:
2440         (WebCore::JSTestTypedefs::createStructure):
2441         (WebCore::JSTestTypedefsPrototype::createStructure):
2442         (WebCore::JSTestTypedefsConstructor::createStructure):
2443         * bridge/c/CRuntimeObject.cpp:
2444         (JSC::Bindings::CRuntimeObject::finishCreation):
2445         * bridge/c/CRuntimeObject.h:
2446         (JSC::Bindings::CRuntimeObject::createStructure):
2447         * bridge/c/c_instance.cpp:
2448         (JSC::Bindings::CRuntimeMethod::createStructure):
2449         (JSC::Bindings::CRuntimeMethod::finishCreation):
2450         (JSC::Bindings::CInstance::invokeMethod):
2451         * bridge/c/c_utility.cpp:
2452         (JSC::Bindings::convertValueToNPVariant):
2453         * bridge/objc/ObjCRuntimeObject.h:
2454         (JSC::Bindings::ObjCRuntimeObject::createStructure):
2455         * bridge/objc/objc_instance.mm:
2456         (ObjCRuntimeMethod::finishCreation):
2457         (ObjcInstance::invokeMethod):
2458         * bridge/objc/objc_runtime.h:
2459         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
2460         * bridge/objc/objc_runtime.mm:
2461         (JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
2462         (JSC::Bindings::callObjCFallbackObject):
2463         * bridge/qt/qt_instance.cpp:
2464         (JSC::Bindings::QtRuntimeObject::createStructure):
2465         (JSC::Bindings::QtInstance::getInstance):
2466         * bridge/qt/qt_pixmapruntime.cpp:
2467         (JSC::Bindings::assignToHTMLImageElement):
2468         (JSC::Bindings::QtPixmapRuntime::toQt):
2469         * bridge/qt/qt_runtime.cpp:
2470         (JSC::Bindings::isJSUint8Array):
2471         (JSC::Bindings::isJSArray):
2472         (JSC::Bindings::isJSDate):
2473         (JSC::Bindings::isQtObject):
2474         (JSC::Bindings::unwrapBoxedPrimitive):
2475         (JSC::Bindings::convertQVariantToValue):
2476         * bridge/runtime_array.cpp:
2477         (JSC::RuntimeArray::finishCreation):
2478         * bridge/runtime_array.h:
2479         (JSC::RuntimeArray::createStructure):
2480         * bridge/runtime_method.cpp:
2481         (JSC::RuntimeMethod::finishCreation):
2482         (JSC::callRuntimeMethod):
2483         * bridge/runtime_method.h:
2484         (JSC::RuntimeMethod::createStructure):
2485         * bridge/runtime_object.cpp:
2486         (JSC::Bindings::RuntimeObject::finishCreation):
2487         (JSC::Bindings::callRuntimeObject):
2488         (JSC::Bindings::callRuntimeConstructor):
2489         * bridge/runtime_object.h:
2490         (JSC::Bindings::RuntimeObject::createStructure):
2491
2492 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
2493
2494         REGRESSION(r150187): Safari fails to render allrecipe.com comment popups
2495         https://bugs.webkit.org/show_bug.cgi?id=119780
2496
2497         Reviewed by Benjamin Poulain.
2498
2499         The bug was caused by SelectorDataList::executeFastPathForIdSelector not verifying that
2500         elements found by getAllElementsById are descendents of rootNode when there are multiple
2501         elements of the same id. This resulted in querySelector and querySelectorAll of an element
2502         returning nodes outside of the element.
2503
2504         Fixed the bug by checking this condition when we have multiple elements of the same id.
2505
2506         Test: fast/selectors/querySelector-id-with-multiple-elements-with-same-id.html
2507
2508         * dom/SelectorQuery.cpp:
2509         (WebCore::SelectorDataList::executeFastPathForIdSelector):
2510
2511 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
2512
2513         Fix orphan needsLayout state in RenderTextControlSingleLine
2514         https://bugs.webkit.org/show_bug.cgi?id=119726
2515
2516         Reviewed by Kent Tamura.
2517
2518         Merge https://chromium.googlesource.com/chromium/blink/+/c0aec52ef348b2be0c882f8646fe3cf537831f59
2519
2520         We should mark the renderer for containerElement, which wraps innerTextElement and innerBlockElement
2521         in cases of input[type=search] and input[type=number], dirty.
2522
2523         * rendering/RenderTextControlSingleLine.cpp:
2524         (WebCore::setNeedsLayoutOnAncestors):
2525         (WebCore::RenderTextControlSingleLine::layout):
2526
2527 2013-08-13  Sam Weinig  <sam@webkit.org>
2528
2529         [Re-land] Cleanup MediaQueryListListener
2530         https://bugs.webkit.org/show_bug.cgi?id=119664
2531
2532         Reviewed by Andreas Kling.
2533
2534         Make MediaQueryListListener a proper WebIDL callback.
2535
2536         * CMakeLists.txt:
2537         * DerivedSources.cpp:
2538         * DerivedSources.make:
2539         * DerivedSources.pri:
2540         * GNUmakefile.list.am:
2541         * Target.pri:
2542         * WebCore.vcxproj/WebCore.vcxproj:
2543         * WebCore.vcxproj/WebCore.vcxproj.filters:
2544         * WebCore.xcodeproj/project.pbxproj:
2545         Update project files.
2546
2547         * bindings/scripts/CodeGeneratorJS.pm:
2548         (GenerateCallbackHeader):
2549         (GenerateCallbackImplementation):
2550         (JSValueToNative):
2551         * bindings/scripts/IDLAttributes.txt:
2552         Add support for CallbackNeedsOperatorEqual, which adds an operator==.
2553
2554         * css/MediaAllInOne.cpp:
2555         Remove MediaQueryListListener.cpp.
2556
2557         * css/MediaQueryListListener.cpp:
2558         Removed.
2559
2560         * css/MediaQueryListListener.h:
2561         (WebCore::MediaQueryListListener::~MediaQueryListListener):
2562         (WebCore::MediaQueryListListener::MediaQueryListListener):
2563         * css/MediaQueryListListener.idl:
2564         Convert to a proper WebIDL callback.
2565
2566         * css/MediaQueryMatcher.cpp:
2567         (WebCore::MediaQueryMatcher::Listener::evaluate):
2568         (WebCore::MediaQueryMatcher::styleResolverChanged):
2569         * css/MediaQueryMatcher.h:
2570         Remove all traces of the ScriptState.
2571
2572 2013-08-13  Dean Jackson  <dino@apple.com>
2573
2574         <https://webkit.org/b/119776> Don't use ScriptProfiler to find canvases for instrumentation
2575
2576         Reviewed by Joseph Pecoraro.
2577
2578         InspectorCanvasAgent::findFramesWithUninstrumentedCanvases uses a ScriptProfiler to walk the tree
2579         looking for canvas elements. This is currently not implemented in JSC, but we can do this directly
2580         with DOM methods. We're only looking for Canvas elements that have a context, so there isn't a need
2581         for this abstract walking object.
2582
2583         * html/HTMLCanvasElement.h: Add new helpers to cast to <canvas>.
2584         (WebCore::isHTMLCanvasElement):
2585         (WebCore::toHTMLCanvasElement):
2586         * inspector/InspectorCanvasAgent.cpp:
2587         (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases): Simply walk
2588         the frame tree and use getElementsByTagName to find canvas elements.
2589         * bindings/js/bindings/js/ScriptProfiler.h: Removed unused method.
2590
2591 2013-08-13  Brent Fulgham  <bfulgham@apple.com>
2592
2593         [Windows] Windows is incorrectly using a LayerTypeTiledBackingLayer
2594         https://bugs.webkit.org/show_bug.cgi?id=119772
2595
2596         Reviewed by Simon Fraser.
2597
2598         * platform/graphics/ca/GraphicsLayerCA.cpp:
2599         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Ensure that we use
2600         the correct (supported) tiled layer type for Windows.
2601         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2602         (PlatformCALayer::PlatformCALayer): Add an assertion to notify us if
2603         we introduce this mistake again in the future.
2604
2605 2013-08-13  Anders Carlsson  <andersca@apple.com>
2606
2607         <https://webkit.org/b/119771> Use NeverDestroyed for smart pointer slot static locals
2608
2609         Reviewed by Andreas Kling.
2610
2611         This is preparation for making it a hard error to use DEFINE_STATIC_LOCAL with smart pointer types.
2612
2613         * dom/UserTypingGestureIndicator.cpp:
2614         (WebCore::focusedNode):
2615         * page/mac/EventHandlerMac.mm:
2616         (WebCore::currentNSEventSlot):
2617         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2618         (WebCore::defaultNetworkStorageSession):
2619         (WebCore::cookieStorageOverride):
2620
2621 2013-08-13  Anders Carlsson  <andersca@apple.com>
2622
2623         Stop using DEFINE_STATIC_LOCAL with RefPtr
2624         https://bugs.webkit.org/show_bug.cgi?id=119769
2625
2626         Reviewed by Andreas Kling.
2627
2628         No need to waste heap memory allocating RefPtr, just store the raw pointers directly.
2629
2630         * dom/ContextFeatures.cpp:
2631         (WebCore::ContextFeatures::defaultSwitch):
2632         * dom/DocumentMarker.cpp:
2633         (WebCore::DocumentMarkerTextMatch::instanceFor):
2634         * editing/EditingStyle.cpp:
2635         (WebCore::StyleChange::extractTextStyles):
2636         * html/FTPDirectoryDocument.cpp:
2637         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
2638         * html/HTMLPlugInImageElement.cpp:
2639         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
2640         * html/track/TextTrack.cpp:
2641         (WebCore::TextTrack::captionMenuOffItem):
2642         (WebCore::TextTrack::captionMenuAutomaticItem):
2643         * loader/icon/IconDatabase.cpp:
2644         (WebCore::loadDefaultIconRecord):
2645         * platform/graphics/Image.cpp:
2646         (WebCore::Image::nullImage):
2647         * platform/graphics/PlatformTextTrack.h:
2648         (WebCore::PlatformTextTrack::captionMenuOffItem):
2649         (WebCore::PlatformTextTrack::captionMenuAutomaticItem):
2650         * rendering/style/RenderStyle.cpp:
2651         (WebCore::RenderStyle::initialShapeInside):
2652         * testing/MockCDM.cpp:
2653         (WebCore::initDataPrefix):
2654         (WebCore::keyPrefix):
2655         (WebCore::keyRequest):
2656
2657 2013-08-13  Anders Carlsson  <andersca@apple.com>
2658
2659         Stop using DEFINE_STATIC_LOCAL with RetainPtr
2660         https://bugs.webkit.org/show_bug.cgi?id=119765
2661
2662         Reviewed by Jessie Berlin.
2663
2664         No need to waste heap memory allocating RetainPtrs, just store the raw pointers directly.
2665
2666         * platform/graphics/mac/ColorMac.mm:
2667         (WebCore::nsColor):
2668         * platform/graphics/mac/GraphicsContextMac.mm:
2669         (WebCore::makePatternColor):
2670         (WebCore::GraphicsContext::drawLineForDocumentMarker):
2671         * platform/graphics/mac/SimpleFontDataMac.mm:
2672         (WebCore::webFallbackFontFamily):
2673
2674 2013-08-13  Commit Queue  <commit-queue@webkit.org>
2675
2676         Unreviewed, rolling out r153925.
2677         http://trac.webkit.org/changeset/153925
2678         https://bugs.webkit.org/show_bug.cgi?id=119768
2679
2680         broke fast/media/media-query-list-07.html (Requested by kling
2681         on #webkit).
2682
2683         * CMakeLists.txt:
2684         * DerivedSources.cpp:
2685         * DerivedSources.make:
2686         * DerivedSources.pri:
2687         * GNUmakefile.list.am:
2688         * Target.pri:
2689         * WebCore.vcxproj/WebCore.vcxproj:
2690         * WebCore.vcxproj/WebCore.vcxproj.filters:
2691         * WebCore.xcodeproj/project.pbxproj:
2692         * bindings/scripts/CodeGeneratorJS.pm:
2693         (GenerateCallbackHeader):
2694         (GenerateCallbackImplementation):
2695         (JSValueToNative):
2696         * bindings/scripts/IDLAttributes.txt:
2697         * bindings/scripts/test/JS/JSTestCallback.cpp:
2698         (WebCore::JSTestCallback::JSTestCallback):
2699         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2700         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
2701         * css/MediaAllInOne.cpp:
2702         * css/MediaQueryListListener.cpp: Copied from Source/WebCore/css/MediaQueryListListener.idl.
2703         (WebCore::MediaQueryListListener::queryChanged):
2704         * css/MediaQueryListListener.h:
2705         (WebCore::MediaQueryListListener::create):
2706         (WebCore::MediaQueryListListener::operator==):
2707         (WebCore::MediaQueryListListener::MediaQueryListListener):
2708         * css/MediaQueryListListener.idl:
2709         * css/MediaQueryMatcher.cpp:
2710         (WebCore::MediaQueryMatcher::Listener::evaluate):
2711         (WebCore::MediaQueryMatcher::styleResolverChanged):
2712         * css/MediaQueryMatcher.h:
2713
2714 2013-08-13  Simon Fraser  <simon.fraser@apple.com>
2715
2716         Every scroll causes additional layer tree work because of flatteningLayer->removeFromParent();
2717         https://bugs.webkit.org/show_bug.cgi?id=119551
2718
2719         Reviewed by Dean Jackson.
2720
2721         Only re-parent the flattening layer if we had to update our
2722         layer configuration (reparenting is necessary then to get
2723         the correct sibling ordering), or if it was parented in some
2724         other layer.
2725         
2726         This avoid unnecessary flushing of state to CA.
2727
2728         * rendering/RenderLayerBacking.cpp:
2729         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2730
2731 2013-08-13  Robert Hogan  <robert@webkit.org>
2732
2733         Section's collapsed borders painted in wrong place in rtl tables
2734         https://bugs.webkit.org/show_bug.cgi?id=119691
2735
2736         Reviewed by Darin Adler.
2737
2738         Table row-groups can be RTL too, so look to the section rather than the
2739         table when deciding the direction of a row. The section will inherit the
2740         table's direction if it doesn't override it.
2741
2742         Test: fast/table/paint-collapsed-borders-rtl-section.html
2743
2744         * rendering/RenderTableCell.cpp:
2745         (WebCore::RenderTableCell::hasStartBorderAdjoiningTable):
2746         (WebCore::RenderTableCell::hasEndBorderAdjoiningTable):
2747
2748 2013-08-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2749
2750         NodeList.item() does not behave according to specification
2751         https://bugs.webkit.org/show_bug.cgi?id=119722
2752
2753         Reviewed by Darin Adler.
2754
2755         Make NodeList.item() indexed getter behave according to specification:
2756         http://dom.spec.whatwg.org/#nodelist
2757
2758         Namely, we no longer throw if the index is negative (meaning the
2759         [IsIndex] extended attribute is dropped) and the argument is now
2760         mandatory.
2761
2762         This behavior is consistent with both IE10 and Firefox and since
2763         recently Blink.
2764
2765         Test: fast/dom/nodelist-item-parameter.html
2766
2767         * dom/NodeList.idl:
2768
2769 2013-08-13  Anders Carlsson  <andersca@apple.com>
2770
2771         Fix build.
2772
2773         * WebCore.exp.in:
2774
2775 2013-08-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2776
2777         REGRESSION(SUBPIXEL_LAYOUT) Composited layers can cause one pixel shifts
2778         https://bugs.webkit.org/show_bug.cgi?id=115304
2779
2780         Reviewed by David Hyatt.
2781
2782         Accelerated layers can cause blocks at subpixel offsets to shift because
2783         accumulated subpixel offsets are lost between each layers.
2784
2785         To solve this layer bounds are now calculated in LayoutUnits, and their
2786         subpixel offset saved so it can be used to ensure correct pixel-snapping
2787         during painting.
2788
2789         Test: fast/sub-pixel/sub-pixel-composited-layers.html
2790
2791         * WebCore.exp.in:
2792         * inspector/InspectorLayerTreeAgent.cpp:
2793         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
2794         * platform/graphics/LayoutPoint.h:
2795         (WebCore::LayoutPoint::fraction):
2796         * rendering/RenderLayer.cpp:
2797         (WebCore::RenderLayer::setupClipPath):
2798         (WebCore::RenderLayer::setupFilters):
2799         (WebCore::RenderLayer::paintLayerContents):
2800         (WebCore::RenderLayer::calculateLayerBounds):
2801         * rendering/RenderLayer.h:
2802         * rendering/RenderLayerBacking.cpp:
2803         (WebCore::RenderLayerBacking::updateCompositedBounds):
2804         (WebCore::RenderLayerBacking::updateAfterWidgetResize):
2805         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2806         (WebCore::RenderLayerBacking::resetContentsRect):
2807         (WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
2808         (WebCore::RenderLayerBacking::contentsBox):
2809         (WebCore::RenderLayerBacking::backgroundBox):
2810         (WebCore::RenderLayerBacking::paintIntoLayer):
2811         (WebCore::RenderLayerBacking::paintContents):
2812         (WebCore::RenderLayerBacking::compositedBounds):
2813         (WebCore::RenderLayerBacking::setCompositedBounds):
2814         * rendering/RenderLayerBacking.h:
2815         * rendering/RenderLayerCompositor.cpp:
2816         (WebCore::RenderLayerCompositor::logLayerInfo):
2817         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
2818         * rendering/RenderLayerCompositor.h:
2819         * rendering/RenderTreeAsText.cpp:
2820         (WebCore::operator<<):
2821         * rendering/RenderTreeAsText.h:
2822
2823 2013-08-13  peavo@outlook.com  <peavo@outlook.com>
2824
2825         [Curl] Possible infinite loop while downloading.
2826         https://bugs.webkit.org/show_bug.cgi?id=119744
2827
2828         Reviewed by Darin Adler.
2829
2830         If adding/removing curl handles fails, the download thread
2831         can end up in an endless loop trying to update the curl handle list.
2832
2833         * platform/network/curl/CurlDownload.cpp:
2834         (WebCore::CurlDownloadManager::updateHandleList): Avoid infinite loop by ignoring return value.
2835
2836 2013-08-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2837
2838         HTMLSelectElement.item() does not behave according to specification
2839         https://bugs.webkit.org/show_bug.cgi?id=119738
2840
2841         Reviewed by Darin Adler.
2842
2843         Make HTMLSelectElement.item() behave according to specification:
2844         http://www.w3.org/TR/html51/forms.html#dom-select-item
2845         http://dom.spec.whatwg.org/#dom-htmlcollection-item
2846
2847         Namely, we no longer throw if the offset argument is negative. Also,
2848         the argument is now mandatory.
2849
2850         IE10, Firefox and Blink do not throw when HTMLSelectElement.item() is
2851         called with a negative value (as per the specification).
2852
2853         The argument is mandatory in Firefox and Blink, but optional in IE10
2854         (it returns null when called without argument). This looks like a bug
2855         in IE because other item() getters' argument is usually mandatory in IE
2856         (e.g. NodeList.item()).
2857
2858         Test: fast/dom/HTMLSelectElement/select-element-item-argument.html
2859
2860         * html/HTMLSelectElement.idl:
2861
2862 2013-08-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2863
2864         On request error, always fire events on the XMLHttpRequestUpload before the XMLHttpRequest
2865         https://bugs.webkit.org/show_bug.cgi?id=119714
2866
2867         Reviewed by Alexey Proskuryakov.
2868
2869         On request error, fire events on the XMLHttpRequestUpload object before the XMLHttpRequest
2870         object as per the latest specification:
2871         http://xhr.spec.whatwg.org/#request-error
2872
2873         This specification change was made in Sept 2010:
2874         http://dev.w3.org/cvsweb/2006/webapi/XMLHttpRequest-2/Overview.src.html.diff?r1=1.138;r2=1.139;f=h
2875
2876         It addresses the following comment:
2877         http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/0777.html
2878
2879         IE10 and since recently Blink behave according to specification but WebKit was firing the
2880         events on the XMLHttpRequest object BEFORE the XMLHttpRequestUpload object in case of
2881         'network error' or 'abort error'. WebKit was however behaving according to specification
2882         in case of 'timeout error', which was inconsistent.
2883
2884         Test: http/tests/xmlhttprequest/upload-request-error-event-order.html
2885
2886         * xml/XMLHttpRequest.cpp:
2887         (WebCore::XMLHttpRequest::networkError):
2888         (WebCore::XMLHttpRequest::abortError):
2889
2890 2013-08-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2891
2892         Simplify RadioNodeList's anonymous indexed getter
2893         https://bugs.webkit.org/show_bug.cgi?id=119725
2894
2895         Reviewed by Darin Adler.
2896
2897         Simplify RadioNodeList's anonymous indexed getter by dropping [IsIndex]
2898         IDL extended attribute from its parameter and making it mandatory.
2899
2900         This change has strictly no impact on the generated bindings code
2901         but it simplifies the IDL.
2902
2903         No new test, no behavior change.
2904
2905         * html/RadioNodeList.idl:
2906
2907 2013-08-13  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
2908
2909         [GTK] close the volume slider when the media control panel is hidden
2910         https://bugs.webkit.org/show_bug.cgi?id=119062
2911
2912         Reviewed by Gustavo Noronha Silva.
2913
2914         It's not obvious how to close the volume slider on webkitGtk.
2915         The volume slider should close if the control panel is hidden.
2916
2917         * html/shadow/MediaControlsGtk.cpp:
2918         (WebCore::MediaControlsGtk::makeTransparent):
2919         * html/shadow/MediaControlsGtk.h:
2920
2921 2013-08-13  Commit Queue  <commit-queue@webkit.org>
2922
2923         Unreviewed, rolling out r152563.
2924         http://trac.webkit.org/changeset/152563
2925         https://bugs.webkit.org/show_bug.cgi?id=119740
2926
2927         causes random crashes (Requested by carewolf on #webkit).
2928
2929         * platform/graphics/qt/FontCacheQt.cpp:
2930         (WebCore::FontCache::getLastResortFallbackFont):
2931
2932 2013-08-13  Andrei Bucur  <abucur@adobe.com>
2933
2934         Unreviewed.
2935
2936         Fix the build after http://trac.webkit.org/changeset/153990.
2937
2938         * rendering/RenderBlock.cpp:
2939         (WebCore::RenderBlock::updateShapesBeforeBlockLayout): Add the default return value if CSS Shapes are disabled.
2940
2941 2013-08-13  Andrei Bucur  <abucur@adobe.com>
2942
2943         [CSS Regions] Compute correct region ranges for boxes
2944         https://bugs.webkit.org/show_bug.cgi?id=116296
2945
2946         Reviewed by David Hyatt.
2947
2948         The patch extends the region ranges implementation with the following behavior:
2949         - the range of a box is always included in the range of its containing block (even for floats); this will simplify how overflow
2950         is propagated to the regions and it should later change on a case by case basis.
2951         - if the range of a box is not correctly estimated before the layout it will be marked for relayout; this is necessary to correctly
2952         position boxes that overflow naturally, like floats.
2953         - all the boxes have a range now, not only the blocks.
2954         - regionAtBlockOffset can clamp to a box.
2955         - an unsplittable box has a region range of a single region, the one where the box top falls into.
2956
2957         When the layout of a child box starts it tries to give an estimate based on the maximal height of the box. After the layout,
2958         if the estimation was wrong, the box is relaid out. For example, if a block with a float is laid out in a region but the float
2959         overflows in the next region a relayout is needed for the float so it can be positioned relative to the containing block
2960         region (this step can be optimized by making a layout pass only for the children that don't have the region range enclosed in the
2961         containing block range).
2962
2963         Tests: fast/regions/bottom-overflow-out-of-first-region-absolute.html
2964                fast/regions/float-pushed-width-change-2.html
2965                fast/regions/scrollable-paragraph-unsplittable.html
2966
2967         * rendering/RenderBlock.cpp:
2968         (WebCore::RenderBlock::updateShapesBeforeBlockLayout): Doesn't do anything for regions now.
2969         (WebCore::RenderBlock::updateShapesAfterBlockLayout): Doesn't do anything for regions now.
2970         (WebCore::RenderBlock::relayoutToAvoidWidows): The layout to avoid widows. Widows use the line index to determine the break point,
2971         not the RootLineBox pointer as before. This is necessary to prevent stale pointers in further layouts.
2972         (WebCore::RenderBlock::layoutBlock):
2973         (WebCore::RenderBlock::layoutBlockChild):
2974         (WebCore::RenderBlock::layoutPositionedObjects):
2975         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded): Relayout for widows during layoutBlock(). Don't wait to exit the block layout.
2976         (WebCore::RenderBlock::positionNewFloats):
2977         (WebCore::RenderBlock::hasNextPage):
2978         (WebCore::RenderBlock::applyBeforeBreak):
2979         (WebCore::RenderBlock::applyAfterBreak):
2980         (WebCore::RenderBlock::setPageBreak):
2981         (WebCore::RenderBlock::updateMinimumPageHeight):
2982         (WebCore::RenderBlock::regionAtBlockOffset): This function can now clamp at a box.
2983         (WebCore::RenderBlock::computeRegionRangeForBoxChild): Calculate the box region range using the box height.
2984         (WebCore::RenderBlock::estimateRegionRangeForBoxChild): Estimate the box region range using a huge height for the box.
2985         (WebCore::RenderBlock::updateRegionRangeForBoxChild): Determine the final region range of a box.
2986         * rendering/RenderBlock.h:
2987         (WebCore::RenderBlock::logicalWidthForChild):
2988         (WebCore::RenderBlock::logicalHeightForChild):
2989         (WebCore::RenderBlock::logicalTopForChild):
2990         * rendering/RenderBlockLineLayout.cpp:
2991         (WebCore::RenderBlock::layoutInlineChildren):
2992         * rendering/RenderBox.cpp:
2993         (WebCore::RenderBox::clampToStartAndEndRegions):
2994         (WebCore::RenderBox::borderBoxRectInRegion):
2995         * rendering/RenderBox.h:
2996         * rendering/RenderDeprecatedFlexibleBox.cpp:
2997         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2998         * rendering/RenderFlexibleBox.cpp:
2999         (WebCore::RenderFlexibleBox::layoutBlock):
3000         * rendering/RenderFlowThread.cpp:
3001         (WebCore::RenderFlowThread::validateRegions):
3002         (WebCore::RenderFlowThread::regionAtBlockOffset):
3003         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
3004         (WebCore::RenderFlowThread::pageLogicalTopForOffset):
3005         (WebCore::RenderFlowThread::pageLogicalWidthForOffset):
3006         (WebCore::RenderFlowThread::pageLogicalHeightForOffset):
3007         (WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
3008         (WebCore::RenderFlowThread::mapFromFlowToRegion):
3009         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
3010         (WebCore::RenderFlowThread::clearRenderObjectCustomStyle):
3011         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
3012         (WebCore::RenderFlowThread::setRegionRangeForBox):
3013         (WebCore::RenderFlowThread::applyBreakAfterContent):
3014         (WebCore::RenderFlowThread::addForcedRegionBreak):
3015         * rendering/RenderFlowThread.h:
3016         * rendering/RenderGrid.cpp:
3017         (WebCore::RenderGrid::layoutBlock):
3018         * rendering/RenderMultiColumnFlowThread.cpp:
3019         (WebCore::RenderMultiColumnFlowThread::setPageBreak):
3020         (WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
3021         * rendering/RenderMultiColumnFlowThread.h:
3022
3023 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
3024
3025         One more speculative Windows build fix after r153978.
3026
3027         * page/win/DragControllerWin.cpp:
3028
3029 2013-08-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3030
3031         Update scheme list according to latest specification
3032         https://bugs.webkit.org/show_bug.cgi?id=119510
3033
3034         Reviewed by Christophe Dumez.
3035
3036         New schemes are added to it additionally. Those are bitcoin, im, ircs and wtai.
3037         As additional work, scheme order is listed to be sync with spec.
3038
3039         Spec: http://www.w3.org/html/wg/drafts/html/master/webappapis.html#custom-handlers
3040
3041         Test: fast/dom/register-protocol-handler.html
3042               fast/dom/unregister-protocol-handler.html
3043
3044         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
3045         (WebCore::initProtocolHandlerWhitelist):
3046
3047 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
3048
3049         Yet another Windows build fix attempt after r153978.
3050
3051         * page/win/DragControllerWin.cpp:
3052         (WebCore::DragController::declareAndWriteDragImage):
3053
3054 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
3055
3056         Another Windows build fix attempt after r153978.
3057
3058         * page/win/DragControllerWin.cpp:
3059
3060 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
3061
3062         Windows build fix attempt after r153978.
3063
3064         * page/win/DragControllerWin.cpp:
3065
3066 2013-08-12  Zan Dobersek  <zdobersek@igalia.com>
3067
3068         ASSERTION FAILED: type() == Percent in WebCore::Length::percent
3069         https://bugs.webkit.org/show_bug.cgi?id=116715
3070
3071         Reviewed by Darin Adler.
3072
3073         Allow the Calculated type in the Length::percent method that returns the Length's
3074         float value. This reflects the changes in r110148 that adjusted the Length::isPercent
3075         method to return true for Length objects of either Percent or Calculated type.
3076
3077         Test: fast/css/calculated-length-as-percent-crash.html
3078
3079         * platform/Length.h:
3080         (WebCore::Length::percent): Assert that Length::isPercent is true when Length::percent
3081         is called, ensuring the Length's type is either Percent or Calculated.
3082
3083 2013-06-16  Darin Adler  <darin@apple.com>
3084
3085         Move Clipboard::declareAndWriteDragImage to DragController
3086         https://bugs.webkit.org/show_bug.cgi?id=117683
3087
3088         Reviewed by Brent Fulgham.
3089
3090         * dom/Clipboard.h: Removed declareAndWriteDragImage.
3091
3092         * page/DragController.cpp:
3093         (WebCore::selectImageBeforeDragging): Half of the old prepareClipboardForImageDrag
3094         is now refactored into this function.
3095         (WebCore::DragController::startDrag): Where we called prepareClipboardForImageDrag,
3096         instead call selectImageBeforeDragging and declareAndWriteDragImage. This is needed
3097         because declareAndWriteDragImage needs to be a member function, for Mac at least.
3098
3099         * page/DragController.h: Added declareAndWriteDragImage.
3100
3101         * page/efl/DragControllerEfl.cpp:
3102         (WebCore::DragController::declareAndWriteDragImage): Added empty placeholder.
3103         It would be better to delete this file rather than having these placeholders.
3104         I don't think EFL actually has drag support, and it makes work to have to keep
3105         source files up to date that are really unused.
3106
3107         * page/gtk/DragControllerGtk.cpp:
3108         (WebCore::DragController::declareAndWriteDragImage): Added. Calls Pasteboard::writeImage.
3109         * page/mac/DragControllerMac.mm:
3110         (WebCore::DragController::declareAndWriteDragImage): Added. Calls to DragClient, which
3111         does the work.
3112         * page/qt/DragControllerQt.cpp:
3113         (WebCore::DragController::declareAndWriteDragImage): Added. Calls Pasteboard::writeImage.
3114         * page/win/DragControllerWin.cpp:
3115         (WebCore::DragController::declareAndWriteDragImage): Added. Uses Pasteboard functions to
3116         do the work.
3117
3118         * platform/Clipboard.h: Changed the pasteboard function to return a non-const reference.
3119         For now, it's not clear what const will mean for pasteboards, and it's currently not
3120         possible to write to a const pasteboard, which we need to do in the new
3121         DragController::declareAndWriteDragImage functions.
3122
3123         * platform/Pasteboard.h: Added a new writeMarkup function, implemented only for Windows
3124         at this time.
3125
3126         * platform/efl/ClipboardEfl.cpp: Deleted declareAndWriteDragImage.
3127         * platform/gtk/ClipboardGtk.cpp: Ditto.
3128         * platform/ios/ClipboardIOS.h: Ditto.
3129         * platform/ios/ClipboardIOS.mm: Ditto.
3130         * platform/mac/ClipboardMac.mm: Ditto.
3131         * platform/qt/ClipboardQt.cpp: Ditto.
3132         * platform/win/ClipboardWin.cpp: Ditto.
3133
3134         * platform/win/PasteboardWin.cpp:
3135         (WebCore::Pasteboard::writePlainTextToDataObject): Took out a pointless line of code.
3136         (WebCore::Pasteboard::writeMarkup): Added. Currently implemented only for Windows.
3137         This factors out a significant piece of DragController::declareAndWriteDragImage,
3138         and will probably be handy for other platforms later.
3139
3140 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
3141
3142         Fix NULL de-refernce in HTMLAnchorElement::sendPings when settings doesn't exist
3143         https://bugs.webkit.org/show_bug.cgi?id=119716
3144
3145         Reviewed by Darin Adler.
3146
3147         Merge https://chromium.googlesource.com/chromium/blink/+/d5783da353ab783e9994b8fbecd91880be5192a1
3148
3149         No new tests since the test in the Blink change doesn't reproduce crash on WebKit.
3150
3151         * html/HTMLAnchorElement.cpp:
3152         (WebCore::HTMLAnchorElement::sendPings):
3153
3154 2013-08-12  Seokju Kwon  <seokju@webkit.org>
3155
3156         Use the correct preprocessor in shouldRepaintFixedBackgroundsOnScroll()
3157         https://bugs.webkit.org/show_bug.cgi?id=119710
3158
3159         Reviewed by Darin Adler.
3160
3161         No behavior change, no new tests needed.
3162
3163         * rendering/RenderObject.cpp: Remove unused parameter warning.
3164         (WebCore::shouldRepaintFixedBackgroundsOnScroll):
3165
3166 2013-08-12  Alexey Proskuryakov  <ap@apple.com>
3167
3168         http/tests/security/sandboxed-iframe-invalid.html is flaky on Mac
3169         https://bugs.webkit.org/show_bug.cgi?id=85522
3170
3171         Reviewed by Andy Estes.
3172
3173         Drive-by FIXMEs and trivial fixes for WebCore issues I noticed while working
3174         on this bug. No behavior change expected.
3175
3176         * loader/FrameLoader.cpp:
3177         (WebCore::FrameLoader::submitForm):
3178         (WebCore::FrameLoader::findFrameForNavigation):
3179         * loader/NavigationScheduler.cpp:
3180         (WebCore::ScheduledFormSubmission::fire):
3181
3182 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
3183
3184         Fix variable name |end| -> |size| in EventTarget::fireEventListeners
3185         https://bugs.webkit.org/show_bug.cgi?id=119715
3186
3187         Reviewed by Benjamin Poulain.
3188
3189         Merge https://chromium.googlesource.com/chromium/blink/+/f58b017539c48059bb2b88d18ee0ee3d14decb01
3190         and also fix variable names in FiringEventIterator.
3191
3192         * dom/EventTarget.cpp:
3193         (WebCore::EventTarget::removeEventListener):
3194         (WebCore::EventTarget::fireEventListeners):
3195         (WebCore::EventTarget::removeAllEventListeners):
3196         * dom/EventTarget.h:
3197         (WebCore::FiringEventIterator::FiringEventIterator):
3198
3199 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
3200
3201         Encapsulate access to documentNamedItemMap and windowNamedItemMap
3202         https://bugs.webkit.org/show_bug.cgi?id=119701
3203
3204         Reviewed by Darin Adler.
3205
3206         Encapsulate m_documentNamedItem and m_windowNamedItem by adding various methods on HTMLDocument.
3207         This will help us doing more refactorings in the future.
3208
3209         * bindings/js/JSDOMWindowCustom.cpp:
3210         (WebCore::namedItemGetter):
3211         (WebCore::JSDOMWindow::getOwnPropertySlot):
3212         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
3213         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
3214         * bindings/js/JSHTMLDocumentCustom.cpp:
3215         (WebCore::JSHTMLDocument::canGetItemsForName):
3216         (WebCore::JSHTMLDocument::nameGetter):
3217         * dom/Element.cpp:
3218         (WebCore::Element::updateNameForDocument):
3219         (WebCore::Element::updateIdForDocument):
3220         * html/HTMLDocument.cpp:
3221         (WebCore::HTMLDocument::addDocumentNamedItem): Added.
3222         (WebCore::HTMLDocument::removeDocumentNamedItem): Added.
3223         (WebCore::HTMLDocument::addWindowNamedItem): Added.
3224         (WebCore::HTMLDocument::removeWindowNamedItem): Added.
3225         * html/HTMLDocument.h:
3226         (WebCore::HTMLDocument::documentNamedItem): Added.
3227         (WebCore::HTMLDocument::hasDocumentNamedItem): Added.
3228         (WebCore::HTMLDocument::documentNamedItemContainsMultipleElements): Added.
3229         (WebCore::HTMLDocument::windowNamedItem): Added.
3230         (WebCore::HTMLDocument::hasWindowNamedItem): Added.
3231         (WebCore::HTMLDocument::windowNamedItemContainsMultipleElements): Added.
3232         * html/HTMLImageElement.cpp:
3233         (WebCore::HTMLImageElement::parseAttribute):
3234         * html/HTMLObjectElement.cpp:
3235         (WebCore::HTMLObjectElement::updateDocNamedItem):
3236
3237 2013-08-12  Patrick Gansterer  <paroga@webkit.org>
3238
3239         [CMake] Use the correct list of files when compiling ANGLESupport on Windows
3240         https://bugs.webkit.org/show_bug.cgi?id=119439
3241
3242         Reviewed by Gyuyoung Kim.
3243
3244         * CMakeLists.txt: Use ossource_win.cpp instead of ossource_posix.cpp on Windows platforms.
3245
3246 2013-08-12  Arnaud Renevier  <a.renevier@samsung.com>
3247
3248         [cairo] memory corruption with putImageData and accelerated canvas.
3249         https://bugs.webkit.org/show_bug.cgi?id=118621
3250
3251         Reviewed by Martin Robinson.
3252
3253         When we have an accelerated imageBuffer, and we putByteArray with a
3254         non zero destPoint, we create temporary surface of sourceSize. Then,
3255         we write to image data with an offset. This results in an out of bound
3256         write.
3257
3258         In order to avoid that, we use a 0 offset when writing data.
3259
3260         In addition, we also create image with the minimal needed size in
3261         getImageData, and also use a 0 offset. This decrease data transfer
3262         between cpu and gpu
3263
3264         Instead of the map/unmap mechanism, perform an explicit surface copy
3265         when needed. This change also removes an unneeded glReadPixels at the
3266         start of putByteArray
3267
3268         Add two parameters to copyRectFromOneSurfaceToAnother: destination
3269         offset, and cairo drawing operator.
3270
3271         No new tests. Accelerated canvas is not enabled for testing yet.
3272
3273         * platform/graphics/cairo/CairoUtilities.cpp:
3274         (WebCore::copyRectFromOneSurfaceToAnother):
3275         * platform/graphics/cairo/CairoUtilities.h:
3276         * platform/graphics/cairo/ImageBufferCairo.cpp:
3277         (WebCore::copySurfaceToImageAndAdjustRect):
3278         (WebCore::getImageData):
3279         (WebCore::ImageBuffer::putByteArray):
3280
3281 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
3282
3283         Use const AtomicStringImpl* in DocumentOrderedMap
3284         https://bugs.webkit.org/show_bug.cgi?id=119700
3285
3286         Reviewed by Benjamin Poulain.
3287
3288         Use const AtomicStringImpl* in DocumentOrderedMap. It caught at least one bug that HTMLNameCollection'
3289         subclasses' nodeMatches were taking const AtomicString& instead of AtomicStringImpl*. This was forcing
3290         DocumentOrderedMap::getElementByWindowNamedItem and DocumentOrderedMap::getElementByDocumentNamedItem
3291         to create temporary AtomicStrings.
3292
3293         * dom/DocumentOrderedMap.cpp:
3294         (WebCore::keyMatchesId):
3295         (WebCore::keyMatchesName):
3296         (WebCore::keyMatchesMapName):
3297         (WebCore::keyMatchesLowercasedMapName):
3298         (WebCore::keyMatchesLabelForAttribute):
3299         (WebCore::keyMatchesWindowNamedItem):
3300         (WebCore::keyMatchesDocumentNamedItem):
3301         (WebCore::DocumentOrderedMap::add):
3302         (WebCore::DocumentOrderedMap::remove):
3303         (WebCore::DocumentOrderedMap::get):
3304         (WebCore::DocumentOrderedMap::getElementById):
3305         (WebCore::DocumentOrderedMap::getElementByName):
3306         (WebCore::DocumentOrderedMap::getElementByMapName):
3307         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
3308         (WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
3309         (WebCore::DocumentOrderedMap::getElementByWindowNamedItem):
3310         (WebCore::DocumentOrderedMap::getElementByDocumentNamedItem):
3311         (WebCore::DocumentOrderedMap::getAllElementsById):
3312         * dom/DocumentOrderedMap.h:
3313         (WebCore::DocumentOrderedMap::containsSingle):
3314         (WebCore::DocumentOrderedMap::contains):
3315         (WebCore::DocumentOrderedMap::containsMultiple):
3316         * html/HTMLNameCollection.cpp:
3317         (WebCore::WindowNameCollection::nodeMatches):
3318         (WebCore::DocumentNameCollection::nodeMatches):
3319         * html/HTMLNameCollection.h:
3320         (WebCore::WindowNameCollection::nodeMatches):
3321         (WebCore::DocumentNameCollection::nodeMatches):
3322
3323 2013-08-12  Beth Dakin  <bdakin@apple.com>
3324
3325         The LayoutMilestones didLayout callback should only fire for the main frame
3326         https://bugs.webkit.org/show_bug.cgi?id=119457
3327
3328         Reviewed by Sam Weinig.
3329
3330         This patch makes it so that FrameLoader::didLayout(LayoutMilestones) is only ever 
3331         called for the main frame. Technically this will change existing API for 
3332         didFirstVisuallyNonEmptyLayoutInFrame and didFirstLayoutInFrame. Clients used to 
3333         be able to register for those callbacks for any frame they wanted, however, now 
3334         they will only ever get the callback when it applies to the main frame. We think 
3335         that this is acceptable since we don’t know of any clients that ever used those 
3336         APIs for a non-main frame. This change also makes nothing but sense for the 
3337         didLayout(LayoutMilestones) callback, since that is a Page-level concept, so it 
3338         should only fire for the main frame.
3339
3340         Only call didLayout for the main frame.
3341         * dom/Document.cpp:
3342         (WebCore::Document::setVisualUpdatesAllowed):
3343
3344         Assert that this is the main frame.
3345         * loader/FrameLoader.cpp:
3346         (WebCore::FrameLoader::didLayout):
3347
3348         Only call didLayout for the main frame.
3349         * page/FrameView.cpp:
3350         (WebCore::FrameView::performPostLayoutTasks):
3351
3352 2013-08-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3353
3354         Define DOM_KEY_LOCATION_* constants on KeyboardEvent
3355         https://bugs.webkit.org/show_bug.cgi?id=119341
3356
3357         Reviewed by Ryosuke Niwa.
3358
3359         Add support for the DOM_KEY_LOCATION_* constants on KeyboardEvent as per
3360         the specification:
3361         http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent
3362
3363         Those constants are already supported by IE10, Firefox 22 and since
3364         recently Blink.
3365
3366         Note that the following constants are not supported / exposed yet:
3367         DOM_KEY_LOCATION_MOBILE and DOM_KEY_LOCATION_JOYSTICK.
3368
3369         Test: fast/events/keyboardevent-location-constants.html
3370
3371         * dom/KeyboardEvent.cpp:
3372         (WebCore::keyLocationCode):
3373         (WebCore::KeyboardEvent::KeyboardEvent):
3374         * dom/KeyboardEvent.h:
3375         * dom/KeyboardEvent.idl:
3376
3377 2013-08-12  Tim Horton  <timothy_horton@apple.com>
3378
3379         dataLog dumpers for WebCore's basic geometry types
3380         https://bugs.webkit.org/show_bug.cgi?id=119636
3381
3382         Reviewed by Filip Pizlo.
3383
3384         * platform/graphics/FloatPoint.cpp:
3385         (WebCore::FloatPoint::dump):
3386         * platform/graphics/FloatPoint.h:
3387         * platform/graphics/FloatRect.cpp:
3388         (WebCore::FloatRect::dump):
3389         * platform/graphics/FloatRect.h:
3390         * platform/graphics/FloatSize.cpp:
3391         (WebCore::FloatSize::dump):
3392         * platform/graphics/FloatSize.h:
3393         * platform/graphics/IntPoint.h:
3394         (WebCore::IntPoint::dump):
3395         * platform/graphics/IntRect.cpp:
3396         (WebCore::IntRect::dump):
3397         * platform/graphics/IntRect.h:
3398         * platform/graphics/IntSize.h:
3399         (WebCore::IntSize::dump):
3400
3401 2013-08-12  Dean Jackson  <dino@apple.com>
3402
3403         Shadows don't support viewport units
3404         https://bugs.webkit.org/show_bug.cgi?id=119649
3405
3406         Reviewed by Darin Adler.
3407
3408         We don't yet support viewport units in shadows, so
3409         fail parsing if we see one. The bug to fix this
3410         completely is: https://webkit.org/b/119650
3411
3412         Test: fast/css/shadow-viewport-units.html
3413
3414         * css/CSSParser.cpp:
3415         (WebCore::CSSParser::parseShadow): Fail if we get one of
3416         vh, vw, vmin, vmax.
3417
3418 2013-08-12  peavo@outlook.com  <peavo@outlook.com>
3419
3420         [Curl] Cookie is not set when url string is unicode.
3421         https://bugs.webkit.org/show_bug.cgi?id=119545
3422
3423         Reviewed by Brent Fulgham.
3424
3425         When the method setCookiesFromDOM is called with an unicode url parameter, the cookie is not correctly set.
3426         We need to convert the cookie string to 8 bit, before passing it to the Curl api function.