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