Finish making FloatingObject a real class with private members
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-08-14  Bem Jones-Bey  <bjonesbe@adobe.com>
2
3         Finish making FloatingObject a real class with private members
4         https://bugs.webkit.org/show_bug.cgi?id=119807
5
6         This is a port from Blink of
7         http://src.chromium.org/viewvc/blink?view=revision&revision=155964
8         Original patch by Eric Seidel.
9
10         From his comments on the Blink change:
11
12         Previously FloatingObject was in a half-done state where it had
13         accessors for many members, but also many members were public.
14
15         This CL makes all members private and adds the necessary remaining
16         accessors.
17
18         Reviewed by David Hyatt.
19
20         No new tests, no behavior change.
21
22         * rendering/RenderBlock.cpp:
23         (WebCore::RenderBlock::deleteLineBoxTree):
24         (WebCore::RenderBlock::addOverflowFromFloats):
25         (WebCore::RenderBlock::repaintOverhangingFloats):
26         (WebCore::RenderBlock::paintFloats):
27         (WebCore::RenderBlock::selectionGaps):
28         (WebCore::RenderBlock::insertFloatingObject):
29         (WebCore::RenderBlock::removeFloatingObject):
30         (WebCore::RenderBlock::removeFloatingObjectsBelow):
31         (WebCore::RenderBlock::positionNewFloats):
32         (WebCore::RenderBlock::clearFloats):
33         (WebCore::RenderBlock::addOverhangingFloats):
34         (WebCore::RenderBlock::addIntrudingFloats):
35         (WebCore::RenderBlock::hitTestFloats):
36         (WebCore::RenderBlock::adjustForBorderFit):
37         * rendering/RenderBlock.h:
38         (WebCore::RenderBlock::FloatingObject::paginationStrut):
39         (WebCore::RenderBlock::FloatingObject::setPaginationStrut):
40         (WebCore::RenderBlock::FloatingObject::setRenderer):
41         (WebCore::RenderBlock::FloatingObject::originatingLine):
42         (WebCore::RenderBlock::FloatingObject::setOriginatingLine):
43         (WebCore::RenderBlock::FloatingObjectHashFunctions::hash):
44         (WebCore::RenderBlock::FloatingObjectHashFunctions::equal):
45         (WebCore::RenderBlock::FloatingObjectHashTranslator::equal):
46         * rendering/RenderBlockLineLayout.cpp:
47         (WebCore::RenderBlock::appendFloatingObjectToLastLine):
48         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
49         (WebCore::RenderBlock::linkToEndLineIfNeeded):
50         (WebCore::RenderBlock::determineStartPosition):
51         (WebCore::RenderBlock::positionNewFloatOnLine):
52
53 2013-08-14  Rob Buis  <rwlbuis@webkit.org>
54
55         Assertion failure in RenderObject::drawLineForBoxSide
56         https://bugs.webkit.org/show_bug.cgi?id=108187
57
58         Reviewed by David Hyatt.
59
60         Don't draw the outline if the rectangle to draw is empty.
61
62         Test: fast/css/outline-negative.html
63
64         * rendering/RenderInline.cpp:
65         (WebCore::RenderInline::paintOutlineForLine):
66
67 2013-08-13  Chris Fleizach  <cfleizach@apple.com>
68
69         AX: Headings not longer have an AXTitle if they have a link as the only child
70         https://bugs.webkit.org/show_bug.cgi?id=119699
71
72         Reviewed by Anders Carlsson.
73
74         Normally, focusable content is not incuded when looking at the visible text of an element.
75         One case where we need an exception is with headings, where there is usually link content inside the heading
76         that we want to be used as the visible text.
77
78         Test: accessibility/heading-title-includes-links.html
79
80         * accessibility/AccessibilityNodeObject.cpp:
81         (WebCore::AccessibilityNodeObject::visibleText):
82         (WebCore::shouldUseAccessiblityObjectInnerText):
83         (WebCore::AccessibilityNodeObject::title):
84         * accessibility/AccessibilityNodeObject.h:
85         * accessibility/AccessibilityObject.h:
86         (WebCore::AccessibilityTextUnderElementMode::AccessibilityTextUnderElementMode):
87         (WebCore::AccessibilityObject::textUnderElement):
88         * accessibility/AccessibilityRenderObject.cpp:
89         (WebCore::AccessibilityRenderObject::textUnderElement):
90         * accessibility/AccessibilityRenderObject.h:
91
92 2013-08-14  Christophe Dumez  <ch.dumez@sisa.samsung.com>
93
94         Move id attribute to parent Element interface
95         https://bugs.webkit.org/show_bug.cgi?id=119706
96
97         Reviewed by Ryosuke Niwa.
98
99         Move id attribute from SVGElement / HTMLElement to their Element parent
100         interface to match the latest DOM specification and avoid duplication:
101         http://dom.spec.whatwg.org/#dom-element-id
102
103         There is no web-exposed behavior change because we haven't moved
104         properties from instances to their prototype, as per the Web IDL
105         specification (http://dev.w3.org/2006/webapi/WebIDL/#es-attributes).
106
107         Firefox already exposes the id property of Element's prototype.
108
109         This patch also drops the comment about returning the empty string when
110         no id is present (introduced in http://trac.webkit.org/changeset/4417).
111         This comment is redundant since the id property is already marked to
112         "reflect" the id attribute. Returning the empty string when the
113         attribute is not present is the normal behavior when reflecting:
114         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#reflect
115
116         No new test, no web-exposed behavior change.
117
118         * dom/Element.idl:
119         * html/HTMLElement.idl:
120         * svg/SVGElement.idl:
121
122 2013-08-14  Arpita Bahuguna  <a.bah@samsung.com>
123
124         createAttribute/setAttributeNode does not properly normalize case
125         https://bugs.webkit.org/show_bug.cgi?id=90341
126
127         Reviewed by Darin Adler.
128
129         setAttributeNode() verifies for existing attributes in a case sensitive
130         manner. Thus, it would add another attribute if specified in a case
131         different from the existing one. Instead, like setAttribute(), it too
132         should modify the existing attribute's value.
133
134         Tests: fast/dom/Element/setAttributeNode-case-insensitivity-xhtml.xhtml
135                fast/dom/Element/setAttributeNode-case-insensitivity.html
136
137         * dom/Element.cpp:
138         (WebCore::Element::setAttributeNode):
139         Passing the second param (shouldIgnoreAttributeCase) to
140         findAttributeIndexByNameForAttributeNode() method. We are now letting
141         findAttributeIndexByNameForAttributeNode() handle the case-sensitive/insensitive
142         checking.
143
144         (WebCore::ElementData::findAttributeIndexByNameForAttributeNode):
145         * dom/Element.h:
146         Added shouldIgnoreAttributeCase boolean param to the method. It passes
147         this on to QualifiedName::matchesIgnoringCaseForLocalName() method.
148
149         * dom/QualifiedName.h:
150         (WebCore::QualifiedName::matchesIgnoringCaseForLocalName):
151         New method added for doing a case-insensitive comparison based on the
152         shouldIgnoreCase param passed to this method.
153
154 2013-08-14  Gabor Abraham  <abrhm@inf.u-szeged.hu>
155
156         [CMake] Fix building with bison-3.0.
157         https://bugs.webkit.org/show_bug.cgi?id=119788
158
159         Reviewed by Zoltan Herczeg.
160
161         No new tests, just build fix.
162
163         * CMakeLists.txt:
164
165 2013-08-14  Rob Buis  <rwlbuis@webkit.org>
166
167         ASSERTION FAILED: resultAnimationElement->m_animatedType in WebCore::SVGAnimateElement::calculateAnimatedValue
168         https://bugs.webkit.org/show_bug.cgi?id=119748
169
170         Reviewed by Dirk Schulze.
171
172         Avoid animation when attributeType="CSS" is used on an animateTransform.
173
174         Tests: svg/animations/animateTransform-translate-attributetype-auto.html
175                svg/animations/animateTransform-translate-invalid-attributetype.html
176
177         * svg/SVGAnimateTransformElement.cpp:
178         (WebCore::SVGAnimateTransformElement::hasValidAttributeType):
179
180 2013-08-14  Antti Koivisto  <antti@apple.com>
181
182         Try to fix Qt build.
183         
184         Not reviewed.
185
186         * xml/parser/XMLDocumentParserQt.cpp:
187         (WebCore::XMLDocumentParser::parseProcessingInstruction):
188         (WebCore::XMLDocumentParser::parseCdata):
189         (WebCore::XMLDocumentParser::parseComment):
190
191 2013-08-13  Antti Koivisto  <antti@apple.com>
192
193         Remove Node::attach() and ContainerNode::attach()
194         https://bugs.webkit.org/show_bug.cgi?id=119698
195
196         Reviewed by Andreas Kling.
197
198         Currently attach() is a virtual function on Node. However only Elements have style and so a corresponding 
199         independent render object. Attaching should be made Element level concept.
200         
201         This patch merges Node::attach() and ContainerNode::attach() to Element::attach(). Other related functions
202         (detach(), reattach(), etc) move similarly.
203         
204         Next step here is to make attach non-virtual in common case and move it out from the DOM tree.
205
206         * dom/ContainerNode.cpp:
207         (WebCore::attachChild):
208         (WebCore::detachChild):
209         
210             Temporary helpers. Further refactoring should get rid of these.
211
212         (WebCore::ContainerNode::takeAllChildrenFrom):
213         (WebCore::ContainerNode::removeBetween):
214         (WebCore::updateTreeAfterInsertion):
215         * dom/ContainerNode.h:
216         * dom/Document.cpp:
217         (WebCore::Document::attach):
218         (WebCore::Document::detach):
219         
220             Copy the relevant parts of the code from base class attach/detach here. It is not much.
221
222         * dom/Document.h:
223         * dom/Element.cpp:
224         (WebCore::Element::~Element):
225         
226             Node destructor no longer detaches.
227
228         (WebCore::Element::attachChildren):
229         (WebCore::Element::attach):
230         
231             Combine Node::attach(), ContainerNode::attach() and Element::attach().
232
233         (WebCore::Element::detachChildren):
234         (WebCore::Element::detach):
235         
236             Combine Node::detach(), ContainerNode::detach() and Element::detach().
237
238         (WebCore::Element::reattach):
239         (WebCore::Element::reattachIfAttached):
240         (WebCore::Element::lazyReattach):
241         (WebCore::Element::lazyAttach):
242         
243             This stuff moves from ContainerNode/Node.
244
245         * dom/Element.h:
246         (WebCore::Element::AttachContext::AttachContext):
247         * dom/ElementShadow.cpp:
248         (WebCore::ElementShadow::removeShadowRoot):
249         (WebCore::ElementShadow::attach):
250         (WebCore::ElementShadow::detach):
251         * dom/ElementShadow.h:
252         * dom/Node.cpp:
253         (WebCore::Node::~Node):
254         
255             Assert that we are not attached at this point.
256
257         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
258         * dom/Node.h:
259         (WebCore::Node::setAttached):
260         (WebCore::Node::setStyleChange):
261         
262             Make available.
263
264         * dom/NodeRenderingContext.cpp:
265         (WebCore::NodeRenderingContext::NodeRenderingContext):
266         * dom/NodeRenderingContext.h:
267         * dom/ShadowRoot.cpp:
268         (WebCore::ShadowRoot::attach):
269         (WebCore::ShadowRoot::detach):
270         * dom/ShadowRoot.h:
271         * dom/Text.cpp:
272         (WebCore::Text::~Text):
273         
274             Node destructor no longer detaches. Add destructor.
275
276         (WebCore::Text::createTextRenderersForSiblingsAfterAttachIfNeeded):
277         
278             Factor the code that updates sibling text renderers after attach into a function.
279
280         (WebCore::Text::attachText):
281         (WebCore::Text::detachText):
282         
283             Text::attachText/detachText replace virtual Node::attach/detach. They do the part of the work text nodes actually ended up doing.
284
285         (WebCore::Text::updateTextRenderer):
286         * dom/Text.h:
287         * html/HTMLViewSourceDocument.cpp:
288         (WebCore::HTMLViewSourceDocument::addText):
289         * html/PluginDocument.cpp:
290         (WebCore::PluginDocument::detach):
291         * html/PluginDocument.h:
292         * html/parser/HTMLConstructionSite.cpp:
293         (WebCore::executeTask):
294         * html/shadow/ContentDistributor.cpp:
295         (WebCore::ContentDistributor::invalidateDistribution):
296         * html/shadow/InsertionPoint.cpp:
297         (WebCore::InsertionPoint::attach):
298         (WebCore::InsertionPoint::detach):
299         * loader/PlaceholderDocument.cpp:
300         (WebCore::PlaceholderDocument::attach):
301         * loader/PlaceholderDocument.h:
302         * style/StyleResolveTree.cpp:
303         (WebCore::Style::resolveLocal):
304         (WebCore::Style::updateTextStyle):
305         * xml/parser/XMLDocumentParser.cpp:
306         (WebCore::XMLDocumentParser::exitText):
307         * xml/parser/XMLDocumentParserLibxml2.cpp:
308         (WebCore::XMLDocumentParser::processingInstruction):
309         (WebCore::XMLDocumentParser::cdataBlock):
310         (WebCore::XMLDocumentParser::comment):
311         
312             No need to attach non-rendered nodes.
313
314 2013-08-14  Allan Sandfeld Jensen  <allan.jensen@digia.com>
315
316         ASSERT(m_frame->view() == this) fails
317         https://bugs.webkit.org/show_bug.cgi?id=119015
318
319         Reviewed by Simon Fraser.
320
321         Introduced the method fixedLayoutSizeChanged and made it chack if the view
322         is attached to the frame before issuing contentsResized.
323
324         * page/FrameView.cpp:
325         (WebCore::FrameView::fixedLayoutSizeChanged):
326         * page/FrameView.h:
327         * platform/ScrollView.cpp:
328         (WebCore::ScrollView::setFixedLayoutSize):
329         (WebCore::ScrollView::setUseFixedLayout):
330         (WebCore::ScrollView::fixedLayoutSizeChanged):
331         * platform/ScrollView.h:
332
333 2013-08-13  Sergio Villar Senin  <svillar@igalia.com>
334
335         [CSS Grid Layout] Align our grid-line handling with the updated specification
336         https://bugs.webkit.org/show_bug.cgi?id=113546
337
338         Reviewed by Andreas Kling.
339
340         From Blink r148091 by <jchaffraix@chromium.org>
341
342         This change makes us match the updated specification by making
343         grid line numbers to always resolve against the
344         grid-{column|row}-start edge (the previous code would resolve
345         grid-{column|row}-end grid lines against the grid-{column|row}-end
346         edge).
347
348         To keep feature parity, negative numbers resolve against the
349         grid-{column|row}-end edge of the 'explicit grid'.
350
351         Test: fast/css-grid-layout/grid-item-negative-integer-explicit-grid-resolution.html
352
353         * rendering/RenderGrid.cpp:
354         (WebCore::estimatedGridSizeForPosition):
355         (WebCore::RenderGrid::explicitGridColumnCount): New utility function.
356         (WebCore::RenderGrid::explicitGridRowCount): Ditto.
357         (WebCore::RenderGrid::maximumIndexInDirection): Use explicitGridXXXCount().
358         (WebCore::RenderGrid::resolveGridPositionsFromStyle): Check that row-end > row-start.
359         (WebCore::RenderGrid::resolveGridPositionFromStyle): Clamp negative values to the first line.
360         * rendering/RenderGrid.h:
361         * rendering/style/GridPosition.h:
362
363 2013-08-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
364
365         Add toSVGTextPathElement(), and use it
366         https://bugs.webkit.org/show_bug.cgi?id=119783
367
368         Reviewed by Ryosuke Niwa.
369
370         As a step to clean-up static_cast<SVGXXX>, static_cast<SVGTextPathElement*> can
371         be changed with toSVGTextPathElement().
372
373         * rendering/svg/RenderSVGTextPath.cpp:
374         (WebCore::RenderSVGTextPath::layoutPath):
375         (WebCore::RenderSVGTextPath::startOffset):
376         (WebCore::RenderSVGTextPath::exactAlignment):
377         (WebCore::RenderSVGTextPath::stretchMethod):
378         * svg/SVGTextPathElement.h:
379         (WebCore::toSVGTextPathElement):
380
381 2013-08-14  Jinwoo Jeong  <jw00.jeong@samsung.com>
382
383         FEComponentTransfer could be faster.
384         https://bugs.webkit.org/show_bug.cgi?id=119671
385
386         Reviewed by Christophe Dumez.
387
388         Use direct writing to target data instead of calling Uint8ClampedArray::set() function.
389         This change reduces at least 80% time in the loop of that function.
390
391         The Uint8ClampedArray::set() function has index checking code, value checking code and value casting code.
392         But the index is managed by for loop condition, the value is generated by transferFunction.
393         And the value is already defined as unsigned char.
394         Thus all works in Uint8ClampedArray::set() function is redundant.
395         Removing the call to Uint8ClampedArray::set() function does not reduce stability but improves performance.
396
397         * platform/graphics/filters/FEComponentTransfer.cpp:
398         (WebCore::FEComponentTransfer::platformApplySoftware):
399
400 2013-08-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
401
402         The length of scheme is at least five characters even when the scheme has 'web+' prefix
403         https://bugs.webkit.org/show_bug.cgi?id=119779
404
405         Reviewed by Ryosuke Niwa.
406
407         The content-scheme handler specification requires that it is SecurityError if the length of
408         scheme isn't five characters at least, including 'web+' prefix. Thus, we need to check the length
409         of scheme on the 'web+' scheme.
410
411         Spec: http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers
412
413         No new tests, just modify existing tests.
414
415         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
416         (WebCore::verifyProtocolHandlerScheme):
417
418 2013-08-13  Filip Pizlo  <fpizlo@apple.com>
419
420         Foo::s_info should be Foo::info(), so that you can change how the s_info is actually linked
421         https://bugs.webkit.org/show_bug.cgi?id=119770
422
423         Reviewed by Mark Hahnenberg.
424
425         No new tests because no new behavior.
426
427         * bindings/js/IDBBindingUtilities.cpp:
428         (WebCore::createIDBKeyFromValue):
429         * bindings/js/JSAttrCustom.cpp:
430         (WebCore::JSAttr::visitChildren):
431         * bindings/js/JSAudioTrackCustom.cpp:
432         (WebCore::JSAudioTrack::visitChildren):
433         * bindings/js/JSAudioTrackListCustom.cpp:
434         (WebCore::JSAudioTrackList::visitChildren):
435         * bindings/js/JSBlobCustom.cpp:
436         (WebCore::JSBlobConstructor::constructJSBlob):
437         * bindings/js/JSCSSRuleCustom.cpp:
438         (WebCore::JSCSSRule::visitChildren):
439         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
440         (WebCore::JSCSSStyleDeclaration::visitChildren):
441         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
442         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
443         (WebCore::toHTMLCanvasStyle):
444         * bindings/js/JSCanvasRenderingContextCustom.cpp:
445         (WebCore::JSCanvasRenderingContext::visitChildren):
446         * bindings/js/JSDOMBinding.cpp:
447         (WebCore::valueToDate):
448         * bindings/js/JSDOMBinding.h:
449         (WebCore::DOMConstructorObject::createStructure):
450         (WebCore::getDOMStructure):
451         (WebCore::toRefPtrNativeArray):
452         (WebCore::getStaticValueSlotEntryWithoutCaching):
453         * bindings/js/JSDOMFormDataCustom.cpp:
454         (WebCore::toHTMLFormElement):
455         (WebCore::JSDOMFormData::append):
456         * bindings/js/JSDOMGlobalObject.cpp:
457         (WebCore::JSDOMGlobalObject::finishCreation):
458         (WebCore::JSDOMGlobalObject::scriptExecutionContext):
459         (WebCore::JSDOMGlobalObject::visitChildren):
460         * bindings/js/JSDOMGlobalObject.h:
461         (WebCore::JSDOMGlobalObject::info):
462         (WebCore::JSDOMGlobalObject::createStructure):
463         (WebCore::getDOMConstructor):
464         * bindings/js/JSDOMStringListCustom.cpp:
465         (WebCore::toDOMStringList):
466         * bindings/js/JSDOMWindowBase.cpp:
467         (WebCore::JSDOMWindowBase::finishCreation):
468         (WebCore::toJSDOMWindow):
469         * bindings/js/JSDOMWindowBase.h:
470         (WebCore::JSDOMWindowBase::createStructure):
471         * bindings/js/JSDOMWindowCustom.cpp:
472         (WebCore::JSDOMWindow::visitChildren):
473         (WebCore::JSDOMWindow::getOwnPropertySlot):
474         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
475         (WebCore::toDOMWindow):
476         * bindings/js/JSDOMWindowShell.cpp:
477         (WebCore::JSDOMWindowShell::finishCreation):
478         * bindings/js/JSDOMWindowShell.h:
479         (WebCore::JSDOMWindowShell::createStructure):
480         * bindings/js/JSEventTargetCustom.cpp:
481         (WebCore::toEventTarget):
482         * bindings/js/JSHistoryCustom.cpp:
483         (WebCore::JSHistory::getOwnPropertySlotDelegate):
484         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
485         * bindings/js/JSImageConstructor.cpp:
486         (WebCore::JSImageConstructor::finishCreation):
487         * bindings/js/JSImageConstructor.h:
488         (WebCore::JSImageConstructor::createStructure):
489         * bindings/js/JSInjectedScriptHostCustom.cpp:
490         (WebCore::JSInjectedScriptHost::isHTMLAllCollection):
491         (WebCore::JSInjectedScriptHost::type):
492         (WebCore::JSInjectedScriptHost::functionDetails):
493         * bindings/js/JSInspectorFrontendHostCustom.cpp:
494         (WebCore::populateContextMenuItems):
495         * bindings/js/JSLocationCustom.cpp:
496         (WebCore::JSLocation::getOwnPropertySlotDelegate):
497         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
498         (WebCore::JSLocation::putDelegate):
499         * bindings/js/JSMessageChannelCustom.cpp:
500         (WebCore::JSMessageChannel::visitChildren):
501         * bindings/js/JSMessagePortCustom.cpp:
502         (WebCore::JSMessagePort::visitChildren):
503         * bindings/js/JSNodeCustom.cpp:
504         (WebCore::JSNode::pushEventHandlerScope):
505         (WebCore::JSNode::visitChildren):
506         * bindings/js/JSNodeFilterCustom.cpp:
507         (WebCore::JSNodeFilter::visitChildren):
508         (WebCore::toNodeFilter):
509         * bindings/js/JSNodeIteratorCustom.cpp:
510         (WebCore::JSNodeIterator::visitChildren):
511         * bindings/js/JSPluginElementFunctions.h:
512         (WebCore::pluginElementCustomGetOwnPropertySlot):
513         (WebCore::pluginElementCustomGetOwnPropertyDescriptor):
514         * bindings/js/JSSVGElementInstanceCustom.cpp:
515         (WebCore::JSSVGElementInstance::visitChildren):
516         * bindings/js/JSSharedWorkerCustom.cpp:
517         (WebCore::JSSharedWorker::visitChildren):
518         * bindings/js/JSStyleSheetCustom.cpp:
519         (WebCore::JSStyleSheet::visitChildren):
520         * bindings/js/JSTextTrackCueCustom.cpp:
521         (WebCore::JSTextTrackCue::visitChildren):
522         * bindings/js/JSTextTrackCustom.cpp:
523         (WebCore::JSTextTrack::visitChildren):
524         * bindings/js/JSTextTrackListCustom.cpp:
525         (WebCore::JSTextTrackList::visitChildren):
526         * bindings/js/JSTrackCustom.cpp:
527         (WebCore::toTrack):
528         * bindings/js/JSTreeWalkerCustom.cpp:
529         (WebCore::JSTreeWalker::visitChildren):
530         * bindings/js/JSVideoTrackCustom.cpp:
531         (WebCore::JSVideoTrack::visitChildren):
532         * bindings/js/JSVideoTrackListCustom.cpp:
533         (WebCore::JSVideoTrackList::visitChildren):
534         * bindings/js/JSWebGLRenderingContextCustom.cpp:
535         (WebCore::JSWebGLRenderingContext::visitChildren):
536         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
537         (WebCore::JSWebGLRenderingContext::getProgramParameter):
538         (WebCore::JSWebGLRenderingContext::getShaderParameter):
539         (WebCore::JSWebGLRenderingContext::getUniform):
540         (WebCore::dataFunctionf):
541         (WebCore::dataFunctioni):
542         (WebCore::dataFunctionMatrix):
543         * bindings/js/JSWorkerGlobalScopeBase.cpp:
544         (WebCore::JSWorkerGlobalScopeBase::finishCreation):
545         (WebCore::toJSDedicatedWorkerGlobalScope):
546         (WebCore::toJSSharedWorkerGlobalScope):
547         * bindings/js/JSWorkerGlobalScopeBase.h:
548         (WebCore::JSWorkerGlobalScopeBase::createStructure):
549         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
550         (WebCore::JSWorkerGlobalScope::visitChildren):
551         * bindings/js/JSXMLHttpRequestCustom.cpp:
552         (WebCore::JSXMLHttpRequest::visitChildren):
553         (WebCore::JSXMLHttpRequest::send):
554         * bindings/js/JSXPathResultCustom.cpp:
555         (WebCore::JSXPathResult::visitChildren):
556         * bindings/js/ScriptDebugServer.cpp:
557         (WebCore::ScriptDebugServer::dispatchDidPause):
558         * bindings/js/ScriptState.cpp:
559         (WebCore::domWindowFromScriptState):
560         (WebCore::scriptExecutionContextFromScriptState):
561         * bindings/js/SerializedScriptValue.cpp:
562         (WebCore::CloneSerializer::isArray):
563         (WebCore::CloneSerializer::dumpArrayBufferView):
564         (WebCore::CloneSerializer::dumpIfTerminal):
565         (WebCore::CloneSerializer::serialize):
566         (WebCore::CloneDeserializer::CloneDeserializer):
567         (WebCore::CloneDeserializer::readArrayBufferView):
568         * bindings/objc/DOM.mm:
569         (+[DOMNode _nodeFromJSWrapper:]):
570         * bindings/objc/DOMUtility.mm:
571         (JSC::createDOMWrapper):
572         * bindings/objc/WebScriptObject.mm:
573         (+[WebScriptObject _convertValueToObjcValue:JSC::originRootObject:rootObject:]):
574         * bindings/scripts/CodeGeneratorJS.pm:
575         (GenerateGetOwnPropertySlotBody):
576         (GenerateGetOwnPropertyDescriptorBody):
577         (GenerateHeader):
578         (GenerateParametersCheckExpression):
579         (GenerateImplementation):
580         (GenerateParametersCheck):
581         (GenerateConstructorDeclaration):
582         (GenerateConstructorHelperMethods):
583         * bindings/scripts/test/JS/JSFloat64Array.cpp:
584         (WebCore::JSFloat64ArrayConstructor::finishCreation):
585         (WebCore::JSFloat64Array::finishCreation):
586         (WebCore::JSFloat64Array::getOwnPropertySlot):
587         (WebCore::JSFloat64Array::getOwnPropertyDescriptor):
588         (WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
589         (WebCore::JSFloat64Array::put):
590         (WebCore::JSFloat64Array::putByIndex):
591         (WebCore::JSFloat64Array::getOwnPropertyNames):
592         (WebCore::jsFloat64ArrayPrototypeFunctionFoo):
593         (WebCore::jsFloat64ArrayPrototypeFunctionSet):
594         (WebCore::JSFloat64Array::getByIndex):
595         (WebCore::toFloat64Array):
596         * bindings/scripts/test/JS/JSFloat64Array.h:
597         (WebCore::JSFloat64Array::createStructure):
598         (WebCore::JSFloat64ArrayPrototype::createStructure):
599         (WebCore::JSFloat64ArrayConstructor::createStructure):
600         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
601         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
602         (WebCore::JSTestActiveDOMObject::finishCreation):
603         (WebCore::JSTestActiveDOMObject::getOwnPropertySlot):
604         (WebCore::JSTestActiveDOMObject::getOwnPropertyDescriptor):
605         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
606         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
607         (WebCore::toTestActiveDOMObject):
608         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
609         (WebCore::JSTestActiveDOMObject::createStructure):
610         (WebCore::JSTestActiveDOMObjectPrototype::createStructure):
611         (WebCore::JSTestActiveDOMObjectConstructor::createStructure):
612         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
613         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
614         (WebCore::JSTestCustomNamedGetter::finishCreation):
615         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
616         (WebCore::JSTestCustomNamedGetter::getOwnPropertyDescriptor):
617         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
618         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
619         (WebCore::toTestCustomNamedGetter):
620         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
621         (WebCore::JSTestCustomNamedGetter::createStructure):
622         (WebCore::JSTestCustomNamedGetterPrototype::createStructure):
623         (WebCore::JSTestCustomNamedGetterConstructor::createStructure):
624         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
625         (WebCore::JSTestEventConstructorConstructor::finishCreation):
626         (WebCore::JSTestEventConstructor::finishCreation):
627         (WebCore::JSTestEventConstructor::getOwnPropertySlot):
628         (WebCore::JSTestEventConstructor::getOwnPropertyDescriptor):
629         (WebCore::toTestEventConstructor):
630         * bindings/scripts/test/JS/JSTestEventConstructor.h:
631         (WebCore::JSTestEventConstructor::createStructure):
632         (WebCore::JSTestEventConstructorPrototype::createStructure):
633         (WebCore::JSTestEventConstructorConstructor::createStructure):
634         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
635         (WebCore::JSTestEventTargetConstructor::finishCreation):
636         (WebCore::JSTestEventTarget::finishCreation):
637         (WebCore::JSTestEventTarget::getOwnPropertySlot):
638         (WebCore::JSTestEventTarget::getOwnPropertyDescriptor):
639         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
640         (WebCore::JSTestEventTarget::getOwnPropertyNames):
641         (WebCore::jsTestEventTargetPrototypeFunctionItem):
642         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
643         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
644         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
645         (WebCore::JSTestEventTarget::visitChildren):
646         (WebCore::JSTestEventTarget::indexGetter):
647         (WebCore::toTestEventTarget):
648         * bindings/scripts/test/JS/JSTestEventTarget.h:
649         (WebCore::JSTestEventTarget::createStructure):
650         (WebCore::JSTestEventTargetPrototype::createStructure):
651         (WebCore::JSTestEventTargetConstructor::createStructure):
652         * bindings/scripts/test/JS/JSTestException.cpp:
653         (WebCore::JSTestExceptionConstructor::finishCreation):
654         (WebCore::JSTestException::finishCreation):
655         (WebCore::JSTestException::getOwnPropertySlot):
656         (WebCore::JSTestException::getOwnPropertyDescriptor):
657         (WebCore::toTestException):
658         * bindings/scripts/test/JS/JSTestException.h:
659         (WebCore::JSTestException::createStructure):
660         (WebCore::JSTestExceptionPrototype::createStructure):
661         (WebCore::JSTestExceptionConstructor::createStructure):
662         * bindings/scripts/test/JS/JSTestInterface.cpp:
663         (WebCore::JSTestInterfaceConstructor::finishCreation):
664         (WebCore::JSTestInterface::finishCreation):
665         (WebCore::JSTestInterface::getOwnPropertySlot):
666         (WebCore::JSTestInterface::getOwnPropertyDescriptor):
667         (WebCore::JSTestInterface::put):
668         (WebCore::JSTestInterface::putByIndex):
669         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
670         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
671         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3):
672         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
673         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
674         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod3):
675         (WebCore::toTestInterface):
676         * bindings/scripts/test/JS/JSTestInterface.h:
677         (WebCore::JSTestInterface::createStructure):
678         (WebCore::JSTestInterfacePrototype::createStructure):
679         (WebCore::JSTestInterfaceConstructor::createStructure):
680         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
681         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
682         (WebCore::JSTestMediaQueryListListener::finishCreation):
683         (WebCore::JSTestMediaQueryListListener::getOwnPropertySlot):
684         (WebCore::JSTestMediaQueryListListener::getOwnPropertyDescriptor):
685         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
686         (WebCore::toTestMediaQueryListListener):
687         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
688         (WebCore::JSTestMediaQueryListListener::createStructure):
689         (WebCore::JSTestMediaQueryListListenerPrototype::createStructure):
690         (WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
691         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
692         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
693         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
694         (WebCore::JSTestNamedConstructor::finishCreation):
695         (WebCore::JSTestNamedConstructor::getOwnPropertySlot):
696         (WebCore::JSTestNamedConstructor::getOwnPropertyDescriptor):
697         (WebCore::toTestNamedConstructor):
698         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
699         (WebCore::JSTestNamedConstructor::createStructure):
700         (WebCore::JSTestNamedConstructorPrototype::createStructure):
701         (WebCore::JSTestNamedConstructorConstructor::createStructure):
702         (WebCore::JSTestNamedConstructorNamedConstructor::createStructure):
703         * bindings/scripts/test/JS/JSTestNode.cpp:
704         (WebCore::JSTestNodeConstructor::finishCreation):
705         (WebCore::JSTestNode::finishCreation):
706         (WebCore::JSTestNode::getOwnPropertySlot):
707         (WebCore::JSTestNode::getOwnPropertyDescriptor):
708         (WebCore::JSTestNode::visitChildren):
709         * bindings/scripts/test/JS/JSTestNode.h:
710         (WebCore::JSTestNode::createStructure):
711         (WebCore::JSTestNodePrototype::createStructure):
712         (WebCore::JSTestNodeConstructor::createStructure):
713         * bindings/scripts/test/JS/JSTestObj.cpp:
714         (WebCore::JSTestObjConstructor::finishCreation):
715         (WebCore::JSTestObj::finishCreation):
716         (WebCore::JSTestObj::getOwnPropertySlot):
717         (WebCore::JSTestObj::getOwnPropertyDescriptor):
718         (WebCore::JSTestObj::put):
719         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
720         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
721         (WebCore::jsTestObjPrototypeFunctionByteMethod):
722         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
723         (WebCore::jsTestObjPrototypeFunctionOctetMethod):
724         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
725         (WebCore::jsTestObjPrototypeFunctionLongMethod):
726         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
727         (WebCore::jsTestObjPrototypeFunctionObjMethod):
728         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
729         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
730         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
731         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
732         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
733         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
734         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
735         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
736         (WebCore::jsTestObjPrototypeFunctionCustomMethod):
737         (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
738         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
739         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
740         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
741         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
742         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
743         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
744         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
745         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
746         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
747         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
748         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
749         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
750         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
751         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
752         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
753         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
754         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
755         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
756         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
757         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
758         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
759         (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
760         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
761         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
762         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
763         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
764         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
765         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
766         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
767         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
768         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
769         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
770         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
771         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
772         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
773         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
774         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
775         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
776         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
777         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
778         (WebCore::jsTestObjPrototypeFunctionConvert1):
779         (WebCore::jsTestObjPrototypeFunctionConvert2):
780         (WebCore::jsTestObjPrototypeFunctionConvert4):
781         (WebCore::jsTestObjPrototypeFunctionConvert5):
782         (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
783         (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
784         (WebCore::jsTestObjPrototypeFunctionOrange):
785         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
786         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
787         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
788         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
789         (WebCore::JSTestObj::visitChildren):
790         (WebCore::toTestObj):
791         * bindings/scripts/test/JS/JSTestObj.h:
792         (WebCore::JSTestObj::createStructure):
793         (WebCore::JSTestObjPrototype::createStructure):
794         (WebCore::JSTestObjConstructor::createStructure):
795         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
796         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors):
797         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
798         (WebCore::JSTestOverloadedConstructors::finishCreation):
799         (WebCore::JSTestOverloadedConstructors::getOwnPropertySlot):
800         (WebCore::JSTestOverloadedConstructors::getOwnPropertyDescriptor):
801         (WebCore::toTestOverloadedConstructors):
802         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
803         (WebCore::JSTestOverloadedConstructors::createStructure):
804         (WebCore::JSTestOverloadedConstructorsPrototype::createStructure):
805         (WebCore::JSTestOverloadedConstructorsConstructor::createStructure):
806         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
807         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
808         (WebCore::JSTestSerializedScriptValueInterface::finishCreation):
809         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot):
810         (WebCore::JSTestSerializedScriptValueInterface::getOwnPropertyDescriptor):
811         (WebCore::JSTestSerializedScriptValueInterface::put):
812         (WebCore::JSTestSerializedScriptValueInterface::visitChildren):
813         (WebCore::toTestSerializedScriptValueInterface):
814         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
815         (WebCore::JSTestSerializedScriptValueInterface::createStructure):
816         (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure):
817         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
818         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
819         (WebCore::JSTestTypedefsConstructor::finishCreation):
820         (WebCore::JSTestTypedefs::finishCreation):
821         (WebCore::JSTestTypedefs::getOwnPropertySlot):
822         (WebCore::JSTestTypedefs::getOwnPropertyDescriptor):
823         (WebCore::JSTestTypedefs::put):
824         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
825         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
826         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
827         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
828         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
829         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
830         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
831         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
832         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
833         (WebCore::toTestTypedefs):
834         * bindings/scripts/test/JS/JSTestTypedefs.h:
835         (WebCore::JSTestTypedefs::createStructure):
836         (WebCore::JSTestTypedefsPrototype::createStructure):
837         (WebCore::JSTestTypedefsConstructor::createStructure):
838         * bridge/c/CRuntimeObject.cpp:
839         (JSC::Bindings::CRuntimeObject::finishCreation):
840         * bridge/c/CRuntimeObject.h:
841         (JSC::Bindings::CRuntimeObject::createStructure):
842         * bridge/c/c_instance.cpp:
843         (JSC::Bindings::CRuntimeMethod::createStructure):
844         (JSC::Bindings::CRuntimeMethod::finishCreation):
845         (JSC::Bindings::CInstance::invokeMethod):
846         * bridge/c/c_utility.cpp:
847         (JSC::Bindings::convertValueToNPVariant):
848         * bridge/objc/ObjCRuntimeObject.h:
849         (JSC::Bindings::ObjCRuntimeObject::createStructure):
850         * bridge/objc/objc_instance.mm:
851         (ObjCRuntimeMethod::finishCreation):
852         (ObjcInstance::invokeMethod):
853         * bridge/objc/objc_runtime.h:
854         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
855         * bridge/objc/objc_runtime.mm:
856         (JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
857         (JSC::Bindings::callObjCFallbackObject):
858         * bridge/qt/qt_instance.cpp:
859         (JSC::Bindings::QtRuntimeObject::createStructure):
860         (JSC::Bindings::QtInstance::getInstance):
861         * bridge/qt/qt_pixmapruntime.cpp:
862         (JSC::Bindings::assignToHTMLImageElement):
863         (JSC::Bindings::QtPixmapRuntime::toQt):
864         * bridge/qt/qt_runtime.cpp:
865         (JSC::Bindings::isJSUint8Array):
866         (JSC::Bindings::isJSArray):
867         (JSC::Bindings::isJSDate):
868         (JSC::Bindings::isQtObject):
869         (JSC::Bindings::unwrapBoxedPrimitive):
870         (JSC::Bindings::convertQVariantToValue):
871         * bridge/runtime_array.cpp:
872         (JSC::RuntimeArray::finishCreation):
873         * bridge/runtime_array.h:
874         (JSC::RuntimeArray::createStructure):
875         * bridge/runtime_method.cpp:
876         (JSC::RuntimeMethod::finishCreation):
877         (JSC::callRuntimeMethod):
878         * bridge/runtime_method.h:
879         (JSC::RuntimeMethod::createStructure):
880         * bridge/runtime_object.cpp:
881         (JSC::Bindings::RuntimeObject::finishCreation):
882         (JSC::Bindings::callRuntimeObject):
883         (JSC::Bindings::callRuntimeConstructor):
884         * bridge/runtime_object.h:
885         (JSC::Bindings::RuntimeObject::createStructure):
886
887 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
888
889         REGRESSION(r150187): Safari fails to render allrecipe.com comment popups
890         https://bugs.webkit.org/show_bug.cgi?id=119780
891
892         Reviewed by Benjamin Poulain.
893
894         The bug was caused by SelectorDataList::executeFastPathForIdSelector not verifying that
895         elements found by getAllElementsById are descendents of rootNode when there are multiple
896         elements of the same id. This resulted in querySelector and querySelectorAll of an element
897         returning nodes outside of the element.
898
899         Fixed the bug by checking this condition when we have multiple elements of the same id.
900
901         Test: fast/selectors/querySelector-id-with-multiple-elements-with-same-id.html
902
903         * dom/SelectorQuery.cpp:
904         (WebCore::SelectorDataList::executeFastPathForIdSelector):
905
906 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
907
908         Fix orphan needsLayout state in RenderTextControlSingleLine
909         https://bugs.webkit.org/show_bug.cgi?id=119726
910
911         Reviewed by Kent Tamura.
912
913         Merge https://chromium.googlesource.com/chromium/blink/+/c0aec52ef348b2be0c882f8646fe3cf537831f59
914
915         We should mark the renderer for containerElement, which wraps innerTextElement and innerBlockElement
916         in cases of input[type=search] and input[type=number], dirty.
917
918         * rendering/RenderTextControlSingleLine.cpp:
919         (WebCore::setNeedsLayoutOnAncestors):
920         (WebCore::RenderTextControlSingleLine::layout):
921
922 2013-08-13  Sam Weinig  <sam@webkit.org>
923
924         [Re-land] Cleanup MediaQueryListListener
925         https://bugs.webkit.org/show_bug.cgi?id=119664
926
927         Reviewed by Andreas Kling.
928
929         Make MediaQueryListListener a proper WebIDL callback.
930
931         * CMakeLists.txt:
932         * DerivedSources.cpp:
933         * DerivedSources.make:
934         * DerivedSources.pri:
935         * GNUmakefile.list.am:
936         * Target.pri:
937         * WebCore.vcxproj/WebCore.vcxproj:
938         * WebCore.vcxproj/WebCore.vcxproj.filters:
939         * WebCore.xcodeproj/project.pbxproj:
940         Update project files.
941
942         * bindings/scripts/CodeGeneratorJS.pm:
943         (GenerateCallbackHeader):
944         (GenerateCallbackImplementation):
945         (JSValueToNative):
946         * bindings/scripts/IDLAttributes.txt:
947         Add support for CallbackNeedsOperatorEqual, which adds an operator==.
948
949         * css/MediaAllInOne.cpp:
950         Remove MediaQueryListListener.cpp.
951
952         * css/MediaQueryListListener.cpp:
953         Removed.
954
955         * css/MediaQueryListListener.h:
956         (WebCore::MediaQueryListListener::~MediaQueryListListener):
957         (WebCore::MediaQueryListListener::MediaQueryListListener):
958         * css/MediaQueryListListener.idl:
959         Convert to a proper WebIDL callback.
960
961         * css/MediaQueryMatcher.cpp:
962         (WebCore::MediaQueryMatcher::Listener::evaluate):
963         (WebCore::MediaQueryMatcher::styleResolverChanged):
964         * css/MediaQueryMatcher.h:
965         Remove all traces of the ScriptState.
966
967 2013-08-13  Dean Jackson  <dino@apple.com>
968
969         <https://webkit.org/b/119776> Don't use ScriptProfiler to find canvases for instrumentation
970
971         Reviewed by Joseph Pecoraro.
972
973         InspectorCanvasAgent::findFramesWithUninstrumentedCanvases uses a ScriptProfiler to walk the tree
974         looking for canvas elements. This is currently not implemented in JSC, but we can do this directly
975         with DOM methods. We're only looking for Canvas elements that have a context, so there isn't a need
976         for this abstract walking object.
977
978         * html/HTMLCanvasElement.h: Add new helpers to cast to <canvas>.
979         (WebCore::isHTMLCanvasElement):
980         (WebCore::toHTMLCanvasElement):
981         * inspector/InspectorCanvasAgent.cpp:
982         (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases): Simply walk
983         the frame tree and use getElementsByTagName to find canvas elements.
984         * bindings/js/bindings/js/ScriptProfiler.h: Removed unused method.
985
986 2013-08-13  Brent Fulgham  <bfulgham@apple.com>
987
988         [Windows] Windows is incorrectly using a LayerTypeTiledBackingLayer
989         https://bugs.webkit.org/show_bug.cgi?id=119772
990
991         Reviewed by Simon Fraser.
992
993         * platform/graphics/ca/GraphicsLayerCA.cpp:
994         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Ensure that we use
995         the correct (supported) tiled layer type for Windows.
996         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
997         (PlatformCALayer::PlatformCALayer): Add an assertion to notify us if
998         we introduce this mistake again in the future.
999
1000 2013-08-13  Anders Carlsson  <andersca@apple.com>
1001
1002         <https://webkit.org/b/119771> Use NeverDestroyed for smart pointer slot static locals
1003
1004         Reviewed by Andreas Kling.
1005
1006         This is preparation for making it a hard error to use DEFINE_STATIC_LOCAL with smart pointer types.
1007
1008         * dom/UserTypingGestureIndicator.cpp:
1009         (WebCore::focusedNode):
1010         * page/mac/EventHandlerMac.mm:
1011         (WebCore::currentNSEventSlot):
1012         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
1013         (WebCore::defaultNetworkStorageSession):
1014         (WebCore::cookieStorageOverride):
1015
1016 2013-08-13  Anders Carlsson  <andersca@apple.com>
1017
1018         Stop using DEFINE_STATIC_LOCAL with RefPtr
1019         https://bugs.webkit.org/show_bug.cgi?id=119769
1020
1021         Reviewed by Andreas Kling.
1022
1023         No need to waste heap memory allocating RefPtr, just store the raw pointers directly.
1024
1025         * dom/ContextFeatures.cpp:
1026         (WebCore::ContextFeatures::defaultSwitch):
1027         * dom/DocumentMarker.cpp:
1028         (WebCore::DocumentMarkerTextMatch::instanceFor):
1029         * editing/EditingStyle.cpp:
1030         (WebCore::StyleChange::extractTextStyles):
1031         * html/FTPDirectoryDocument.cpp:
1032         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
1033         * html/HTMLPlugInImageElement.cpp:
1034         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
1035         * html/track/TextTrack.cpp:
1036         (WebCore::TextTrack::captionMenuOffItem):
1037         (WebCore::TextTrack::captionMenuAutomaticItem):
1038         * loader/icon/IconDatabase.cpp:
1039         (WebCore::loadDefaultIconRecord):
1040         * platform/graphics/Image.cpp:
1041         (WebCore::Image::nullImage):
1042         * platform/graphics/PlatformTextTrack.h:
1043         (WebCore::PlatformTextTrack::captionMenuOffItem):
1044         (WebCore::PlatformTextTrack::captionMenuAutomaticItem):
1045         * rendering/style/RenderStyle.cpp:
1046         (WebCore::RenderStyle::initialShapeInside):
1047         * testing/MockCDM.cpp:
1048         (WebCore::initDataPrefix):
1049         (WebCore::keyPrefix):
1050         (WebCore::keyRequest):
1051
1052 2013-08-13  Anders Carlsson  <andersca@apple.com>
1053
1054         Stop using DEFINE_STATIC_LOCAL with RetainPtr
1055         https://bugs.webkit.org/show_bug.cgi?id=119765
1056
1057         Reviewed by Jessie Berlin.
1058
1059         No need to waste heap memory allocating RetainPtrs, just store the raw pointers directly.
1060
1061         * platform/graphics/mac/ColorMac.mm:
1062         (WebCore::nsColor):
1063         * platform/graphics/mac/GraphicsContextMac.mm:
1064         (WebCore::makePatternColor):
1065         (WebCore::GraphicsContext::drawLineForDocumentMarker):
1066         * platform/graphics/mac/SimpleFontDataMac.mm:
1067         (WebCore::webFallbackFontFamily):
1068
1069 2013-08-13  Commit Queue  <commit-queue@webkit.org>
1070
1071         Unreviewed, rolling out r153925.
1072         http://trac.webkit.org/changeset/153925
1073         https://bugs.webkit.org/show_bug.cgi?id=119768
1074
1075         broke fast/media/media-query-list-07.html (Requested by kling
1076         on #webkit).
1077
1078         * CMakeLists.txt:
1079         * DerivedSources.cpp:
1080         * DerivedSources.make:
1081         * DerivedSources.pri:
1082         * GNUmakefile.list.am:
1083         * Target.pri:
1084         * WebCore.vcxproj/WebCore.vcxproj:
1085         * WebCore.vcxproj/WebCore.vcxproj.filters:
1086         * WebCore.xcodeproj/project.pbxproj:
1087         * bindings/scripts/CodeGeneratorJS.pm:
1088         (GenerateCallbackHeader):
1089         (GenerateCallbackImplementation):
1090         (JSValueToNative):
1091         * bindings/scripts/IDLAttributes.txt:
1092         * bindings/scripts/test/JS/JSTestCallback.cpp:
1093         (WebCore::JSTestCallback::JSTestCallback):
1094         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1095         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
1096         * css/MediaAllInOne.cpp:
1097         * css/MediaQueryListListener.cpp: Copied from Source/WebCore/css/MediaQueryListListener.idl.
1098         (WebCore::MediaQueryListListener::queryChanged):
1099         * css/MediaQueryListListener.h:
1100         (WebCore::MediaQueryListListener::create):
1101         (WebCore::MediaQueryListListener::operator==):
1102         (WebCore::MediaQueryListListener::MediaQueryListListener):
1103         * css/MediaQueryListListener.idl:
1104         * css/MediaQueryMatcher.cpp:
1105         (WebCore::MediaQueryMatcher::Listener::evaluate):
1106         (WebCore::MediaQueryMatcher::styleResolverChanged):
1107         * css/MediaQueryMatcher.h:
1108
1109 2013-08-13  Simon Fraser  <simon.fraser@apple.com>
1110
1111         Every scroll causes additional layer tree work because of flatteningLayer->removeFromParent();
1112         https://bugs.webkit.org/show_bug.cgi?id=119551
1113
1114         Reviewed by Dean Jackson.
1115
1116         Only re-parent the flattening layer if we had to update our
1117         layer configuration (reparenting is necessary then to get
1118         the correct sibling ordering), or if it was parented in some
1119         other layer.
1120         
1121         This avoid unnecessary flushing of state to CA.
1122
1123         * rendering/RenderLayerBacking.cpp:
1124         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1125
1126 2013-08-13  Robert Hogan  <robert@webkit.org>
1127
1128         Section's collapsed borders painted in wrong place in rtl tables
1129         https://bugs.webkit.org/show_bug.cgi?id=119691
1130
1131         Reviewed by Darin Adler.
1132
1133         Table row-groups can be RTL too, so look to the section rather than the
1134         table when deciding the direction of a row. The section will inherit the
1135         table's direction if it doesn't override it.
1136
1137         Test: fast/table/paint-collapsed-borders-rtl-section.html
1138
1139         * rendering/RenderTableCell.cpp:
1140         (WebCore::RenderTableCell::hasStartBorderAdjoiningTable):
1141         (WebCore::RenderTableCell::hasEndBorderAdjoiningTable):
1142
1143 2013-08-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1144
1145         NodeList.item() does not behave according to specification
1146         https://bugs.webkit.org/show_bug.cgi?id=119722
1147
1148         Reviewed by Darin Adler.
1149
1150         Make NodeList.item() indexed getter behave according to specification:
1151         http://dom.spec.whatwg.org/#nodelist
1152
1153         Namely, we no longer throw if the index is negative (meaning the
1154         [IsIndex] extended attribute is dropped) and the argument is now
1155         mandatory.
1156
1157         This behavior is consistent with both IE10 and Firefox and since
1158         recently Blink.
1159
1160         Test: fast/dom/nodelist-item-parameter.html
1161
1162         * dom/NodeList.idl:
1163
1164 2013-08-13  Anders Carlsson  <andersca@apple.com>
1165
1166         Fix build.
1167
1168         * WebCore.exp.in:
1169
1170 2013-08-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1171
1172         REGRESSION(SUBPIXEL_LAYOUT) Composited layers can cause one pixel shifts
1173         https://bugs.webkit.org/show_bug.cgi?id=115304
1174
1175         Reviewed by David Hyatt.
1176
1177         Accelerated layers can cause blocks at subpixel offsets to shift because
1178         accumulated subpixel offsets are lost between each layers.
1179
1180         To solve this layer bounds are now calculated in LayoutUnits, and their
1181         subpixel offset saved so it can be used to ensure correct pixel-snapping
1182         during painting.
1183
1184         Test: fast/sub-pixel/sub-pixel-composited-layers.html
1185
1186         * WebCore.exp.in:
1187         * inspector/InspectorLayerTreeAgent.cpp:
1188         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
1189         * platform/graphics/LayoutPoint.h:
1190         (WebCore::LayoutPoint::fraction):
1191         * rendering/RenderLayer.cpp:
1192         (WebCore::RenderLayer::setupClipPath):
1193         (WebCore::RenderLayer::setupFilters):
1194         (WebCore::RenderLayer::paintLayerContents):
1195         (WebCore::RenderLayer::calculateLayerBounds):
1196         * rendering/RenderLayer.h:
1197         * rendering/RenderLayerBacking.cpp:
1198         (WebCore::RenderLayerBacking::updateCompositedBounds):
1199         (WebCore::RenderLayerBacking::updateAfterWidgetResize):
1200         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1201         (WebCore::RenderLayerBacking::resetContentsRect):
1202         (WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
1203         (WebCore::RenderLayerBacking::contentsBox):
1204         (WebCore::RenderLayerBacking::backgroundBox):
1205         (WebCore::RenderLayerBacking::paintIntoLayer):
1206         (WebCore::RenderLayerBacking::paintContents):
1207         (WebCore::RenderLayerBacking::compositedBounds):
1208         (WebCore::RenderLayerBacking::setCompositedBounds):
1209         * rendering/RenderLayerBacking.h:
1210         * rendering/RenderLayerCompositor.cpp:
1211         (WebCore::RenderLayerCompositor::logLayerInfo):
1212         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
1213         * rendering/RenderLayerCompositor.h:
1214         * rendering/RenderTreeAsText.cpp:
1215         (WebCore::operator<<):
1216         * rendering/RenderTreeAsText.h:
1217
1218 2013-08-13  peavo@outlook.com  <peavo@outlook.com>
1219
1220         [Curl] Possible infinite loop while downloading.
1221         https://bugs.webkit.org/show_bug.cgi?id=119744
1222
1223         Reviewed by Darin Adler.
1224
1225         If adding/removing curl handles fails, the download thread
1226         can end up in an endless loop trying to update the curl handle list.
1227
1228         * platform/network/curl/CurlDownload.cpp:
1229         (WebCore::CurlDownloadManager::updateHandleList): Avoid infinite loop by ignoring return value.
1230
1231 2013-08-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1232
1233         HTMLSelectElement.item() does not behave according to specification
1234         https://bugs.webkit.org/show_bug.cgi?id=119738
1235
1236         Reviewed by Darin Adler.
1237
1238         Make HTMLSelectElement.item() behave according to specification:
1239         http://www.w3.org/TR/html51/forms.html#dom-select-item
1240         http://dom.spec.whatwg.org/#dom-htmlcollection-item
1241
1242         Namely, we no longer throw if the offset argument is negative. Also,
1243         the argument is now mandatory.
1244
1245         IE10, Firefox and Blink do not throw when HTMLSelectElement.item() is
1246         called with a negative value (as per the specification).
1247
1248         The argument is mandatory in Firefox and Blink, but optional in IE10
1249         (it returns null when called without argument). This looks like a bug
1250         in IE because other item() getters' argument is usually mandatory in IE
1251         (e.g. NodeList.item()).
1252
1253         Test: fast/dom/HTMLSelectElement/select-element-item-argument.html
1254
1255         * html/HTMLSelectElement.idl:
1256
1257 2013-08-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1258
1259         On request error, always fire events on the XMLHttpRequestUpload before the XMLHttpRequest
1260         https://bugs.webkit.org/show_bug.cgi?id=119714
1261
1262         Reviewed by Alexey Proskuryakov.
1263
1264         On request error, fire events on the XMLHttpRequestUpload object before the XMLHttpRequest
1265         object as per the latest specification:
1266         http://xhr.spec.whatwg.org/#request-error
1267
1268         This specification change was made in Sept 2010:
1269         http://dev.w3.org/cvsweb/2006/webapi/XMLHttpRequest-2/Overview.src.html.diff?r1=1.138;r2=1.139;f=h
1270
1271         It addresses the following comment:
1272         http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/0777.html
1273
1274         IE10 and since recently Blink behave according to specification but WebKit was firing the
1275         events on the XMLHttpRequest object BEFORE the XMLHttpRequestUpload object in case of
1276         'network error' or 'abort error'. WebKit was however behaving according to specification
1277         in case of 'timeout error', which was inconsistent.
1278
1279         Test: http/tests/xmlhttprequest/upload-request-error-event-order.html
1280
1281         * xml/XMLHttpRequest.cpp:
1282         (WebCore::XMLHttpRequest::networkError):
1283         (WebCore::XMLHttpRequest::abortError):
1284
1285 2013-08-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1286
1287         Simplify RadioNodeList's anonymous indexed getter
1288         https://bugs.webkit.org/show_bug.cgi?id=119725
1289
1290         Reviewed by Darin Adler.
1291
1292         Simplify RadioNodeList's anonymous indexed getter by dropping [IsIndex]
1293         IDL extended attribute from its parameter and making it mandatory.
1294
1295         This change has strictly no impact on the generated bindings code
1296         but it simplifies the IDL.
1297
1298         No new test, no behavior change.
1299
1300         * html/RadioNodeList.idl:
1301
1302 2013-08-13  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
1303
1304         [GTK] close the volume slider when the media control panel is hidden
1305         https://bugs.webkit.org/show_bug.cgi?id=119062
1306
1307         Reviewed by Gustavo Noronha Silva.
1308
1309         It's not obvious how to close the volume slider on webkitGtk.
1310         The volume slider should close if the control panel is hidden.
1311
1312         * html/shadow/MediaControlsGtk.cpp:
1313         (WebCore::MediaControlsGtk::makeTransparent):
1314         * html/shadow/MediaControlsGtk.h:
1315
1316 2013-08-13  Commit Queue  <commit-queue@webkit.org>
1317
1318         Unreviewed, rolling out r152563.
1319         http://trac.webkit.org/changeset/152563
1320         https://bugs.webkit.org/show_bug.cgi?id=119740
1321
1322         causes random crashes (Requested by carewolf on #webkit).
1323
1324         * platform/graphics/qt/FontCacheQt.cpp:
1325         (WebCore::FontCache::getLastResortFallbackFont):
1326
1327 2013-08-13  Andrei Bucur  <abucur@adobe.com>
1328
1329         Unreviewed.
1330
1331         Fix the build after http://trac.webkit.org/changeset/153990.
1332
1333         * rendering/RenderBlock.cpp:
1334         (WebCore::RenderBlock::updateShapesBeforeBlockLayout): Add the default return value if CSS Shapes are disabled.
1335
1336 2013-08-13  Andrei Bucur  <abucur@adobe.com>
1337
1338         [CSS Regions] Compute correct region ranges for boxes
1339         https://bugs.webkit.org/show_bug.cgi?id=116296
1340
1341         Reviewed by David Hyatt.
1342
1343         The patch extends the region ranges implementation with the following behavior:
1344         - the range of a box is always included in the range of its containing block (even for floats); this will simplify how overflow
1345         is propagated to the regions and it should later change on a case by case basis.
1346         - if the range of a box is not correctly estimated before the layout it will be marked for relayout; this is necessary to correctly
1347         position boxes that overflow naturally, like floats.
1348         - all the boxes have a range now, not only the blocks.
1349         - regionAtBlockOffset can clamp to a box.
1350         - an unsplittable box has a region range of a single region, the one where the box top falls into.
1351
1352         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,
1353         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
1354         overflows in the next region a relayout is needed for the float so it can be positioned relative to the containing block
1355         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
1356         containing block range).
1357
1358         Tests: fast/regions/bottom-overflow-out-of-first-region-absolute.html
1359                fast/regions/float-pushed-width-change-2.html
1360                fast/regions/scrollable-paragraph-unsplittable.html
1361
1362         * rendering/RenderBlock.cpp:
1363         (WebCore::RenderBlock::updateShapesBeforeBlockLayout): Doesn't do anything for regions now.
1364         (WebCore::RenderBlock::updateShapesAfterBlockLayout): Doesn't do anything for regions now.
1365         (WebCore::RenderBlock::relayoutToAvoidWidows): The layout to avoid widows. Widows use the line index to determine the break point,
1366         not the RootLineBox pointer as before. This is necessary to prevent stale pointers in further layouts.
1367         (WebCore::RenderBlock::layoutBlock):
1368         (WebCore::RenderBlock::layoutBlockChild):
1369         (WebCore::RenderBlock::layoutPositionedObjects):
1370         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded): Relayout for widows during layoutBlock(). Don't wait to exit the block layout.
1371         (WebCore::RenderBlock::positionNewFloats):
1372         (WebCore::RenderBlock::hasNextPage):
1373         (WebCore::RenderBlock::applyBeforeBreak):
1374         (WebCore::RenderBlock::applyAfterBreak):
1375         (WebCore::RenderBlock::setPageBreak):
1376         (WebCore::RenderBlock::updateMinimumPageHeight):
1377         (WebCore::RenderBlock::regionAtBlockOffset): This function can now clamp at a box.
1378         (WebCore::RenderBlock::computeRegionRangeForBoxChild): Calculate the box region range using the box height.
1379         (WebCore::RenderBlock::estimateRegionRangeForBoxChild): Estimate the box region range using a huge height for the box.
1380         (WebCore::RenderBlock::updateRegionRangeForBoxChild): Determine the final region range of a box.
1381         * rendering/RenderBlock.h:
1382         (WebCore::RenderBlock::logicalWidthForChild):
1383         (WebCore::RenderBlock::logicalHeightForChild):
1384         (WebCore::RenderBlock::logicalTopForChild):
1385         * rendering/RenderBlockLineLayout.cpp:
1386         (WebCore::RenderBlock::layoutInlineChildren):
1387         * rendering/RenderBox.cpp:
1388         (WebCore::RenderBox::clampToStartAndEndRegions):
1389         (WebCore::RenderBox::borderBoxRectInRegion):
1390         * rendering/RenderBox.h:
1391         * rendering/RenderDeprecatedFlexibleBox.cpp:
1392         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
1393         * rendering/RenderFlexibleBox.cpp:
1394         (WebCore::RenderFlexibleBox::layoutBlock):
1395         * rendering/RenderFlowThread.cpp:
1396         (WebCore::RenderFlowThread::validateRegions):
1397         (WebCore::RenderFlowThread::regionAtBlockOffset):
1398         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
1399         (WebCore::RenderFlowThread::pageLogicalTopForOffset):
1400         (WebCore::RenderFlowThread::pageLogicalWidthForOffset):
1401         (WebCore::RenderFlowThread::pageLogicalHeightForOffset):
1402         (WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
1403         (WebCore::RenderFlowThread::mapFromFlowToRegion):
1404         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
1405         (WebCore::RenderFlowThread::clearRenderObjectCustomStyle):
1406         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
1407         (WebCore::RenderFlowThread::setRegionRangeForBox):
1408         (WebCore::RenderFlowThread::applyBreakAfterContent):
1409         (WebCore::RenderFlowThread::addForcedRegionBreak):
1410         * rendering/RenderFlowThread.h:
1411         * rendering/RenderGrid.cpp:
1412         (WebCore::RenderGrid::layoutBlock):
1413         * rendering/RenderMultiColumnFlowThread.cpp:
1414         (WebCore::RenderMultiColumnFlowThread::setPageBreak):
1415         (WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
1416         * rendering/RenderMultiColumnFlowThread.h:
1417
1418 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
1419
1420         One more speculative Windows build fix after r153978.
1421
1422         * page/win/DragControllerWin.cpp:
1423
1424 2013-08-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1425
1426         Update scheme list according to latest specification
1427         https://bugs.webkit.org/show_bug.cgi?id=119510
1428
1429         Reviewed by Christophe Dumez.
1430
1431         New schemes are added to it additionally. Those are bitcoin, im, ircs and wtai.
1432         As additional work, scheme order is listed to be sync with spec.
1433
1434         Spec: http://www.w3.org/html/wg/drafts/html/master/webappapis.html#custom-handlers
1435
1436         Test: fast/dom/register-protocol-handler.html
1437               fast/dom/unregister-protocol-handler.html
1438
1439         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1440         (WebCore::initProtocolHandlerWhitelist):
1441
1442 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
1443
1444         Yet another Windows build fix attempt after r153978.
1445
1446         * page/win/DragControllerWin.cpp:
1447         (WebCore::DragController::declareAndWriteDragImage):
1448
1449 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
1450
1451         Another Windows build fix attempt after r153978.
1452
1453         * page/win/DragControllerWin.cpp:
1454
1455 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
1456
1457         Windows build fix attempt after r153978.
1458
1459         * page/win/DragControllerWin.cpp:
1460
1461 2013-08-12  Zan Dobersek  <zdobersek@igalia.com>
1462
1463         ASSERTION FAILED: type() == Percent in WebCore::Length::percent
1464         https://bugs.webkit.org/show_bug.cgi?id=116715
1465
1466         Reviewed by Darin Adler.
1467
1468         Allow the Calculated type in the Length::percent method that returns the Length's
1469         float value. This reflects the changes in r110148 that adjusted the Length::isPercent
1470         method to return true for Length objects of either Percent or Calculated type.
1471
1472         Test: fast/css/calculated-length-as-percent-crash.html
1473
1474         * platform/Length.h:
1475         (WebCore::Length::percent): Assert that Length::isPercent is true when Length::percent
1476         is called, ensuring the Length's type is either Percent or Calculated.
1477
1478 2013-06-16  Darin Adler  <darin@apple.com>
1479
1480         Move Clipboard::declareAndWriteDragImage to DragController
1481         https://bugs.webkit.org/show_bug.cgi?id=117683
1482
1483         Reviewed by Brent Fulgham.
1484
1485         * dom/Clipboard.h: Removed declareAndWriteDragImage.
1486
1487         * page/DragController.cpp:
1488         (WebCore::selectImageBeforeDragging): Half of the old prepareClipboardForImageDrag
1489         is now refactored into this function.
1490         (WebCore::DragController::startDrag): Where we called prepareClipboardForImageDrag,
1491         instead call selectImageBeforeDragging and declareAndWriteDragImage. This is needed
1492         because declareAndWriteDragImage needs to be a member function, for Mac at least.
1493
1494         * page/DragController.h: Added declareAndWriteDragImage.
1495
1496         * page/efl/DragControllerEfl.cpp:
1497         (WebCore::DragController::declareAndWriteDragImage): Added empty placeholder.
1498         It would be better to delete this file rather than having these placeholders.
1499         I don't think EFL actually has drag support, and it makes work to have to keep
1500         source files up to date that are really unused.
1501
1502         * page/gtk/DragControllerGtk.cpp:
1503         (WebCore::DragController::declareAndWriteDragImage): Added. Calls Pasteboard::writeImage.
1504         * page/mac/DragControllerMac.mm:
1505         (WebCore::DragController::declareAndWriteDragImage): Added. Calls to DragClient, which
1506         does the work.
1507         * page/qt/DragControllerQt.cpp:
1508         (WebCore::DragController::declareAndWriteDragImage): Added. Calls Pasteboard::writeImage.
1509         * page/win/DragControllerWin.cpp:
1510         (WebCore::DragController::declareAndWriteDragImage): Added. Uses Pasteboard functions to
1511         do the work.
1512
1513         * platform/Clipboard.h: Changed the pasteboard function to return a non-const reference.
1514         For now, it's not clear what const will mean for pasteboards, and it's currently not
1515         possible to write to a const pasteboard, which we need to do in the new
1516         DragController::declareAndWriteDragImage functions.
1517
1518         * platform/Pasteboard.h: Added a new writeMarkup function, implemented only for Windows
1519         at this time.
1520
1521         * platform/efl/ClipboardEfl.cpp: Deleted declareAndWriteDragImage.
1522         * platform/gtk/ClipboardGtk.cpp: Ditto.
1523         * platform/ios/ClipboardIOS.h: Ditto.
1524         * platform/ios/ClipboardIOS.mm: Ditto.
1525         * platform/mac/ClipboardMac.mm: Ditto.
1526         * platform/qt/ClipboardQt.cpp: Ditto.
1527         * platform/win/ClipboardWin.cpp: Ditto.
1528
1529         * platform/win/PasteboardWin.cpp:
1530         (WebCore::Pasteboard::writePlainTextToDataObject): Took out a pointless line of code.
1531         (WebCore::Pasteboard::writeMarkup): Added. Currently implemented only for Windows.
1532         This factors out a significant piece of DragController::declareAndWriteDragImage,
1533         and will probably be handy for other platforms later.
1534
1535 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
1536
1537         Fix NULL de-refernce in HTMLAnchorElement::sendPings when settings doesn't exist
1538         https://bugs.webkit.org/show_bug.cgi?id=119716
1539
1540         Reviewed by Darin Adler.
1541
1542         Merge https://chromium.googlesource.com/chromium/blink/+/d5783da353ab783e9994b8fbecd91880be5192a1
1543
1544         No new tests since the test in the Blink change doesn't reproduce crash on WebKit.
1545
1546         * html/HTMLAnchorElement.cpp:
1547         (WebCore::HTMLAnchorElement::sendPings):
1548
1549 2013-08-12  Seokju Kwon  <seokju@webkit.org>
1550
1551         Use the correct preprocessor in shouldRepaintFixedBackgroundsOnScroll()
1552         https://bugs.webkit.org/show_bug.cgi?id=119710
1553
1554         Reviewed by Darin Adler.
1555
1556         No behavior change, no new tests needed.
1557
1558         * rendering/RenderObject.cpp: Remove unused parameter warning.
1559         (WebCore::shouldRepaintFixedBackgroundsOnScroll):
1560
1561 2013-08-12  Alexey Proskuryakov  <ap@apple.com>
1562
1563         http/tests/security/sandboxed-iframe-invalid.html is flaky on Mac
1564         https://bugs.webkit.org/show_bug.cgi?id=85522
1565
1566         Reviewed by Andy Estes.
1567
1568         Drive-by FIXMEs and trivial fixes for WebCore issues I noticed while working
1569         on this bug. No behavior change expected.
1570
1571         * loader/FrameLoader.cpp:
1572         (WebCore::FrameLoader::submitForm):
1573         (WebCore::FrameLoader::findFrameForNavigation):
1574         * loader/NavigationScheduler.cpp:
1575         (WebCore::ScheduledFormSubmission::fire):
1576
1577 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
1578
1579         Fix variable name |end| -> |size| in EventTarget::fireEventListeners
1580         https://bugs.webkit.org/show_bug.cgi?id=119715
1581
1582         Reviewed by Benjamin Poulain.
1583
1584         Merge https://chromium.googlesource.com/chromium/blink/+/f58b017539c48059bb2b88d18ee0ee3d14decb01
1585         and also fix variable names in FiringEventIterator.
1586
1587         * dom/EventTarget.cpp:
1588         (WebCore::EventTarget::removeEventListener):
1589         (WebCore::EventTarget::fireEventListeners):
1590         (WebCore::EventTarget::removeAllEventListeners):
1591         * dom/EventTarget.h:
1592         (WebCore::FiringEventIterator::FiringEventIterator):
1593
1594 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
1595
1596         Encapsulate access to documentNamedItemMap and windowNamedItemMap
1597         https://bugs.webkit.org/show_bug.cgi?id=119701
1598
1599         Reviewed by Darin Adler.
1600
1601         Encapsulate m_documentNamedItem and m_windowNamedItem by adding various methods on HTMLDocument.
1602         This will help us doing more refactorings in the future.
1603
1604         * bindings/js/JSDOMWindowCustom.cpp:
1605         (WebCore::namedItemGetter):
1606         (WebCore::JSDOMWindow::getOwnPropertySlot):
1607         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1608         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
1609         * bindings/js/JSHTMLDocumentCustom.cpp:
1610         (WebCore::JSHTMLDocument::canGetItemsForName):
1611         (WebCore::JSHTMLDocument::nameGetter):
1612         * dom/Element.cpp:
1613         (WebCore::Element::updateNameForDocument):
1614         (WebCore::Element::updateIdForDocument):
1615         * html/HTMLDocument.cpp:
1616         (WebCore::HTMLDocument::addDocumentNamedItem): Added.
1617         (WebCore::HTMLDocument::removeDocumentNamedItem): Added.
1618         (WebCore::HTMLDocument::addWindowNamedItem): Added.
1619         (WebCore::HTMLDocument::removeWindowNamedItem): Added.
1620         * html/HTMLDocument.h:
1621         (WebCore::HTMLDocument::documentNamedItem): Added.
1622         (WebCore::HTMLDocument::hasDocumentNamedItem): Added.
1623         (WebCore::HTMLDocument::documentNamedItemContainsMultipleElements): Added.
1624         (WebCore::HTMLDocument::windowNamedItem): Added.
1625         (WebCore::HTMLDocument::hasWindowNamedItem): Added.
1626         (WebCore::HTMLDocument::windowNamedItemContainsMultipleElements): Added.
1627         * html/HTMLImageElement.cpp:
1628         (WebCore::HTMLImageElement::parseAttribute):
1629         * html/HTMLObjectElement.cpp:
1630         (WebCore::HTMLObjectElement::updateDocNamedItem):
1631
1632 2013-08-12  Patrick Gansterer  <paroga@webkit.org>
1633
1634         [CMake] Use the correct list of files when compiling ANGLESupport on Windows
1635         https://bugs.webkit.org/show_bug.cgi?id=119439
1636
1637         Reviewed by Gyuyoung Kim.
1638
1639         * CMakeLists.txt: Use ossource_win.cpp instead of ossource_posix.cpp on Windows platforms.
1640
1641 2013-08-12  Arnaud Renevier  <a.renevier@samsung.com>
1642
1643         [cairo] memory corruption with putImageData and accelerated canvas.
1644         https://bugs.webkit.org/show_bug.cgi?id=118621
1645
1646         Reviewed by Martin Robinson.
1647
1648         When we have an accelerated imageBuffer, and we putByteArray with a
1649         non zero destPoint, we create temporary surface of sourceSize. Then,
1650         we write to image data with an offset. This results in an out of bound
1651         write.
1652
1653         In order to avoid that, we use a 0 offset when writing data.
1654
1655         In addition, we also create image with the minimal needed size in
1656         getImageData, and also use a 0 offset. This decrease data transfer
1657         between cpu and gpu
1658
1659         Instead of the map/unmap mechanism, perform an explicit surface copy
1660         when needed. This change also removes an unneeded glReadPixels at the
1661         start of putByteArray
1662
1663         Add two parameters to copyRectFromOneSurfaceToAnother: destination
1664         offset, and cairo drawing operator.
1665
1666         No new tests. Accelerated canvas is not enabled for testing yet.
1667
1668         * platform/graphics/cairo/CairoUtilities.cpp:
1669         (WebCore::copyRectFromOneSurfaceToAnother):
1670         * platform/graphics/cairo/CairoUtilities.h:
1671         * platform/graphics/cairo/ImageBufferCairo.cpp:
1672         (WebCore::copySurfaceToImageAndAdjustRect):
1673         (WebCore::getImageData):
1674         (WebCore::ImageBuffer::putByteArray):
1675
1676 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
1677
1678         Use const AtomicStringImpl* in DocumentOrderedMap
1679         https://bugs.webkit.org/show_bug.cgi?id=119700
1680
1681         Reviewed by Benjamin Poulain.
1682
1683         Use const AtomicStringImpl* in DocumentOrderedMap. It caught at least one bug that HTMLNameCollection'
1684         subclasses' nodeMatches were taking const AtomicString& instead of AtomicStringImpl*. This was forcing
1685         DocumentOrderedMap::getElementByWindowNamedItem and DocumentOrderedMap::getElementByDocumentNamedItem
1686         to create temporary AtomicStrings.
1687
1688         * dom/DocumentOrderedMap.cpp:
1689         (WebCore::keyMatchesId):
1690         (WebCore::keyMatchesName):
1691         (WebCore::keyMatchesMapName):
1692         (WebCore::keyMatchesLowercasedMapName):
1693         (WebCore::keyMatchesLabelForAttribute):
1694         (WebCore::keyMatchesWindowNamedItem):
1695         (WebCore::keyMatchesDocumentNamedItem):
1696         (WebCore::DocumentOrderedMap::add):
1697         (WebCore::DocumentOrderedMap::remove):
1698         (WebCore::DocumentOrderedMap::get):
1699         (WebCore::DocumentOrderedMap::getElementById):
1700         (WebCore::DocumentOrderedMap::getElementByName):
1701         (WebCore::DocumentOrderedMap::getElementByMapName):
1702         (WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
1703         (WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
1704         (WebCore::DocumentOrderedMap::getElementByWindowNamedItem):
1705         (WebCore::DocumentOrderedMap::getElementByDocumentNamedItem):
1706         (WebCore::DocumentOrderedMap::getAllElementsById):
1707         * dom/DocumentOrderedMap.h:
1708         (WebCore::DocumentOrderedMap::containsSingle):
1709         (WebCore::DocumentOrderedMap::contains):
1710         (WebCore::DocumentOrderedMap::containsMultiple):
1711         * html/HTMLNameCollection.cpp:
1712         (WebCore::WindowNameCollection::nodeMatches):
1713         (WebCore::DocumentNameCollection::nodeMatches):
1714         * html/HTMLNameCollection.h:
1715         (WebCore::WindowNameCollection::nodeMatches):
1716         (WebCore::DocumentNameCollection::nodeMatches):
1717
1718 2013-08-12  Beth Dakin  <bdakin@apple.com>
1719
1720         The LayoutMilestones didLayout callback should only fire for the main frame
1721         https://bugs.webkit.org/show_bug.cgi?id=119457
1722
1723         Reviewed by Sam Weinig.
1724
1725         This patch makes it so that FrameLoader::didLayout(LayoutMilestones) is only ever 
1726         called for the main frame. Technically this will change existing API for 
1727         didFirstVisuallyNonEmptyLayoutInFrame and didFirstLayoutInFrame. Clients used to 
1728         be able to register for those callbacks for any frame they wanted, however, now 
1729         they will only ever get the callback when it applies to the main frame. We think 
1730         that this is acceptable since we don’t know of any clients that ever used those 
1731         APIs for a non-main frame. This change also makes nothing but sense for the 
1732         didLayout(LayoutMilestones) callback, since that is a Page-level concept, so it 
1733         should only fire for the main frame.
1734
1735         Only call didLayout for the main frame.
1736         * dom/Document.cpp:
1737         (WebCore::Document::setVisualUpdatesAllowed):
1738
1739         Assert that this is the main frame.
1740         * loader/FrameLoader.cpp:
1741         (WebCore::FrameLoader::didLayout):
1742
1743         Only call didLayout for the main frame.
1744         * page/FrameView.cpp:
1745         (WebCore::FrameView::performPostLayoutTasks):
1746
1747 2013-08-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1748
1749         Define DOM_KEY_LOCATION_* constants on KeyboardEvent
1750         https://bugs.webkit.org/show_bug.cgi?id=119341
1751
1752         Reviewed by Ryosuke Niwa.
1753
1754         Add support for the DOM_KEY_LOCATION_* constants on KeyboardEvent as per
1755         the specification:
1756         http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent
1757
1758         Those constants are already supported by IE10, Firefox 22 and since
1759         recently Blink.
1760
1761         Note that the following constants are not supported / exposed yet:
1762         DOM_KEY_LOCATION_MOBILE and DOM_KEY_LOCATION_JOYSTICK.
1763
1764         Test: fast/events/keyboardevent-location-constants.html
1765
1766         * dom/KeyboardEvent.cpp:
1767         (WebCore::keyLocationCode):
1768         (WebCore::KeyboardEvent::KeyboardEvent):
1769         * dom/KeyboardEvent.h:
1770         * dom/KeyboardEvent.idl:
1771
1772 2013-08-12  Tim Horton  <timothy_horton@apple.com>
1773
1774         dataLog dumpers for WebCore's basic geometry types
1775         https://bugs.webkit.org/show_bug.cgi?id=119636
1776
1777         Reviewed by Filip Pizlo.
1778
1779         * platform/graphics/FloatPoint.cpp:
1780         (WebCore::FloatPoint::dump):
1781         * platform/graphics/FloatPoint.h:
1782         * platform/graphics/FloatRect.cpp:
1783         (WebCore::FloatRect::dump):
1784         * platform/graphics/FloatRect.h:
1785         * platform/graphics/FloatSize.cpp:
1786         (WebCore::FloatSize::dump):
1787         * platform/graphics/FloatSize.h:
1788         * platform/graphics/IntPoint.h:
1789         (WebCore::IntPoint::dump):
1790         * platform/graphics/IntRect.cpp:
1791         (WebCore::IntRect::dump):
1792         * platform/graphics/IntRect.h:
1793         * platform/graphics/IntSize.h:
1794         (WebCore::IntSize::dump):
1795
1796 2013-08-12  Dean Jackson  <dino@apple.com>
1797
1798         Shadows don't support viewport units
1799         https://bugs.webkit.org/show_bug.cgi?id=119649
1800
1801         Reviewed by Darin Adler.
1802
1803         We don't yet support viewport units in shadows, so
1804         fail parsing if we see one. The bug to fix this
1805         completely is: https://webkit.org/b/119650
1806
1807         Test: fast/css/shadow-viewport-units.html
1808
1809         * css/CSSParser.cpp:
1810         (WebCore::CSSParser::parseShadow): Fail if we get one of
1811         vh, vw, vmin, vmax.
1812
1813 2013-08-12  peavo@outlook.com  <peavo@outlook.com>
1814
1815         [Curl] Cookie is not set when url string is unicode.
1816         https://bugs.webkit.org/show_bug.cgi?id=119545
1817
1818         Reviewed by Brent Fulgham.
1819
1820         When the method setCookiesFromDOM is called with an unicode url parameter, the cookie is not correctly set.
1821         We need to convert the cookie string to 8 bit, before passing it to the Curl api function.
1822
1823         * platform/network/curl/CookieJarCurl.cpp:
1824         (WebCore::setCookiesFromDOM): Convert cookie string to 8 bit, if needed.
1825
1826 2013-08-12  Eric Carlson  <eric.carlson@apple.com>
1827
1828         Revert r153912 because it broke some track tests.
1829
1830         Rubber-stamped by Antti Koivisto.
1831
1832         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1833         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
1834         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack):
1835
1836 2013-08-12  Antti Koivisto  <antti@apple.com>
1837
1838         Add ElementTraversal::next/previousSibling
1839         https://bugs.webkit.org/show_bug.cgi?id=119681
1840
1841         Reviewed by Andreas Kling.
1842
1843         Add nextSibling/previousSibling/lastWithin to ElementTraversal namespace.
1844         
1845         - Use them to replace internal use of Element::next/previousElementSibling DOM API for traversal.
1846         - Replace some Node::nextSibling() usage with ElementTraversal::nextSibling() for tighter code.
1847         - Replace ElementTraversal::nextSkippingChildren where it is used to traverse over immediate children only.
1848
1849         * css/SelectorChecker.cpp:
1850         (WebCore::isFirstChildElement):
1851         (WebCore::isLastChildElement):
1852         (WebCore::isFirstOfType):
1853         (WebCore::isLastOfType):
1854         (WebCore::countElementsBefore):
1855         (WebCore::countElementsOfTypeBefore):
1856         (WebCore::countElementsAfter):
1857         (WebCore::countElementsOfTypeAfter):
1858         * dom/Element.cpp:
1859         (WebCore::Element::lastElementChild):
1860         (WebCore::Element::previousElementSibling):
1861         (WebCore::Element::nextElementSibling):
1862         * dom/Element.h:
1863         * dom/ElementTraversal.h:
1864         (WebCore::ElementTraversal::lastElementWithinTemplate):
1865         (WebCore::ElementTraversal::lastWithin):
1866         (WebCore::ElementTraversal::traverseNextSiblingElementTemplate):
1867         (WebCore::ElementTraversal::nextSibling):
1868         (WebCore::ElementTraversal::traversePreviousSiblingElementTemplate):
1869         (WebCore::ElementTraversal::previousSibling):
1870         * editing/ApplyStyleCommand.cpp:
1871         (WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan):
1872         (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
1873         * editing/CompositeEditCommand.cpp:
1874         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
1875         * editing/IndentOutdentCommand.cpp:
1876         (WebCore::IndentOutdentCommand::tryIndentingAsListItem):
1877         * editing/InsertListCommand.cpp:
1878         (WebCore::InsertListCommand::mergeWithNeighboringLists):
1879         * editing/markup.cpp:
1880         (WebCore::createContextualFragment):
1881         * html/HTMLCollection.cpp:
1882         (WebCore::firstMatchingChildElement):
1883         (WebCore::nextMatchingSiblingElement):
1884         (WebCore::HTMLCollection::traverseNextElement):
1885         (WebCore::HTMLCollection::traverseForwardToOffset):
1886         * html/HTMLFieldSetElement.cpp:
1887         (WebCore::HTMLFieldSetElement::childrenChanged):
1888         (WebCore::HTMLFieldSetElement::legend):
1889         * html/HTMLMediaElement.cpp:
1890         (WebCore::HTMLMediaElement::finishParsingChildren):
1891         * html/HTMLObjectElement.cpp:
1892         (WebCore::HTMLObjectElement::containsJavaApplet):
1893         * rendering/FilterEffectRenderer.cpp:
1894         (WebCore::FilterEffectRenderer::buildReferenceFilter):
1895         * style/StyleResolveTree.cpp:
1896         (WebCore::Style::resolveTree):
1897         * svg/SVGStyledElement.cpp:
1898         (WebCore::SVGStyledElement::title):
1899
1900 2013-08-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1901
1902         [Qt] Add Support for canvas blend modes
1903         https://bugs.webkit.org/show_bug.cgi?id=100072
1904
1905         Reviewed by Jocelyn Turcotte.
1906
1907         Implement basic support for the blend-modes supported by QPainter.
1908
1909         Covered by existing tests.
1910
1911         * platform/graphics/qt/GraphicsContextQt.cpp:
1912         (WebCore::toQtCompositionMode):
1913         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1914         * platform/graphics/qt/ImageBufferQt.cpp:
1915         (WebCore::ImageBuffer::draw):
1916         * platform/graphics/qt/ImageQt.cpp:
1917         (WebCore::BitmapImage::draw):
1918         * platform/graphics/qt/StillImageQt.cpp:
1919         (WebCore::StillImage::draw):
1920
1921 2013-08-12  Gabor Abraham  <abrhm@inf.u-szeged.hu>
1922
1923         Buildfix for !ENABLE(SVG). Fix warning by adding guard after r153901:
1924         void WebCore::addString(WebCore::FeatureSet&, const char*)'
1925         defined but not used [-Werror=unused-function]
1926
1927         Reviewed by Csaba Osztrogonác.
1928
1929         * dom/DOMImplementation.cpp:
1930
1931 2013-08-12  Antti Koivisto  <antti@apple.com>
1932
1933         Move ElementTraversal to ElementTraversal.h
1934         https://bugs.webkit.org/show_bug.cgi?id=119678
1935
1936         Rubber-stamped by Andreas Kling.
1937
1938         Move ElementTraversal namespace from NodeTraversal.h to a correctly named file.
1939
1940         * GNUmakefile.list.am:
1941         * Target.pri:
1942         * WebCore.vcxproj/WebCore.vcxproj:
1943         * WebCore.xcodeproj/project.pbxproj:
1944         * accessibility/AccessibilityRenderObject.cpp:
1945         * css/StyleInvalidationAnalysis.cpp:
1946         * dom/Document.cpp:
1947         * dom/DocumentOrderedMap.cpp:
1948         * dom/Element.cpp:
1949         * dom/ElementTraversal.h: Added.
1950         (WebCore::ElementTraversal::firstElementWithinTemplate):
1951         (WebCore::ElementTraversal::firstWithin):
1952         (WebCore::ElementTraversal::traverseNextElementTemplate):
1953         (WebCore::ElementTraversal::next):
1954         (WebCore::ElementTraversal::traverseNextElementSkippingChildrenTemplate):
1955         (WebCore::ElementTraversal::nextSkippingChildren):
1956         (WebCore::ElementTraversal::previousIncludingPseudo):
1957         (WebCore::ElementTraversal::nextIncludingPseudo):
1958         (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
1959         (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
1960         * dom/Node.cpp:
1961         * dom/NodeTraversal.h:
1962         * dom/SelectorQuery.cpp:
1963         * dom/TreeScope.cpp:
1964         * dom/VisitedLinkState.cpp:
1965         * editing/FrameSelection.cpp:
1966         * editing/markup.cpp:
1967         * html/HTMLCollection.cpp:
1968         * html/HTMLFieldSetElement.cpp:
1969         * html/HTMLFormElement.cpp:
1970         * html/HTMLLabelElement.cpp:
1971         * html/HTMLLegendElement.cpp:
1972         * html/HTMLMapElement.cpp:
1973         * html/HTMLObjectElement.cpp:
1974         * html/HTMLSelectElement.cpp:
1975         * html/shadow/ContentDistributor.cpp:
1976         * page/FocusController.cpp:
1977         * rendering/RenderCounter.cpp:
1978         * rendering/RenderListItem.cpp:
1979         * svg/SVGSVGElement.cpp:
1980         * svg/SVGStyledElement.cpp:
1981         * svg/SVGUseElement.cpp:
1982         * svg/animation/SMILTimeContainer.cpp:
1983         * svg/graphics/SVGImage.cpp:
1984
1985 2013-08-12  Antti Koivisto  <antti@apple.com>
1986
1987         Move some Document recalcStyle code to StyleResolveTree
1988         https://bugs.webkit.org/show_bug.cgi?id=119676
1989
1990         Reviewed by Andreas Kling.
1991
1992         Move the code that resolves the document and child styles to Style::resolveTree(Document*).
1993
1994         * dom/Document.cpp:
1995         (WebCore::Document::recalcStyle):
1996         * style/StyleResolveTree.cpp:
1997         (WebCore::Style::resolveTree):
1998         * style/StyleResolveTree.h:
1999
2000 2013-08-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2001
2002         Resource leak related to gstreamer and videos
2003         https://bugs.webkit.org/show_bug.cgi?id=109350
2004
2005         Reviewed by Eric Carlson.
2006
2007         Since active DOM object are only stopped once and can not be restarted, we can
2008         unreference the media player there, instead of waiting for garbage collection.
2009
2010         If the r152778 is rolled back, this also breaks a circular reference between
2011         GStreamer and WebKit which prevented garbage collecting from triggering.
2012
2013         * html/HTMLMediaElement.cpp:
2014         (WebCore::HTMLMediaElement::stop):
2015
2016 2013-08-12  Gabor Rapcsanyi  <rgabor@webkit.org>
2017
2018         [Qt] Unreviewed buildfix for webaudio.
2019
2020         * Target.pri: Add missing files
2021
2022 2013-08-12  Andreas Kling  <akling@apple.com>
2023
2024         Some build juice for the Windows bots after r153926 + r153927.
2025
2026         * html/shadow/MediaControlElements.cpp:
2027         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2028         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsFullscreen):
2029         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
2030
2031 2013-08-11  Sam Weinig  <sam@webkit.org>
2032
2033         Move RenderMathMLSpace.h/cpp to the right group in the Xcode project.
2034
2035         Reviewed by Dean Jackson.
2036
2037         * WebCore.xcodeproj/project.pbxproj:
2038
2039 2013-08-11  Andreas Kling  <akling@apple.com>
2040
2041         Make Page::settings() return a reference.
2042         <http://webkit.org/b/119662>
2043
2044         Reviewed by Anders Carlsson.
2045
2046         ...and remove some pointless null checks that were exposed by doing this.
2047
2048 2013-08-11  Andreas Kling  <akling@apple.com>
2049
2050         Make some things that return never-null pointers return references instead.
2051         <http://webkit.org/b/119660>
2052
2053         Reviewed by Antti Koivisto.
2054
2055         These functions never return null anyway, so remove any ambiguity by letting
2056         them return references instead of pointers.
2057
2058         - Node::ensureRareData()
2059         - Element::ensureUniqueElementData()
2060         - Element::ensureShadow()
2061         - Element::ensureUserAgentShadowRoot()
2062         - StyledElement::ensureMutableInlineStyle()
2063         - NodeRareData::ensureNodeLists()
2064         - NodeRareData::ensureMutationObserverData()
2065         - EventTarget::ensureEventTargetData()
2066         - Document::ensureStyleResolver()
2067         - Document::selectorQueryCache()
2068         - Document::mediaQueryMatcher()
2069         - FlowThreadController::ensureRenderFlowThreadWithName()
2070         - HTMLTrackElement::ensureTrack()
2071         - SVGElement::ensureSVGRareData()
2072         - AnimationControllerPrivate::ensureCompositeAnimation()
2073
2074 2013-08-11  Sam Weinig  <sam@webkit.org>
2075
2076         Cleanup MediaQueryListListener
2077         https://bugs.webkit.org/show_bug.cgi?id=119664
2078
2079         Reviewed by Andreas Kling.
2080
2081         Make MediaQueryListListener a proper WebIDL callback.
2082
2083         * CMakeLists.txt:
2084         * DerivedSources.cpp:
2085         * DerivedSources.make:
2086         * DerivedSources.pri:
2087         * GNUmakefile.list.am:
2088         * Target.pri:
2089         * WebCore.vcxproj/WebCore.vcxproj:
2090         * WebCore.vcxproj/WebCore.vcxproj.filters:
2091         * WebCore.xcodeproj/project.pbxproj:
2092         Update project files.
2093
2094         * bindings/scripts/CodeGeneratorJS.pm:
2095         (GenerateCallbackHeader):
2096         (GenerateCallbackImplementation):
2097         (JSValueToNative):
2098         * bindings/scripts/IDLAttributes.txt:
2099         Add support for CallbackNeedsOperatorEqual, which adds an operator==.
2100
2101         * css/MediaAllInOne.cpp:
2102         Remove MediaQueryListListener.cpp.
2103
2104         * css/MediaQueryListListener.cpp:
2105         Removed.
2106
2107         * css/MediaQueryListListener.h:
2108         (WebCore::MediaQueryListListener::~MediaQueryListListener):
2109         (WebCore::MediaQueryListListener::MediaQueryListListener):
2110         * css/MediaQueryListListener.idl:
2111         Convert to a proper WebIDL callback.
2112
2113         * css/MediaQueryMatcher.cpp:
2114         (WebCore::MediaQueryMatcher::Listener::evaluate):
2115         (WebCore::MediaQueryMatcher::styleResolverChanged):
2116         * css/MediaQueryMatcher.h:
2117         Remove all traces of the ScriptState.
2118
2119 2013-08-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2120
2121         Unreviewed. Fix make distcheck.
2122
2123         * GNUmakefile.list.am: Remove unexistent header file.
2124
2125 2013-08-09  Gustavo Noronha Silva  <gns@gnome.org>
2126
2127         [GObject] Wrap KeyboardEvent
2128         https://bugs.webkit.org/show_bug.cgi?id=119651
2129
2130         Reviewed by Christophe Dumez.
2131
2132         This exposes KeyboardEvent to our GObject API. It is required for handling
2133         keyboard events, such as keydown, keypress, and so on.
2134
2135         * bindings/gobject/GNUmakefile.am:
2136         * bindings/gobject/WebKitDOMPrivate.cpp:
2137         (WebKit::wrap): make sure we create a WebKitDOMKeyboardEvent for a DOM event that
2138         is a KeyboardEvent.
2139         * bindings/scripts/CodeGeneratorGObject.pm:
2140         (GetBaseClass): make WebKitDOMEvent be WebKitDOMKeyboardEvent's parent, like we do
2141         for WebKitDOMMouseEvent.
2142         * dom/KeyboardEvent.idl: generate a single initialization method.
2143
2144 2013-08-09  Jer Noble  <jer.noble@apple.com>
2145
2146         Crash in com.apple.WebKit.WebContent at com.apple.MediaToolbox.
2147         https://bugs.webkit.org/show_bug.cgi?id=119645
2148
2149         Reviewed by Eric Carlson.
2150
2151         Work around crash caused by <rdar://problem/14688471> by releasing
2152         m_request as soon as keys have been added to it.
2153
2154         * Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
2155         (WebCore::CDMSessionAVFoundation::update):
2156
2157 2013-08-09  Anders Carlsson  <andersca@apple.com>
2158
2159         Artifacts seen sometimes with layer backed WebKit1 plug-in
2160         https://bugs.webkit.org/show_bug.cgi?id=119647
2161         <rdar://problem/14002715>
2162
2163         Reviewed by Beth Dakin.
2164
2165         Don't try to paint layer backed views - they will be painted by Core Animation.
2166
2167         * platform/mac/WidgetMac.mm:
2168         (WebCore::Widget::paint):
2169
2170 2013-08-09  Rob Buis  <rwlbuis@webkit.org>
2171
2172         ASSERTION FAILED: stroke->opacity != other->stroke->opacity in WebCore::SVGRenderStyle::diff
2173         https://bugs.webkit.org/show_bug.cgi?id=119623
2174
2175         Reviewed by Dirk Schulze.
2176
2177         Include all the stroke attributes in the style diff comparison, the visited links ones were missing.
2178
2179         Test: svg/animations/animate-stroke-crasher.html
2180
2181         * rendering/style/SVGRenderStyle.cpp:
2182         (WebCore::SVGRenderStyle::diff):
2183
2184 2013-08-09  Alexey Proskuryakov  <ap@apple.com>
2185
2186         REGRESSION (r142755): window.open creates an invisible window when width and height are 0
2187         https://bugs.webkit.org/show_bug.cgi?id=119633
2188
2189         Reviewed by Darin Adler.
2190
2191         Test: fast/dom/Window/open-zero-size-as-default.html
2192
2193         Relying on each WebKit to refuse setting size to zero was fragile - because this
2194         required each one to have the check, and because by the time the client was called,
2195         the initially zero size was not necessarily zero.
2196
2197         * loader/FrameLoader.cpp: (WebCore::createWindow): When sizes are zero, keep the
2198         size the window was created with, because that's the default one by definition.
2199
2200         * page/DOMWindow.cpp: (WebCore::DOMWindow::adjustWindowRect): It's too late to
2201         check for zero size now, it's been mangled to adjust for the difference between
2202         window and viewport size.
2203
2204 2013-08-09  Eric Carlson  <eric.carlson@apple.com>
2205
2206         [Mac] some track language tags are not recognized
2207         https://bugs.webkit.org/show_bug.cgi?id=119643
2208
2209         Reviewed by Dean Jackson.
2210
2211         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2212         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Always call languageOfPrimaryAudioTrack(),
2213             a track may have changed so we may have a new language.
2214         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Call [AVAssetTrack languageCode]
2215             if [AVAssetTrack extendedLanguageTag] returns NULL in case the media file has an old
2216             QuickTime language code.
2217
2218 2013-08-09  Dean Jackson  <dino@apple.com>
2219
2220         Captions menu needs to reset text-align
2221         https://bugs.webkit.org/show_bug.cgi?id=119637
2222
2223         Reviewed by Eric Carlson.
2224
2225         Reset the text-align property on the menu so that it
2226         doesn't get the inherited value. The full fix for all
2227         controls is http://webkit.org/b/116100.
2228
2229         * css/mediaControlsQuickTime.css:
2230         (video::-webkit-media-controls-closed-captions-container):
2231
2232 2013-08-09  Beth Dakin  <bdakin@apple.com>
2233
2234         AX: Not able to use arrow keys to read text in a WK2 app
2235         https://bugs.webkit.org/show_bug.cgi?id=119605
2236         -and corresponding-
2237         <rdar://problem/14281275>
2238
2239         Reviewed by Darin Adler.
2240
2241         This code from defaultKeyboardEventHandler() is the magic that makes this AX 
2242         functionality work. This patch moves that into a separate function so that we can 
2243         call it from WK2.
2244         * WebCore.exp.in:
2245         * page/EventHandler.cpp:
2246         (WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
2247         (WebCore::EventHandler::defaultKeyboardEventHandler):
2248         * page/EventHandler.h:
2249
2250 2013-08-09  Antti Koivisto  <antti@apple.com>
2251
2252         Move static StyleResolver functions to Style namespace
2253         https://bugs.webkit.org/show_bug.cgi?id=119629
2254
2255         Reviewed by Sam Weinig and Andreas Kling.
2256
2257         - Move static font size computation functions to StyleFontSizeFunctions.h/.cpp
2258         - Move StyleResolver::styleForDocument to Style::resolveForDocument
2259
2260         * WebCore.xcodeproj/project.pbxproj:
2261         * css/DeprecatedStyleBuilder.cpp:
2262         (WebCore::ApplyPropertyFontFamily::applyInitialValue):
2263         (WebCore::ApplyPropertyFontFamily::applyValue):
2264         (WebCore::ApplyPropertyFontSize::applyInitialValue):
2265         (WebCore::ApplyPropertyFontSize::applyValue):
2266         * css/StyleResolver.cpp:
2267         (WebCore::StyleResolver::adjustRenderStyle):
2268         (WebCore::checkForOrientationChange):
2269         (WebCore::StyleResolver::applyProperty):
2270         (WebCore::StyleResolver::checkForGenericFamilyChange):
2271         (WebCore::StyleResolver::initializeFontStyle):
2272         (WebCore::StyleResolver::setFontSize):
2273         * css/StyleResolver.h:
2274         * dom/Document.cpp:
2275         (WebCore::Document::recalcStyle):
2276         * editing/EditingStyle.cpp:
2277         (WebCore::legacyFontSizeFromCSSValue):
2278         * html/HTMLLinkElement.cpp:
2279         (WebCore::HTMLLinkElement::process):
2280         * rendering/style/RenderStyle.cpp:
2281         (WebCore::RenderStyle::getFontAndGlyphOrientation):
2282         
2283             Moved from StyleResolver.cpp so it can be used by Style::resolveForDocument().
2284             This depends on RenderStyle only so it is a natural member function.
2285
2286         * rendering/style/RenderStyle.h:
2287         * rendering/svg/RenderSVGInlineText.cpp:
2288         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
2289         * style/StyleFontSizeFunctions.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
2290         (WebCore::Style::computedFontSizeFromSpecifiedSize):
2291         (WebCore::Style::computedFontSizeFromSpecifiedSizeForSVGInlineText):
2292         (WebCore::Style::fontSizeForKeyword):
2293         (WebCore::Style::legacyFontSizeForPixelSize):
2294         * style/StyleFontSizeFunctions.h: Added.
2295         * style/StyleResolveForDocument.cpp: Added.
2296         (WebCore::Style::resolveForDocument):
2297         * style/StyleResolveForDocument.h: Added.
2298
2299 2013-08-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2300
2301         Add support for KeyboardEvent.location attribute
2302         https://bugs.webkit.org/show_bug.cgi?id=119326
2303
2304         Reviewed by Benjamin Poulain.
2305
2306         Add support for KeyboardEvent.location attribute as per the latest specification:
2307         http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-KeyboardEvent
2308
2309         IE10, Firefox 22 and recently Blink all support KeyboardEvent.location already.
2310
2311         The deprecated 'keyLocation' attribute was not removed to maintain backward
2312         compatibility.
2313
2314         No new tests, covered by existing tests.
2315
2316         * bindings/objc/PublicDOMInterfaces.h:
2317         * bindings/scripts/CodeGeneratorJS.pm:
2318         (GenerateConstructorDefinition):
2319         * dom/KeyboardEvent.cpp:
2320         (WebCore::KeyboardEventInit::KeyboardEventInit):
2321         (WebCore::KeyboardEvent::KeyboardEvent):
2322         (WebCore::KeyboardEvent::initKeyboardEvent):
2323         * dom/KeyboardEvent.h:
2324         (WebCore::KeyboardEvent::location):
2325         * dom/KeyboardEvent.idl:
2326
2327 2013-08-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2328
2329         Make atob() throw an InvalidCharacterError on excess padding characters
2330         https://bugs.webkit.org/show_bug.cgi?id=118898
2331
2332         Reviewed by Darin Adler.
2333
2334         According to the latest specification, window.atob() should throw an
2335         InvalidCharacterError on excess padding characters:
2336         http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#dom-windowbase64-atob
2337
2338         This behavior is consistent with both Firefox, IE10 and recently Blink.
2339
2340         No new tests, already covered by:
2341         fast/dom/Window/atob-btoa.html
2342
2343         * page/DOMWindow.cpp:
2344         (WebCore::DOMWindow::atob):
2345
2346 2013-08-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2347
2348         Make DOMImplementation::hasFeature() behave according to specification
2349         https://bugs.webkit.org/show_bug.cgi?id=119329
2350
2351         Reviewed by Ryosuke Niwa.
2352
2353         Make DOMImplementation::hasFeature() behave according to the latest specification:
2354         http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
2355
2356         Specifically, the function should now return true unconditionally for any non-SVG feature.
2357         This behavior is consistent with Firefox and since recently Blink.
2358
2359         hasFeature() originally would report whether the user agent claimed to support a
2360         given DOM feature, but experience proved it was not nearly as reliable or granular
2361         as simply checking whether the desired interfaces, attributes, or methods existed.
2362         As such, it should no longer be used, but continues to exist (and simply returns
2363         true) so that old pages don't stop working.
2364
2365         No new tests, covered by existing tests.
2366
2367         * dom/DOMImplementation.cpp:
2368         (WebCore::isSupportedSVG10Feature):
2369         (WebCore::isSupportedSVG11Feature):
2370         (WebCore::DOMImplementation::hasFeature):
2371
2372 2013-08-09  Alejandro G. Castro  <alex@igalia.com>
2373
2374         [GTK] [EFL] Enable tiled shadow blur for the inset shadows.
2375         https://bugs.webkit.org/show_bug.cgi?id=119078
2376
2377         Reviewed by Martin Robinson.
2378
2379         Already covered in the tests.
2380
2381         * platform/graphics/GraphicsContext.cpp:
2382         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2383         (WebCore::fillCurrentCairoPath): Added to allow fill the path
2384         without the shadow.
2385         (WebCore::shadowAndFillCurrentCairoPath):
2386         (WebCore::GraphicsContext::fillRectWithRoundedHole): Added cairo
2387         implementation.
2388
2389 2013-08-09  Jakob Petsovits  <jpetsovits@blackberry.com>
2390
2391         [BlackBerry] Don't release the canvas Drawable, flush it directly instead.
2392         https://bugs.webkit.org/show_bug.cgi?id=119589
2393         https://jira.bbqnx.net/browse/BRWSR-12531
2394         JIRA 444857
2395
2396         Reviewed by George Staikos.
2397
2398         The previous code here used releaseBufferDrawable() to
2399         flush painted ImageBuffer contents, but then proceeded
2400         to use that released Drawable for further painting
2401         without ever locking a new one.
2402
2403         In an implementation that actually releases the Drawable
2404         rather than keeping it around and just flushing it,
2405         this will wreak havoc as bad as black screens or crashes.
2406
2407         As a solution that doesn't require the ImageBuffer object
2408         to swap out its m_canvas member for a new Drawable, we can
2409         access the PlatformGraphicsContext::flush() method directly
2410         to achieve the same effect as was previously intended by
2411         calling releaseBufferDrawable(). All it needs is letting
2412         the canvas layer know about the Drawable so it can call
2413         that flush() method by itself.
2414
2415         No new tests, verified by not crashing with an aforementioned
2416         implementation of releaseBufferDrawable().
2417
2418         * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
2419         (WebCore::CanvasLayerCompositingThreadClient::CanvasLayerCompositingThreadClient):
2420         (WebCore::CanvasLayerCompositingThreadClient::commitPendingTextureUploads):
2421         (WebCore::CanvasLayerWebKitThread::CanvasLayerWebKitThread):
2422         * platform/graphics/blackberry/CanvasLayerWebKitThread.h:
2423         (WebCore::CanvasLayerWebKitThread::create):
2424         * platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
2425         (WebCore::ImageBuffer::ImageBuffer):
2426         (WebCore::ImageBuffer::~ImageBuffer):
2427
2428 2013-08-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2429
2430         [Qt][WK2] Composited and transformed links asserts in tap highlight
2431         https://bugs.webkit.org/show_bug.cgi?id=94345
2432
2433         Reviewed by Jocelyn Turcotte.
2434
2435         Use a mapping that does not assert when hitting transforms. We still skip
2436         transforms that produces non-rectangular areas.
2437
2438         * page/GestureTapHighlighter.cpp:
2439
2440 2013-08-09  Gabor Abraham  <abrhm@inf.u-szeged.hu>
2441
2442         Buildfix. Fix warning after r153887:
2443         control reaches end of non-void function [-Werror=return-type]
2444
2445         Reviewed by Csaba Osztrogonác.
2446
2447         * svg/SVGAnimateElement.cpp:
2448         (WebCore::SVGAnimateElement::animatedPropertyTypeSupportsAddition):
2449
2450 2013-08-09  Bruno de Oliveira Abinader  <bruno.d@partner.samsung.com>
2451
2452         Text decorations should be listed as non-inheritable
2453         https://bugs.webkit.org/show_bug.cgi?id=119608
2454
2455         Reviewed by Andreas Kling.
2456
2457         Both "text-decoration" specs (CSS 2.1, CSS 3) and "text-decoration-line"
2458         spec (CSS 3) states these properties are not inherited (w/ exceptions,
2459         which are currently handled by -in-effect property), however those were
2460         listed as inherited for no reason - thus preserving behavior as shown by
2461         layout test results.
2462
2463         Backported from Blink: https://codereview.chromium.org/20751008
2464
2465         Updated getComputedStyle tests for both 'text-decoration' and
2466         'text-decoration-line' properties to check that both are not implicitly
2467         inherited.
2468
2469         * css/CSSProperty.cpp:
2470         (WebCore::CSSProperty::isInheritedProperty):
2471
2472 2013-08-09  Andreas Kling  <akling@apple.com>
2473
2474         I wish we had a Windows EWS. :(
2475
2476         * css/ElementRuleCollector.cpp:
2477         (WebCore::ElementRuleCollector::doCollectMatchingRulesForList): No range-based for today.
2478
2479 2013-08-09  Rob Buis  <rwlbuis@webkit.org>
2480
2481         ASSERT_NOT_REACHED() touched in WebCore::SVGAnimatedStringAnimator::addAnimatedTypes
2482         https://bugs.webkit.org/show_bug.cgi?id=113224
2483
2484         Reviewed by Darin Adler.
2485
2486         Do not perform from-by animations for non-additive attributes.
2487
2488         Test: svg/animations/non-additive-type-from-by-animation.html
2489
2490         * svg/SVGAnimateElement.cpp:
2491         (WebCore::SVGAnimateElement::calculateFromAndByValues):
2492         (WebCore::SVGAnimateElement::animatedPropertyTypeSupportsAddition):
2493         (WebCore::SVGAnimateElement::isAdditive):
2494         * svg/SVGAnimateElement.h:
2495
2496 2013-08-09  Rob Buis  <rwlbuis@webkit.org>
2497
2498         ASSERT(m_type == toSVGTransform.type())
2499         https://bugs.webkit.org/show_bug.cgi?id=113217
2500
2501         Reviewed by Darin Adler.
2502
2503         For to animations clear the transform list while animating and reset to it after the animation is done.
2504         This matches Firefox and Opera 12 behavior.
2505
2506         Tests: svg/animations/animateTransform-to-scale-expected.svg
2507                svg/animations/animateTransform-to-scale.svg
2508
2509         * svg/SVGAnimatedTransformList.cpp:
2510         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
2511
2512 2013-08-09  Arunprasad Rajkumar  <arurajku@cisco.com>
2513
2514         [Qt] QtWebKit should allow sending domain specific keycode to HTML applications
2515         https://bugs.webkit.org/show_bug.cgi?id=118445
2516
2517         Reviewed by Allan Sandfeld Jensen.
2518
2519         No new test required, it is covered by QtWebKit API test.
2520
2521         This fix allows sending QKeyEvent::nativeVirtualKey as the DOM KeyboardEvent keyCode value instead
2522         of Windows virtual key code. It can be enabled/disabled using "_q_useNativeVirtualKeyAsDOMKey"
2523         dynamic property present in QWebPage.
2524
2525         * platform/PlatformKeyboardEvent.h:
2526         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2527         * platform/qt/PlatformKeyboardEventQt.cpp:
2528         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2529         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2530
2531 2013-08-09  Renata Hodovan  <reni@webkit.org>
2532
2533         Missing NULL check in ApplyStyleCommand::applyInlineStyleToNodeRange()
2534         https://bugs.webkit.org/show_bug.cgi?id=119570
2535
2536         Reviewed by Ryosuke Niwa.
2537
2538         The m_mutableStyleSet of EditingStyle can be NULL in ApplyStyleCommand::applyInlineStyleToNodeRange but
2539         this scenario was not checked earlier.
2540
2541         Test: editing/execCommand/null-style-crash.html
2542
2543         * css/StylePropertySet.cpp:
2544         (WebCore::MutableStylePropertySet::mergeAndOverrideOnConflict):
2545         * css/StylePropertySet.h:
2546         * css/ViewportStyleResolver.cpp:
2547         (WebCore::ViewportStyleResolver::addViewportRule):
2548         * editing/ApplyStyleCommand.cpp:
2549         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
2550         * editing/EditingStyle.cpp:
2551         (WebCore::styleFromMatchedRulesForElement):
2552         (WebCore::EditingStyle::mergeStyleFromRules):
2553         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
2554
2555 2013-08-09  Andreas Kling  <akling@apple.com>
2556
2557         ElementRuleCollector: Use range-based for syntax in rule collection loop.
2558         <http://webkit.org/b/119617>
2559         <rdar://problem/14695311>
2560
2561         Reviewed by Antti Koivisto.
2562
2563         * css/ElementRuleCollector.cpp:
2564         (WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
2565
2566 2013-08-09  Andreas Kling  <akling@apple.com>
2567
2568         StyleRule*::properties() should return const references.
2569         <http://webkit.org/b/119596>
2570
2571         Reviewed by Antti Koivisto.
2572
2573         Make StyleRule::properties() & friends return const-references instead of
2574         pointers. This exposed some pointless null checking, since rules should
2575         always have properties.
2576
2577         All rule objects that contain properties now require a StylePropertySet at
2578         the time of construction instead having you call setProperties() later.
2579
2580         The only rules that could ever have null properties were the default-inserted
2581         animation keyframe rules for 0% and 100% that we'd conjure up if the author
2582         didn't provide them. Now they just have an empty property set instead.
2583
2584         * css/CSSFontFaceRule.cpp:
2585         (WebCore::CSSFontFaceRule::cssText):
2586         * css/CSSFontSelector.cpp:
2587         (WebCore::CSSFontSelector::addFontFaceRule):
2588         * css/CSSPageRule.cpp:
2589         (WebCore::CSSPageRule::cssText):
2590         * css/CSSParser.cpp:
2591         (WebCore::CSSParser::createFilterRule):
2592         (WebCore::CSSParser::createStyleRule):
2593         (WebCore::CSSParser::createFontFaceRule):
2594         (WebCore::CSSParser::rewriteSpecifiers):
2595         * css/CSSStyleRule.cpp:
2596         (WebCore::CSSStyleRule::cssText):
2597         * css/ElementRuleCollector.cpp:
2598         (WebCore::leftToRightDeclaration):
2599         (WebCore::rightToLeftDeclaration):
2600         (WebCore::ElementRuleCollector::addElementStyleProperties):
2601         (WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
2602         * css/PageRuleCollector.cpp:
2603         (WebCore::PageRuleCollector::matchPageRulesForList):
2604         * css/StylePropertySet.cpp:
2605         (WebCore::MutableStylePropertySet::mergeAndOverrideOnConflict):
2606         * css/StylePropertySet.h:
2607         * css/StyleResolver.cpp:
2608         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
2609         (WebCore::StyleResolver::styleForKeyframe):
2610         (WebCore::StyleResolver::keyframeStylesForAnimation):
2611         * css/StyleResolver.h:
2612         * css/StyleRule.cpp:
2613         (WebCore::StyleRule::StyleRule):
2614         (WebCore::StyleRule::create):
2615         (WebCore::StyleRulePage::StyleRulePage):
2616         (WebCore::StyleRuleFontFace::StyleRuleFontFace):
2617         (WebCore::StyleRuleViewport::StyleRuleViewport):
2618         (WebCore::StyleRuleViewport::mutableProperties):
2619         (WebCore::StyleRuleFilter::StyleRuleFilter):
2620         * css/StyleRule.h:
2621         (WebCore::StyleRule::create):
2622         (WebCore::StyleRule::properties):
2623         (WebCore::StyleRuleFontFace::create):
2624         (WebCore::StyleRuleFontFace::properties):
2625         (WebCore::StyleRulePage::create):
2626         (WebCore::StyleRulePage::properties):
2627         (WebCore::StyleRuleViewport::create):
2628         (WebCore::StyleRuleViewport::properties):
2629         (WebCore::StyleRuleFilter::create):
2630         (WebCore::StyleRuleFilter::properties):
2631         * css/StyleSheetContents.cpp:
2632         (WebCore::StyleSheetContents::addSubresourceStyleURLs):
2633         (WebCore::childRulesHaveFailedOrCanceledSubresources):
2634         * css/WebKitCSSFilterRule.cpp:
2635         (WebCore::WebKitCSSFilterRule::cssText):
2636         * css/WebKitCSSKeyframeRule.cpp:
2637         (WebCore::StyleKeyframe::StyleKeyframe):
2638         (WebCore::StyleKeyframe::mutableProperties):
2639         * css/WebKitCSSKeyframeRule.h:
2640         (WebCore::StyleKeyframe::create):
2641         (WebCore::StyleKeyframe::properties):
2642         * css/WebKitCSSViewportRule.cpp:
2643         (WebCore::WebKitCSSViewportRule::cssText):
2644         * editing/ApplyStyleCommand.cpp:
2645         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
2646         * editing/EditingStyle.cpp:
2647         (WebCore::EditingStyle::mergeStyleFromRules):
2648         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
2649         * inspector/InspectorStyleSheet.cpp:
2650         (WebCore::InspectorStyleSheet::revalidateStyle):
2651         * page/PageSerializer.cpp:
2652         (WebCore::PageSerializer::retrieveResourcesForRule):
2653         * svg/SVGFontFaceElement.cpp:
2654         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
2655         (WebCore::SVGFontFaceElement::fontFamily):
2656         (WebCore::SVGFontFaceElement::rebuildFontFace):
2657
2658 2013-08-09  Julien Brianceau  <jbrianceau@nds.com>
2659
2660         [Qt] Fix build (broken by changeset r153826).
2661         https://bugs.webkit.org/show_bug.cgi?id=119616
2662
2663         Reviewed by Andreas Kling.
2664
2665         * xml/parser/XMLDocumentParserQt.cpp:
2666         (WebCore::XMLDocumentParser::XMLDocumentParser):
2667
2668 2013-08-08  Tim Horton  <timothy_horton@apple.com>
2669
2670         navigator.plugins has plugins in it when plugins are disabled
2671         https://bugs.webkit.org/show_bug.cgi?id=119607
2672         <rdar://problem/14678030>
2673
2674         Reviewed by Anders Carlsson.
2675
2676         Test: plugins/navigator-plugins-disabled.html
2677
2678         * page/Settings.cpp:
2679         (WebCore::Settings::setPluginsEnabled):
2680         Refresh the plugin database when plugins are enabled or disabled.
2681         This is necessary to ensure that navigator.plugins will have the
2682         correct set of plugins after dynamically changing whether plugins
2683         are enabled, which makes the test for this patch possible (but it
2684         makes sense in the browser as well).
2685
2686 2013-08-08  Timothy Hatcher  <timothy@apple.com>
2687
2688         Allow SVG images to be drawn into canvas without tainting.
2689         https://bugs.webkit.org/show_bug.cgi?id=119492
2690
2691         Reviewed by Darin Adler.
2692
2693         Tests: svg/as-image/svg-canvas-not-tainted.html
2694                svg/as-image/svg-canvas-link-not-colored.html
2695                svg/as-image/svg-canvas-xhtml-tainted.html
2696
2697         * html/HTMLAnchorElement.cpp:
2698         (WebCore::HTMLAnchorElement::parseAttribute): Call shouldProhibitLinks.
2699         (WebCore::shouldProhibitLinks): Added.
2700         * html/HTMLAnchorElement.h:
2701         * html/HTMLImageElement.cpp:
2702         (WebCore::HTMLImageElement::parseAttribute): Call shouldProhibitLinks.
2703         * rendering/svg/RenderSVGRoot.cpp:
2704         (WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage): Use isInSVGImage.
2705         * svg/SVGAElement.cpp:
2706         (WebCore::SVGAElement::svgAttributeChanged): Call shouldProhibitLinks.
2707         * svg/graphics/SVGImage.cpp:
2708         (WebCore::SVGImage::hasSingleSecurityOrigin): Added.
2709         (WebCore::isInSVGImage): Added.
2710         * svg/graphics/SVGImage.h:
2711
2712 2013-08-08  Simon Fraser  <simon.fraser@apple.com>
2713
2714         Fix ASSERT(m_contentsSolidColor.isValid()) assertion on iOS at nytimes.com
2715         https://bugs.webkit.org/show_bug.cgi?id=119603
2716
2717         Reviewed by Dean Jackson.
2718
2719         On iOS it's possible for a GraphicsLayer to transition between having
2720         a solid background color, and containing media. This happens on nytimes.com
2721         when playing video.
2722         
2723         In this case, GraphicsLayerCA::updateContentsColorLayer() would assert
2724         because m_contentsLayer had been already set up to contain media, but
2725         it would be trying to update the color.
2726         
2727         Fix by bailing from all the updateContents* functions if there is no
2728         contents layer, or that layer exists for a different purpose.
2729
2730         * platform/graphics/ca/GraphicsLayerCA.cpp:
2731         (WebCore::GraphicsLayerCA::updateContentsMediaLayer):
2732         (WebCore::GraphicsLayerCA::updateContentsCanvasLayer):
2733         (WebCore::GraphicsLayerCA::updateContentsColorLayer):
2734
2735 2013-08-08  Commit Queue  <commit-queue@webkit.org>
2736
2737         Unreviewed, rolling out r153847.
2738         http://trac.webkit.org/changeset/153847
2739         https://bugs.webkit.org/show_bug.cgi?id=119609
2740
2741         caused new SVG animation test failures (Requested by smfr on
2742         #webkit).
2743
2744         * svg/SVGAnimateElement.cpp:
2745         (WebCore::SVGAnimateElement::calculateFromAndByValues):
2746
2747 2013-08-08  Simon Fraser  <simon.fraser@apple.com>
2748
2749         Kill updateStyleForAllDocuments()
2750         https://bugs.webkit.org/show_bug.cgi?id=118093
2751
2752         Reviewed by Geoff Garen.
2753
2754         We should never have to eagerly update style, especially for all documents
2755         that the process knows about. The WebKit model is to update style when
2756         required for layout etc, not to update it eagerly.
2757         
2758         This is historical code whose origins are lost in the mists of KHTML.
2759         r42384 makes it possible to do away with this eager updating, and
2760         r55568 removed some calls. Discussion in bug 32580 suggests that
2761         form control code still need this, but tests still pass without it.
2762
2763         * bindings/js/JSCallbackData.cpp:
2764         (WebCore::JSCallbackData::invokeCallback):
2765         * bindings/js/JSCustomXPathNSResolver.cpp:
2766         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2767         * dom/Document.cpp:
2768         (WebCore::Document::scheduleStyleRecalc):
2769         (WebCore::Document::unscheduleStyleRecalc):
2770         * dom/Document.h:
2771         * dom/Element.cpp:
2772         (WebCore::Element::setActive):
2773
2774 2013-08-08  Jer Noble  <jer.noble@apple.com>
2775
2776         [EME] MediaKey APIs should be prefixed.
2777         https://bugs.webkit.org/show_bug.cgi?id=119606
2778
2779         Reviewed by Anders Carlsson.
2780
2781         No new tests; updated exsisting tests with new names.
2782
2783         Prefix all new classes with "WebKit" and new methods on existing unprefixed
2784         classes with "webkit"
2785
2786         * Modules/encryptedmedia/MediaKeyMessageEvent.idl: MediaKeyMessageEvent -> WebKitMediaKeyMessageEvent
2787         * Modules/encryptedmedia/MediaKeySession.idl: MediaKeySession -> WebKitMediaKeySession
2788         * Modules/encryptedmedia/MediaKeys.idl: MediaKeys -> WebKitMediaKeys
2789         * html/HTMLMediaElement.idl: keys -> webkitKeys, setMediaKeys -> webkitSetMediaKeys
2790         * html/MediaKeyError.idl: MediaKeyError -> WebKitMediaKeyError
2791
2792 2013-08-08  Jer Noble  <jer.noble@apple.com>
2793
2794         [EME] setMediaKeys function as defined in the EME specification does not work
2795         https://bugs.webkit.org/show_bug.cgi?id=119597
2796
2797         Reviewed by Anders Carlsson.
2798
2799         No new tests; updated media/encrypted-media/encrypted-media-v2-syntax.html
2800
2801         Rename the mediaKeys attribute 'keys' and make readonly, and add an explicit
2802         setMediaKeys() method in HTMLMediaElement's IDL.
2803
2804         * html/HTMLMediaElement.h:
2805         (WebCore::HTMLMediaElement::keys):
2806         * html/HTMLMediaElement.idl:
2807
2808 2013-08-06  Sam Weinig  <sam@webkit.org>
2809
2810         Hashing SecurityOrigin's can lead to trouble if you mutate them :(
2811         https://bugs.webkit.org/show_bug.cgi?id=119533
2812         <rdar://problem/12978338>
2813
2814         Reviewed by Andreas Kling.
2815
2816         We are getting into trouble in the following circumstance:
2817         - You have a HashMap<RefPtr<SecurityOrigin>, Value> map.
2818         - You add security origin A (http, www.webkit.org, 80) to the map.
2819         - You mutate security origin A by domain relaxation, so that it has the domain webkit.org.
2820         - You add security origin B (http, www.webkit.org, 80) to the map.
2821         - You mutate security origin B by domain relaxation, so that it has the domain webkit.org.
2822             You now have two identical keys in the map.
2823         - Add few more items to the map causing a rehash.
2824         - When you try to add A and B back into the map, you will have a collision, because they now equal each other.
2825
2826         We should probably stop using SecurityOrigins as keys in HashMaps (and move to using a non-mutable SecurityOriginTuple,
2827         or something), but for now, we can just only use the scheme / host / port part for equality, which is what all the users
2828         really want.
2829
2830         * page/SecurityOriginHash.h:
2831         (WebCore::SecurityOriginHash::equal):
2832         Switch to using isSameSchemeHostPort() for SecurityOriginHash::equal().
2833
2834 2013-08-08  Rob Buis  <rwlbuis@webkit.org>
2835
2836         ASSERT_NOT_REACHED() touched in WebCore::SVGAnimatedStringAnimator::addAnimatedTypes
2837         https://bugs.webkit.org/show_bug.cgi?id=113224
2838
2839         Reviewed by Dirk Schulze.
2840
2841         Do not perform from-by animations for non-additive attributes.
2842
2843         Test: svg/animations/non-additive-type-from-by-animation.html
2844
2845         * svg/SVGAnimateElement.cpp:
2846         (WebCore::SVGAnimateElement::calculateFromAndByValues):
2847
2848 2013-08-08  Brent Fulgham  <bfulgham@apple.com>
2849
2850         [Windows] Improper Caption Button Displayed to Users
2851         https://bugs.webkit.org/show_bug.cgi?id=119593 
2852
2853         Reviewed by Eric Carlson.
2854
2855         Remove the custom drawing code for the Windows port, and
2856         have it render using the CSS/SVG markup like we do on OS X.
2857
2858         * rendering/RenderThemeWin.cpp: Remove drawing code.
2859         * rendering/RenderThemeWin.h: Remove declaration.
2860
2861 2013-08-08  Alex Christensen  <achristensen@apple.com>
2862
2863         Work towards WebGL on AppleWin port.
2864         https://bugs.webkit.org/show_bug.cgi?id=119562
2865
2866         Reviewed by Brent Fulgham.
2867
2868         * WebCore.vcxproj/WebCore.vcxproj:
2869         Build GLContext.cpp and GraphicsContext3DPrivate.cpp on AppleWin port.
2870         * WebCore.vcxproj/WebCore.vcxproj.filters:
2871         Moved GLContext and GraphicsContext3DPrivate from Cairo filter to graphics.
2872         * platform/graphics/GraphicsContext3D.h:
2873         Added m_webGLLayer for AppleWin port.
2874         * platform/graphics/GraphicsContext3DPrivate.cpp:
2875         Protected inclusion of PlatformContextCairo.h in USE(CAIRO) macro for non-cairo ports.
2876         * platform/graphics/win/GraphicsContext3DWin.cpp:
2877         Removed stub GraphicsContext3DPrivate implementation in favor of GraphicsContext3DPrivate.cpp.
2878         (WebCore::GraphicsContext3D::GraphicsContext3D):
2879         Added GraphicsContext3DPrivate and PlatformCALayer initialization.
2880         (WebCore::GraphicsContext3D::makeContextCurrent):
2881         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
2882         Added implementation based on Cairo ports' to be refactored soon.
2883         (WebCore::GraphicsContext3D::platformLayer):
2884         Return PlatformCALayer's PlatformLayer instead of 0.
2885
2886 2013-08-08  Jer Noble  <jer.noble@apple.com>
2887
2888         [EME] Implement MediaKeys.isTypeSupported()
2889         https://bugs.webkit.org/show_bug.cgi?id=119586
2890
2891         Reviewed by Eric Carlson.
2892
2893         Test: media/encrypted-media/encrypted-media-is-type-supported.html
2894
2895         The EME spec has removed the extra keySystem parameter from
2896         HTMLMediaElement.canPlayType() in favor of a new isTypeSupported()
2897         method on MediaKeys.
2898
2899         To implement this method, the CDMFactory needs to know whether the
2900         registered CDM supports the specified mime type.  CDMs must register
2901         this new factory method, which requires changes to CDMPrivateAVFoundation
2902         and MockCDM.
2903
2904         Add the new MediaKeys.isTypeSupported() method:
2905         * Modules/encryptedmedia/MediaKeys.cpp:
2906         (WebCore::MediaKeys::isTypeSupported):
2907         * Modules/encryptedmedia/MediaKeys.h:
2908         * Modules/encryptedmedia/MediaKeys.idl:
2909
2910         Add the new factory CDMSupportsKeySystemAndMimeType method:
2911         * Modules/encryptedmedia/CDM.cpp:
2912         (WebCore::CDMFactory::CDMFactory): Now takes a third parameter.
2913         (WebCore::installedCDMFactories): When adding the AVFoundation CDM, pass its new method.
2914         (WebCore::CDM::registerCDMFactory): Now takes a third parameter.
2915         (WebCore::CDM::keySystemSupportsMimeType): Added.
2916         * Modules/encryptedmedia/CDM.h:
2917         * WebCore.exp.in:
2918
2919         Register this new method with the factory for all concrete CDMs:
2920         * Modules/encryptedmedia/CDMPrivateAVFoundation.h:
2921         * Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
2922         (WebCore::CDMPrivateAVFoundation::supportsKeySystem):
2923         (WebCore::CDMPrivateAVFoundation::supportsKeySystemAndMimeType):
2924         * testing/Internals.cpp:
2925         (WebCore::Internals::initializeMockCDM):
2926         * testing/MockCDM.cpp:
2927         (WebCore::MockCDM::supportsKeySystem):
2928         (WebCore::MockCDM::supportsKeySystemAndMimeType):
2929         * testing/MockCDM.h:
2930
2931 2013-08-08  Rob Buis  <rwlbuis@webkit.org>
2932
2933         Crash in WTF::RefPtr<WebCore::SpaceSplitStringData>::operator UnspecifiedBoolType
2934         https://bugs.webkit.org/show_bug.cgi?id=118839
2935
2936         Reviewed by Darin Adler.
2937
2938         Take into account that elementData() can be null in classAttributeChanged.
2939
2940         Test: svg/animations/classAttributeSettingCrash.html
2941
2942         * dom/Element.cpp:
2943         (WebCore::Element::classAttributeChanged):
2944
2945 2013-08-08  Robert Hogan  <robert@webkit.org>
2946
2947         REGRESSION(r147019): Page has extra space
2948         https://bugs.webkit.org/show_bug.cgi?id=119424
2949
2950         Reviewed by David Hyatt.
2951
2952         Clear the overflow rect before recomputing it in table sections.
2953
2954         No new tests: the reduction uses jquery and I was unable to simulate the reduction without it.
2955
2956         * rendering/RenderTableSection.cpp:
2957         (WebCore::RenderTableSection::layoutRows):
2958         (WebCore::RenderTableSection::computeOverflowFromCells):
2959
2960 2013-08-08  Andreas Kling  <akling@apple.com>
2961
2962         Inserting multiple rules into an empty style sheet should avoid style recalc if possible.
2963         <http://webkit.org/b/119568>
2964
2965         Reviewed by Antti Koivisto.
2966
2967         As a follow-up to <http://webkit.org/b/119475>, where I added a hack for inserting
2968         a single rule into an empty style sheet, this broadens the optimization to support
2969         any number of rules.
2970
2971         This optimizes the scenario where a style sheet is added to the DOM and then populated
2972         rule-by-rule via CSSOM insertRule()/addRule() calls. Previously we'd do a full style
2973         recalc for this case, but now we'll treat it the same as a full sheet added at once.
2974
2975         * css/CSSStyleSheet.h:
2976         * css/CSSStyleSheet.cpp:
2977         (WebCore::CSSStyleSheet::willMutateRules):
2978
2979             Made willMutateRules() return whether the style sheet contents were cloned by the
2980             copy-on-write mechanism.
2981
2982         * dom/Document.h:
2983         (WebCore::CSSStyleSheet::didMutateRules):
2984         (WebCore::CSSStyleSheet::insertRule):
2985
2986             Replaced the InsertionIntoEmptySheet mutation type by a general RuleInsertion.
2987             The mutation callback checks if we're inserting into a rule that's not (yet) part
2988             of the document's active sheet set. In that case, we defer doing the style sheet
2989             until all the insertions are done (or something forces us to style+layout.)
2990
2991             Note that this optimization only happens if the style sheet had a single client.
2992             Shared style sheets that just got cloned before mutation may have pointers into
2993             them from the Document's StyleResolver, so we're forced to do an immediate sheet
2994             update in that case.
2995
2996         (WebCore::CSSStyleSheet::RuleMutationScope::RuleMutationScope):
2997         (WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):
2998
2999             Moved these out-of-line.
3000
3001         (WebCore::CSSStyleSheet::didMutateRuleFromCSSStyleDeclaration):
3002         * css/PropertySetCSSStyleDeclaration.cpp:
3003         (WebCore::StyleRuleCSSStyleDeclaration::didMutate):
3004
3005             Made a separate mutation callback for CSSStyleDeclaration since its needs are
3006             so simple compared to the mutation callback from CSSStyleSheet. Seems better
3007             than adding yet another mode to the enum.
3008
3009         * dom/Document.cpp:
3010         (WebCore::Document::Document):
3011         (WebCore::Document::recalcStyle):
3012         (WebCore::Document::styleResolverChanged):
3013         (WebCore::Document::optimizedStyleSheetUpdateTimerFired):
3014         (WebCore::Document::scheduleOptimizedStyleSheetUpdate):
3015
3016             Added mechanism to defer doing a RecalcStyleIfNeeded.
3017
3018         (WebCore::Document::updateStyleIfNeeded):
3019
3020             Synchronize the optimized style sheet update if there's one scheduled.
3021             This ensures that stuff like layout-dependent property access won't operate
3022             on stale style.
3023
3024         * dom/DocumentStyleSheetCollection.h:
3025         (WebCore::DocumentStyleSheetCollection::pendingUpdateType):
3026         (WebCore::DocumentStyleSheetCollection::setPendingUpdateType):
3027         (WebCore::DocumentStyleSheetCollection::flushPendingUpdates):
3028         * dom/DocumentStyleSheetCollection.cpp:
3029         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
3030         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
3031
3032             Have DSSC track the kind of style sheet update it needs to do (instead of just
3033             a boolean "needs update.") This is used by Document::recalcStyle() to make sure
3034             the right kind of update happens if there's one scheduled.
3035
3036         (WebCore::DocumentStyleSheetCollection::activeStyleSheetsContains):
3037
3038             Added helper to check if a CSSStyleSheet is part of the active set.
3039
3040 2013-08-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3041
3042         [WK1] NPStream::headers not initialized
3043         https://bugs.webkit.org/show_bug.cgi?id=119574
3044
3045         Reviewed by Alexey Proskuryakov.
3046
3047         Initialize the header field. According to user feedback that should solve some
3048         cases of random crashes when loading plugins on Mac and Windows.
3049
3050         * plugins/PluginStream.cpp:
3051         (WebCore::PluginStream::PluginStream):
3052
3053 2013-08-08  Andreas Kling  <akling@apple.com>
3054
3055         Element: Modernize attribute storage accessor functions.
3056         <http://webkit.org/b/119578>
3057
3058         Reviewed by Antti Koivisto.
3059
3060         Rename these functions to more WebKit-style names.
3061
3062         - const Attribute* attributeItem(index) => const Attribute& attributeAt(index)
3063         - const Attribute* getAttributeItem(name) => const Attribute* findAttributeByName(name)
3064         - unsigned getAttributeItemIndex(name) => unsigned findAttributeIndexByName(name)
3065
3066         Note that attributeAt() now returns a reference instead of a pointer. That's right.
3067
3068         * css/SelectorChecker.cpp:
3069         (WebCore::attributeValueMatches):
3070         (WebCore::anyAttributeMatches):
3071         * css/SelectorChecker.h:
3072         (WebCore::SelectorChecker::checkExactAttribute):
3073         * dom/Attr.cpp:
3074         (WebCore::Attr::elementAttribute):
3075         * dom/DatasetDOMStringMap.cpp:
3076         (WebCore::DatasetDOMStringMap::getNames):
3077         (WebCore::DatasetDOMStringMap::item):
3078         (WebCore::DatasetDOMStringMap::contains):
3079         * dom/Element.cpp:
3080         (WebCore::Element::detachAttribute):
3081         (WebCore::Element::removeAttribute):
3082         (WebCore::Element::getAttribute):
3083         (WebCore::Element::setAttribute):
3084         (WebCore::Element::setSynchronizedLazyAttribute):
3085         (WebCore::Element::setAttributeInternal):
3086         (WebCore::Element::setAttributeNode):
3087         (WebCore::Element::removeAttributeNode):
3088         (WebCore::Element::removeAttributeInternal):
3089         (WebCore::Element::getAttributeNode):
3090         (WebCore::Element::getAttributeNodeNS):
3091         (WebCore::Element::hasAttribute):
3092         (WebCore::Element::hasAttributeNS):
3093         (WebCore::Element::computeInheritedLanguage):
3094         (WebCore::Element::normalizeAttributes):
3095         (WebCore::Element::getURLAttribute):
3096         (WebCore::Element::getNonEmptyURLAttribute):
3097         (WebCore::Element::detachAllAttrNodesFromElement):
3098         (WebCore::Element::cloneAttributesFromElement):
3099         (WebCore::ElementData::isEquivalent):
3100         (WebCore::ElementData::findAttributeIndexByNameSlowCase):
3101         (WebCore::ElementData::findAttributeIndexByNameForAttributeNode):
3102         (WebCore::UniqueElementData::findAttributeByName):
3103         (WebCore::UniqueElementData::attributeAt):
3104         * dom/Element.h:
3105         (WebCore::Element::findAttributeIndexByName):
3106         (WebCore::Element::fastHasAttribute):
3107         (WebCore::Element::fastGetAttribute):
3108         (WebCore::Element::attributeAt):
3109         (WebCore::Element::findAttributeByName):
3110         (WebCore::ElementData::findAttributeByName):
3111         (WebCore::ElementData::findAttributeIndexByName):
3112         (WebCore::ElementData::attributeAt):
3113         * dom/NamedNodeMap.cpp:
3114         (WebCore::NamedNodeMap::removeNamedItem):
3115         (WebCore::NamedNodeMap::removeNamedItemNS):
3116         (WebCore::NamedNodeMap::item):
3117         * dom/Node.cpp:
3118         (WebCore::Node::dumpStatistics):
3119         (WebCore::Node::isDefaultNamespace):
3120         (WebCore::Node::lookupNamespaceURI):
3121         (WebCore::Node::lookupNamespacePrefix):
3122         (WebCore::Node::compareDocumentPosition):
3123         * dom/StyledElement.cpp:
3124         (WebCore::StyledElement::makePresentationAttributeCacheKey):
3125         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
3126         * editing/MarkupAccumulator.cpp:
3127         (WebCore::MarkupAccumulator::appendElement):
3128         * editing/markup.cpp:
3129         (WebCore::completeURLs):
3130         (WebCore::StyledMarkupAccumulator::appendElement):
3131         * html/HTMLEmbedElement.cpp:
3132         (WebCore::HTMLEmbedElement::parametersForPlugin):
3133         * html/HTMLInputElement.cpp:
3134         (WebCore::HTMLInputElement::updateType):
3135         * html/HTMLObjectElement.cpp:
3136         (WebCore::HTMLObjectElement::parametersForPlugin):
3137         * html/HTMLSelectElement.cpp:
3138         (WebCore::HTMLSelectElement::parseAttribute):
3139         * html/parser/HTMLConstructionSite.cpp:
3140         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
3141         * inspector/DOMPatchSupport.cpp:
3142         (WebCore::DOMPatchSupport::innerPatchNode):
3143         (WebCore::DOMPatchSupport::createDigest):
3144         * inspector/InspectorDOMAgent.cpp:
3145         (WebCore::InspectorDOMAgent::setAttributesAsText):
3146         (WebCore::InspectorDOMAgent::performSearch):
3147         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
3148         * page/PageSerializer.cpp:
3149         (WebCore::isCharsetSpecifyingNode):
3150         * svg/SVGStyledElement.cpp:
3151         (WebCore::SVGStyledElement::getPresentationAttribute):
3152         * xml/XPathFunctions.cpp:
3153         (WebCore::XPath::FunLang::evaluate):
3154         * xml/XPathNodeSet.cpp:
3155         (WebCore::XPath::NodeSet::traversalSort):
3156         * xml/XPathStep.cpp:
3157         (WebCore::XPath::Step::nodesInAxis):
3158         * xml/parser/XMLDocumentParserLibxml2.cpp:
3159         (WebCore::XMLDocumentParser::XMLDocumentParser):
3160         * xml/parser/XMLDocumentParserQt.cpp:
3161         (WebCore::XMLDocumentParser::XMLDocumentParser):
3162
3163 2013-08-08  Mark Lam  <mark.lam@apple.com>
3164
3165         Restoring use of StackIterator instead of Interpreter::getStacktrace().
3166         https://bugs.webkit.org/show_bug.cgi?id=119575.
3167
3168         Reviewed by Oliver Hunt.
3169
3170         No new tests.
3171
3172         * bindings/js/ScriptCallStackFactory.cpp:
3173         (WebCore::createScriptCallStack):
3174
3175 2013-08-08  Zalan Bujtas  <zalan@apple.com>
3176
3177         REGRESSION (r121551) Incorrect handling of invalid media query list.
3178         https://bugs.webkit.org/show_bug.cgi?id=119164
3179
3180         Reviewed by Antti Koivisto.
3181
3182         Differentiate between syntactically invalid media queries and media queries with empty expressions.
3183
3184         Introduce a dedicated function for valid, but empty expression queries, so that passing NULL MediaQuerySet
3185         object to CSSParser::createMediaRule() can indicate invalid media query.
3186
3187         Test: fast/media/invalid-media-query-list.html
3188
3189         * css/CSSGrammar.y.in:
3190         * css/CSSParser.cpp:
3191         (WebCore::CSSParser::createMediaRule):
3192         (WebCore::CSSParser::createEmptyMediaRule):
3193         * css/CSSParser.h:
3194
3195 2013-08-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3196
3197         Introduce toSVGMPathElement(), and use it
3198         https://bugs.webkit.org/show_bug.cgi?id=119566
3199
3200         Reviewed by Andreas Kling.
3201
3202         As a step to change static_cast with toSVGXXX, static_cast<SVGMPathElement*> can
3203         be changed with toSVGMPathElement().
3204
3205         * svg/SVGAnimateMotionElement.cpp:
3206         (WebCore::SVGAnimateMotionElement::updateAnimationPath):
3207         * svg/SVGMPathElement.h:
3208         (WebCore::toSVGMPathElement):
3209         * svg/SVGPathElement.cpp:
3210         (WebCore::SVGPathElement::invalidateMPathDependencies):
3211
3212 2013-08-08  Antti Koivisto  <antti@apple.com>
3213
3214         Move more style recalc code to StyleResolveTree.cpp
3215         https://bugs.webkit.org/show_bug.cgi?id=119553
3216
3217         Reviewed by Andreas Kling.
3218
3219         * css/StyleResolver.cpp:
3220         * css/StyleResolver.h:
3221         
3222             Remove now unused StyleResolver::styleForText.
3223
3224         * dom/ElementShadow.cpp:
3225         * dom/ElementShadow.h:
3226         
3227             Remove ElementShadow::recalcStyle.
3228
3229         * dom/ShadowRoot.cpp:
3230         (WebCore::ShadowRoot::setResetStyleInheritance):
3231         
3232             Use Style::resolveTree instead of ElementShadow::recalcStyle.
3233
3234         * dom/ShadowRoot.h:
3235         
3236             Remove ShadowRoot::recalcStyle.
3237
3238         * dom/Text.cpp:
3239         * dom/Text.h:
3240         
3241             Remove Text::recalcTextStyle.
3242
3243         * style/StyleResolveTree.cpp:
3244         (WebCore::Style::updateTextStyle):
3245         
3246             Moved from Text::recalcTextStyle. Speed up by just setting the parent style on common case.
3247
3248         (WebCore::Style::resolveShadowTree):
3249         
3250             Moved from ShadowRoot::recalcStyle. 
3251             Simplified to cover only cases that can occur with the current shadow DOM support.
3252
3253         (WebCore::Style::resolveTree):
3254
3255 2013-08-08  Andreas Kling  <akling@apple.com>
3256
3257         REGRESSION(r139282): Old caret sometimes gets "stuck" (not repainted) in contenteditable elements.
3258         <http://webkit.org/b/119520>
3259         <rdar://problem/14658929>
3260
3261         Reviewed by Simon Fraser.
3262
3263         When computing a new caret rect, don't forget to repaint the old rect if the caret jumped
3264         from one node to another.
3265         We were being a little too clever, assuming that oldRect==newRect meant that no repaint was
3266         necessary, but moving from (0,0) in one node to (0,0) in another would cause a ghost caret
3267         in the old node.
3268
3269         Test: fast/repaint/caret-jump-between-nodes.html
3270
3271         * editing/FrameSelection.cpp:
3272         (WebCore::FrameSelection::recomputeCaretRect):
3273
3274             Fall through all the way down to caret repaints if the selection's new anchor node is not
3275             the same as m_previousCaretNode.
3276
3277 2013-08-07  Andrei Bucur  <abucur@adobe.com>
3278
3279         [CSS Regions] Propagate overflow from the flow thread to the first and last region
3280         https://bugs.webkit.org/show_bug.cgi?id=118526
3281
3282         Reviewed by David Hyatt.
3283
3284         The patch implements layout overflow propagation for the first and last regions. The approach
3285         taken is triggering a simple layout on the regions after the named flows are laid out
3286         that extracts the layout overflow from the flow thread and adds it to the regions.
3287
3288         The process is based on adding two new layout phases: the overflow phase and the final phase.
3289         The overflow phase is set after the flow threads are laid out and it marks the regions as
3290         needing to extract the overflow from the flow thread. In case there are blocks with auto overflow
3291         it's possible the overflow to create scrollbars that shrink the regions. In this case the flow
3292         thread is relaid out and set in the final phase, forcing the regions to recollect the layout
3293         overflow. In theory this would be an N-step layout because scrollbars can force content to change
3294         regions and create overflow for other blocks (and thus creating more scrollbars). For now, we are
3295         limiting this to the first pass by inserting this new final layout phase.
3296
3297         A short description of the processing model for a document:
3298         - layout the document (all the flow threads should be in the constrained layout phase after this step)
3299         - reverse iterate through the flow threads and mark the regions for simplified layout (we need to
3300         reverse iterate so the overflow can correctly propagate with nested regions)
3301         - if the layout changes the size of a region, invalidate the flow thread and when laying it out mark
3302         it as needing a new pass
3303         - make a secondary pass through the flow threads that changed after scrollbars have been added and
3304         recompute the overflow for their regions; mark the flow threads in the final phase (flow threads can't
3305         be invalidated in the final phase)
3306         - after the overflow was propagated update all the flow threads in the normal layout phase
3307
3308         There are some issues with the patch:
3309         - the simplified layout doesn't compute correct overflow values for inline blocks
3310         - the layout overflow from the flow thread doesn't take the region size into account
3311
3312         The first issue is not related to regions and will be fixed in a future patch. The second issue
3313         will be fixed when box overflow will be region bound.
3314
3315         Tests: fast/regions/overflow-scrollable-1.html
3316                fast/regions/overflow-scrollable-2.html
3317                fast/regions/overflow-scrollable-3.html
3318                fast/regions/overflow-scrollable-fit-complex.html
3319                fast/regions/overflow-scrollable-fit.html
3320                fast/regions/overflow-scrollable-nested.html
3321
3322         * rendering/FlowThreadController.cpp: Flow threads layout driver functions.
3323         (WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
3324         (WebCore::FlowThreadController::updateFlowThreadsIntoConstrainedPhase):
3325         (WebCore::FlowThreadController::updateFlowThreadsIntoOverflowPhase):
3326         (WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
3327         (WebCore::FlowThreadController::updateFlowThreadsIntoFinalPhase):
3328         * rendering/FlowThreadController.h:
3329         * rendering/RenderBlock.cpp:
3330         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
3331         * rendering/RenderFlowThread.cpp:
3332         (WebCore::RenderFlowThread::RenderFlowThread):
3333         (WebCore::RenderFlowThread::invalidateRegions):
3334         (WebCore::RenderFlowThread::validateRegions):
3335         (WebCore::RenderFlowThread::layout):
3336         (WebCore::RenderFlowThread::firstRegion): This getter should work even though the region chain is invalid.
3337         (WebCore::RenderFlowThread::lastRegion): This getter should work even though the region chain is invalid.
3338         (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
3339         (WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded): If the flow thread has no overflow do nothing.
3340         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
3341         (WebCore::RenderFlowThread::addForcedRegionBreak):
3342         * rendering/RenderFlowThread.h:
3343         * rendering/RenderMultiColumnSet.cpp:
3344         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
3345         * rendering/RenderRegion.cpp:
3346         (WebCore::RenderRegion::pageLogicalHeight):
3347         (WebCore::RenderRegion::maxPageLogicalHeight):
3348         (WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
3349         (WebCore::RenderRegion::flowThreadPortionOverflowRect):
3350         (WebCore::RenderRegion::overflowRectForFlowThreadPortion): Used to get the flow thread visual or layout overflow.
3351         (WebCore::RenderRegion::layoutBlock):
3352         (WebCore::RenderRegion::computeOverflowFromFlowThread):
3353         (WebCore::RenderRegion::updateLogicalHeight):
3354         * rendering/RenderRegion.h:
3355         * rendering/RenderView.cpp:
3356         (WebCore::RenderView::layoutContentToComputeOverflowInRegions):
3357         (WebCore::RenderView::layout):
3358         * rendering/RenderView.h:
3359
3360 2013-08-07  Simon Fraser  <simon.fraser@apple.com>
3361
3362         Avoid spurious "all repaint" layouts when scrolling WebViews on Retina displays
3363         https://bugs.webkit.org/show_bug.cgi?id=119564
3364
3365         Reviewed by Beth Dakin.
3366
3367         When scrolling WebViews on Macs with Retina displays, AppKit uses
3368         device pixels for the scroll offset, so [scrollView() documentVisibleRect]
3369         can return a CGRect with non-integral origin. This rect is used by layout,
3370         via layoutSize(), to decide whether the view size changed, which prompts
3371         a full repaint. However, FrameView gets a value which has been rounded
3372         by enclosingIntRect(), which increases the height or width by 1px if the 
3373         y or x offset is on a half-pixel, causing spurious full repaints.
3374         
3375         Fix by plumbing through platformVisibleContentSize(), which just
3376         gets the size of the -documentVisibleRect.
3377         
3378         * page/FrameView.cpp:
3379         (WebCore::FrameView::layout): Don't get layoutHeight and layoutWidth
3380         separately, since that is two calls down into platformVisibleContentSize.
3381         * platform/ScrollView.cpp:
3382         (WebCore::ScrollView::unscaledVisibleContentSize):
3383         (WebCore::ScrollView::platformVisibleContentSize):
3384         * platform/ScrollView.h:
3385         * platform/mac/ScrollViewMac.mm:
3386         (WebCore::ScrollView::platformVisibleContentSize):
3387
3388 2013-08-07  Simon Fraser  <simon.fraser@apple.com>
3389
3390         Be more aggressive about sending fake mouse events less frequently
3391         https://bugs.webkit.org/show_bug.cgi?id=119563
3392         <rdar://problem/14669029>
3393
3394         Reviewed by Tim Horton.
3395
3396         r109151 added code that throttles back the fake mouse events that we
3397         send during scrolling, but in such a way that a page could take up to
3398         100ms to handle a single mousemove, and we'd still send fake mousemove
3399         events every 100ms. This could cause serious scrolling stutter.
3400         
3401         Fix by changing when we drop back to sending events every 250ms, rather than every
3402         100ms: if the slowest mousemove takes 10ms or more (less than one frame), drop back
3403         to a 250ms fake move interval.
3404
3405         * page/EventHandler.cpp:
3406         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
3407
3408 2013-08-07  Adenilson Cavalcanti  <cavalcantii@gmail.com>
3409
3410         [rendering] Implement PaintInfo interfaces
3411         https://bugs.webkit.org/show_bug.cgi?id=119388
3412
3413         Reviewed by Benjamin Poulain.
3414
3415         In discussion in IRC, it was decided to remove this comment since implementing such change
3416         would have a vast impact on rendering classes.
3417
3418         * rendering/PaintInfo.h:
3419
3420 2013-08-07  Dean Jackson  <dino@apple.com>
3421
3422         Don't remove contents layer from its parent unless necessary
3423         https://bugs.webkit.org/show_bug.cgi?id=119560
3424
3425         Reviewed by Simon Fraser.
3426
3427         RenderLayerBacking::updateInternalHierarchy() is called in some
3428         instances where there doesn't need to be a complete reparenting of the
3429         the m_graphicsLayer. For example, on OS X when the user changes the
3430         scrollbar styles to/from always visible. We don't need to always
3431         remove the graphics layer from its parent - any reparenting does that
3432         automatically.
3433
3434         Unfortunately we can't trigger this situation in an automated test.
3435
3436         * rendering/RenderLayerBacking.cpp:
3437         (WebCore::RenderLayerBacking::updateInternalHierarchy): Don't call removeFromParent().
3438
3439 2013-08-07  Tim Horton  <timothy_horton@apple.com>
3440
3441         Fall out of simple image layer optimization if the image has EXIF rotation
3442         https://bugs.webkit.org/show_bug.cgi?id=119535
3443         <rdar://problem/14071174>
3444
3445         Reviewed by Simon Fraser.
3446
3447         Test: fast/images/exif-orientation-composited.html
3448
3449         * platform/graphics/BitmapImage.cpp:
3450         (WebCore::BitmapImage::frameOrientationAtIndex):
3451         Ensure that the frame is cached if we're requesting the orientation,
3452         so we can acquire orientation information at any given time.
3453
3454         * platform/mac/DragImageMac.mm:
3455         (WebCore::createDragImageFromImage):
3456         * platform/graphics/BitmapImage.h:
3457         Rename currentFrameOrientation to frameOrientationForCurrentFrame to match
3458         the similarly-behaving nativeImageForCurrentFrame.
3459
3460         * platform/graphics/Image.h:
3461         (WebCore::Image::orientationForCurrentFrame): Added. Virtual, overriden by BitmapImage.
3462
3463         * rendering/RenderLayerBacking.cpp:
3464         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
3465         If the given image has a non-default image orientation, don't use direct compositing.
3466
3467 2013-08-07  Antti Koivisto  <antti@apple.com>
3468
3469         fast/frames/seamless/seamless-custom-font-pruning-crash.html asserts
3470         https://bugs.webkit.org/show_bug.cgi?id=119557
3471