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