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