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