35585c82ec8adc249d723813ac05a8f9c997e834
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-08-23  Chris Fleizach  <cfleizach@apple.com>
2
3         <https://webkit.org/b/113895> Webkit exposes aria-expanded="undefined" as aria-expanded="false" (AXExpanded = NO)
4
5         Reviewed by Darin Adler.
6
7         Don't support the ARIA expanded attribute unless the value is one of the defined ARIA values (true/false).
8
9         Test: platform/mac/accessibility/aria-expanded-not-exposed-when-undefined.html
10
11         * accessibility/AccessibilityObject.cpp:
12         (WebCore::AccessibilityObject::supportsARIAExpanded):
13
14 2013-08-17  Darin Adler  <darin@apple.com>
15
16         <https://webkit.org/b/119945> Some cleanup for PasteboardIOS
17
18         Reviewed by Andreas Kling.
19
20         * platform/ios/PasteboardIOS.mm:
21         (WebCore::Pasteboard::setFrame): Moved this function up near the
22         create functions and constructors.
23         (WebCore::documentFragmentWithRTF): Tweaked formatting.
24         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
25         Ditto.
26         (WebCore::utiTypeFromCocoaType): Changed to use early return and removed
27         an unneeded local variable.
28         (WebCore::cocoaTypeFromHTMLClipboardType): Renamed the quaint qType and
29         pbType local variables, and tweaked formatting.
30         (WebCore::Pasteboard::clear): Tweaked comment.
31         (WebCore::Pasteboard::readString): Tweaked formatting.
32         (WebCore::addHTMLClipboardTypesForCocoaType): Tweaked formatting.
33         (WebCore::Pasteboard::writeString): Streamlined logic and tweaked formatting
34         (WebCore::Pasteboard::types): Renamed pbType to just type.
35
36 2013-08-23  Bem Jones-Bey  <bjonesbe@adobe.com>
37
38         Attempt to make it more clear what FloatIntervalSearchAdaptor::collectIfNeeded is doing
39         https://bugs.webkit.org/show_bug.cgi?id=119816
40
41         Reviewed by David Hyatt.
42
43         This is a port from Blink of
44         https://src.chromium.org/viewvc/blink?revision=155885&view=revision
45         Original Patch by Eric Seidel
46
47         Original comments:
48
49         "It seemed to me that template specifications would be clearer than an
50         if.  They also allow for compile-time error checking were a 3rd type
51         of float to come into existance in CSS4. :p
52
53         For any unfamiliar with this method, this the object used for
54         performing a search on a RedBlackTree in WTF.
55
56         We create one of these adaptors, specifying that we want to search for
57         values in a specific (logical) Y interval, and this adaptor is called
58         back for any values in the RBTree cooresponding to that interval
59         range.
60
61         The job of this adaptor is to collect the various values we care
62         about, including the left or right-most offset of the floats in that
63         Y-range as well as what the last (document order) float seen in that
64         range.
65
66         It also collects the remaining available height for the block but I'm
67         less clear on how that parameter is used."
68
69         Note that in addition to the original change, I have made the
70         updateOffsetIfNeeded and rangesIntersect methods inline, as this was
71         shown to be a performance win in
72         https://src.chromium.org/viewvc/blink?revision=156064&view=revision
73         and it seemed a rather trivial change to be subject to a separate
74         patch when porting.
75
76         No new tests, no behavior change.
77
78         * rendering/RenderBlock.cpp:
79         (WebCore::::updateOffsetIfNeeded):
80         (WebCore::::collectIfNeeded):
81         * rendering/RenderBlock.h:
82
83 2013-08-23  David Kilzer  <ddkilzer@apple.com>
84
85         WebCore fails to link due to changes in Objective-C++ ABI in trunk clang
86         <http://webkit.org/b/120183>
87         <rdar://problem/14764114>
88
89         Reviewed by Eric Carlson.
90
91         The trunk version of clang made an ABI change for Objective-C++
92         parameters that caused WebCore to fail to link.  The short-term
93         fix is to change the parameter type from id<protocol> to just id
94         and add an ASSERT that the parameter still conforms to the
95         protocol.
96
97         * platform/DragData.h:
98         (DragDataRef): Change typedef from id<NSDragInfo> to id.
99         * platform/mac/DragDataMac.mm:
100         (WebCore::DragData::DragData): Add ASSERT that checks that the
101         DragDataRef object implements the NSDragInfo protocol.
102
103 2013-08-23  Andreas Kling  <akling@apple.com>
104
105         RenderLayerCompositor::m_renderView should be a reference.
106         <https://webkit.org/b/120210>
107
108         Reviewed by Antti Koivisto.
109
110         The RenderLayerCompositor is always created by a RenderView passing itself to the constructor.
111         By making m_renderView a reference, we flush out some unnecessary null checks.
112         We also gain a pointer-free path to Settings through m_renderView.frameView().frame().settings()
113         so we don't have to make those blocks conditional anymore, reducing ambiguity.
114
115         * rendering/RenderLayerCompositor.cpp:
116         * rendering/RenderLayerCompositor.h:
117         * rendering/RenderView.cpp:
118         (WebCore::RenderView::compositor):
119
120 2013-08-23  Andreas Kling  <akling@apple.com>
121
122         RenderView::frameView() should return a reference.
123         <https://webkit.org/b/120208>
124
125         Reviewed by Antti Koivisto.
126
127         A RenderView should always have a corresponding FrameView, so make frameView()
128         return a reference. Also remove a myriad of now-impossible null checks.
129
130 2013-08-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
131
132         REGRESSION(r153939) Fix typo in Qt build-files
133
134         Reviewed by Antti Koivisto.
135
136         Fix simple typo in Target.pri introduced in r153939.
137
138         * Target.pri:
139
140 2013-08-23  Antti Koivisto  <antti@apple.com>
141
142         <https://webkit.org/b/120166> Add Traversal<ElementType> template
143
144         Reviewed by Andreas Kling.
145
146         It is common to traverse through a subtree looking for elements of specific type and then casting to the type. This pattern can be generalized.
147         
148         This patch adds a new Traversal<typename ElementType> template. It works like ElementTraversal except that the traversal is limited to the specified type.
149         The patch also uses the template in a bunch of applicable places.
150
151         * WebCore.exp.in:
152         * accessibility/AccessibilityRenderObject.cpp:
153         (WebCore::AccessibilityRenderObject::addImageMapChildren):
154         * dom/Document.cpp:
155         (WebCore::Document::removeTitle):
156         (WebCore::Document::updateBaseURL):
157         (WebCore::Document::processBaseElement):
158         * dom/Element.h:
159         * dom/ElementTraversal.h:
160         (WebCore::::firstChildTemplate):
161         (WebCore::::firstWithinTemplate):
162         (WebCore::::lastChildTemplate):
163         (WebCore::::lastWithinTemplate):
164         (WebCore::::nextTemplate):
165         (WebCore::::previousTemplate):
166         (WebCore::::nextSiblingTemplate):
167         (WebCore::::previousSiblingTemplate):
168         (WebCore::::nextSkippingChildrenTemplate):
169         (WebCore::::firstChild):
170         (WebCore::::lastChild):
171         (WebCore::::firstWithin):
172         (WebCore::::lastWithin):
173         (WebCore::::next):
174         (WebCore::::previous):
175         (WebCore::::nextSibling):
176         (WebCore::::previousSibling):
177         (WebCore::::nextSkippingChildren):
178         (WebCore::ElementTraversal::previousIncludingPseudo):
179         (WebCore::ElementTraversal::nextIncludingPseudo):
180         (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
181         (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
182         * dom/Node.cpp:
183         (WebCore::Node::numberOfScopedHTMLStyleChildren):
184         * dom/NodeIterator.cpp:
185         (WebCore::NodeIterator::NodeIterator):
186         * dom/NodeIterator.h:
187         * dom/Traversal.cpp:
188         (WebCore::NodeIteratorBase::NodeIteratorBase):
189         (WebCore::NodeIteratorBase::acceptNode):
190         * dom/Traversal.h:
191         
192             Renamed existing class called Traversal to less generic NodeIteratorBase.
193
194         * dom/TreeScope.cpp:
195         (WebCore::TreeScope::labelElementForId):
196         (WebCore::TreeScope::findAnchor):
197         * dom/TreeWalker.cpp:
198         (WebCore::TreeWalker::TreeWalker):
199         * dom/TreeWalker.h:
200         * editing/FrameSelection.cpp:
201         (WebCore::scanForForm):
202         * editing/markup.cpp:
203         (WebCore::createContextualFragment):
204         * html/HTMLAnchorElement.h:
205         (WebCore::isHTMLAnchorElement):
206         (WebCore::HTMLAnchorElement):
207         * html/HTMLAreaElement.h:
208         (WebCore::isHTMLAreaElement):
209         (WebCore::HTMLAreaElement):
210         * html/HTMLBaseElement.h:
211         (WebCore::isHTMLBaseElement):
212         (WebCore::HTMLBaseElement):
213         * html/HTMLElement.h:
214         (WebCore::HTMLElement):
215         * html/HTMLFieldSetElement.cpp:
216         (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
217         (WebCore::HTMLFieldSetElement::childrenChanged):
218         (WebCore::HTMLFieldSetElement::legend):
219         * html/HTMLFormControlElement.h:
220         (WebCore::toHTMLFormControlElement):
221         (WebCore::HTMLFormControlElement):
222         * html/HTMLLabelElement.cpp:
223         (WebCore::nodeAsSupportedLabelableElement):
224         (WebCore::HTMLLabelElement::control):
225         * html/HTMLLabelElement.h:
226         (WebCore::isHTMLLabelElement):
227         (WebCore::HTMLLabelElement):
228         * html/HTMLLegendElement.h:
229         (WebCore::isHTMLLegendElement):
230         (WebCore::HTMLLegendElement):
231         * html/HTMLMapElement.cpp:
232         (WebCore::HTMLMapElement::mapMouseEvent):
233         * html/HTMLMediaElement.cpp:
234         (WebCore::HTMLMediaElement::finishParsingChildren):
235         * html/HTMLStyleElement.h:
236         (WebCore::isHTMLStyleElement):
237         (WebCore::HTMLStyleElement):
238         * html/HTMLTitleElement.h:
239         (WebCore::HTMLTitleElement):
240         * html/HTMLTrackElement.h:
241         (WebCore::isHTMLTrackElement):
242         (WebCore::HTMLTrackElement):
243         * html/LabelableElement.h:
244         (WebCore::isLabelableElement):
245         (WebCore::LabelableElement):
246         * rendering/FilterEffectRenderer.cpp:
247         (WebCore::FilterEffectRenderer::buildReferenceFilter):
248         * svg/SVGElement.h:
249         (WebCore::SVGElement):
250         * svg/SVGForeignObjectElement.h:
251         (WebCore::isSVGForeignObjectElement):
252         (WebCore::SVGForeignObjectElement):
253         * svg/SVGSVGElement.cpp:
254         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
255         (WebCore::SVGSVGElement::getElementById):
256         * svg/SVGStyledElement.cpp:
257         (WebCore::SVGStyledElement::title):
258         * svg/SVGTitleElement.h:
259         (WebCore::SVGTitleElement):
260         * svg/animation/SMILTimeContainer.cpp:
261         (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
262         * svg/animation/SVGSMILElement.cpp:
263         (WebCore::SVGSMILElement::isSMILElement):
264         * svg/animation/SVGSMILElement.h:
265         (WebCore::SVGSMILElement):
266         * svg/graphics/SVGImage.cpp:
267         (WebCore::SVGImage::hasSingleSecurityOrigin):
268
269 2013-08-23  Arpita Bahuguna  <a.bah@samsung.com>
270
271         <br> does not get deleted when inlined after some non-textual content.
272         https://bugs.webkit.org/show_bug.cgi?id=120006
273
274         Reviewed by Ryosuke Niwa.
275
276         deleteSelectionCommand does not handle the case when a <br> element is
277         inlined after some non-textual content (input controls, image etc.).
278
279         When doing a back-delete at the start of a line following such a <br>
280         the two contiguous lines should merge and the <br> should get deleted.
281         Currently, even though the <br> is deleted, another placeholder <br>
282         is incorrectly inserted at the same point, thus effectively there is no
283         change.
284
285         We are incorrectly computing the inline <br> to be at the start of an
286         empty line even though the line is not empty.
287
288         Test: editing/deleting/delete-inline-br.html
289
290         * editing/DeleteSelectionCommand.cpp:
291         (WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
292         Adding a check to verify that the inline <br> is not on an empty line
293         if the end node is not a <br> element itself and it's previous sibling
294         is the start <br> element.
295
296         Basically we check whether there is another node (end node) following
297         the <br>, that the node is not a <br> itself, and that the end node's
298         previous node is the start <br>.
299
300 2013-08-23  Renata Hodovan  <reni@webkit.org>
301
302         Missing null-check in HTMLFormElement::rendererIsNeeded()
303         https://bugs.webkit.org/show_bug.cgi?id=120159
304
305         Reviewed by Ryosuke Niwa.
306
307         Null-check parentRenderer in HTMLFormElement::rendererIsNeeded()
308         and early return.
309
310         Test: fast/forms/missing-parentrenderer-crash.html
311
312         * html/HTMLFormElement.cpp:
313         (WebCore::HTMLFormElement::rendererIsNeeded):
314
315 2013-08-23  Zalan Bujtas  <zalan@apple.com>
316
317         MathML: ASSERTION FAILED: !isPreferredLogicalHeightDirty() in RenderMathMLBlock::preferredLogicalHeight() const
318         https://bugs.webkit.org/show_bug.cgi?id=120157
319
320         Reviewed by Antti Koivisto.
321
322         RenderListMarker needs to be inserted to the render tree before
323         we start computing the preferred logical widths for the associated
324         RenderListItem.
325
326         Test: mathml/mn-as-list-item-assert.html
327
328         * rendering/RenderListItem.cpp:
329         (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
330         (WebCore::RenderListItem::layout):
331         (WebCore::RenderListItem::computePreferredLogicalWidths):
332         * rendering/RenderListItem.h:
333
334 2013-08-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
335
336         Introduce toSVGLinearGradientElement(), and use it
337         https://bugs.webkit.org/show_bug.cgi?id=120154
338
339         Reviewed by Andreas Kling.
340
341         As a step to clean-up static_cast<SVGXXX>, toSVGLinearGradientElement() is added to clean-up
342         static_cast<SVGLinearGradientElement*>.
343
344         * rendering/svg/RenderSVGResourceLinearGradient.cpp:
345         (WebCore::RenderSVGResourceLinearGradient::collectGradientAttributes):
346         * rendering/svg/SVGRenderTreeAsText.cpp:
347         (WebCore::writeSVGResourceContainer):
348         * svg/SVGLinearGradientElement.cpp:
349         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
350         * svg/SVGLinearGradientElement.h:
351         (WebCore::toSVGLinearGradientElement):
352
353 2013-08-22  Simon Fraser  <simon.fraser@apple.com>
354
355         compositing/geometry/bounds-ignores-hidden-dynamic.html has incorrect initial rendering
356         https://bugs.webkit.org/show_bug.cgi?id=119825
357
358         Reviewed by Tim Horton.
359         
360         r137526 and some earlier commits attempted to avoid unconditionally
361         repainting layers when their size changes, because this was causing
362         TiledBacking layers to repaint when the document size changed.
363         
364         However, the approach required that we have good information about
365         whether size changes require a repaint, which in some cases is hard
366         to determine, especially when RenderLayer changes affect our
367         decisions about which layers are composited.
368         
369         Fix by pushing the decision about whether to repaint on size change
370         into GraphicsLayer. The default is to repaint on size change,
371         but GraphicsLayer provides a function that can be overridden to
372         modify this behavior; GraphicsLayerCA does so to avoid repaints
373         when layers with TiledBackings get resized.
374
375         Test: compositing/repaint/repaint-on-layer-grouping-change.html
376
377         * WebCore.exp.in: WebKit2 needs GraphicsLayer::setSize, which is no longer inline.
378         * platform/graphics/GraphicsLayer.cpp:
379         (WebCore::GraphicsLayer::setOffsetFromRenderer):
380         (WebCore::GraphicsLayer::setSize):
381         * platform/graphics/GraphicsLayer.h:
382         (WebCore::GraphicsLayer::shouldRepaintOnSizeChange):
383         * platform/graphics/ca/GraphicsLayerCA.cpp:
384         (WebCore::GraphicsLayerCA::shouldRepaintOnSizeChange):
385         * platform/graphics/ca/GraphicsLayerCA.h:
386         * rendering/RenderLayerBacking.h: No longer need m_boundsConstrainedByClipping
387         * rendering/RenderLayerBacking.cpp:
388         (WebCore::RenderLayerBacking::RenderLayerBacking):
389         (WebCore::RenderLayerBacking::updateCompositedBounds):
390         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): setSize takes
391         care of repainting for us now, so we can remove all the conditional code.
392
393 2013-08-22  Simon Fraser  <simon.fraser@apple.com>
394
395         Repaint counters are sometimes not in the corner of the compositing layer
396         https://bugs.webkit.org/show_bug.cgi?id=120176
397
398         Reviewed by Beth Dakin.
399
400         Sometimes the repaint counters are not in the corner of the compositing layer;
401         they are either inset, or partially or entirely outside the layer.
402         
403         Fix by making sure that we restore the CGContext before drawing
404         the counter, since the WebCore code may have translated the CTM.
405         
406         The counter-painting code saves and restores the context itself,
407         so this is safe.
408
409         * platform/graphics/mac/WebLayer.mm:
410         (drawLayerContents):
411
412 2013-08-22  Tim Horton  <timothy_horton@apple.com>
413
414         Unavailable plug-in indicator text is one pixel too low
415         https://bugs.webkit.org/show_bug.cgi?id=120177
416         <rdar://problem/14811951>
417
418         Reviewed by Kevin Decker.
419
420         Move the unavailable plug-in indicator text up one pixel.
421
422         * rendering/RenderEmbeddedObject.cpp:
423         (WebCore::RenderEmbeddedObject::paintReplaced):
424
425 2013-08-22  Christophe Dumez  <ch.dumez@sisa.samsung.com>
426
427         [SVG2] Merge SVGStyledElement and SVGElement
428         https://bugs.webkit.org/show_bug.cgi?id=107386
429
430         Reviewed by Andreas Kling.
431
432         Merge SVGStyledElement into SVGElement to simplify the SVG inheritance
433         model and match the SVG2 specification:
434         https://svgwg.org/svg2-draft/single-page.html#types-InterfaceSVGElement
435
436         Test: svg/dom/svg2-inheritance.html
437
438         * CMakeLists.txt:
439         * DerivedSources.cpp:
440         * DerivedSources.make:
441         * DerivedSources.pri:
442         * GNUmakefile.list.am:
443         * Target.pri:
444         * WebCore.order:
445         * WebCore.vcxproj/WebCore.vcxproj:
446         * WebCore.vcxproj/WebCore.vcxproj.filters:
447         * WebCore.xcodeproj/project.pbxproj:
448         * accessibility/AccessibilityNodeObject.cpp:
449         (WebCore::AccessibilityNodeObject::alternativeText):
450         (WebCore::AccessibilityNodeObject::accessibilityDescription):
451         * css/SVGCSSStyleSelector.cpp:
452         * rendering/style/SVGRenderStyle.cpp:
453         * rendering/svg/RenderSVGContainer.cpp:
454         (WebCore::RenderSVGContainer::RenderSVGContainer):
455         * rendering/svg/RenderSVGContainer.h:
456         * rendering/svg/RenderSVGHiddenContainer.cpp:
457         (WebCore::RenderSVGHiddenContainer::RenderSVGHiddenContainer):
458         * rendering/svg/RenderSVGHiddenContainer.h:
459         * rendering/svg/RenderSVGModelObject.cpp:
460         (WebCore::RenderSVGModelObject::RenderSVGModelObject):
461         (WebCore::getElementCTM):
462         * rendering/svg/RenderSVGModelObject.h:
463         * rendering/svg/RenderSVGResourceClipper.cpp:
464         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
465         (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
466         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
467         * rendering/svg/RenderSVGResourceContainer.cpp:
468         (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
469         * rendering/svg/RenderSVGResourceContainer.h:
470         * rendering/svg/RenderSVGResourceFilter.cpp:
471         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
472         * rendering/svg/RenderSVGResourceMarker.cpp:
473         * rendering/svg/RenderSVGResourceMarker.h:
474         * rendering/svg/RenderSVGResourceMasker.cpp:
475         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
476         (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
477         * rendering/svg/RenderSVGResourcePattern.cpp:
478         (WebCore::RenderSVGResourcePattern::createTileImage):
479         * rendering/svg/RenderSVGRoot.cpp:
480         (WebCore::RenderSVGRoot::RenderSVGRoot):
481         * rendering/svg/RenderSVGRoot.h:
482         * rendering/svg/RenderSVGViewportContainer.cpp:
483         (WebCore::RenderSVGViewportContainer::RenderSVGViewportContainer):
484         * rendering/svg/RenderSVGViewportContainer.h:
485         * rendering/svg/SVGRenderSupport.cpp:
486         (WebCore::SVGRenderSupport::layoutChildren):
487         * rendering/svg/SVGRenderTreeAsText.cpp:
488         * rendering/svg/SVGResources.cpp:
489         (WebCore::registerPendingResource):
490         * rendering/svg/SVGResourcesCache.cpp:
491         * svg/SVGAElement.cpp:
492         (WebCore::SVGAElement::title):
493         * svg/SVGAllInOne.cpp:
494         * svg/SVGAltGlyphDefElement.h:
495         * svg/SVGAltGlyphItemElement.h:
496         * svg/SVGAnimateElement.cpp:
497         * svg/SVGAnimatedType.cpp:
498         (WebCore::SVGAnimatedType::valueAsString):
499         (WebCore::SVGAnimatedType::setValueAsString):
500         * svg/SVGAnimationElement.cpp:
501         (WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
502         (WebCore::SVGAnimationElement::computeCSSPropertyValue):
503         (WebCore::SVGAnimationElement::adjustForInheritance):
504         (WebCore::inheritsFromProperty):
505         * svg/SVGComponentTransferFunctionElement.h:
506         * svg/SVGCursorElement.h:
507         * svg/SVGDescElement.cpp:
508         (WebCore::SVGDescElement::SVGDescElement):
509         * svg/SVGDescElement.h:
510         * svg/SVGDescElement.idl:
511         * svg/SVGElement.cpp:
512         (WebCore::mapAttributeToCSSProperty):
513         (WebCore::cssPropertyToTypeMap):
514         (WebCore::SVGElement::SVGElement):
515         (WebCore::SVGElement::~SVGElement):
516         (WebCore::SVGElement::removedFrom):
517         (WebCore::SVGElement::parseAttribute):
518         (WebCore::SVGElement::animatedPropertyTypeForAttribute):
519         (WebCore::collectInstancesForSVGElement):
520         (WebCore::SVGElement::isAnimatableAttribute):
521         (WebCore::SVGElement::title):
522         (WebCore::SVGElement::rendererIsNeeded):
523         (WebCore::SVGElement::cssPropertyIdForSVGAttributeName):
524         (WebCore::SVGElement::isAnimatableCSSProperty):
525         (WebCore::SVGElement::isPresentationAttribute):
526         (WebCore::SVGElement::collectStyleForPresentationAttribute):
527         (WebCore::SVGElement::isKnownAttribute):
528         (WebCore::SVGElement::svgAttributeChanged):
529         (WebCore::SVGElement::insertedInto):
530         (WebCore::SVGElement::buildPendingResourcesIfNeeded):
531         (WebCore::SVGElement::childrenChanged):
532         (WebCore::SVGElement::getPresentationAttribute):
533         (WebCore::SVGElement::instanceUpdatesBlocked):
534         (WebCore::SVGElement::setInstanceUpdatesBlocked):
535         (WebCore::SVGElement::localCoordinateSpaceTransform):
536         (WebCore::SVGElement::updateRelativeLengthsInformation):
537         (WebCore::SVGElement::isMouseFocusable):
538         (WebCore::SVGElement::isKeyboardFocusable):
539         * svg/SVGElement.h:
540         (WebCore::SVGElement::supportsMarkers):
541         (WebCore::SVGElement::hasRelativeLengths):
542         (WebCore::SVGElement::needsPendingResourceHandling):
543         (WebCore::SVGElement::selfHasRelativeLengths):
544         (WebCore::SVGElement::updateRelativeLengthsInformation):
545         * svg/SVGElement.idl:
546         * svg/SVGElementInstance.cpp:
547         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
548         (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker):
549         * svg/SVGElementInstance.h:
550         * svg/SVGFEBlendElement.idl:
551         * svg/SVGFEColorMatrixElement.idl:
552         * svg/SVGFEComponentTransferElement.idl:
553         * svg/SVGFECompositeElement.idl:
554         * svg/SVGFEConvolveMatrixElement.idl:
555         * svg/SVGFEDiffuseLightingElement.idl:
556         * svg/SVGFEDisplacementMapElement.idl:
557         * svg/SVGFEDropShadowElement.idl:
558         * svg/SVGFEFloodElement.idl:
559         * svg/SVGFEGaussianBlurElement.idl:
560         * svg/SVGFEImageElement.idl:
561         * svg/SVGFELightElement.h:
562         * svg/SVGFEMergeElement.idl:
563         * svg/SVGFEMergeNodeElement.h:
564         * svg/SVGFEMorphologyElement.idl:
565         * svg/SVGFEOffsetElement.idl:
566         * svg/SVGFESpecularLightingElement.idl:
567         * svg/SVGFETileElement.idl:
568         * svg/SVGFETurbulenceElement.idl:
569         * svg/SVGFilterElement.cpp:
570         (WebCore::SVGFilterElement::SVGFilterElement):
571         (WebCore::SVGFilterElement::parseAttribute):
572         (WebCore::SVGFilterElement::svgAttributeChanged):
573         (WebCore::SVGFilterElement::childrenChanged):
574         * svg/SVGFilterElement.h:
575         * svg/SVGFilterElement.idl:
576         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
577         (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
578         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
579         (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
580         (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
581         (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
582         * svg/SVGFilterPrimitiveStandardAttributes.h:
583         * svg/SVGFontElement.cpp:
584         (WebCore::SVGFontElement::SVGFontElement):
585         * svg/SVGFontElement.h:
586         * svg/SVGFontFaceElement.cpp:
587         * svg/SVGFontFaceElement.h:
588         * svg/SVGFontFaceFormatElement.h:
589         * svg/SVGFontFaceNameElement.h:
590         * svg/SVGFontFaceSrcElement.h:
591         * svg/SVGFontFaceUriElement.h:
592         * svg/SVGGElement.cpp:
593         (WebCore::SVGGElement::rendererIsNeeded):
594         * svg/SVGGlyphElement.cpp:
595         (WebCore::SVGGlyphElement::SVGGlyphElement):
596         (WebCore::SVGGlyphElement::parseAttribute):
597         (WebCore::SVGGlyphElement::insertedInto):
598         (WebCore::SVGGlyphElement::removedFrom):
599         * svg/SVGGlyphElement.h:
600         * svg/SVGGlyphRefElement.cpp:
601         (WebCore::SVGGlyphRefElement::SVGGlyphRefElement):
602         (WebCore::SVGGlyphRefElement::parseAttribute):
603         * svg/SVGGlyphRefElement.h:
604         * svg/SVGGlyphRefElement.idl:
605         * svg/SVGGradientElement.cpp:
606         (WebCore::SVGGradientElement::SVGGradientElement):
607         (WebCore::SVGGradientElement::parseAttribute):
608         (WebCore::SVGGradientElement::svgAttributeChanged):
609         (WebCore::SVGGradientElement::childrenChanged):
610         * svg/SVGGradientElement.h:
611         * svg/SVGGradientElement.idl:
612         * svg/SVGGraphicsElement.cpp:
613         (WebCore::SVGGraphicsElement::SVGGraphicsElement):
614         (WebCore::SVGGraphicsElement::parseAttribute):
615         (WebCore::SVGGraphicsElement::svgAttributeChanged):
616         * svg/SVGGraphicsElement.h:
617         * svg/SVGGraphicsElement.idl:
618         * svg/SVGLocatable.cpp:
619         (WebCore::SVGLocatable::computeCTM):
620         * svg/SVGMPathElement.h:
621         * svg/SVGMarkerElement.cpp:
622         (WebCore::SVGMarkerElement::SVGMarkerElement):
623         (WebCore::SVGMarkerElement::parseAttribute):
624         (WebCore::SVGMarkerElement::svgAttributeChanged):
625         (WebCore::SVGMarkerElement::childrenChanged):
626         * svg/SVGMarkerElement.h:
627         * svg/SVGMarkerElement.idl:
628         * svg/SVGMaskElement.cpp:
629         (WebCore::SVGMaskElement::SVGMaskElement):
630         (WebCore::SVGMaskElement::parseAttribute):
631         (WebCore::SVGMaskElement::svgAttributeChanged):
632         (WebCore::SVGMaskElement::childrenChanged):
633         * svg/SVGMaskElement.h:
634         * svg/SVGMaskElement.idl:
635         * svg/SVGMetadataElement.h:
636         * svg/SVGMissingGlyphElement.cpp:
637         (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
638         * svg/SVGMissingGlyphElement.h:
639         * svg/SVGMissingGlyphElement.idl:
640         * svg/SVGPatternElement.cpp:
641         (WebCore::SVGPatternElement::SVGPatternElement):
642         (WebCore::SVGPatternElement::parseAttribute):
643         (WebCore::SVGPatternElement::svgAttributeChanged):
644         (WebCore::SVGPatternElement::childrenChanged):
645         * svg/SVGPatternElement.h:
646         * svg/SVGPatternElement.idl:
647         * svg/SVGScriptElement.h:
648         * svg/SVGStopElement.cpp:
649         (WebCore::SVGStopElement::SVGStopElement):
650         (WebCore::SVGStopElement::parseAttribute):
651         (WebCore::SVGStopElement::svgAttributeChanged):
652         * svg/SVGStopElement.h:
653         * svg/SVGStopElement.idl:
654         * svg/SVGStyleElement.h:
655         * svg/SVGStyledElement.cpp: Removed.
656         * svg/SVGStyledElement.h: Removed.
657         * svg/SVGStyledElement.idl: Removed.
658         * svg/SVGSymbolElement.cpp:
659         (WebCore::SVGSymbolElement::SVGSymbolElement):
660         (WebCore::SVGSymbolElement::parseAttribute):
661         (WebCore::SVGSymbolElement::svgAttributeChanged):
662         * svg/SVGSymbolElement.h:
663         * svg/SVGSymbolElement.idl:
664         * svg/SVGTRefElement.cpp:
665         (WebCore::SVGTRefElement::insertedInto):
666         (WebCore::SVGTRefElement::removedFrom):
667         * svg/SVGTitleElement.cpp:
668         (WebCore::SVGTitleElement::SVGTitleElement):
669         (WebCore::SVGTitleElement::insertedInto):
670         * svg/SVGTitleElement.h:
671         * svg/SVGTitleElement.idl:
672         * svg/SVGTransformable.cpp:
673         * svg/SVGUseElement.cpp:
674         (WebCore::SVGUseElement::selfHasRelativeLengths):
675         * svg/SVGViewElement.cpp:
676         (WebCore::SVGViewElement::SVGViewElement):
677         (WebCore::SVGViewElement::parseAttribute):
678         * svg/SVGViewElement.h:
679         * svg/animation/SVGSMILElement.h:
680         * svg/graphics/filters/SVGFEImage.cpp:
681         (WebCore::FEImage::platformApplySoftware):
682
683 2013-08-22  Andreas Kling  <akling@apple.com>
684
685         FrameLoader::history() should return a reference.
686         <https://webkit.org/b/120163>
687
688         Reviewed by Anders Carlsson.
689
690         Rehued by Anders Carlsson.
691
692         FrameLoader::m_history is never null, so make history() return a reference.
693         Also made HistoryController::m_frame a reference, since HistoryController's
694         lifetime is tied to FrameLoader, which is tied to the Frame.
695
696 2013-08-21  Simon Fraser  <simon.fraser@apple.com>
697
698         Reloading this video test shows garbage briefly
699         https://bugs.webkit.org/show_bug.cgi?id=119377
700
701         Reviewed by Anders Carlson.
702
703         RenderVideo should not claim that it's foreground is opaque
704         unless it has a video frame to display.
705
706         * rendering/RenderVideo.cpp:
707         (WebCore::RenderVideo::foregroundIsKnownToBeOpaqueInRect):
708
709 2013-08-22  Andreas Kling  <akling@apple.com>
710
711         Remove accidental cruft from r154449.
712
713         * rendering/RenderWidget.cpp:
714         (WebCore::RenderWidget::destroy):
715
716 2013-08-22  Andreas Kling  <akling@apple.com>
717
718         FrameLoader: frame() and client() should return references.
719         <https://webkit.org/b/120158>
720
721         Reviewed by Anders Carlsson.
722
723         These two are never null so change them to return references.
724
725 2013-08-22  Andrei Bucur  <abucur@adobe.com>
726
727         RenderNamedFlowThread should not create NodeRenderingContext objects
728         https://bugs.webkit.org/show_bug.cgi?id=119923
729
730         Reviewed by Antti Koivisto.
731
732         Port of https://chromium.googlesource.com/chromium/blink/+/949d7d7e7b8685454742a55cf0ca912bb9a7b177.
733         Original patch by Elliott Sprehn.
734
735         RenderNamedFlowThread should not create NodeRenderingContext objects
736
737         RenderNamedFlowThread is using NodeRenderingContext to get the original
738         parent renderer, but should just be using NodeRenderingTraversal::parent
739         instead (which is what NodeRenderingContext does internally anyway).
740
741         Tests: No change in functionality. No new tests.
742
743         * rendering/RenderNamedFlowThread.cpp:
744         (WebCore::RenderNamedFlowThread::isChildAllowed):
745
746 2013-08-22  Christophe Dumez  <ch.dumez@sisa.samsung.com>
747
748         Introduce a SVGUnknownElement class for unknown SVG elements
749         https://bugs.webkit.org/show_bug.cgi?id=120155
750
751         Reviewed by Andreas Kling.
752
753         Introduce a SVGUnknownElement class and have it override rendererIsNeeded() to return false.
754         We now use SVGUnknownElement type (instead of SVGElement) for unknown SVG elements:
755         - Unknown Elements in SVG namespace
756         - Registered custom tag elements in SVG namespace:
757           http://www.w3.org/TR/2013/WD-custom-elements-20130514/#registering-custom-elements
758
759         As a consequence, SVGElement::rendererIsNeeded() is not longer required to return false and
760         it will be able to behave as SVGStyledElement::rendererIsNeeded() once we merge
761         SVGStyledElement into SVGElement.
762
763         This is a pre-requirement to merging SVGStyledElement into SVGElement.
764
765         No new tests, no behavior change.
766
767         * GNUmakefile.list.am:
768         * Target.pri:
769         * WebCore.vcxproj/WebCore.vcxproj:
770         * WebCore.vcxproj/WebCore.vcxproj.filters:
771         * dom/CustomElementConstructor.cpp:
772         (WebCore::CustomElementConstructor::createElementInternal):
773         * dom/make_names.pl:
774         (defaultParametersHash):
775         (printJSElementIncludes):
776         (printWrapperFunctions):
777         (printWrapperFactoryCppFile):
778         * svg/SVGElement.cpp:
779         * svg/SVGElement.h:
780         * svg/SVGUnknownElement.h: Added.
781         (WebCore::SVGUnknownElement::create):
782         (WebCore::SVGUnknownElement::SVGUnknownElement):
783         * svg/svgtags.in:
784
785 2013-08-22  Rob Buis  <rwlbuis@webkit.org>
786
787         REGRESSION: Assertion failure !collection->hasExactlyOneItem() in WebCore::namedItemGetter
788         https://bugs.webkit.org/show_bug.cgi?id=118056
789
790         Reviewed by Ryosuke Niwa.
791
792         The assert is hit in Debug mode because the DocumentOrderedMap in HTMLDocument::m_windowNamedItem
793         includes matched SVG elements, but the WindowNameCollection used to collect the elements does not.
794         This means the HTMLCollection stripped of SVG elements could end up hitting the empty or single item
795         assertion, which the testcase verifies.
796         To fix this change WindowNameCollection to include both SVG and HTML elements so it matches DocumentOrderedMap.
797
798         Tests: svg/custom/document-all-includes-svg.html
799                svg/custom/window-named-item-lookup.html
800
801         * html/HTMLCollection.cpp:
802         (WebCore::isMatchingElement):
803         (WebCore::HTMLCollection::updateNameCache):
804
805 2013-08-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
806
807         Introduce toSVGRadialGradientElement(), and use it
808         https://bugs.webkit.org/show_bug.cgi?id=120153
809
810         Reviewed by Andreas Kling.
811
812         As a step to clean-up static_cast<SVGXXX>, toSVGRadialGradientElement() is added to clean-up
813         static_cast<SVGRadialGradientElement*>.
814
815         * rendering/svg/RenderSVGResourceRadialGradient.cpp:
816         (WebCore::RenderSVGResourceRadialGradient::collectGradientAttributes):
817         * rendering/svg/SVGRenderTreeAsText.cpp:
818         (WebCore::writeSVGResourceContainer):
819         * svg/SVGRadialGradientElement.cpp:
820         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
821         * svg/SVGRadialGradientElement.h:
822         (WebCore::toSVGRadialGradientElement):
823
824 2013-08-22  Renata Hodovan  <reni@webkit.org>
825
826         ASSERTION FAILED: extractedStyle in WebCore::ApplyStyleCommand::removeInlineStyleFromElement
827         https://bugs.webkit.org/show_bug.cgi?id=119672
828
829         Reviewed by Darin Adler.
830
831         The last extractedStyle parameter of removeInlineStyleFromElement() is not mandatory and it's set
832         to default 0. This way we have to check its existence before the usage.
833
834         Test: editing/execCommand/extracted_style_assert.html
835
836         * editing/ApplyStyleCommand.cpp:
837         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
838
839 2013-08-21  Commit Queue  <commit-queue@webkit.org>
840
841         Unreviewed, rolling out r154416.
842         http://trac.webkit.org/changeset/154416
843         https://bugs.webkit.org/show_bug.cgi?id=120147
844
845         Broke Windows builds (Requested by rniwa on #webkit).
846
847         * WebCore.vcxproj/WebCoreGenerated.make:
848         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
849         * WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
850         * WebCore.vcxproj/build-generated-files.sh:
851         * WebCore.vcxproj/copyForwardingHeaders.cmd:
852         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
853
854 2013-08-21  Ryuan Choi  <ryuan.choi@samsung.com>
855
856         [EFL] Unreviewed build fix after r154430.
857
858         * rendering/style/StyleRareNonInheritedData.cpp:
859         (WebCore::StyleRareNonInheritedData::hasFilters): Added CSS_FILTERS guard.
860
861 2013-08-21  Simon Fraser  <simon.fraser@apple.com>
862
863         Setting -webkit-filter: in :active selector causes failure to redraw
864         https://bugs.webkit.org/show_bug.cgi?id=120135
865
866         Reviewed by Jer Noble.
867         
868         When removing a filter on an inline child of a compositing layer,
869         the inline loses its RenderLayer and compositing layer, but we fail to
870         repaint the compositing layer that the inline is now painting into.
871         
872         This worked correctly for opacity, because opacity toggles cause
873         layouts (which then paint the correct layer), so do the same for filters.
874
875         Test: css3/filters/remove-filter-repaint.html
876
877         * rendering/style/RenderStyle.cpp:
878         (WebCore::RenderStyle::changeRequiresLayout): Return true if we toggled
879         between having filters and not. Drive-by cleanup, making use of new convenience
880         function for hasOpacity().
881         * rendering/style/StyleRareNonInheritedData.cpp:
882         (WebCore::StyleRareNonInheritedData::hasFilters): Returns true if we have any
883         filters.
884         * rendering/style/StyleRareNonInheritedData.h:
885         (WebCore::StyleRareNonInheritedData::hasOpacity): Convenience function that
886         returns true if opacity is < 1.
887
888 2013-08-21  Gavin Barraclough  <barraclough@apple.com>
889
890         https://bugs.webkit.org/show_bug.cgi?id=120139
891         PropertyDescriptor argument to define methods should be const
892
893         Rubber stamped by Sam Weinig.
894
895         This should never be modified, and this way we can use rvalues.
896
897         * bindings/js/JSDOMWindowCustom.cpp:
898         (WebCore::JSDOMWindow::defineOwnProperty):
899         * bindings/js/JSLocationCustom.cpp:
900         (WebCore::JSLocation::defineOwnProperty):
901         (WebCore::JSLocationPrototype::defineOwnProperty):
902         * bindings/scripts/CodeGeneratorJS.pm:
903         (GenerateHeader):
904             - make PropertyDescriptor const
905
906 2013-08-21  Jacky Jiang  <zhajiang@blackberry.com>
907
908         <https://webkit.org/b/120123> [BlackBerry] Incorrect origin of indexOfTile in LayerTiler can cause unnecessary texture jobs and waste memory
909
910         Reviewed by Yong Li.
911         Internally reviewed by Arvid Nilsson.
912
913         JIRA 481356
914         The origin of indexOfTile(origin) is incorrect in these two places. For
915         example, if the maxXMaxYCorner of the rect is (768, 768), there can be
916         three other redundant indexOfTile (0, 1), (1, 0), (1, 1) which can cause
917         unnecessary texture jobs and waste memory.
918         The origin should be the top left of the bottom right pixel of a rect.
919
920         * platform/graphics/blackberry/LayerTiler.cpp:
921         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
922         (WebCore::LayerTiler::processTextureJob):
923
924 2013-08-21  Simon Fraser  <simon.fraser@apple.com>
925
926         <https://webkit.org/b/116901> ASSERTION FAILED: !m_visibleDescendantStatusDirty on twitter
927
928         Reviewed by Beth Dakin.
929         
930         In order to make decisions about compositing, the m_hasVisibleDescendant bit on RenderLayers
931         needs to be up-to-date when RenderLayerCompositor::computeCompositingRequirements is recursing
932         over the RenderLayer tree.
933         
934         However, was possible for computeCompositingRequirements() to hit a layer whose m_visibleDescendantStatusDirty
935         bit was set; we only clear this bit from collectLayers() (when updating z-order lists), and from styleChanged()
936         which requires that style changed on the layer itself.
937         
938         Fix by always calling updateDescendantDependentFlags() from computeCompositingRequirements().
939
940         Wasn't able to easily get a reduced testcase.
941
942         * rendering/RenderLayerCompositor.cpp:
943         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
944
945 2013-08-21  Alex Christensen  <achristensen@apple.com>
946
947         <https://webkit.org/b/120137> Separating Win32 and Win64 builds.
948
949         Reviewed by Brent Fulgham.
950
951         * WebCore.vcxproj/WebCoreGenerated.make:
952         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
953         Pass PlatformArchitecture as a command line parameter to bash scripts
954         and use PlatformArchitecture to determine which directory to delete
955         while cleaning (obj32 or obj64).
956         * WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props:
957         Export PlatformArchitecture to be used by make and cmd scripts.
958         * WebCore.vcxproj/build-generated-files.sh:
959         Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
960         * WebCore.vcxproj/copyForwardingHeaders.cmd:
961         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
962         Use PlatformArchitecture to determine which directory to copy to (obj32 or obj64).
963
964 2013-08-21  Tim Horton  <timothy_horton@apple.com>
965
966         revalidateTiles and ensureTilesForRect can share a lot of code
967         https://bugs.webkit.org/show_bug.cgi?id=119282
968
969         Missed the review comments, whoops.
970
971         * platform/graphics/ca/mac/TileController.h:
972         * platform/graphics/ca/mac/TileController.mm:
973         (WebCore::TileController::prepopulateRect):
974         (WebCore::TileController::revalidateTiles):
975         (WebCore::TileController::ensureTilesForRect):
976
977 2013-08-21  Andreas Kling  <akling@apple.com>
978
979         <https://webkit.org/b/120115> SVG elements always have custom style resolve callbacks.
980
981         Reviewed by Antti Koivisto.
982
983         Simplify SVGElement construction by making them opt in to custom style resolve callbacks
984         by default, and removing the ability to pass a custom ConstructionType to some subclass
985         constructors.
986
987         * dom/Node.h:
988
989             Add HasCustomStyleResolveCallbacksFlag to the CreateSVGElement mask.
990
991         * svg/SVGElement.cpp:
992         (WebCore::SVGElement::SVGElement):
993         * svg/SVGElement.h:
994         * svg/SVGGElement.cpp:
995         (WebCore::SVGGElement::SVGGElement):
996         * svg/SVGGElement.h:
997         * svg/SVGGraphicsElement.cpp:
998         (WebCore::SVGGraphicsElement::SVGGraphicsElement):
999         * svg/SVGGraphicsElement.h:
1000         * svg/SVGImageElement.cpp:
1001         (WebCore::SVGImageElement::SVGImageElement):
1002         * svg/SVGStyledElement.cpp:
1003         (WebCore::SVGStyledElement::SVGStyledElement):
1004         * svg/SVGStyledElement.h:
1005
1006             Remove calls to setHasCustomStyleResolveCallbacks() in SVGElement and subclasses.
1007             Also remove unnecessary ConstructionType argument from subclasses since nobody
1008             overrides it and everyone just uses CreateSVGElement.
1009
1010 2013-08-21  Tim Horton  <timothy_horton@apple.com>
1011
1012         revalidateTiles and ensureTilesForRect can share a lot of code
1013         https://bugs.webkit.org/show_bug.cgi?id=119282
1014
1015         Reviewed by Simon Fraser.
1016
1017         No new tests, just a refactoring.
1018
1019         The bodies of ensureTilesForRect and revalidateTiles are nearly equivalent.
1020
1021         * platform/graphics/ca/mac/TileController.h:
1022         Add an enum, NewTileType, to note whether the tiles created by ensureTilesForRect will
1023         be primary coverage tiles or secondary out-of-view tiles.
1024
1025         * platform/graphics/ca/mac/TileController.mm:
1026         (WebCore::TileController::prepopulateRect):
1027         Move the code to see if we already have the requisite tiles in the
1028         primary coverage rect, as well as our call to updateTileCoverageMap,
1029         out into prepopulateRect, to generalize ensureTilesForRect.
1030
1031         (WebCore::TileController::revalidateTiles):
1032         Make use of ensureTilesForRect. The platformCALayerDidCreateTiles call will happen there, now.
1033
1034         (WebCore::TileController::ensureTilesForRect):
1035         Make ensureTilesForRect return the rect that it created tiles for, and only put
1036         tiles in a cohort if we're creating secondary tiles.
1037
1038 2013-08-21  Tim Horton  <timothy_horton@apple.com>
1039
1040         isReplacementObscured is wrong when the indicator is clipped by an iframe
1041         https://bugs.webkit.org/show_bug.cgi?id=120031
1042         <rdar://problem/14606819>
1043
1044         Reviewed by Simon Fraser.
1045
1046         Hit-test for plugin obscurity in the root document. To do this, we also need
1047         to convert the indicator rectangle into root view coordinates before
1048         hit testing its edges.
1049
1050         This resolves the case where an iframe which clips its content was reporting
1051         the indicator as not obscured, despite the fact that it was obscured from the
1052         point of view of the user.
1053
1054         Updated test plugins/unavailable-plugin-indicator-obscurity.html
1055
1056         * rendering/RenderEmbeddedObject.cpp:
1057         (WebCore::RenderEmbeddedObject::isReplacementObscured):
1058
1059 2013-08-21  Andreas Kling  <akling@apple.com>
1060
1061         <https://webkit.org/b/120132> Frame::navigationScheduler() should return a reference.
1062
1063         Reviewed by Anders Carlzon.
1064
1065         Frame::m_navigationScheduler is an inline member, not a pointer.
1066
1067 2013-08-21  Tim Horton  <timothy_horton@apple.com>
1068
1069         REGRESSION(r154399): broke Mac ML debug WK1 tests > 50 crashes (Requested by thorton on #webkit).
1070         https://bugs.webkit.org/show_bug.cgi?id=120129
1071
1072         Rolling out http://trac.webkit.org/changeset/154399.
1073
1074         * rendering/RenderBlock.cpp:
1075         * rendering/RenderBlock.h:
1076         * rendering/RenderBlockLineLayout.cpp:
1077         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
1078         * rendering/RenderBox.h:
1079
1080 2013-08-21  Andreas Kling  <akling@apple.com>
1081
1082         <https://webkit.org/b/120118> Frame::animation() should return a reference.
1083
1084         Reviewed by Anders Carlsson.
1085
1086         Frame::m_animationController is never null.
1087         Also changed RenderObject::animation() to return a reference since it's just a wrapper
1088         around RenderObject::frame()->animation() with no null checking of frame().
1089
1090 2013-08-21  Simon Fraser  <simon.fraser@apple.com>
1091
1092         Allow opacity to apply to custom scrollbars
1093         https://bugs.webkit.org/show_bug.cgi?id=120104
1094
1095         Reviewed by David Hyatt.
1096         
1097         Opacity was ignored custom scrollbar pseudoelements because custom scrollbar
1098         renderers never create layers, and opacity is normally handled by the RenderLayer code.
1099         
1100         Fix by having RenderScrollbarTheme and RenderScrollbarPart do the transparency
1101         layers necessary for opacity. RenderScrollbarPart handles opacity for individual
1102         parts.
1103         
1104         Because ScrollbarThemeComposite::paint() renders the parts on after another (with
1105         no nesting), opacity handling for the entire scrollbar needs special-casing.
1106         This is done by willPaintScrollbar()/didPaintScrollbar() on the theme.
1107         RenderScrollbarTheme consults the opacity the scrollbar (which we get from
1108         the ScrollbarBGPart renderer) to decide whether to set up a transparency layer.
1109
1110         Test: scrollbars/scrollbar-parts-opacity.html
1111
1112         * platform/ScrollbarThemeComposite.cpp:
1113         (WebCore::ScrollbarThemeComposite::paint):
1114         * platform/ScrollbarThemeComposite.h:
1115         (WebCore::ScrollbarThemeComposite::willPaintScrollbar):
1116         (WebCore::ScrollbarThemeComposite::didPaintScrollbar):
1117         * rendering/RenderScrollbar.cpp:
1118         (WebCore::RenderScrollbar::opacity):
1119         * rendering/RenderScrollbar.h:
1120         * rendering/RenderScrollbarPart.cpp:
1121         (WebCore::RenderScrollbarPart::paintIntoRect):
1122         * rendering/RenderScrollbarTheme.cpp:
1123         (WebCore::RenderScrollbarTheme::willPaintScrollbar):
1124         (WebCore::RenderScrollbarTheme::didPaintScrollbar):
1125         * rendering/RenderScrollbarTheme.h:
1126
1127 2013-08-21  Robert Hogan  <robert@webkit.org>
1128
1129         REGRESSION(r127163): Respect clearance set on ancestors when placing floats
1130         https://bugs.webkit.org/show_bug.cgi?id=119979
1131
1132         Reviewed by David Hyatt.
1133
1134         If a float has a self-collapsing ancestor with clearance then it needs to respect
1135         that clearance when placing itself on the line.
1136
1137         Test: fast/block/margin-collapse/self-collapsing-block-with-float-descendant.html
1138
1139         * rendering/RenderBlock.cpp:
1140         (WebCore::RenderBlock::marginOffsetForSelfCollapsingBlock):
1141         * rendering/RenderBlock.h:
1142         * rendering/RenderBlockLineLayout.cpp:
1143         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
1144         * rendering/RenderBox.h:
1145         (WebCore::RenderBox::previousInFlowSiblingBox):
1146
1147 2013-08-21  Brent Fulgham  <bfulgham@apple.com>
1148
1149         <https://webkit.org/b/120113> [Windows] Enable CSS_IMAGE_SET
1150
1151         Reviewed by Anders Carlsson.
1152
1153         We can now activate:
1154         fast/css/image-set-parsing.html
1155         fast/css/image-set-parsing-invalid.html
1156
1157         * WebCore.vcxproj/WebCore.vcxproj: Add missing image set implementation files.
1158         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1159         * css/CSSAllInOne.cpp: Add missing CSSImageSetValue.cpp
1160         * rendering/style/StyleAllInOne.cpp: Add missing StyeCachedImageSet.cpp
1161
1162 2013-08-21  Robert Hogan  <robert@webkit.org>
1163
1164         In RenderTableCell::paintCollapsedBorders() check surrounding cells using physical rather than logical direction
1165         https://bugs.webkit.org/show_bug.cgi?id=120074
1166
1167         Reviewed by David Hyatt.
1168
1169         No new tests, covered by existing tests.
1170
1171         The functions cellAbove(), cellBelow() etc. check the logical rather than the physical direction but they're being
1172         used to decide the painting of the physical borders of the cell. As we paint all four sides of every cell, and
1173         the borders of adjoining cells twice over, this has no impact on painting currently but making the check consistent
1174         in its treatment of physical and logical direction will help with webkit.org/b/119759 and make the code less confusing
1175         to the next guy.
1176
1177         * rendering/RenderTableCell.cpp:
1178         (WebCore::RenderTableCell::cellAtLeft):
1179         (WebCore::RenderTableCell::cellAtRight):
1180         (WebCore::RenderTableCell::cellAtTop):
1181         (WebCore::RenderTableCell::cellAtBottom):
1182         (WebCore::RenderTableCell::paintCollapsedBorders):
1183         * rendering/RenderTableCell.h:
1184
1185 2013-08-21  Róbert Sipka  <sipka@inf.u-szeged.hu>
1186
1187         <https://webkit.org/b/120109> [curl] only include WebCoreBundleWin on Windows
1188
1189         Reviewed by Brent Fulgham.
1190
1191         The WebCoreBundleWin is a windows specific file, it is only needed on Windows.
1192
1193         * platform/network/curl/ResourceHandleManager.cpp:
1194
1195 2013-08-21  Jae Hyun Park  <jae.park@company100.net>
1196
1197         [Qt] Remove unused code path in PluginView
1198         https://bugs.webkit.org/show_bug.cgi?id=113173
1199
1200         Reviewed by Anders Carlsson.
1201
1202         m_platformLayer in PluginView has been removed in r121710, but there are
1203         still some leftover code path related to m_platformLayer. This patch
1204         removes unused code path.
1205
1206         No new tests, removing unused code paths.
1207
1208         * plugins/PluginView.h:
1209         (PluginView):
1210         * plugins/qt/PluginViewQt.cpp:
1211         (WebCore::PluginView::updatePluginWidget):
1212         (WebCore::PluginView::paint):
1213
1214 2013-08-21  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1215
1216         Font’s fast code path doesn’t handle partial runs correctly when kerning or ligatures are enabled 
1217         https://bugs.webkit.org/show_bug.cgi?id=100050
1218
1219         Reviewed by Antti Koivisto.
1220
1221         Always let WidthIterator iterate over an entire TextRun to avoid problems
1222         with pixel rounding or shaping on partial runs.
1223
1224         This fix is necessary for Qt because the complex font-path can not disable
1225         shaping, leading to the complex path painting slighly different from the
1226         fast path, which messes up selection painting.
1227
1228         No change in functionality, no new tests.
1229
1230         * platform/graphics/Font.cpp:
1231         (WebCore::Font::drawText):
1232         (WebCore::Font::drawEmphasisMarks):
1233         (WebCore::Font::selectionRectForText):
1234         (WebCore::Font::offsetForPosition):
1235         * platform/graphics/FontFastPath.cpp:
1236         (WebCore::Font::getGlyphsAndAdvancesForSimpleText):
1237         (WebCore::Font::selectionRectForSimpleText):
1238         (WebCore::Font::offsetForPositionForSimpleText):
1239         * platform/graphics/GlyphBuffer.h:
1240         (WebCore::GlyphBuffer::add):
1241         (GlyphBuffer):
1242         * platform/graphics/WidthIterator.cpp:
1243         (WebCore::WidthIterator::advanceInternal):
1244         * platform/graphics/WidthIterator.h:
1245         (WidthIterator): Removed now unused advanceOneCharacter method.
1246
1247 2013-08-20  Antonio Gomes  <a1.gomes@sisa.samsung.com>
1248
1249         Harden RenderBox::canBeScrolledAndHasScrollableArea logic
1250         https://bugs.webkit.org/show_bug.cgi?id=104373
1251
1252         Reviewed by Simon Fraser.
1253
1254         Previously if a say div has a overflown content on 'y' but is
1255         styled as "overflow-x: auto; overflow-y: hidden", RenderBox::canBeProgramaticallyScrolled
1256         would still return true. It interfers, among other things, with the way
1257         autoscroll works.
1258
1259         Patch fixes it by adding two helper methods to RenderBox class in order to verify a box'
1260         scrollability in a given axis (x or y); They are used when checking if a given box is in
1261         fact programatically scrollable.
1262
1263         Test: fast/events/autoscroll-overflow-hidden-longhands.html
1264
1265         WebKit autoscroll behavior now matches Firefox and Opera12 (pre-blink)
1266         in that sense.
1267
1268         * rendering/RenderBox.cpp:
1269         (WebCore::RenderBox::canBeProgramaticallyScrolled):
1270         * rendering/RenderBox.h:
1271         (WebCore::RenderBox::hasScrollableOverflowX):
1272         (WebCore::RenderBox::hasScrollableOverflowY):
1273
1274 2013-08-19  Antonio Gomes  <a1.gomes@sisa.samsung.com>
1275
1276         Text dragging can scroll overflow:hidden boxes
1277         https://bugs.webkit.org/show_bug.cgi?id=119760
1278
1279         Reviewed by Darin Adler.
1280
1281         Consider the case of the following HTML:
1282         <div style="overflow:hidden; width: 100px; height: 100px" >
1283           <input id="input" type="text" size=10 value="any text here!"/>
1284           <button style="position:relative; top: 100px; left: 100px"/>
1285         </div>
1286
1287         If ones starts a text selection by dragging the mouse from within the input
1288         field, and continues to drag beyong the outer div boundary, the latter will
1289         be scrolled no matter its overflow:hidden style.
1290         That happens because when the autoscroll has started, it gets propagated up
1291         to the current layer's parent layer, instead of the to current layer's enclosing
1292         scrollable layer.
1293
1294         Patch fixes the issue by hardening the way scrolling is
1295         propagated upwards when autoscroll is being performed.
1296
1297         RenderLayer::enclosingScrollableLayer method also got rewritten
1298         in terms of RenderLayer tree traversing, instead of RenderObject tree.
1299         The rewrite adds support for cross frame upwards traversal.
1300
1301         Test: fast/events/autoscroll-upwards-propagation.html
1302
1303         * rendering/RenderLayer.cpp:
1304         (WebCore::parentLayerCrossFrame):
1305         (WebCore::RenderLayer::enclosingScrollableLayer):
1306         (WebCore::RenderLayer::scrollRectToVisible):
1307
1308 2013-08-20  Jer Noble  <jer.noble@apple.com>
1309
1310         <https://webkit.org/b/120101> [Mac] Suspended HTMLMediaElements can still hold power assertion after playback stops.
1311
1312         Reviewed by Eric Carlson.
1313
1314         Call updateDisplaySleep() when we clear our MediaPlayer, as doing so may kill any in-flight
1315         rateChanged() notifications.
1316
1317         * html/HTMLMediaElement.cpp:
1318         (WebCore::HTMLMediaElement::clearMediaPlayer):
1319         (WebCore::HTMLMediaElement::stop):
1320
1321 2013-08-20  David Barr <davidbarr@chromium.org>, Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1322
1323         <https://webkit.org/b/92330> [CSS] Pass an image orientation data to drawImage()
1324
1325         Reviewed by Beth Dakin.
1326
1327         In support of ongoing css3-images image-orientation implementation. This patch passes
1328         an imageOrientationDescription object to drawImage() function as a argument. The drawImage()
1329         can know information of image orientation by the argument.
1330
1331         Spec: http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation
1332
1333         * html/HTMLCanvasElement.cpp:
1334         (WebCore::HTMLCanvasElement::paint):
1335         * html/canvas/CanvasRenderingContext2D.cpp:
1336         (WebCore::CanvasRenderingContext2D::drawImage):
1337         (WebCore::drawImageToContext):
1338         * platform/graphics/ImageOrientation.h: Add setter functions.
1339         (WebCore::ImageOrientationDescription::setRespectImageOrientation):
1340         (WebCore::ImageOrientationDescription::setImageOrientationEnum):
1341         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
1342         (WebCore::BitmapTextureImageBuffer::updateContents):
1343         * rendering/RenderBoxModelObject.cpp:
1344         (WebCore::RenderBoxModelObject::paintNinePieceImage):
1345         * rendering/RenderImage.cpp:
1346         (WebCore::RenderImage::paintReplaced):
1347         (WebCore::RenderImage::paintIntoRect):
1348         * rendering/RenderSnapshottedPlugIn.cpp:
1349         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
1350
1351 2013-08-20  Gavin Barraclough  <barraclough@apple.com>
1352
1353         https://bugs.webkit.org/show_bug.cgi?id=120093
1354         Remove getOwnPropertyDescriptor trap
1355
1356         Reviewed by Geoff Garen.
1357
1358         All implementations of this method are now called via the method table, and equivalent in behaviour.
1359         Remove all duplicate implementations (and the method table trap), and add a single member function implementation on JSObject.
1360
1361         * WebCore.exp.in:
1362         * bindings/js/JSDOMWindowCustom.cpp:
1363         * bindings/scripts/CodeGeneratorJS.pm:
1364         (GenerateHeader):
1365         (GenerateImplementation):
1366         (GenerateConstructorDeclaration):
1367         (GenerateConstructorHelperMethods):
1368         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1369         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1370         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1371         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1372         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1373         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1374         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1375         * bindings/scripts/test/JS/JSTestEventTarget.h:
1376         * bindings/scripts/test/JS/JSTestException.cpp:
1377         * bindings/scripts/test/JS/JSTestException.h:
1378         * bindings/scripts/test/JS/JSTestInterface.cpp:
1379         * bindings/scripts/test/JS/JSTestInterface.h:
1380         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1381         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1382         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1383         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1384         * bindings/scripts/test/JS/JSTestNode.cpp:
1385         * bindings/scripts/test/JS/JSTestNode.h:
1386         * bindings/scripts/test/JS/JSTestObj.cpp:
1387         * bindings/scripts/test/JS/JSTestObj.h:
1388         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1389         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1390         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1391         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1392         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1393         * bindings/scripts/test/JS/JSTestTypedefs.h:
1394         * bridge/jsc/BridgeJSC.h:
1395         (JSC::Bindings::Instance::getOwnPropertySlot):
1396         * bridge/objc/objc_runtime.h:
1397         * bridge/objc/objc_runtime.mm:
1398         * bridge/runtime_array.cpp:
1399         * bridge/runtime_array.h:
1400         * bridge/runtime_method.cpp:
1401         * bridge/runtime_method.h:
1402         * bridge/runtime_object.cpp:
1403         * bridge/runtime_object.h:
1404             - remove getOwnPropertyDescriptor
1405
1406 2013-08-20  Antti Koivisto  <antti@apple.com>
1407
1408         <https://webkit.org/b/120071> Replace NodeRenderingContext with Node* as childShouldCreateRenderer() argument
1409
1410         Reviewed by Darin Adler.
1411
1412         This simplifies the code. NodeRenderingContext was basically only used for getting the Node.
1413
1414         * dom/ContainerNode.h:
1415         (WebCore::ContainerNode::childShouldCreateRenderer):
1416         * dom/Element.cpp:
1417         (WebCore::Element::childShouldCreateRenderer):
1418         * dom/Element.h:
1419         * dom/NodeRenderingContext.cpp:
1420         (WebCore::NodeRenderingContext::shouldCreateRenderer):
1421         * dom/NodeRenderingContext.h:
1422         
1423             Move isOnEncapsulationBoundary() to InsertionPoint.h and call it hasShadowRootOrActiveInsertionPointParent().
1424             Move isOnUpperEncapsulationBoundary() to ShadowRoot.h and call it hasShadowRootParent().
1425
1426         * dom/ShadowRoot.h:
1427         (WebCore::hasShadowRootParent):
1428         * html/HTMLDetailsElement.cpp:
1429         (WebCore::HTMLDetailsElement::childShouldCreateRenderer):
1430         * html/HTMLDetailsElement.h:
1431         * html/HTMLFormControlElement.cpp:
1432         (WebCore::HTMLFormControlElement::validationMessageShadowTreeContains):
1433         * html/HTMLFormControlElement.h:
1434         * html/HTMLMediaElement.cpp:
1435         (WebCore::HTMLMediaElement::childShouldCreateRenderer):
1436         * html/HTMLMediaElement.h:
1437         * html/HTMLMeterElement.cpp:
1438         (WebCore::HTMLMeterElement::childShouldCreateRenderer):
1439         * html/HTMLMeterElement.h:
1440         * html/HTMLOptGroupElement.h:
1441         (WebCore::isHTMLOptGroupElement):
1442         * html/HTMLOptionElement.h:
1443         (WebCore::isHTMLOptionElement):
1444         * html/HTMLProgressElement.cpp:
1445         (WebCore::HTMLProgressElement::childShouldCreateRenderer):
1446         * html/HTMLProgressElement.h:
1447         * html/HTMLSelectElement.cpp:
1448         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
1449         * html/HTMLSelectElement.h:
1450         * html/HTMLSummaryElement.cpp:
1451         (WebCore::HTMLSummaryElement::childShouldCreateRenderer):
1452         * html/HTMLSummaryElement.h:
1453         * html/HTMLTextFormControlElement.cpp:
1454         (WebCore::HTMLTextFormControlElement::childShouldCreateRenderer):
1455         (WebCore::enclosingTextFormControl):
1456         * html/HTMLTextFormControlElement.h:
1457         * html/ValidationMessage.cpp:
1458         (WebCore::ValidationMessage::shadowTreeContains):
1459         * html/ValidationMessage.h:
1460         * html/shadow/InsertionPoint.cpp:
1461         (WebCore::InsertionPoint::rendererIsNeeded):
1462         * html/shadow/InsertionPoint.h:
1463         (WebCore::isActiveInsertionPoint):
1464         
1465             Remove isShadowBoundary() as it was equivalent to isActive(). 
1466             Remove isLowerEncapsulationBoundary() as it was equivalent to isActiveInsertionPoint().
1467
1468         (WebCore::hasShadowRootOrActiveInsertionPointParent):
1469         
1470             Moved and renamed from NodeRenderingContext::isOnEncapsulationBoundary().
1471
1472         * svg/SVGAElement.cpp:
1473         (WebCore::SVGAElement::childShouldCreateRenderer):
1474         * svg/SVGAElement.h:
1475         * svg/SVGAltGlyphElement.cpp:
1476         (WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
1477         * svg/SVGAltGlyphElement.h:
1478         * svg/SVGDocument.cpp:
1479         (WebCore::SVGDocument::childShouldCreateRenderer):
1480         * svg/SVGDocument.h:
1481         * svg/SVGElement.cpp:
1482         (WebCore::SVGElement::childShouldCreateRenderer):
1483         * svg/SVGElement.h:
1484         * svg/SVGFilterElement.cpp:
1485         (WebCore::SVGFilterElement::childShouldCreateRenderer):
1486         * svg/SVGFilterElement.h:
1487         * svg/SVGFilterPrimitiveStandardAttributes.h:
1488         * svg/SVGForeignObjectElement.cpp:
1489         (WebCore::SVGForeignObjectElement::childShouldCreateRenderer):
1490         * svg/SVGForeignObjectElement.h:
1491         * svg/SVGSVGElement.h:
1492         (WebCore::toSVGSVGElement):
1493         * svg/SVGSwitchElement.cpp:
1494         (WebCore::SVGSwitchElement::childShouldCreateRenderer):
1495         * svg/SVGSwitchElement.h:
1496         * svg/SVGTRefElement.cpp:
1497         (WebCore::SVGTRefElement::childShouldCreateRenderer):
1498         * svg/SVGTRefElement.h:
1499         * svg/SVGTSpanElement.cpp:
1500         (WebCore::SVGTSpanElement::childShouldCreateRenderer):
1501         * svg/SVGTSpanElement.h:
1502         * svg/SVGTextElement.cpp:
1503         (WebCore::SVGTextElement::childShouldCreateRenderer):
1504         * svg/SVGTextElement.h:
1505         * svg/SVGTextPathElement.cpp:
1506         (WebCore::SVGTextPathElement::childShouldCreateRenderer):
1507         * svg/SVGTextPathElement.h:
1508
1509 2013-08-20  Benjamin Poulain  <benjamin@webkit.org>
1510
1511         <https://webkit.org/b/120050> Don't bother using a Vector for the ouput of querySelector, just return the first element found
1512
1513         Reviewed by Ryosuke Niwa.
1514
1515         Simplify the case of querySelector. Instead of using the same output type as querySelectorAll,
1516         simply use a trait to define what to do in the loop.
1517
1518         * dom/SelectorQuery.cpp:
1519         (WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
1520         (WebCore::SelectorDataList::queryAll):
1521         (WebCore::SingleElementExtractorSelectorQueryTrait::appendOutputForElement):
1522         (WebCore::SelectorDataList::queryFirst):
1523         (WebCore::SelectorDataList::executeFastPathForIdSelector):
1524         (WebCore::elementsForLocalName):
1525         (WebCore::anyElement):
1526         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
1527         (WebCore::SelectorDataList::executeSingleClassNameSelectorData):
1528         (WebCore::SelectorDataList::executeSingleSelectorData):
1529         (WebCore::SelectorDataList::executeSingleMultiSelectorData):
1530         (WebCore::SelectorDataList::execute):
1531         * dom/SelectorQuery.h:
1532
1533 2013-08-20  Antti Koivisto  <antti@apple.com>
1534
1535         Rollout the previous patch for landing with the correct ChangeLog.
1536
1537 013-08-20  Jacky Jiang  <zhajiang@blackberry.com>
1538
1539         <https://webkit.org/b/120082> [BlackBerry] Remove unused previousTextureRect in LayerTiler
1540
1541         Reviewed by Rob Buis.
1542         Internally reviewed by Mike Lattanzio and Jakob Petsovits.
1543
1544         * platform/graphics/blackberry/LayerTiler.cpp:
1545         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
1546
1547 2013-08-20  Antti Koivisto  <antti@apple.com>
1548
1549         <https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
1550
1551         Reviewed by Darin Adler.
1552
1553         This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
1554
1555         * dom/Element.cpp:
1556         (WebCore::Element::rendererIsNeeded):
1557         * dom/Element.h:
1558         * dom/NodeRenderingContext.cpp:
1559         (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
1560         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
1561         * dom/PseudoElement.cpp:
1562         (WebCore::PseudoElement::rendererIsNeeded):
1563         * dom/PseudoElement.h:
1564         * html/HTMLAppletElement.cpp:
1565         (WebCore::HTMLAppletElement::rendererIsNeeded):
1566         * html/HTMLAppletElement.h:
1567         * html/HTMLElement.cpp:
1568         (WebCore::HTMLElement::rendererIsNeeded):
1569         * html/HTMLElement.h:
1570         * html/HTMLEmbedElement.cpp:
1571         (WebCore::HTMLEmbedElement::rendererIsNeeded):
1572         * html/HTMLEmbedElement.h:
1573         * html/HTMLFormElement.cpp:
1574         (WebCore::HTMLFormElement::rendererIsNeeded):
1575         * html/HTMLFormElement.h:
1576         * html/HTMLFrameElement.cpp:
1577         (WebCore::HTMLFrameElement::rendererIsNeeded):
1578         * html/HTMLFrameElement.h:
1579         * html/HTMLFrameSetElement.cpp:
1580         (WebCore::HTMLFrameSetElement::rendererIsNeeded):
1581         * html/HTMLFrameSetElement.h:
1582         * html/HTMLIFrameElement.cpp:
1583         (WebCore::HTMLIFrameElement::rendererIsNeeded):
1584         * html/HTMLIFrameElement.h:
1585         * html/HTMLInputElement.cpp:
1586         (WebCore::HTMLInputElement::rendererIsNeeded):
1587         * html/HTMLInputElement.h:
1588         * html/HTMLMediaElement.cpp:
1589         (WebCore::HTMLMediaElement::rendererIsNeeded):
1590         * html/HTMLMediaElement.h:
1591         * html/HTMLObjectElement.cpp:
1592         (WebCore::HTMLObjectElement::rendererIsNeeded):
1593         * html/HTMLObjectElement.h:
1594         * html/HTMLOptGroupElement.h:
1595         * html/HTMLOptionElement.h:
1596         * html/HTMLVideoElement.cpp:
1597         (WebCore::HTMLVideoElement::rendererIsNeeded):
1598         * html/HTMLVideoElement.h:
1599         * html/shadow/DetailsMarkerControl.cpp:
1600         (WebCore::DetailsMarkerControl::rendererIsNeeded):
1601         * html/shadow/DetailsMarkerControl.h:
1602         * html/shadow/InsertionPoint.cpp:
1603         (WebCore::InsertionPoint::rendererIsNeeded):
1604         * html/shadow/InsertionPoint.h:
1605         * html/shadow/MeterShadowElement.cpp:
1606         (WebCore::MeterShadowElement::rendererIsNeeded):
1607         (WebCore::MeterInnerElement::rendererIsNeeded):
1608         * html/shadow/MeterShadowElement.h:
1609         * html/shadow/ProgressShadowElement.cpp:
1610         (WebCore::ProgressShadowElement::rendererIsNeeded):
1611         (WebCore::ProgressInnerElement::rendererIsNeeded):
1612         * html/shadow/ProgressShadowElement.h:
1613         * svg/SVGDescElement.h:
1614         * svg/SVGElement.h:
1615         (WebCore::SVGElement::rendererIsNeeded):
1616         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1617         (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
1618         * svg/SVGFilterPrimitiveStandardAttributes.h:
1619         * svg/SVGFontElement.h:
1620         * svg/SVGForeignObjectElement.cpp:
1621         (WebCore::SVGForeignObjectElement::rendererIsNeeded):
1622         * svg/SVGForeignObjectElement.h:
1623         * svg/SVGGElement.cpp:
1624         (WebCore::SVGGElement::rendererIsNeeded):
1625         * svg/SVGGElement.h:
1626         * svg/SVGGlyphElement.h:
1627         * svg/SVGGlyphRefElement.h:
1628         * svg/SVGHKernElement.h:
1629         * svg/SVGMarkerElement.h:
1630         * svg/SVGMissingGlyphElement.h:
1631         * svg/SVGSVGElement.cpp:
1632         (WebCore::SVGSVGElement::rendererIsNeeded):
1633         * svg/SVGSVGElement.h:
1634         * svg/SVGStopElement.cpp:
1635         (WebCore::SVGStopElement::rendererIsNeeded):
1636         * svg/SVGStopElement.h:
1637         * svg/SVGStyledElement.cpp:
1638         (WebCore::SVGStyledElement::rendererIsNeeded):
1639         * svg/SVGStyledElement.h:
1640         * svg/SVGTRefElement.cpp:
1641         (WebCore::SVGTRefElement::rendererIsNeeded):
1642         * svg/SVGTRefElement.h:
1643         * svg/SVGTSpanElement.cpp:
1644         (WebCore::SVGTSpanElement::rendererIsNeeded):
1645         * svg/SVGTSpanElement.h:
1646         * svg/SVGTextPathElement.cpp:
1647         (WebCore::SVGTextPathElement::rendererIsNeeded):
1648         * svg/SVGTextPathElement.h:
1649         * svg/SVGTitleElement.h:
1650         * svg/SVGVKernElement.h:
1651         * svg/SVGViewElement.h:
1652
1653 2013-08-20  Daniel Bates  <dabates@apple.com>
1654
1655         <https://webkit.org/b/120088> Define Clipboard::hasData() only when building with drag support
1656
1657         Reviewed by Darin Adler.
1658
1659         Clipboard::hasData() is specific to drag-and-drop support. We should only define it when
1660         such support is enabled.
1661
1662         * dom/Clipboard.cpp: Move hasData() to DRAG_SUPPORT section of the file.
1663         * dom/Clipboard.h: Ditto.
1664
1665 2013-08-20  Antti Koivisto  <antti@apple.com>
1666
1667         <https://webkit.org/b/120078> Replace NodeRenderingContext with RenderStyle& as shouldCreateRenderer() argument
1668
1669         Reviewed by Darin Adler.
1670
1671         This simplifies the code. NodeRenderingContext was only used for getting the RenderStyle.
1672
1673         * dom/Element.cpp:
1674         (WebCore::Element::rendererIsNeeded):
1675         * dom/Element.h:
1676         * dom/NodeRenderingContext.cpp:
1677         (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
1678         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
1679         * dom/PseudoElement.cpp:
1680         (WebCore::PseudoElement::rendererIsNeeded):
1681         * dom/PseudoElement.h:
1682         * html/HTMLAppletElement.cpp:
1683         (WebCore::HTMLAppletElement::rendererIsNeeded):
1684         * html/HTMLAppletElement.h:
1685         * html/HTMLElement.cpp:
1686         (WebCore::HTMLElement::rendererIsNeeded):
1687         * html/HTMLElement.h:
1688         * html/HTMLEmbedElement.cpp:
1689         (WebCore::HTMLEmbedElement::rendererIsNeeded):
1690         * html/HTMLEmbedElement.h:
1691         * html/HTMLFormElement.cpp:
1692         (WebCore::HTMLFormElement::rendererIsNeeded):
1693         * html/HTMLFormElement.h:
1694         * html/HTMLFrameElement.cpp:
1695         (WebCore::HTMLFrameElement::rendererIsNeeded):
1696         * html/HTMLFrameElement.h:
1697         * html/HTMLFrameSetElement.cpp:
1698         (WebCore::HTMLFrameSetElement::rendererIsNeeded):
1699         * html/HTMLFrameSetElement.h:
1700         * html/HTMLIFrameElement.cpp:
1701         (WebCore::HTMLIFrameElement::rendererIsNeeded):
1702         * html/HTMLIFrameElement.h:
1703         * html/HTMLInputElement.cpp:
1704         (WebCore::HTMLInputElement::rendererIsNeeded):
1705         * html/HTMLInputElement.h:
1706         * html/HTMLMediaElement.cpp:
1707         (WebCore::HTMLMediaElement::rendererIsNeeded):
1708         * html/HTMLMediaElement.h:
1709         * html/HTMLObjectElement.cpp:
1710         (WebCore::HTMLObjectElement::rendererIsNeeded):
1711         * html/HTMLObjectElement.h:
1712         * html/HTMLOptGroupElement.h:
1713         * html/HTMLOptionElement.h:
1714         * html/HTMLVideoElement.cpp:
1715         (WebCore::HTMLVideoElement::rendererIsNeeded):
1716         * html/HTMLVideoElement.h:
1717         * html/shadow/DetailsMarkerControl.cpp:
1718         (WebCore::DetailsMarkerControl::rendererIsNeeded):
1719         * html/shadow/DetailsMarkerControl.h:
1720         * html/shadow/InsertionPoint.cpp:
1721         (WebCore::InsertionPoint::rendererIsNeeded):
1722         * html/shadow/InsertionPoint.h:
1723         * html/shadow/MeterShadowElement.cpp:
1724         (WebCore::MeterShadowElement::rendererIsNeeded):
1725         (WebCore::MeterInnerElement::rendererIsNeeded):
1726         * html/shadow/MeterShadowElement.h:
1727         * html/shadow/ProgressShadowElement.cpp:
1728         (WebCore::ProgressShadowElement::rendererIsNeeded):
1729         (WebCore::ProgressInnerElement::rendererIsNeeded):
1730         * html/shadow/ProgressShadowElement.h:
1731         * svg/SVGDescElement.h:
1732         * svg/SVGElement.h:
1733         (WebCore::SVGElement::rendererIsNeeded):
1734         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1735         (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
1736         * svg/SVGFilterPrimitiveStandardAttributes.h:
1737         * svg/SVGFontElement.h:
1738         * svg/SVGForeignObjectElement.cpp:
1739         (WebCore::SVGForeignObjectElement::rendererIsNeeded):
1740         * svg/SVGForeignObjectElement.h:
1741         * svg/SVGGElement.cpp:
1742         (WebCore::SVGGElement::rendererIsNeeded):
1743         * svg/SVGGElement.h:
1744         * svg/SVGGlyphElement.h:
1745         * svg/SVGGlyphRefElement.h:
1746         * svg/SVGHKernElement.h:
1747         * svg/SVGMarkerElement.h:
1748         * svg/SVGMissingGlyphElement.h:
1749         * svg/SVGSVGElement.cpp:
1750         (WebCore::SVGSVGElement::rendererIsNeeded):
1751         * svg/SVGSVGElement.h:
1752         * svg/SVGStopElement.cpp:
1753         (WebCore::SVGStopElement::rendererIsNeeded):
1754         * svg/SVGStopElement.h:
1755         * svg/SVGStyledElement.cpp:
1756         (WebCore::SVGStyledElement::rendererIsNeeded):
1757         * svg/SVGStyledElement.h:
1758         * svg/SVGTRefElement.cpp:
1759         (WebCore::SVGTRefElement::rendererIsNeeded):
1760         * svg/SVGTRefElement.h:
1761         * svg/SVGTSpanElement.cpp:
1762         (WebCore::SVGTSpanElement::rendererIsNeeded):
1763         * svg/SVGTSpanElement.h:
1764         * svg/SVGTextPathElement.cpp:
1765         (WebCore::SVGTextPathElement::rendererIsNeeded):
1766         * svg/SVGTextPathElement.h:
1767         * svg/SVGTitleElement.h:
1768         * svg/SVGVKernElement.h:
1769         * svg/SVGViewElement.h:
1770
1771 2013-08-20  Tim Horton  <timothy_horton@apple.com>
1772
1773         <https://webkit.org/b/105988> [Mac] Some inspector tests intermittently assert in InspectorOverlay::paint
1774         <rdar://problem/12958038>
1775
1776         Reviewed by Joseph Pecoraro.
1777
1778         Update the inspector overlay's layout before painting, if it is stale.
1779
1780         No new tests; fixes an intermittent assertion failure in some existing tests.
1781
1782         * inspector/InspectorOverlay.cpp:
1783         (WebCore::InspectorOverlay::paint):
1784
1785 2013-08-20  Daniel Bates  <dabates@apple.com>
1786
1787         Build fix after <http://trac.webkit.org/changeset/154260> (https://webkit.org/b/119949);
1788         declare Clipboard::hasData() when building with and without drag support
1789
1790         * dom/Clipboard.h:
1791
1792 2013-08-20  Hans Muller  <hmuller@adobe.com>
1793
1794         <https://webkit.org/b/119849> [CSS Shapes] Complete RasterShape::firstIncludedIntervalLogicalTop()
1795
1796         Reviewed by Alexandru Chiculita.
1797
1798         Completed the implementation of RasterShape::firstIncludedIntervalLogicalTop(). The
1799         method now computes first logical top location where a line segment can be laid
1800         out within a RasterShape, i.e. a shape derived from an image valued URL resource.
1801
1802         A detailed description of the algorithm can be found in
1803         http://hansmuller-webkit.blogspot.com/2013/08/first-fit-location-for-image-shapes.html.
1804
1805         The new tests exposed a bug in the existing getIncludedIntervals() method. A shape
1806         with a vertical gap that spans the entire line now causes the method to short circuit
1807         and return an empty interval list.
1808
1809         Tests: fast/shapes/shape-inside/shape-inside-image-003.html
1810                fast/shapes/shape-inside/shape-inside-image-004.html
1811                fast/shapes/shape-inside/shape-inside-image-005.html
1812
1813         * rendering/shapes/RasterShape.cpp:
1814         (WebCore::RasterShapeIntervals::firstIncludedIntervalY):
1815         (WebCore::RasterShapeIntervals::getIncludedIntervals):
1816         (WebCore::RasterShape::firstIncludedIntervalLogicalTop):
1817         * rendering/shapes/RasterShape.h:
1818
1819 2013-08-20  Pratik Solanki  <psolanki@apple.com>
1820
1821         <https://webkit.org/b/120029> Document::markers() should return a reference
1822
1823         Reviewed by Andreas Kling.
1824
1825         Document::m_markers is never NULL so return a reference from Document::markers(). Also mark
1826         m_markers as const and initialize it in member initialization.
1827
1828         * dom/Document.cpp:
1829         (WebCore::Document::Document):
1830         * dom/Document.h:
1831         (WebCore::Document::markers):
1832         * editing/AlternativeTextController.cpp:
1833         (WebCore::AlternativeTextController::isSpellingMarkerAllowed):
1834         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1835         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
1836         (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
1837         (WebCore::AlternativeTextController::respondToChangedSelection):
1838         (WebCore::AlternativeTextController::respondToAppliedEditing):
1839         (WebCore::AlternativeTextController::respondToUnappliedEditing):
1840         (WebCore::AlternativeTextController::markReversed):
1841         (WebCore::AlternativeTextController::markCorrection):
1842         (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
1843         (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
1844         (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
1845         (WebCore::AlternativeTextController::applyDictationAlternative):
1846         * editing/CompositeEditCommand.cpp:
1847         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
1848         * editing/DeleteSelectionCommand.cpp:
1849         (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
1850         * editing/DictationCommand.cpp:
1851         (WebCore::DictationMarkerSupplier::addMarkersToTextNode):
1852         * editing/Editor.cpp:
1853         (WebCore::Editor::ignoreSpelling):
1854         (WebCore::Editor::learnSpelling):
1855         (WebCore::Editor::advanceToNextMisspelling):
1856         (WebCore::Editor::clearMisspellingsAndBadGrammar):
1857         (WebCore::Editor::markAndReplaceFor):
1858         (WebCore::Editor::changeBackToReplacedString):
1859         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
1860         (WebCore::Editor::countMatchesForText):
1861         (WebCore::Editor::setMarkedTextMatchesAreHighlighted):
1862         (WebCore::Editor::respondToChangedSelection):
1863         (WebCore::Editor::selectionStartHasMarkerFor):
1864         * editing/SpellChecker.cpp:
1865         (WebCore::SpellChecker::didCheckSucceed):
1866         * editing/SplitTextNodeCommand.cpp:
1867         (WebCore::SplitTextNodeCommand::doApply):
1868         (WebCore::SplitTextNodeCommand::doUnapply):
1869         * editing/TextCheckingHelper.cpp:
1870         (WebCore::TextCheckingHelper::findFirstMisspelling):
1871         (WebCore::TextCheckingHelper::findFirstGrammarDetail):
1872         * page/FrameView.cpp:
1873         (WebCore::FrameView::getTickmarks):
1874         (WebCore::FrameView::paintContents):
1875         * page/Page.cpp:
1876         (WebCore::Page::unmarkAllTextMatches):
1877         * rendering/HitTestResult.cpp:
1878         (WebCore::HitTestResult::spellingToolTip):
1879         (WebCore::HitTestResult::replacedString):
1880         (WebCore::HitTestResult::dictationAlternatives):
1881         * rendering/InlineTextBox.cpp:
1882         (WebCore::InlineTextBox::paintDocumentMarkers):
1883         * rendering/svg/SVGInlineFlowBox.cpp:
1884         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
1885         * testing/Internals.cpp:
1886         (WebCore::Internals::markerCountForNode):
1887         (WebCore::Internals::markerAt):
1888         (WebCore::Internals::addTextMatchMarker):
1889
1890 2013-08-20  Pratik Solanki  <psolanki@apple.com>
1891
1892         <https://webkit.org/b/119875> localeToScriptCodeForFontSelection should use hash tables with larger default capacity
1893
1894         Reviewed by Darin Adler.
1895
1896         The two static hash tables used in this file have 106 and 198 entries. Set a minimumTableSize for
1897         these hash tables so we don't have to expand them during initialization.
1898
1899         No new tests because no functional changes.
1900
1901         * platform/text/LocaleToScriptMappingDefault.cpp:
1902         (WebCore::scriptNameToCode):
1903         (WebCore::localeToScriptCodeForFontSelection):
1904
1905 2013-08-20  Eric Carlson  <eric.carlson@apple.com>
1906
1907         <https://webkit.org/b/120068> Media controls can be attached lazily
1908
1909         Reviewed by Jer Noble.
1910
1911         Merge https://chromium.googlesource.com/chromium/blink/+/28a995486a675992f2e72f81bfabdfff05688a31.
1912
1913         * html/HTMLMediaElement.cpp:
1914         (WebCore::HTMLMediaElement::createMediaControls): Add AttachLazily to appendChild().
1915
1916 2013-08-20  Daniel Bates  <dabates@apple.com>
1917
1918         <https://webkit.org/b/120072> Use nullAtom instead of defining static local in
1919         Accessibility{Object, RenderObject}::actionVerb()
1920
1921         Reviewed by Chris Fleizach.
1922
1923         * accessibility/AccessibilityObject.cpp:
1924         (WebCore::AccessibilityObject::actionVerb):
1925         * accessibility/AccessibilityRenderObject.cpp:
1926         (WebCore::AccessibilityRenderObject::actionVerb):
1927
1928 2013-08-20  Daniel Bates  <dabates@apple.com>
1929
1930         <https://webkit.org/b/119914> [iOS] Upstream changes to WebCore/accessibility
1931
1932         Reviewed by Darin Adler and Chris Fleizach.
1933
1934         * accessibility/AccessibilityMenuList.cpp:
1935         (WebCore::AccessibilityMenuList::press):
1936         (WebCore::AccessibilityMenuList::isCollapsed):
1937         * accessibility/AccessibilityObject.cpp:
1938         (WebCore::AccessibilityObject::headingElementForNode):
1939         (WebCore::AccessibilityObject::actionVerb):
1940         * accessibility/AccessibilityObject.h:
1941         * accessibility/AccessibilityRenderObject.cpp:
1942         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
1943         (WebCore::AccessibilityRenderObject::actionVerb):
1944         * accessibility/AccessibilityTableColumn.cpp:
1945         (WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
1946         * accessibility/AccessibilityTableHeaderContainer.cpp:
1947         (WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
1948         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1949
1950 2013-08-20  Bruno de Oliveira Abinader  <bruno.d@partner.samsung.com>
1951
1952         [css3-text] Implement CSS3 text-decoration shorthand
1953         https://bugs.webkit.org/show_bug.cgi?id=92000
1954
1955         Reviewed by Darin Adler.
1956
1957         Implements the text-decoration shorthand (with -webkit- prefix), as specified by the CSS3 Text Decoration specification:
1958         http://dev.w3.org/csswg/css-text-decor-3/#text-decoration-property
1959
1960         Backported from Blink:
1961         https://src.chromium.org/viewvc/blink?revision=156266&view=revision
1962
1963         Tests: fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand-ordering.html
1964                fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand.html
1965
1966         * css/CSSComputedStyleDeclaration.cpp:
1967         (WebCore::ComputedStyleExtractor::propertyValue):
1968         * css/CSSParser.cpp:
1969         (WebCore::CSSParser::parseValue):
1970         (WebCore::CSSParser::addTextDecorationProperty):
1971         (WebCore::CSSParser::parseTextDecoration):
1972         * css/CSSProperty.cpp:
1973         (WebCore::CSSProperty::isInheritedProperty):
1974         * css/CSSPropertyNames.in:
1975         * css/StylePropertyShorthand.cpp:
1976         (WebCore::webkitTextDecorationShorthand):
1977         (WebCore::shorthandForProperty):
1978         (WebCore::matchingShorthandsForLonghand):
1979         * css/StylePropertyShorthand.h:
1980
1981 2013-08-20  Gavin Barraclough  <barraclough@apple.com>
1982
1983         https://bugs.webkit.org/show_bug.cgi?id=120054
1984         Remove some dead code following getOwnPropertyDescriptor cleanup
1985
1986         Reviewed by Oliver Hunt.
1987
1988         * bindings/js/JSPluginElementFunctions.cpp:
1989         * bindings/js/JSPluginElementFunctions.h:
1990             - remove runtimeObjectCustomGetOwnPropertyDescriptor, pluginElementCustomGetOwnPropertyDescriptor
1991
1992 2013-08-20  Alex Christensen  <achristensen@apple.com>
1993
1994         Use PlatformArchitecture to distinguish between 32-bit and 64-bit builds on Windows.
1995         https://bugs.webkit.org/show_bug.cgi?id=119512
1996
1997         Reviewed by Brent Fulgham.
1998
1999         * WebCore.vcxproj/WebCore.vcxproj:
2000         * WebCore.vcxproj/WebCore.vcxproj.filters:
2001         * WebCore.vcxproj/WebCoreCommon.props:
2002         * WebCore.vcxproj/WebCoreGeneratedCommon.props:
2003         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
2004         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
2005         Replaced obj32, bin32, and lib32 with macros for 64-bit build.
2006
2007 2013-08-20  Jessie Berlin  <jberlin@apple.com>
2008
2009         Remove a string no longer used after r154251.
2010
2011         Rubber-stamped by Brady Eidson.
2012
2013         * English.lproj/Localizable.strings:
2014
2015 2013-08-20  Jakob Petsovits  <jpetsovits@blackberry.com>
2016
2017         [BlackBerry] Avoid an assertion from calling releaseBufferDrawable(nullptr)
2018         https://bugs.webkit.org/show_bug.cgi?id=119862
2019         JIRA 470760
2020
2021         Reviewed by Antonio Gomes.
2022
2023         destroyBuffer() finds a null pointer valid but
2024         releaseBufferDrawable() does not. Fix by adding a
2025         null pointer check.
2026
2027         No new tests, caught by existing layout test runs.
2028
2029         * platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
2030         (WebCore::ImageBuffer::~ImageBuffer):
2031
2032 2013-08-19  Gustavo Noronha Silva  <gns@gnome.org>
2033
2034         <https://webkit.org/b/120048> [GTK] Add stubs for APIs that went missing in the DOM bindings
2035
2036         Reviewed by Martin Robinson.
2037
2038         No new tests, these are just stubs for the DOM bindings API.
2039
2040         * bindings/gobject/WebKitDOMCustom.cpp:
2041         (webkit_dom_bar_info_get_property):
2042         (webkit_dom_bar_info_class_init):
2043         (webkit_dom_bar_info_init):
2044         (webkit_dom_bar_info_get_visible):
2045         (webkit_dom_console_get_memory):
2046         (webkit_dom_css_style_declaration_get_property_css_value):
2047         (webkit_dom_document_get_webkit_hidden):
2048         (webkit_dom_document_get_webkit_visibility_state):
2049         (webkit_dom_html_document_open):
2050         (webkit_dom_html_element_set_item_id):
2051         (webkit_dom_html_element_get_item_id):
2052         (webkit_dom_html_element_get_item_ref):
2053         (webkit_dom_html_element_get_item_prop):
2054         (webkit_dom_html_element_set_item_scope):
2055         (webkit_dom_html_element_get_item_scope):
2056         (webkit_dom_html_element_get_item_type):
2057         (webkit_dom_html_properties_collection_get_property):
2058         (webkit_dom_html_properties_collection_class_init):
2059         (webkit_dom_html_properties_collection_init):
2060         (webkit_dom_html_properties_collection_item):
2061         (webkit_dom_html_properties_collection_named_item):
2062         (webkit_dom_html_properties_collection_get_length):
2063         (webkit_dom_html_properties_collection_get_names):
2064         (webkit_dom_node_get_attributes):
2065         (webkit_dom_node_has_attributes):
2066         (webkit_dom_memory_info_get_property):
2067         (webkit_dom_memory_info_class_init):
2068         (webkit_dom_memory_info_init):
2069         (webkit_dom_memory_info_get_total_js_heap_size):
2070         (webkit_dom_memory_info_get_used_js_heap_size):
2071         (webkit_dom_memory_info_get_js_heap_size_limit):
2072         (webkit_dom_micro_data_item_value_class_init):
2073         (webkit_dom_micro_data_item_value_init):
2074         (webkit_dom_performance_get_memory):
2075         (webkit_dom_property_node_list_get_property):
2076         (webkit_dom_property_node_list_class_init):
2077         (webkit_dom_property_node_list_init):
2078         (webkit_dom_property_node_list_item):
2079         (webkit_dom_property_node_list_get_length):
2080         * bindings/gobject/WebKitDOMCustom.h:
2081
2082 2013-08-20  Antti Koivisto  <antti@apple.com>
2083
2084         <https://webkit.org/b/120017> Remove NodeRenderingTraversal::ParentDetails
2085
2086         Reviewed by Andreas Kling.
2087
2088         Remove this oddly factored type that is used to optionally collect some data during ComposedShadowTreeWalker parent traversal.
2089         
2090         Also removed support for reset-style-inheritance attribute in InsertionPoint. We don't use or expose it.
2091
2092         * css/StyleResolver.cpp:
2093         (WebCore::StyleResolver::State::initForStyleResolve):
2094         (WebCore::StyleResolver::styleForElement):
2095         * css/StyleResolver.h:
2096         (WebCore::StyleResolver::State::State):
2097         (WebCore::StyleResolver::State::elementLinkState):
2098         
2099             Remove m_distributedToInsertionPoint State field. We never hit the cases where it was used.
2100
2101         * dom/ComposedShadowTreeWalker.cpp:
2102         (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
2103         (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
2104         (WebCore::ComposedShadowTreeWalker::traverseParent):
2105         
2106             Return null instead of setting childWasOutOfComposition to details object. That's what would happen anyway in the caller.
2107
2108         (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
2109         (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
2110         * dom/ComposedShadowTreeWalker.h:
2111         * dom/Node.cpp:
2112         (WebCore::Node::insertionParentForBinding):
2113         * dom/NodeRenderingContext.cpp:
2114         (WebCore::NodeRenderingContext::NodeRenderingContext):
2115         (WebCore::NodeRenderingContext::isOnEncapsulationBoundary):
2116         
2117             Make this look up InsertionPoint directly intead of relying it being populated in m_parentDetails. The function is used only in
2118             a few non-performance critical places.
2119
2120         (WebCore::NodeRenderingContext::resetStyleInheritance):
2121         
2122             Return parent ShadowRoots resetStyleInheritance() flag instead of using m_parentDetails.
2123
2124         * dom/NodeRenderingContext.h:
2125         * dom/NodeRenderingTraversal.cpp:
2126         (WebCore::NodeRenderingTraversal::parentSlow):
2127         * dom/NodeRenderingTraversal.h:
2128         (WebCore::NodeRenderingTraversal::parent):
2129         
2130             Remove ParentDetails.
2131
2132         * html/HTMLAttributeNames.in:
2133         * html/shadow/InsertionPoint.cpp:
2134         
2135             Remove unused resetStyleInheritance attribute.
2136
2137         (WebCore::InsertionPoint::removedFrom):
2138         (WebCore::findInsertionPointOf):
2139         
2140             Renamed for clarity.
2141
2142         * html/shadow/InsertionPoint.h:
2143         * testing/Internals.cpp:
2144         (WebCore::Internals::includerFor):
2145
2146 2013-08-20  Antti Koivisto  <antti@apple.com>
2147
2148         <https://webkit.org/b/120025> REGRESSION (r154254): fast/frames/frameset-frameborder-inheritance.html failing on Apple MountainLion Debug WK1 (Tests)
2149
2150         Reviewed by Anders Carlsson.
2151
2152         * html/HTMLDocument.cpp:
2153         (WebCore::HTMLDocument::isFrameSet):
2154         * html/HTMLFrameElement.cpp:
2155         (WebCore::HTMLFrameElement::didAttachRenderers):
2156         
2157             Make helper public in HTMLFrameSetElement.
2158
2159         * html/HTMLFrameSetElement.cpp:
2160         (WebCore::HTMLFrameSetElement::findContaining):
2161         
2162             Static function for finding containing frameset, if any.
2163
2164         (WebCore::HTMLFrameSetElement::willAttachRenderers):
2165         
2166             This broke in refactoring. We should exit the loop when the first containing frameset is found. Fix by refactoring more.
2167
2168         * html/HTMLFrameSetElement.h:
2169         (WebCore::isHTMLFrameSetElement):
2170         (WebCore::toHTMLFrameSetElement):
2171         
2172             Add casting functions.
2173
2174         * rendering/RenderFrameSet.cpp:
2175         (WebCore::RenderFrameSet::frameSet):
2176
2177 2013-08-20  Antti Koivisto  <antti@apple.com>
2178
2179         <https://webkit.org/b/120023> REGRESSION(r154257): svg/custom/bug78807.svg and svg/custom/use-invalid-style.svg failing
2180
2181         Reviewed by Andreas Kling.
2182
2183         * xml/XMLErrors.cpp:
2184         (WebCore::XMLErrors::insertErrorMessageBlock): "reattach" had accidentally turned into "detach" in refactoring.
2185
2186 2013-08-20  Antti Koivisto  <antti@apple.com>
2187
2188         <https://webkit.org/b/119969> REGRESSION (r154232): Crash on the japantimes.co.jp
2189
2190         Reviewed by Andreas Kling.
2191         
2192         PseudoElement no longer has parent and calling Element::insertedInto for them crashes as it tries to access it.
2193
2194         Normally there are no pseudo elements when Element::insertedInto() is invoked as they get detached and attached
2195         along with rendering. However in this case the page inserts a <style> that uses ::before along with an element
2196         that it applies to. Stylesheet insertion triggers synchronous style recalc that attaches rendering to all newly
2197         insered elements. Later Element::insertedInto gets called for the element that has pseudo element and we crash.
2198
2199         Test: fast/css-generated-content/insert-stylesheet-and-pseudo-crash.html
2200
2201         * dom/Element.cpp:
2202         (WebCore::Element::insertedInto):
2203         (WebCore::Element::removedFrom):
2204         
2205             Remove calls to insertedInto/removedFrom for pseudo elements. They are not considered to be in document.
2206             When they are added normally during render tree attach these calls don't happen either.
2207
2208 2013-08-20  Ryosuke Niwa  <rniwa@webkit.org>
2209
2210         Windows build fix after r154314.
2211
2212         * platform/graphics/cg/PathCG.cpp:
2213         (WebCore::Path::platformAddPathForRoundedRect):
2214
2215 2013-08-19  Hurnjoo Lee  <hurnjoo.lee@samsung.com>
2216
2217         [Cairo] Canvas putImageData is not working as expected
2218         https://bugs.webkit.org/show_bug.cgi?id=119992
2219
2220         Reviewed by Darin Adler.
2221
2222         ImageBufferCairo::putImageArray didn't perform pre-multiply in case of zero alpha value.
2223         If the alpha value is not 255, image data should always be pre-multiplied.
2224
2225         Test: fast/canvas/canvas-putImageData-zero-alpha.html
2226
2227         * platform/graphics/cairo/ImageBufferCairo.cpp:
2228         (WebCore::ImageBuffer::putByteArray):
2229
2230 2013-08-19  Santosh Mahto  <santosh.ma@samsung.com>
2231
2232         <https://webkit.org/b/119991> change usage of calculateUTCOffset()/calculateDSTOffset  to calculateLocalTimeOffset
2233
2234         Reviewed by Darin Adler.
2235
2236         Resolving code error.
2237
2238         * html/BaseDateAndTimeInputType.cpp:
2239         (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp):
2240         * html/MonthInputType.cpp:
2241         (WebCore::MonthInputType::defaultValueForStepUp):
2242         * html/TimeInputType.cpp:
2243         (WebCore::TimeInputType::defaultValueForStepUp):
2244
2245 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
2246
2247         <https://webkit.org/b/120049> Delete code for Snow Leopard
2248
2249         Reviewed by Benjamin Poulain.
2250
2251         Delete all the code for Mac OS 10.6. Nobody builds on Snow Leopard at this point.
2252
2253         * WebCore.exp.in:
2254         * WebCore.xcodeproj/project.pbxproj:
2255         * editing/mac/EditorMac.mm:
2256         (WebCore::Editor::pasteWithPasteboard):
2257         * page/ContextMenuController.cpp:
2258         (WebCore::ContextMenuController::populate):
2259         * platform/LocalizedStrings.cpp:
2260         (WebCore::truncatedStringForLookupMenuItem):
2261         (WebCore::contextMenuItemTagSearchWeb):
2262         (WebCore::contextMenuItemTagLookUpInDictionary):
2263         * platform/MemoryPressureHandler.cpp:
2264         * platform/audio/mac/AudioBusMac.mm:
2265         (WebCore::AudioBus::loadPlatformResource):
2266         * platform/graphics/ca/GraphicsLayerCA.cpp:
2267         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2268         * platform/graphics/ca/PlatformCALayer.h:
2269         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2270         (PlatformCALayer::acceleratesDrawing):
2271         (PlatformCALayer::setAcceleratesDrawing):
2272         (PlatformCALayer::contentsScale):
2273         (PlatformCALayer::setContentsScale):
2274         (PlatformCALayer::synchronouslyDisplayTilesInRect):
2275         * platform/graphics/ca/mac/TileController.mm:
2276         (WebCore::TileController::setScale):
2277         (WebCore::TileController::setAcceleratesDrawing):
2278         (WebCore::TileController::createTileLayer):
2279         * platform/graphics/cg/ImageBufferDataCG.cpp:
2280         (WebCore::ImageBufferData::getData):
2281         (WebCore::ImageBufferData::putData):
2282         * platform/graphics/cg/ImageBufferDataCG.h:
2283         * platform/graphics/cg/PathCG.cpp:
2284         (WebCore::Path::platformAddPathForRoundedRect):
2285         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2286         (WebCore::FontPlatformData::FontPlatformData):
2287         (WebCore::FontPlatformData::setFont):
2288         * platform/graphics/mac/FontMac.mm:
2289         (WebCore::showGlyphsWithAdvances):
2290         * platform/graphics/mac/GraphicsContextMac.mm:
2291         (WebCore::GraphicsContext::drawLineForDocumentMarker):
2292         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2293         (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
2294         (WebCore::MediaPlayerPrivateQTKit::layerHostChanged):
2295         * platform/graphics/mac/WebLayer.mm:
2296         (drawLayerContents):
2297         * platform/mac/CursorMac.mm:
2298         (WebCore::Cursor::ensurePlatformCursor):
2299         * platform/mac/EmptyProtocolDefinitions.h: Removed.
2300         * platform/mac/MemoryPressureHandlerMac.mm:
2301         (WebCore::MemoryPressureHandler::releaseMemory):
2302         * platform/mac/NSScrollerImpDetails.h:
2303         * platform/mac/PlatformEventFactoryMac.mm:
2304         (WebCore::momentumPhaseForEvent):
2305         (WebCore::phaseForEvent):
2306         * platform/mac/ScrollAnimatorMac.mm:
2307         * platform/mac/SharedTimerMac.mm:
2308         * platform/mac/WebCoreSystemInterface.h:
2309         * platform/mac/WebCoreSystemInterface.mm:
2310         * platform/network/mac/ResourceHandleMac.mm:
2311         * platform/network/mac/ResourceRequestMac.mm:
2312         (WebCore::ResourceRequest::doUpdateResourceRequest):
2313         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2314         * platform/text/cf/HyphenationCF.cpp:
2315         * platform/text/mac/HyphenationMac.mm: Removed.
2316         * rendering/RenderLayerBacking.cpp:
2317         (WebCore::RenderLayerBacking::containsPaintedContent):
2318         * rendering/RenderThemeMac.mm:
2319         (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
2320
2321 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
2322
2323         <https://webkit.org/b/120041> Remove superfluous min calls in RenderBlock::computeOverflow
2324
2325         Reviewed by Simon Fraser.
2326
2327         Merge https://chromium.googlesource.com/chromium/blink/+/29cad35d6b4642804e6b7c1a30f0b4435dd7a71d
2328
2329         They are contained in an "if" statement that ensures that textIndent < 0 and so the min will never be 0.
2330
2331         * rendering/RenderBlock.cpp:
2332         (WebCore::RenderBlock::computeOverflow):
2333
2334 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
2335
2336         <https://webkit.org/b/119930> input[type=range]: Fix a crash by changing input type in 'input' event handler
2337
2338         Reviewed by Kent Tamura.
2339
2340         Merge https://chromium.googlesource.com/chromium/blink/+/99afc9b55ce176b4f5fe053070e19dbebc1891a5
2341
2342         In SliderThumbElement::setPositionFromPoint, renderer() can be NULL after HTMLInputElement::setValueFromRenderer,
2343         which dispatches 'input' event. Also, make a local vairable 'input' a RefPtr just in case.
2344
2345         Also add null-poinetr checks for the host element as SliderThumbElement only weakly holds onto the host element.
2346
2347         Test: fast/forms/range/range-type-change-oninput.html
2348
2349         * html/shadow/SliderThumbElement.cpp:
2350         (WebCore::SliderThumbElement::isDisabledFormControl):
2351         (WebCore::SliderThumbElement::matchesReadOnlyPseudoClass):
2352         (WebCore::SliderThumbElement::matchesReadWritePseudoClass):
2353         (WebCore::SliderThumbElement::setPositionFromPoint):
2354         (WebCore::SliderThumbElement::hostInput):
2355
2356 2013-08-19  Alexey Proskuryakov  <ap@apple.com>
2357
2358         https://bugs.webkit.org/show_bug.cgi?id=120028
2359         ASSERTION FAILED: m_history->provisionalItem() == m_requestedHistoryItem.get()
2360         when navigating to an uncached subframe
2361
2362         Reviewed by Brady Eidson.
2363
2364         Test: http/tests/navigation/post-frames-goback1-uncached.html
2365
2366         * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURLIntoChildFrame):
2367         Set m_requestedHistoryItem in a code path that doesn't go through FrameLoader::loadItem.
2368
2369         * loader/HistoryController.cpp: (WebCore::HistoryController::restoreDocumentState):
2370         Now that we always set m_requestedHistoryItem, there is no need to traverse frame
2371         tree to see if this document is being loaded as part of b/f navigation (which was
2372         add in bug 90870).
2373
2374 2013-08-19  Gavin Barraclough  <barraclough@apple.com>
2375
2376         https://bugs.webkit.org/show_bug.cgi?id=120034
2377         Remove custom getOwnPropertyDescriptor for global objects
2378
2379         Reviewed by Geoff Garen.
2380
2381         Fix attributes of JSC SynbolTableObject entries, ensure that cross frame access is safe, and suppress prototype chain walk.
2382
2383         * bindings/js/JSDOMWindowCustom.cpp:
2384         (WebCore::JSDOMWindow::getOwnPropertySlot):
2385             - Remove custom getOwnPropertyDescriptor implementation, on cross-frame access ensure
2386               all properties are marked as read-only, non-configurable to prevent defineProperty.
2387
2388 2013-08-19  Gavin Barraclough  <barraclough@apple.com>
2389
2390         https://bugs.webkit.org/show_bug.cgi?id=119995
2391         Start removing custom implementations of getOwnPropertyDescriptor
2392
2393         Reviewed by Sam Weinig.
2394
2395         This can now typically implemented in terms of getOwnPropertySlot.
2396         Add a macro to PropertyDescriptor to define an implementation of GOPD in terms of GOPS.
2397         Switch over most classes in JSC & the WebCore bindings generator to use this.
2398
2399         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2400         * bindings/js/JSHTMLAppletElementCustom.cpp:
2401         * bindings/js/JSHTMLEmbedElementCustom.cpp:
2402         * bindings/js/JSHTMLObjectElementCustom.cpp:
2403         * bindings/js/JSHistoryCustom.cpp:
2404         (WebCore::JSHistory::getOwnPropertySlotDelegate):
2405         * bindings/js/JSLocationCustom.cpp:
2406         (WebCore::JSLocation::getOwnPropertySlotDelegate):
2407         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
2408             - Remove getOwnPropertyDescriptorDelegate methods,
2409               Change attributes of cross-frame access properties in JSHistory/JSLocation to prevent properties from being redefined.
2410         * bindings/scripts/CodeGeneratorJS.pm:
2411         (GenerateHeader):
2412         (GenerateImplementation):
2413         (GenerateConstructorHelperMethods):
2414             - Implement getOwnPropertySlot in terms of GET_OWN_PROPERTY_DESCRIPTOR_IMPL.
2415         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2416         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2417         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2418         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2419         * bindings/scripts/test/JS/JSTestException.cpp:
2420         * bindings/scripts/test/JS/JSTestInterface.cpp:
2421         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2422         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2423         * bindings/scripts/test/JS/JSTestNode.cpp:
2424         * bindings/scripts/test/JS/JSTestObj.cpp:
2425         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2426         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2427         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2428             - Update test expectations.
2429
2430 2013-08-19  Benjamin Poulain  <benjamin@webkit.org>
2431
2432         <https://webkit.org/b/119936> Fix some encapsulation issues of RuleSet
2433
2434         Reviewed by Darin Adler.
2435
2436         None of the attributes of RuleSet should be modified directly.
2437
2438         * css/DocumentRuleSets.cpp:
2439         (WebCore::DocumentRuleSets::initUserStyle):
2440         * css/ElementRuleCollector.cpp:
2441         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
2442         * css/RuleSet.h:
2443         (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
2444         (WebCore::RuleSet::regionSelectorsAndRuleSets):
2445         (WebCore::RuleSet::ruleCount):
2446         * css/StyleResolver.cpp:
2447         (WebCore::StyleResolver::checkRegionStyle):
2448
2449 2013-08-19  Benjamin Poulain  <benjamin@webkit.org>
2450
2451         <https://webkit.org/b/119937> Remove ElementRuleCollector's m_behaviorAtBoundary
2452
2453         Reviewed by Darin Adler.
2454
2455         The value DoesNotCrossBoundary is the default behavior boundary of SelectorChecker,
2456         and it is never changed by ElementRuleCollector.
2457
2458         * css/ElementRuleCollector.cpp:
2459         (WebCore::ElementRuleCollector::collectMatchingRules):
2460         (WebCore::ElementRuleCollector::ruleMatches):
2461         * css/ElementRuleCollector.h:
2462         (WebCore::ElementRuleCollector::ElementRuleCollector):
2463
2464 2013-08-19  Benjamin Poulain  <benjamin@webkit.org>
2465
2466         <https://webkit.org/b/119934> Remove a repeated "private:" from ElementRuleCollector
2467
2468         Reviewed by Darin Adler.
2469
2470         * css/ElementRuleCollector.h:
2471
2472 2013-08-19  Pratik Solanki  <psolanki@apple.com>
2473
2474         <https://webkit.org/b/120019> Document::visitedLinkState() should return a reference
2475
2476         Reviewed by Andreas Kling.
2477
2478         Document::m_visitedLinkState is never NULL so we can just return a reference. Also make it a const.
2479
2480         * css/StyleResolver.cpp:
2481         (WebCore::StyleResolver::State::initElement):
2482         * dom/Document.h:
2483         (WebCore::Document::visitedLinkState):
2484         * history/CachedPage.cpp:
2485         (WebCore::CachedPage::restore):
2486         * page/Page.cpp:
2487         (WebCore::Page::allVisitedStateChanged):
2488         (WebCore::Page::visitedStateChanged):
2489
2490 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
2491
2492         ASSERTION FAILED: !node || node->isShadowRoot() in WebCore::EventRetargeter::eventTargetRespectingTargetRules
2493         https://bugs.webkit.org/show_bug.cgi?id=119720
2494
2495         Reviewed by Andy Estes.
2496
2497         Merge https://chromium.googlesource.com/chromium/blink/+/4ce9bfbf54410179cd0f18b3d1a912045fc0ec3d
2498
2499         * dom/EventRetargeter.h:
2500         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
2501
2502 2013-08-19  Darin Adler  <darin@apple.com>
2503
2504         <https://webkit.org/b/120013> Tighten up logic in HTMLTableRowsCollection
2505
2506         Reviewed by Andy Estes.
2507
2508         I was looking for incorrect uses of hasLocalName in places where hasTagName should be used.
2509         The use in HTMLTableRowsCollection looked like that kind of mistake, but when I tried to
2510         make a test case to show the mistake, I found I could not. So I wrote assertions to restate
2511         what I learned, and removed an unneeded null check and tightened up the code a bit. This
2512         should make code size slightly smaller.
2513
2514         * html/HTMLTableRowsCollection.cpp:
2515         (WebCore::assertRowIsInTable): Added. Asserts that the row's position in the table is consistent
2516         with the invariants of how the collection class works. A row that is processed here would have
2517         to be an immediate child of the table, or an immediate child of a table section that in turn is
2518         an immediate child of the table.
2519         (WebCore::isInSection): Added. Replaces the three more-specific helper functions. Unlike those,
2520         this does not do a null check.
2521         (WebCore::HTMLTableRowsCollection::rowAfter): Changed to use the two new functions.
2522
2523 2013-08-19  Pratik Solanki  <psolanki@apple.com>
2524
2525         <https://webkit.org/b/119918> Frame::selection() should return a reference
2526
2527         Reviewed by Darin Adler.
2528
2529         m_selection is never NULL so return a reference from Frame::selection(). Also removed some
2530         unnecessary null checks and assert diff ts exposed as a result.
2531
2532         * accessibility/AccessibilityRenderObject.cpp:
2533         (WebCore::AccessibilityRenderObject::selection):
2534         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2535         (WebCore::AccessibilityRenderObject::isFocused):
2536         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
2537         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
2538         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2539         (-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]):
2540         (-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]):
2541         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
2542         (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
2543         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2544         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
2545         * css/SelectorChecker.cpp:
2546         (WebCore::SelectorChecker::isFrameFocused):
2547         * dom/CharacterData.cpp:
2548         (WebCore::CharacterData::setDataAndUpdate):
2549         * dom/Document.cpp:
2550         (WebCore::Document::nodeChildrenWillBeRemoved):
2551         (WebCore::Document::nodeWillBeRemoved):
2552         * dom/Element.cpp:
2553         (WebCore::Element::updateFocusAppearance):
2554         * editing/AlternativeTextController.cpp:
2555         (WebCore::AlternativeTextController::stopPendingCorrection):
2556         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
2557         (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
2558         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
2559         (WebCore::AlternativeTextController::timerFired):
2560         (WebCore::AlternativeTextController::respondToChangedSelection):
2561         * editing/DeleteButtonController.cpp:
2562         (WebCore::DeleteButtonController::respondToChangedSelection):
2563         (WebCore::DeleteButtonController::enable):
2564         (WebCore::DeleteButtonController::deleteTarget):
2565         * editing/DeleteSelectionCommand.cpp:
2566         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
2567         * editing/DictationCommand.cpp:
2568         (WebCore::DictationCommand::insertText):
2569         * editing/EditCommand.cpp:
2570         (WebCore::EditCommand::EditCommand):
2571         * editing/EditingStyle.cpp:
2572         (WebCore::EditingStyle::mergeTypingStyle):
2573         * editing/Editor.cpp:
2574         (WebCore::Editor::selectionForCommand):
2575         (WebCore::Editor::canEdit):
2576         (WebCore::Editor::canEditRichly):
2577         (WebCore::Editor::canDHTMLCut):
2578         (WebCore::Editor::canDHTMLCopy):
2579         (WebCore::Editor::canCopy):
2580         (WebCore::Editor::canDelete):
2581         (WebCore::Editor::canSmartCopyOrDelete):
2582         (WebCore::Editor::deleteWithDirection):
2583         (WebCore::Editor::deleteSelectionWithSmartDelete):
2584         (WebCore::Editor::replaceSelectionWithFragment):
2585         (WebCore::Editor::selectedRange):
2586         (WebCore::Editor::tryDHTMLCopy):
2587         (WebCore::Editor::tryDHTMLCut):
2588         (WebCore::Editor::hasBidiSelection):
2589         (WebCore::Editor::selectionUnorderedListState):
2590         (WebCore::Editor::selectionOrderedListState):
2591         (WebCore::Editor::increaseSelectionListLevel):
2592         (WebCore::Editor::increaseSelectionListLevelOrdered):
2593         (WebCore::Editor::increaseSelectionListLevelUnordered):
2594         (WebCore::Editor::decreaseSelectionListLevel):
2595         (WebCore::Editor::findEventTargetFromSelection):
2596         (WebCore::Editor::applyStyle):
2597         (WebCore::Editor::applyParagraphStyle):
2598         (WebCore::Editor::applyStyleToSelection):
2599         (WebCore::Editor::applyParagraphStyleToSelection):
2600         (WebCore::Editor::selectionStartHasStyle):
2601         (WebCore::Editor::selectionHasStyle):
2602         (WebCore::Editor::selectionStartCSSPropertyValue):
2603         (WebCore::Editor::appliedEditing):
2604         (WebCore::Editor::insertTextWithoutSendingTextEvent):
2605         (WebCore::Editor::insertLineBreak):
2606         (WebCore::Editor::insertParagraphSeparator):
2607         (WebCore::Editor::cut):
2608         (WebCore::Editor::copy):
2609         (WebCore::Editor::paste):
2610         (WebCore::Editor::baseWritingDirectionForSelectionStart):
2611         (WebCore::Editor::selectComposition):
2612         (WebCore::Editor::setComposition):
2613         (WebCore::Editor::ignoreSpelling):
2614         (WebCore::Editor::learnSpelling):
2615         (WebCore::Editor::advanceToNextMisspelling):
2616         (WebCore::Editor::misspelledWordAtCaretOrRange):
2617         (WebCore::Editor::isSelectionUngrammatical):
2618         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
2619         (WebCore::Editor::markMisspellingsAfterTypingToWord):
2620         (WebCore::Editor::isSpellCheckingEnabledInFocusedNode):
2621         (WebCore::Editor::markAndReplaceFor):
2622         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
2623         (WebCore::Editor::revealSelectionAfterEditingOperation):
2624         (WebCore::Editor::getCompositionSelection):
2625         (WebCore::Editor::transpose):
2626         (WebCore::Editor::changeSelectionAfterCommand):
2627         (WebCore::Editor::selectedText):
2628         (WebCore::Editor::computeAndSetTypingStyle):
2629         (WebCore::Editor::findString):
2630         (WebCore::Editor::respondToChangedSelection):
2631         (WebCore::Editor::selectionStartHasMarkerFor):
2632         (WebCore::Editor::toggleOverwriteModeEnabled):
2633         * editing/EditorCommand.cpp:
2634         (WebCore::executeToggleStyleInList):
2635         (WebCore::expandSelectionToGranularity):
2636         (WebCore::stateTextWritingDirection):
2637         (WebCore::executeDelete):
2638         (WebCore::executeDeleteToMark):
2639         (WebCore::executeMoveBackward):
2640         (WebCore::executeMoveBackwardAndModifySelection):
2641         (WebCore::executeMoveDown):
2642         (WebCore::executeMoveDownAndModifySelection):
2643         (WebCore::executeMoveForward):
2644         (WebCore::executeMoveForwardAndModifySelection):
2645         (WebCore::executeMoveLeft):
2646         (WebCore::executeMoveLeftAndModifySelection):
2647         (WebCore::executeMovePageDown):
2648         (WebCore::executeMovePageDownAndModifySelection):
2649         (WebCore::executeMovePageUp):
2650         (WebCore::executeMovePageUpAndModifySelection):
2651         (WebCore::executeMoveRight):
2652         (WebCore::executeMoveRightAndModifySelection):
2653         (WebCore::executeMoveToBeginningOfDocument):
2654         (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
2655         (WebCore::executeMoveToBeginningOfLine):
2656         (WebCore::executeMoveToBeginningOfLineAndModifySelection):
2657         (WebCore::executeMoveToBeginningOfParagraph):
2658         (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
2659         (WebCore::executeMoveToBeginningOfSentence):
2660         (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
2661         (WebCore::executeMoveToEndOfDocument):
2662         (WebCore::executeMoveToEndOfDocumentAndModifySelection):
2663         (WebCore::executeMoveToEndOfSentence):
2664         (WebCore::executeMoveToEndOfSentenceAndModifySelection):
2665         (WebCore::executeMoveToEndOfLine):
2666         (WebCore::executeMoveToEndOfLineAndModifySelection):
2667         (WebCore::executeMoveToEndOfParagraph):
2668         (WebCore::executeMoveToEndOfParagraphAndModifySelection):
2669         (WebCore::executeMoveParagraphBackwardAndModifySelection):
2670         (WebCore::executeMoveParagraphForwardAndModifySelection):
2671         (WebCore::executeMoveUp):
2672         (WebCore::executeMoveUpAndModifySelection):
2673         (WebCore::executeMoveWordBackward):
2674         (WebCore::executeMoveWordBackwardAndModifySelection):
2675         (WebCore::executeMoveWordForward):
2676         (WebCore::executeMoveWordForwardAndModifySelection):
2677         (WebCore::executeMoveWordLeft):
2678         (WebCore::executeMoveWordLeftAndModifySelection):
2679         (WebCore::executeMoveWordRight):
2680         (WebCore::executeMoveWordRightAndModifySelection):
2681         (WebCore::executeMoveToLeftEndOfLine):
2682         (WebCore::executeMoveToLeftEndOfLineAndModifySelection):
2683         (WebCore::executeMoveToRightEndOfLine):
2684         (WebCore::executeMoveToRightEndOfLineAndModifySelection):
2685         (WebCore::executeSelectAll):
2686         (WebCore::executeSelectToMark):
2687         (WebCore::executeSetMark):
2688         (WebCore::executeSwapWithMark):
2689         (WebCore::executeUnselect):
2690         (WebCore::enabledInRichlyEditableText):
2691         (WebCore::enabledRangeInEditableText):
2692         (WebCore::enabledRangeInRichlyEditableText):
2693         (WebCore::valueFormatBlock):
2694         * editing/FrameSelection.cpp:
2695         (WebCore::FrameSelection::setSelection):
2696         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
2697         * editing/InsertLineBreakCommand.cpp:
2698         (WebCore::InsertLineBreakCommand::doApply):
2699         * editing/InsertTextCommand.cpp:
2700         (WebCore::InsertTextCommand::doApply):
2701         * editing/ModifySelectionListLevel.cpp:
2702         (WebCore::IncreaseSelectionListLevelCommand::canIncreaseSelectionListLevel):
2703         (WebCore::DecreaseSelectionListLevelCommand::canDecreaseSelectionListLevel):
2704         * editing/RemoveFormatCommand.cpp:
2705         (WebCore::RemoveFormatCommand::doApply):
2706         * editing/ReplaceSelectionCommand.cpp:
2707         (WebCore::ReplaceSelectionCommand::doApply):
2708         * editing/SetSelectionCommand.cpp:
2709         (WebCore::SetSelectionCommand::doApply):
2710         (WebCore::SetSelectionCommand::doUnapply):
2711         * editing/SpellingCorrectionCommand.cpp:
2712         (WebCore::SpellingCorrectionCommand::doApply):
2713         * editing/TextInsertionBaseCommand.cpp:
2714         (WebCore::TextInsertionBaseCommand::applyTextInsertionCommand):
2715         * editing/TypingCommand.cpp:
2716         (WebCore::TypingCommand::deleteSelection):
2717         (WebCore::TypingCommand::updateSelectionIfDifferentFromCurrentSelection):
2718         (WebCore::TypingCommand::insertText):
2719         (WebCore::TypingCommand::deleteKeyPressed):
2720         (WebCore::TypingCommand::forwardDeleteKeyPressed):
2721         * editing/ios/EditorIOS.mm:
2722         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
2723         (WebCore::styleForSelectionStart):
2724         (WebCore::Editor::fontForSelection):
2725         * editing/mac/EditorMac.mm:
2726         (WebCore::styleForSelectionStart):
2727         (WebCore::Editor::fontForSelection):
2728         (WebCore::Editor::canCopyExcludingStandaloneImages):
2729         (WebCore::Editor::readSelectionFromPasteboard):
2730         * html/HTMLAnchorElement.cpp:
2731         (WebCore::HTMLAnchorElement::defaultEventHandler):
2732         (WebCore::HTMLAnchorElement::setActive):
2733         * html/HTMLInputElement.cpp:
2734         (WebCore::HTMLInputElement::updateFocusAppearance):
2735         * html/HTMLTextAreaElement.cpp:
2736         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
2737         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
2738         * html/HTMLTextFormControlElement.cpp:
2739         (WebCore::HTMLTextFormControlElement::setSelectionRange):
2740         (WebCore::HTMLTextFormControlElement::computeSelectionStart):
2741         (WebCore::HTMLTextFormControlElement::computeSelectionEnd):
2742         (WebCore::HTMLTextFormControlElement::computeSelectionDirection):
2743         (WebCore::HTMLTextFormControlElement::selectionChanged):
2744         * html/TextFieldInputType.cpp:
2745         (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
2746         * loader/FrameLoader.cpp:
2747         (WebCore::FrameLoader::clear):
2748         * loader/archive/cf/LegacyWebArchive.cpp:
2749         (WebCore::LegacyWebArchive::createFromSelection):
2750         * page/ContextMenuController.cpp:
2751         (WebCore::insertUnicodeCharacter):
2752         (WebCore::ContextMenuController::contextMenuItemSelected):
2753         (WebCore::selectionContainsPossibleWord):
2754         (WebCore::ContextMenuController::populate):
2755         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
2756         * page/DOMSelection.cpp:
2757         (WebCore::selectionShadowAncestor):
2758         (WebCore::DOMSelection::visibleSelection):
2759         (WebCore::DOMSelection::isCollapsed):
2760         (WebCore::DOMSelection::type):
2761         (WebCore::DOMSelection::rangeCount):
2762         (WebCore::DOMSelection::collapse):
2763         (WebCore::DOMSelection::collapseToEnd):
2764         (WebCore::DOMSelection::collapseToStart):
2765         (WebCore::DOMSelection::empty):
2766         (WebCore::DOMSelection::setBaseAndExtent):
2767         (WebCore::DOMSelection::setPosition):
2768         (WebCore::DOMSelection::modify):
2769         (WebCore::DOMSelection::extend):
2770         (WebCore::DOMSelection::getRangeAt):
2771         (WebCore::DOMSelection::removeAllRanges):
2772         (WebCore::DOMSelection::addRange):
2773         (WebCore::DOMSelection::deleteFromDocument):
2774         (WebCore::DOMSelection::containsNode):
2775         (WebCore::DOMSelection::toString):
2776         * page/DragController.cpp:
2777         (WebCore::DragController::dragIsMove):
2778         (WebCore::setSelectionToDragCaret):
2779         (WebCore::DragController::concludeEditDrag):
2780         (WebCore::DragController::draggableElement):
2781         (WebCore::selectElement):
2782         (WebCore::dragLocForSelectionDrag):
2783         (WebCore::DragController::startDrag):
2784         * page/DragController.h:
2785         * page/EventHandler.cpp:
2786         (WebCore::setSelectionIfNeeded):
2787         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
2788         (WebCore::EventHandler::handleMousePressEventDoubleClick):
2789         (WebCore::EventHandler::handleMousePressEventSingleClick):
2790         (WebCore::EventHandler::updateSelectionForMouseDrag):
2791         (WebCore::EventHandler::lostMouseCapture):
2792         (WebCore::EventHandler::handleMouseReleaseEvent):
2793         (WebCore::nodeIsNotBeingEdited):
2794         (WebCore::EventHandler::selectCursor):
2795         (WebCore::EventHandler::handleMousePressEvent):
2796         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2797         (WebCore::EventHandler::dispatchMouseEvent):
2798         (WebCore::EventHandler::sendContextMenuEvent):
2799         (WebCore::EventHandler::sendContextMenuEventForKey):
2800         (WebCore::handleKeyboardSelectionMovement):
2801         (WebCore::EventHandler::handleDrag):
2802         * page/FocusController.cpp:
2803         (WebCore::FocusController::setFocusedFrame):
2804         (WebCore::FocusController::setFocused):
2805         (WebCore::FocusController::advanceFocusInDocumentOrder):
2806         (WebCore::clearSelectionIfNeeded):
2807         (WebCore::FocusController::setActive):
2808         * page/Frame.cpp:
2809         (WebCore::Frame::dragImageForSelection):
2810         * page/Frame.h:
2811         (WebCore::Frame::selection):
2812         * page/FrameView.cpp:
2813         (WebCore::FrameView::performPostLayoutTasks):
2814         (WebCore::FrameView::paintContentsForSnapshot):
2815         * page/Page.cpp:
2816         (WebCore::Page::findString):
2817         (WebCore::Page::findStringMatchingRanges):
2818         (WebCore::Page::selection):
2819         * page/mac/FrameMac.mm:
2820         (WebCore::Frame::dragImageForSelection):
2821         * page/mac/FrameSnapshottingMac.mm:
2822         (WebCore::selectionImage):
2823         * page/win/FrameWin.cpp:
2824         (WebCore::imageFromSelection):
2825         (WebCore::Frame::dragImageForSelection):
2826         * platform/ios/PasteboardIOS.mm:
2827         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
2828         * rendering/HitTestResult.cpp:
2829         (WebCore::HitTestResult::isSelected):
2830         * rendering/RenderBlock.cpp:
2831         (WebCore::RenderBlock::paintCaret):
2832         * rendering/RenderImage.cpp:
2833         (WebCore::RenderImage::paintAreaElementFocusRing):
2834         * rendering/RenderLayer.cpp:
2835         (WebCore::RenderLayer::scrollTo):
2836         * rendering/RenderListBox.cpp:
2837         (WebCore::RenderListBox::paintItemForeground):
2838         (WebCore::RenderListBox::paintItemBackground):
2839         * rendering/RenderObject.cpp:
2840         (WebCore::RenderObject::selectionBackgroundColor):
2841         (WebCore::RenderObject::selectionColor):
2842         * rendering/RenderTextControlSingleLine.cpp:
2843         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
2844         * rendering/RenderTheme.cpp:
2845         (WebCore::RenderTheme::isFocused):
2846         * rendering/RenderThemeWin.cpp:
2847         (WebCore::RenderThemeWin::adjustSearchFieldStyle):
2848         * rendering/RenderTreeAsText.cpp:
2849         (WebCore::writeSelection):
2850         * rendering/RenderView.cpp:
2851         (WebCore::RenderView::setSelection):
2852         * svg/SVGSVGElement.cpp:
2853         (WebCore::SVGSVGElement::deselectAll):
2854         * svg/SVGTextContentElement.cpp:
2855         (WebCore::SVGTextContentElement::selectSubString):
2856         * testing/Internals.cpp:
2857         (WebCore::Internals::absoluteCaretBounds):
2858         (WebCore::Internals::selectionBounds):
2859
2860 2013-08-19  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2861
2862         <https://webkit.org/b/119679> Remove the cast-align warnings for ARM
2863
2864         Reviewed by Darin Adler.
2865
2866         While compiling WebKitGTK+ for ARM a lot of warnings of this form
2867         where shown (gcc 4.7.3):
2868
2869         ../../Source/WebCore/css/StylePropertySet.h: In member function 'const WebCore::StylePropertyMetadata* WebCore::ImmutableStylePropertySet::metadataArray() const':
2870 ../../Source/WebCore/css/StylePropertySet.h:179:142: warning: cast from 'const char*' to 'const WebCore::StylePropertyMetadata*' increases required alignment of target type [-Wcast-align]
2871
2872         This patch changes reinterpret_cast<>() for reinterpret_cast_ptr<>()
2873         which is part of WTF for this purpose, silencing the compiler.
2874
2875         * css/StylePropertySet.h:
2876         (WebCore::ImmutableStylePropertySet::metadataArray):
2877
2878 2013-08-19  Antti Koivisto  <antti@apple.com>
2879
2880         <https://webkit.org/b/120014> REGRESSION(r154268): Some stylesheet media attribute tests failing
2881
2882         Reviewed by Dan Bernstein.
2883
2884         * html/HTMLStyleElement.cpp:
2885         (WebCore::HTMLStyleElement::parseAttribute): Always set the media on InlineStyleSheetOwner.
2886
2887 2013-08-19  Chris Fleizach  <cfleizach@apple.com>
2888
2889         <https://webkit.org/b/119916> AX: WebKit is not exposing AXLanguage correctly
2890
2891         Reviewed by Darin Adler.
2892
2893         Expose the AXLanguage attribute for all objects.
2894
2895         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2896         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2897
2898 2013-08-19  Brent Fulgham  <bfulgham@apple.com>
2899
2900         [Windows] Unreviewed gardening.
2901
2902         * WebCore.vcxproj/WebCore.vcxproj: Add missing header for easy access/editing.
2903         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2904
2905 2013-08-19  Mario Sanchez Prada  <mario.prada@samsung.com>
2906
2907         <https://webkit.org/b/119882> Speed up moving cursor/selection up or down past non-rendered elements.
2908
2909         Reviewed by Darin Adler.
2910
2911         This is a port from Blink originally written by Dominic Mazzoni:
2912         https://src.chromium.org/viewvc/blink?revision=154977&view=revision
2913
2914         From the original commit:
2915
2916         Skips calling firstPositionInOrBeforeNode when a node doesn't have a
2917         renderer, since there couldn't possibly be a visible position there.
2918         This was particularly wasteful when trying to move the cursor up when at
2919         the beginning of a document, as it did a O(n^2) scan through the document head.
2920
2921         Test: editing/execCommand/move-up-down-should-skip-hidden-elements.html
2922
2923         * editing/VisibleUnits.cpp:
2924         (WebCore::previousRootInlineBoxCandidatePosition): Updated.
2925         (WebCore::nextRootInlineBoxCandidatePosition): Updates.
2926
2927 2013-08-19  Andreas Kling  <akling@apple.com>
2928
2929         <https://webkit.org/b/120000> Chrome::client() should return a reference.
2930
2931         Reviewed by Antti Koivisto.
2932
2933         Chrome::m_client should never be null.
2934
2935 2013-08-19  Antti Koivisto  <antti@apple.com>
2936
2937         <https://webkit.org/b/120004> Rename StyleElement to InlineStyleSheetOwner and stop inheriting from it
2938
2939         Reviewed by Andreas Kling.
2940         
2941         Saner names and class relations.
2942
2943         * CMakeLists.txt:
2944         * GNUmakefile.list.am:
2945         * Target.pri:
2946         * WebCore.vcxproj/WebCore.vcxproj:
2947         * WebCore.xcodeproj/project.pbxproj:
2948         * dom/DOMAllInOne.cpp:
2949         * dom/InlineStyleSheetOwner.cpp: Copied from Source/WebCore/dom/StyleElement.cpp.
2950         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
2951         (WebCore::InlineStyleSheetOwner::~InlineStyleSheetOwner):
2952         (WebCore::InlineStyleSheetOwner::insertedIntoDocument):
2953         (WebCore::InlineStyleSheetOwner::removedFromDocument):
2954         (WebCore::InlineStyleSheetOwner::clearDocumentData):
2955         (WebCore::InlineStyleSheetOwner::childrenChanged):
2956         (WebCore::InlineStyleSheetOwner::finishParsingChildren):
2957         (WebCore::InlineStyleSheetOwner::createSheetFromTextContents):
2958         (WebCore::InlineStyleSheetOwner::clearSheet):
2959         (WebCore::InlineStyleSheetOwner::createSheet):
2960         (WebCore::InlineStyleSheetOwner::isLoading):
2961         (WebCore::InlineStyleSheetOwner::sheetLoaded):
2962         (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
2963         * dom/InlineStyleSheetOwner.h: Copied from Source/WebCore/dom/StyleElement.h.
2964         * dom/StyleElement.cpp: Removed.
2965         * dom/StyleElement.h: Removed.
2966         * html/HTMLStyleElement.cpp:
2967         (WebCore::HTMLStyleElement::HTMLStyleElement):
2968         (WebCore::HTMLStyleElement::~HTMLStyleElement):
2969         (WebCore::HTMLStyleElement::parseAttribute):
2970         (WebCore::HTMLStyleElement::finishParsingChildren):
2971         (WebCore::HTMLStyleElement::insertedInto):
2972         (WebCore::HTMLStyleElement::removedFrom):
2973         (WebCore::HTMLStyleElement::childrenChanged):
2974         * html/HTMLStyleElement.h:
2975         * svg/SVGStyleElement.cpp:
2976         (WebCore::SVGStyleElement::SVGStyleElement):
2977         (WebCore::SVGStyleElement::~SVGStyleElement):
2978         (WebCore::SVGStyleElement::parseAttribute):
2979         (WebCore::SVGStyleElement::finishParsingChildren):
2980         (WebCore::SVGStyleElement::insertedInto):
2981         (WebCore::SVGStyleElement::removedFrom):
2982         (WebCore::SVGStyleElement::childrenChanged):
2983         * svg/SVGStyleElement.h:
2984
2985 2013-08-19  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2986
2987         [Qt] QtWebKit (using the Arora browser) displays the border radii (radius) of a button very ugly
2988         https://bugs.webkit.org/show_bug.cgi?id=28113
2989
2990         Reviewed by Jocelyn Turcotte.
2991
2992         StylePainter::init() was called twice making it clobber the previous antialiasing setting.
2993
2994         This patch cleans up the construction so we only have one constructor with init inlined.
2995
2996         * platform/qt/RenderThemeQStyle.cpp:
2997         (WebCore::StylePainterQStyle::StylePainterQStyle):
2998         (WebCore::StylePainterQStyle::setupStyleOption):
2999         * platform/qt/RenderThemeQStyle.h:
3000         * platform/qt/RenderThemeQt.cpp:
3001         (WebCore::StylePainter::StylePainter):
3002         * platform/qt/RenderThemeQt.h:
3003         * platform/qt/RenderThemeQtMobile.cpp:
3004         (WebCore::StylePainterMobile::StylePainterMobile):
3005
3006 2013-08-19  Julien Brianceau  <jbrianceau@nds.com>
3007
3008         <https://webkit.org/b/119998> [Qt] Build fix (broken since r154257).
3009
3010         Reviewed by Andreas Kling.
3011
3012         Element::attach() doesn't exist anymore since r154257.
3013
3014         * xml/parser/XMLDocumentParserQt.cpp:
3015         (WebCore::XMLDocumentParser::parseStartElement):
3016
3017 2013-08-19  Antti Koivisto  <antti@apple.com>
3018
3019         <https://webkit.org/b/120001> Clean up StyleElement
3020
3021         Reviewed by Andreas Kling.
3022
3023         - Make it non-virtual so we don't use virtual multiple inheritance
3024         - Improve names
3025         - Improve code clarity
3026
3027         * dom/StyleElement.cpp:
3028         (WebCore::StyleElement::StyleElement):
3029         (WebCore::StyleElement::insertedIntoDocument):
3030         (WebCore::StyleElement::clearDocumentData):
3031         (WebCore::StyleElement::childrenChanged):
3032         (WebCore::StyleElement::finishParsingChildren):
3033         (WebCore::StyleElement::createSheetFromTextContents):
3034         (WebCore::isValidCSSContentType):
3035         (WebCore::StyleElement::createSheet):
3036         (WebCore::StyleElement::isLoading):
3037         * dom/StyleElement.h:
3038         (WebCore::StyleElement::setStyleSheetContentType):
3039         (WebCore::StyleElement::setStyleSheetMedia):
3040         * html/HTMLStyleElement.cpp:
3041         (WebCore::HTMLStyleElement::parseAttribute):
3042         * html/HTMLStyleElement.h:
3043         * svg/SVGStyleElement.cpp:
3044         (WebCore::SVGStyleElement::isSupportedAttribute):
3045         (WebCore::SVGStyleElement::parseAttribute):
3046         * svg/SVGStyleElement.h:
3047
3048 2013-08-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3049
3050         <https://webkit.org/b/119990> Add toSVGStopElement(Node* node) to clean-up a static_cast<SVGStopElement*>
3051
3052         Reviewed by Darin Adler.
3053
3054         Clean up remained static_cast<SVGStopElement*> using toSVGStopElement(toSVGElement()).
3055
3056         * rendering/svg/SVGRenderTreeAsText.cpp:
3057         (WebCore::writeSVGGradientStop):
3058
3059 2013-08-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3060
3061         <https://webkit.org/b/119996> Introduce toSVGAnimateElement(), and use it
3062
3063         Reviewed by Andreas Kling.
3064
3065         As a step to clean-up static_cast<SVGXXX>, static_cast<SVGAnimateElement*> also can be changed
3066         with toSVGAnimateElement().
3067
3068         * svg/SVGAnimateElement.cpp:
3069         (WebCore::SVGAnimateElement::calculateAnimatedValue):
3070         * svg/SVGAnimateElement.h:
3071         (WebCore::toSVGAnimateElement):
3072         * svg/SVGAnimationElement.cpp:
3073         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
3074
3075 2013-08-19  Andreas Kling  <akling@apple.com>
3076
3077         <https://webkit.org/b/119997> Page::progress() should return a reference.
3078
3079         Reviewed by Antti Koivisto.
3080
3081         Page::m_progress is never null.
3082
3083 2013-08-18  Darin Adler  <darin@apple.com>
3084
3085         <https://webkit.org/b/119989> Make use of Node::ownerDocument a compile time error
3086
3087         Reviewed by Sam Weinig.
3088
3089         * dom/Element.h: Deleted the ownerDocument function. For compilers that don't support
3090         deleted functions, it is instead overrides the base class function with one that is
3091         private and not defined, which accomplishes almost the same thing: An error, either
3092         at compile time or link time.
3093
3094         * bindings/js/JSHTMLElementCustom.cpp:
3095         (WebCore::JSHTMLElement::pushEventHandlerScope): Use document instead of ownerDocument.
3096         * dom/Document.cpp:
3097         (WebCore::Document::~Document): Added a comment about this clearly-incorrect code.
3098         * inspector/InspectorInstrumentation.h:
3099         (WebCore::InspectorInstrumentation::didPushShadowRoot): Use document instead of ownerDocument.
3100         (WebCore::InspectorInstrumentation::willPopShadowRoot): Ditto.
3101         * inspector/InspectorStyleSheet.cpp:
3102         (WebCore::InspectorStyleSheetForInlineStyle::setStyleText): Ditto.
3103         * plugins/PluginView.cpp:
3104         (WebCore::getFrame): Removed ineffective call to ownerDocument after document when it
3105         returns 0. It will never return anything other than 0 in that case.
3106         * rendering/RenderVideo.cpp:
3107         (WebCore::RenderVideo::calculateIntrinsicSize): Use document instead of ownerDocument.
3108         Did not remove the null check at this time, although I'm pretty sure it's bogus. We can
3109         fix that when/if we change the return type of Element::document to a reference.
3110         * svg/SVGFEImageElement.cpp:
3111         (WebCore::SVGFEImageElement::requestImageResource): Use document instead of ownerDocument.
3112
3113 2013-08-18  Darin Adler  <darin@apple.com>
3114
3115         <https://webkit.org/b/119993> Remove most remaining platform-specific code from Clipboard class
3116
3117         Reviewed by Sam Weinig.
3118
3119         * GNUmakefile.list.am: Removed ClipboardGtk.cpp.
3120         * PlatformEfl.cmake: Removed ClipboardEfl.cpp.
3121         * PlatformGTK.cmake: Removed ClipboardGtk.cpp.
3122         * PlatformWinCE.cmake: Removed ClipboardWin.cpp.
3123         * Target.pri: Removed ClipboardQt.cpp.
3124         * WebCore.vcxproj/WebCore.vcxproj: Removed ClipboardWin.cpp and ClipboardWin.h.
3125         * WebCore.vcxproj/WebCore.vcxproj.filters: Removed ClipboardWin.cpp and ClipboardWin.h.
3126
3127         * dom/Clipboard.cpp:
3128         (WebCore::Clipboard::createDragImage): Added. Version that works for all platforms
3129         other than Mac, identical to the old one used in GTK and Qt, and close to the one used
3130         on Windows.
3131
3132         * platform/mac/ClipboardMac.mm: Trimmed includes down, and added a FIXME about next steps.
3133
3134         * platform/qt/DataTransferItemListQt.h: Removed "friend class ClipboardQt", which refers
3135         to a now-nonexistent class.
3136
3137         * platform/efl/ClipboardEfl.cpp: Removed.
3138         * platform/gtk/ClipboardGtk.cpp: Removed.
3139         * platform/qt/ClipboardQt.cpp: Removed.
3140         * platform/win/ClipboardWin.cpp: Removed.
3141
3142 2013-08-17  Darin Adler  <darin@apple.com>
3143
3144         <https://webkit.org/b/119949> Factor Clipboard into drag and non-drag parts
3145
3146         Reviewed by Sam Weinig.
3147
3148         * dom/Clipboard.cpp:
3149         (WebCore::Clipboard::Clipboard): Move the ClipboardType argument to go after the pasteboard.
3150         Initialize strings more efficiently. Put drag-specific data members inside an if statement.
3151         Replace m_clipboardType with m_forDrag.
3152         (WebCore::Clipboard::createForCopyAndPaste): Moved function up to be close to constructor.
3153         Removed explicit clipboard type since constructor now defaults to copy and paste style.
3154         (WebCore::Clipboard::setAccessPolicy): Tweaked comment.
3155         (WebCore::Clipboard::getData): Put drag-specific code inside #if ENABLE(DRAG_SUPPORT).
3156         (WebCore::Clipboard::setData): Ditto.
3157         (WebCore::Clipboard::files): Ditto.
3158         (WebCore::Clipboard::dropEffect): Added trivial non-drag versions of these functions to
3159         be used when !ENABLE(DRAG_SUPPORT).
3160         (WebCore::Clipboard::setDropEffect): Ditto.
3161         (WebCore::Clipboard::effectAllowed): Ditto.
3162         (WebCore::Clipboard::setEffectAllowed): Ditto.
3163         (WebCore::Clipboard::createForDragAndDrop): Renamed Clipboard::create that takes DragData
3164         to this, and kep the overload that does not as well. Made the DragData argument a const&.
3165         (WebCore::Clipboard::canSetDragImage): Moved down here since it is drag-specific.
3166         (WebCore::Clipboard::updateDragImage): Use m_shouldUpdateDragImage directly insted of
3167         calling a dragStarted function.
3168         (WebCore::dragOpFromIEOp): Moved this function down here to the drag-specific section.
3169         (WebCore::IEOpFromDragOp): Ditto.
3170         (WebCore::Clipboard::sourceOperation): Ditto.
3171         (WebCore::Clipboard::destinationOperation): Ditto.
3172         (WebCore::Clipboard::setSourceOperation): Ditto.
3173         (WebCore::Clipboard::setDestinationOperation): Ditto.
3174
3175         * dom/Clipboard.h: Removed unneeded include of "Node.h" and added and removed forward
3176         class declarations as required. Removed non-helpful comment. Made ClipboardType a private
3177         implementation detail. Moved functions that are not part of the DOM API down to a separate
3178         section lower down in the class, and sorted the functions to match the order they appear
3179         in the IDL file. Removed isForCopyAndPaste and isForDragAndDrop. Changed dropEffect and
3180         effectAllowed to not be inlined. Moved the long comment before canSetDragImage into the
3181         implementation since it's an implementation detail. Since this class is no longer polymorphic,
3182         use only private, not protected. Make m_dragImageElement an Element, not a Node.
3183
3184         * dom/Clipboard.idl: Removed flags to tell bindings how to deal with null strings, since
3185         these string properties can never return null strings anyway.
3186
3187         * page/DragController.cpp:
3188         (WebCore::DragController::dragExited): Updated to call the new createForDragAndDrop function.
3189         (WebCore::DragController::performDrag): Ditto.
3190         (WebCore::DragController::tryDHTMLDrag): Ditto.
3191
3192         * platform/mac/ClipboardMac.mm: Added now-needed include of Element.h since Clipboard.h no
3193         longer includes it.
3194
3195 2013-08-18  David Kilzer  <ddkilzer@apple.com>
3196
3197         WebCore fails to build with trunk clang: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
3198         <http://webkit.org/b/119932>
3199         <rdar://problem/14764085>
3200
3201         Reviewed by Darin Adler.
3202
3203         Add pragma statements to ignore -Wdeprecated-register warnings
3204         in generated code.  Also ignore -Wunknown-pragmas so this
3205         doesn't cause a build failure in older versions of clang.
3206
3207         * css/makeprop.pl:
3208         (WebCore::findProperty): Remove register hints from parameters.
3209         * css/makevalues.pl:
3210         (WebCore::findValue): Ditto.
3211         * platform/ColorData.gperf:
3212         (WebCore::findColor): Ditto.
3213
3214 2013-08-18  Antti Koivisto  <antti@apple.com>
3215
3216         <https://webkit.org/b/119987> Make Element::attach standalone function
3217
3218         Reviewed by Andreas Kling.
3219
3220         This patch turns Element::attach() and the related functions into standalone functions.
3221
3222         * dom/ContainerNode.cpp:
3223         (WebCore::attachChild):
3224         (WebCore::detachChild):
3225         * dom/ContainerNode.h:
3226         * dom/Document.cpp:
3227         (WebCore::Document::attach):
3228         (WebCore::Document::detach):
3229         * dom/Element.cpp:
3230         (WebCore::Element::~Element):
3231         (WebCore::Element::lazyReattach):
3232         (WebCore::Element::removeShadowRoot):
3233         
3234             Shadow root should be detached by now. Remove the detach call.
3235
3236         (WebCore::Element::updateFocusAppearanceAfterAttachIfNeeded):
3237         (WebCore::Element::updatePseudoElement):
3238         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
3239         (WebCore::Element::clearHoverAndActiveStatusBeforeDetachingRenderer):
3240         
3241             Factor some parts of former Element::attach/detach() into member functions.
3242
3243         * dom/Element.h:
3244         * dom/ElementRareData.h:
3245         (WebCore::ElementRareData::releasePseudoElement):
3246         * dom/NodeRenderingContext.cpp:
3247         (WebCore::NodeRenderingContext::NodeRenderingContext):
3248         * dom/NodeRenderingContext.h:
3249         * dom/ShadowRoot.cpp:
3250         * dom/ShadowRoot.h:
3251         * html/HTMLDetailsElement.cpp:
3252         (WebCore::HTMLDetailsElement::parseAttribute):
3253         * html/HTMLInputElement.cpp:
3254         (WebCore::HTMLInputElement::updateType):
3255         (WebCore::HTMLInputElement::parseAttribute):
3256         * html/HTMLObjectElement.cpp:
3257         (WebCore::HTMLObjectElement::renderFallbackContent):
3258         * html/HTMLPlugInImageElement.cpp:
3259         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
3260         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
3261         * html/HTMLSelectElement.cpp:
3262         (WebCore::HTMLSelectElement::parseAttribute):
3263         (WebCore::HTMLSelectElement::parseMultipleAttribute):
3264         * html/HTMLViewSourceDocument.cpp:
3265         (WebCore::HTMLViewSourceDocument::createContainingTable):
3266         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
3267         (WebCore::HTMLViewSourceDocument::addLine):
3268         (WebCore::HTMLViewSourceDocument::finishLine):
3269         (WebCore::HTMLViewSourceDocument::addBase):
3270         (WebCore::HTMLViewSourceDocument::addLink):
3271         * html/parser/HTMLConstructionSite.cpp:
3272         (WebCore::executeTask):
3273         * html/parser/HTMLTreeBuilder.cpp:
3274         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
3275         * html/shadow/InsertionPoint.cpp:
3276         (WebCore::InsertionPoint::willAttachRenderers):
3277         (WebCore::InsertionPoint::willDetachRenderers):
3278         * loader/PlaceholderDocument.cpp:
3279         (WebCore::PlaceholderDocument::attach):
3280         * style/StyleResolveTree.cpp:
3281         (WebCore::Style::createRendererIfNeeded):
3282         
3283             From Element::createRendererIfNeeded()
3284
3285         (WebCore::Style::attachShadowRoot):
3286         
3287             From ShadowRoot::attach()
3288
3289         (WebCore::Style::childAttachedAllowedWhenAttachingChildren):
3290         (WebCore::Style::attachChildren):
3291         
3292             From Element::attachChildren()
3293
3294         (WebCore::Style::attachRenderTree):
3295         
3296             From Element::attach()
3297
3298         (WebCore::Style::detachShadowRoot):
3299         
3300             From ShadowRoot::detach()
3301
3302         (WebCore::Style::detachChildren):
3303         
3304             From Element::detachChildren()
3305
3306         (WebCore::Style::detachRenderTree):
3307         
3308             From Element::deatach()
3309
3310         (WebCore::Style::reattachRenderTree):
3311         
3312              From Element::reattach()
3313
3314         (WebCore::Style::resolveLocal):
3315         * style/StyleResolveTree.h:
3316         (WebCore::Style::AttachContext::AttachContext):
3317         
3318             From Element::AttachContext
3319
3320         * svg/SVGTests.cpp:
3321         (WebCore::SVGTests::handleAttributeChange):
3322         * xml/XMLErrors.cpp:
3323         (WebCore::XMLErrors::insertErrorMessageBlock):
3324         * xml/parser/XMLDocumentParserLibxml2.cpp:
3325         (WebCore::XMLDocumentParser::startElementNs):
3326
3327 2013-08-18  Antti Koivisto  <antti@apple.com>
3328
3329         Fix crashing plugin tests caused by a logic error in the previous patch.
3330         
3331         Not reviewed.
3332
3333         * html/HTMLPlugInImageElement.cpp:
3334         (WebCore::HTMLPlugInImageElement::willDetachRenderers):
3335
3336 2013-08-18  Antti Koivisto  <antti@apple.com>
3337
3338         <https://webkit.org/b/119982> Make Element::attach non-virtual
3339
3340         Reviewed by Andreas Kling.
3341
3342         This will give us more future refactoring options.
3343
3344         * dom/Element.cpp:
3345         (WebCore::Element::attach):
3346         (WebCore::Element::detach):
3347         
3348             Make non-virtual. Call element type specific custom functions as needed.
3349
3350         (WebCore::Element::styleForRenderer):
3351         (WebCore::Element::willRecalcStyle):
3352         (WebCore::Element::didRecalcStyle):
3353         (WebCore::Element::willAttachRenderers):
3354         (WebCore::Element::didAttachRenderers):
3355         (WebCore::Element::willDetachRenderers):
3356         (WebCore::Element::didDetachRenderers):
3357         
3358             Add virtual custom callbacks.
3359
3360         (WebCore::Element::customStyleForRenderer):
3361         * dom/Element.h:
3362         * dom/Node.h:
3363         (WebCore::Node::pseudoId):
3364         (WebCore::Node::hasCustomStyleResolveCallbacks):
3365         (WebCore::Node::setHasCustomStyleResolveCallbacks):
3366         
3367             Use the existing bit as it largely overlaps. Rename for clarity.
3368
3369         (WebCore::Node::customPseudoId):
3370         * dom/PseudoElement.cpp:
3371         (WebCore::PseudoElement::PseudoElement):
3372         (WebCore::PseudoElement::didAttachRenderers):
3373         * dom/PseudoElement.h:
3374         * html/HTMLCanvasElement.cpp:
3375         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
3376         (WebCore::HTMLCanvasElement::willAttachRenderers):
3377         * html/HTMLCanvasElement.h:
3378         * html/HTMLFormControlElement.cpp:
3379         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
3380         (WebCore::HTMLFormControlElement::didAttachRenderers):
3381         * html/HTMLFormControlElement.h:
3382         * html/HTMLFrameElement.cpp:
3383         (WebCore::HTMLFrameElement::HTMLFrameElement):
3384         (WebCore::HTMLFrameElement::didAttachRenderers):
3385         * html/HTMLFrameElement.h:
3386         * html/HTMLFrameElementBase.cpp:
3387         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
3388         (WebCore::HTMLFrameElementBase::didAttachRenderers):
3389         * html/HTMLFrameElementBase.h:
3390         * html/HTMLFrameSetElement.cpp:
3391         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
3392         (WebCore::HTMLFrameSetElement::willAttachRenderers):
3393         * html/HTMLFrameSetElement.h:
3394         * html/HTMLIFrameElement.cpp:
3395         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
3396         * html/HTMLImageElement.cpp:
3397         (WebCore::HTMLImageElement::HTMLImageElement):
3398         (WebCore::HTMLImageElement::didAttachRenderers):
3399         * html/HTMLImageElement.h:
3400         * html/HTMLInputElement.cpp:
3401         (WebCore::HTMLInputElement::HTMLInputElement):
3402         (WebCore::HTMLInputElement::willAttachRenderers):
3403         (WebCore::HTMLInputElement::didAttachRenderers):
3404         (WebCore::HTMLInputElement::didDetachRenderers):
3405         * html/HTMLInputElement.h:
3406         * html/HTMLLIElement.cpp:
3407         (WebCore::HTMLLIElement::HTMLLIElement):
3408         (WebCore::HTMLLIElement::didAttachRenderers):
3409         * html/HTMLLIElement.h:
3410         * html/HTMLMediaElement.cpp:
3411         (WebCore::HTMLMediaElement::HTMLMediaElement):
3412         (WebCore::HTMLMediaElement::willAttachRenderers):
3413         (WebCore::HTMLMediaElement::didAttachRenderers):
3414         * html/HTMLMediaElement.h:
3415         * html/HTMLOptGroupElement.cpp:
3416         (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
3417         (WebCore::HTMLOptGroupElement::didAttachRenderers):
3418         (WebCore::HTMLOptGroupElement::willDetachRenderers):
3419         * html/HTMLOptGroupElement.h:
3420         * html/HTMLOptionElement.cpp:
3421         (WebCore::HTMLOptionElement::HTMLOptionElement):
3422         (WebCore::HTMLOptionElement::didAttachRenderers):
3423         (WebCore::HTMLOptionElement::willDetachRenderers):
3424         * html/HTMLOptionElement.h:
3425         * html/HTMLPlugInElement.cpp:
3426         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
3427         (WebCore::HTMLPlugInElement::willDetachRenderers):
3428         * html/HTMLPlugInElement.h:
3429         * html/HTMLPlugInImageElement.cpp:
3430         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
3431         (WebCore::HTMLPlugInImageElement::didAttachRenderers):
3432         (WebCore::HTMLPlugInImageElement::willDetachRenderers):
3433         * html/HTMLPlugInImageElement.h:
3434         * html/HTMLProgressElement.cpp:
3435         (WebCore::HTMLProgressElement::HTMLProgressElement):
3436         (WebCore::HTMLProgressElement::didAttachRenderers):
3437         * html/HTMLProgressElement.h:
3438         * html/HTMLTextAreaElement.cpp:
3439         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
3440         (WebCore::HTMLTextAreaElement::didAttachRenderers):
3441         * html/HTMLTextAreaElement.h:
3442         * html/HTMLVideoElement.cpp:
3443         (WebCore::HTMLVideoElement::HTMLVideoElement):
3444         (WebCore::HTMLVideoElement::didAttachRenderers):
3445         * html/HTMLVideoElement.h:
3446         * html/shadow/InsertionPoint.cpp:
3447         (WebCore::InsertionPoint::InsertionPoint):
3448         (WebCore::InsertionPoint::willAttachRenderers):
3449         (WebCore::InsertionPoint::willDetachRenderers):
3450         * html/shadow/InsertionPoint.h:
3451         * html/shadow/SliderThumbElement.cpp:
3452         (WebCore::SliderThumbElement::SliderThumbElement):
3453         (WebCore::SliderThumbElement::willDetachRenderers):
3454         * html/shadow/SliderThumbElement.h:
3455         * html/shadow/SpinButtonElement.cpp:
3456         (WebCore::SpinButtonElement::SpinButtonElement):
3457         (WebCore::SpinButtonElement::willDetachRenderers):
3458         * html/shadow/SpinButtonElement.h:
3459         * html/shadow/TextControlInnerElements.cpp:
3460         (WebCore::TextControlInnerElement::TextControlInnerElement):
3461         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
3462         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
3463         (WebCore::SearchFieldCancelButtonElement::willDetachRenderers):
3464         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
3465         (WebCore::InputFieldSpeechButtonElement::willAttachRenderers):
3466         (WebCore::InputFieldSpeechButtonElement::willDetachRenderers):
3467         * html/shadow/TextControlInnerElements.h:
3468         * style/StyleResolveTree.cpp:
3469         (WebCore::Style::resolveTree):
3470         * svg/SVGElement.cpp:
3471         (WebCore::SVGElement::SVGElement):
3472         * svg/SVGImageElement.cpp:
3473         (WebCore::SVGImageElement::SVGImageElement):
3474         (WebCore::SVGImageElement::didAttachRenderers):
3475         * svg/SVGImageElement.h:
3476         * svg/SVGUseElement.cpp:
3477         (WebCore::SVGUseElement::SVGUseElement):
3478
3479 2013-08-18  Gavin Barraclough  <barraclough@apple.com>
3480
3481         https://bugs.webkit.org/show_bug.cgi?id=119972
3482         Add attributes field to PropertySlot
3483
3484         Reviewed by Geoff Garen.
3485
3486         For all JSC types, this makes getOwnPropertyDescriptor redundant.
3487         There will be a bit more hacking required in WebCore to remove GOPD whilst maintaining current behaviour.
3488         (Current behaviour is in many ways broken, particularly in that GOPD & GOPS are inconsistent, but we should fix incrementally).
3489
3490         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3491         (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate):
3492         * bindings/js/JSDOMWindowCustom.cpp:
3493         (WebCore::JSDOMWindow::getOwnPropertySlot):
3494         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
3495         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
3496         * bindings/js/JSHistoryCustom.cpp:
3497         (WebCore::JSHistory::getOwnPropertySlotDelegate):
3498         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
3499         * bindings/js/JSLocationCustom.cpp:
3500         (WebCore::JSLocation::getOwnPropertySlotDelegate):
3501         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
3502         * bindings/js/JSPluginElementFunctions.cpp:
3503         (WebCore::runtimeObjectCustomGetOwnPropertySlot):
3504         (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
3505         * bindings/scripts/CodeGeneratorJS.pm:
3506         (GenerateGetOwnPropertySlotBody):
3507         (GenerateGetOwnPropertyDescriptorBody):
3508         (GenerateImplementation):
3509         * bridge/runtime_array.cpp:
3510         (JSC::RuntimeArray::getOwnPropertySlot):
3511         (JSC::RuntimeArray::getOwnPropertyDescriptor):
3512         (JSC::RuntimeArray::getOwnPropertySlotByIndex):
3513         * bridge/runtime_method.cpp:
3514         (JSC::RuntimeMethod::getOwnPropertySlot):
3515         (JSC::RuntimeMethod::getOwnPropertyDescriptor):
3516         * bridge/runtime_object.cpp:
3517         (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
3518         (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
3519             - Pass attributes to PropertySlot::set* methods.
3520
3521 2013-08-18  Ryosuke Niwa  <rniwa@webkit.org>
3522
3523         <https://webkit.org/b/119917> Pasting multiple lines into a textarea can introduce extra new lines
3524
3525         Reviewed by Darin Adler.
3526
3527         Inspired by https://chromium.googlesource.com/chromium/blink/+/6152a12f7ace27beea4d284ff8416631e8aa5217.
3528
3529         The bug was caused by createFragmentFromText's falsely assuming that the newline were not preserved
3530         if the first node's renderer didn't exist.
3531
3532         Fixed the bug by obtaining the renderer of the container of the first visible position in the context.
3533
3534         Test: editing/pasteboard/paste-into-textarea-with-new-line.html
3535
3536         * editing/markup.cpp:
3537         (WebCore::contextPreservesNewline):
3538         (WebCore::createFragmentFromText):
3539
3540 2013-08-18  Andreas Kling  <akling@apple.com>
3541
3542         <https://webkit.org/b/119983> Add two missing RefPtr::release() in HTMLLinkElement.
3543
3544         Reviewed by Antti Koivisto.
3545
3546         * html/HTMLLinkElement.cpp:
3547         (WebCore::HTMLLinkElement::setCSSStyleSheet):
3548
3549 2013-08-18  Andreas Kling  <akling@apple.com>
3550
3551         <https://webkit.org/b/119981> Move ElementData & co to their own files.
3552
3553         Reviewed by Antti Koivisto.
3554
3555         I like to move it move it.
3556
3557 2013-08-18  David Kilzer  <ddkilzer@apple.com>
3558
3559         BUILD FIX (r153990): Add UNUSED_PARAM for heightChanged when CSS_SHAPES is disabled
3560
3561         Fixes the following build failure:
3562
3563             WebCore/rendering/RenderBlock.cpp:1529:53: error: unused parameter 'heightChanged' [-Werror,-Wunused-parameter]
3564             void RenderBlock::updateShapesAfterBlockLayout(bool heightChanged)
3565                                                                 ^
3566             1 error generated.
3567
3568         * rendering/RenderBlock.cpp:
3569         (WebCore::RenderBlock::updateShapesAfterBlockLayout): Add
3570         UNUSED_PARAM(heightChanged) when CSS_SHAPES is disabled.
3571
3572 2013-08-18  Danilo Cesar Lemes de Paula  <danilo.cesar@collabora.co.uk>
3573
3574         [EFL] minor method name fix for the textTrackOffMenuItemText method
3575         https://bugs.webkit.org/show_bug.cgi?id=119978
3576
3577         the method textTrackOffMenuItemText was renamed in
3578         https://bugs.webkit.org/show_bug.cgi?id=113822
3579
3580         Reviewed by Christophe Dumez.
3581
3582         * platform/efl/LocalizedStringsEfl.cpp:
3583         (WebCore::textTrackOffMenuItemText):
3584
3585 2013-08-17  Antti Koivisto  <antti@apple.com>
3586
3587         <https://webkit.org/b/119963> Use TextNodeTraversal for getting sheet text in StyleElement
3588
3589         Reviewed by Andreas Kling.
3590
3591         * dom/StyleElement.cpp:
3592         (WebCore::StyleElement::process):
3593         
3594             Use TextNodeTraversal::contentsAsString for the sheet text. The overflow check is removed as StringBuilder 
3595             (which is used by contentsAsString) does that itself. The behavior in case of overflow changes from empty
3596             sheet to CRASH(). Thats what we do elsewhere in similar situations too (scripts for example). Continuing
3597             with > 4GB of style sheet text nodes is probably not going to go well anyway.
3598
3599 2013-08-17  Antti Koivisto  <antti@apple.com>
3600
3601         <https://webkit.org/b/119960> Remove some optimizations made obsolete by use of StringBuilder
3602
3603         Reviewed by Andreas Kling.
3604
3605         * dom/ScriptElement.cpp:
3606         (WebCore::ScriptElement::scriptContent):
3607         
3608             StringBuilder already optimizes for the single string case. If there is only one the original string is returned.
3609
3610         * dom/Text.cpp:
3611         (WebCore::Text::wholeText):
3612         
3613             No need to traverse twice to compute the capacity. StringBuilder handles this efficiently. 
3614             Also in the common case there is only one string and the optimization here is actually hurting by disabling the StringBuilder one.
3615
3616 2013-08-17  Antti Koivisto  <antti@apple.com>
3617
3618         <https://webkit.org/b/119959> Add TextNodeTraversal
3619
3620         Reviewed by Andreas Kling.
3621
3622         Add TextNodeTraversal for cleaner and more compact traversal of Text nodes.
3623         
3624         Use it where appropriate.
3625
3626         * WebCore.xcodeproj/project.pbxproj:
3627         * dom/Attr.cpp:
3628         (WebCore::Attr::childrenChanged):
3629         * dom/NodeTraversal.h:
3630         (WebCore::NodeTraversal::next):
3631         * dom/ScriptElement.cpp:
3632         (WebCore::ScriptElement::scriptContent):
3633         * dom/Text.cpp:
3634         (WebCore::Text::wholeText):
3635         * dom/Text.h:
3636         (WebCore::toText):
3637         * dom/TextNodeTraversal.cpp: Added.
3638         (WebCore::TextNodeTraversal::appendContents):
3639         (WebCore::TextNodeTraversal::contentsAsString):
3640         
3641             Helpers for getting text content of a subtree.
3642
3643         * dom/TextNodeTraversal.h: Added.
3644         (WebCore::TextNodeTraversal::firstTextChildTemplate):
3645         (WebCore::TextNodeTraversal::firstChild):
3646         (WebCore::TextNodeTraversal::firstTextWithinTemplate):
3647         (WebCore::TextNodeTraversal::firstWithin):
3648         (WebCore::TextNodeTraversal::traverseNextTextTemplate):
3649         (WebCore::TextNodeTraversal::next):
3650         (WebCore::TextNodeTraversal::nextSibling):
3651         * editing/ApplyStyleCommand.cpp:
3652         (WebCore::ApplyStyleCommand::joinChildTextNodes):
3653         * html/HTMLTextAreaElement.cpp:
3654         (WebCore::HTMLTextAreaElement::defaultValue):
3655         (WebCore::HTMLTextAreaElement::setDefaultValue):
3656         * html/HTMLTitleElement.cpp:
3657         (WebCore::HTMLTitleElement::text):
3658         * html/track/TextTrackCue.cpp:
3659         (WebCore::TextTrackCue::determineTextDirection):
3660         * page/Frame.cpp:
3661         (WebCore::Frame::searchForLabelsAboveCell):
3662         * xml/XPathUtil.cpp:
3663         (WebCore::XPath::stringValue):
3664
3665 2013-08-17  Andreas Kling  <akling@apple.com>
3666
3667         <https://webkit.org/b/119957> Page::contextMenuController() should return a reference.
3668
3669         Reviewed by Antti Koivisto.
3670
3671         Page::m_contextMenuController is never null.
3672
3673         * page/Page.h:
3674         (WebCore::Page::contextMenuController):
3675
3676 2013-08-17  Andreas Kling  <akling@apple.com>
3677
3678         <https://webkit.org/b/119954> Page::dragCaretController() should return a reference.
3679
3680         Reviewed by Antti Koivisto.
3681
3682         Page::m_dragCaretController is never null.
3683
3684         * dom/Document.cpp:
3685         (WebCore::Document::nodeChildrenWillBeRemoved):
3686         (WebCore::Document::nodeWillBeRemoved):
3687         * page/DragController.cpp:
3688         (WebCore::DragController::cancelDrag):
3689         (WebCore::DragController::dragEnded):
3690         (WebCore::DragController::tryDocumentDrag):
3691         (WebCore::DragController::dispatchTextInputEventFor):
3692         (WebCore::DragController::concludeEditDrag):
3693         (WebCore::DragController::placeDragCaret):
3694         * page/Page.h:
3695         (WebCore::Page::dragCaretController):
3696         * rendering/RenderBlock.cpp:
3697         (WebCore::RenderBlock::paintCaret):
3698
3699 2013-08-17  Andreas Kling  <akling@apple.com>
3700
3701         <https://webkit.org/b/119952> Simplify Editor's back-pointer to the Frame.
3702
3703         Reviewed by Antti Koivisto.
3704
3705         Remove Editor's inheritance from FrameDestructionObserver. Editor is owned by Frame and
3706         has no interest in observing frame destruction since its own destruction will soon follow.
3707
3708         Editor::m_frame is now a reference instead of a pointer. Removed some null checking.
3709
3710 2013-08-17  Andreas Kling  <akling@apple.com>
3711
3712         <https://webkit.org/b/119950> Remove unused EditorClient::frameWillDetachPage() callback.
3713
3714         Reviewed by Antti Koivisto.
3715
3716         This callback was only used by the Chromium port.
3717
3718         * editing/Editor.h:
3719         * editing/Editor.cpp:
3720
3721             Remove override of FrameDestructionObserver::willDetachPage().
3722
3723         * page/EditorClient.h:
3724
3725             Remove frameWillDetachPage(). This is repeated in every EditorClient subclass.
3726
3727 2013-08-16  Antti Koivisto  <antti@apple.com>
3728
3729         <https://webkit.org/b/119886> PseudoElement is abusing parent node pointer
3730
3731         Reviewed by Darin Adler.
3732
3733         PseudoElement sets its host node as its parent. This is confusing and wrong as it breaks
3734         the basic tree consistency (a node is a child node of its parent node).
3735         
3736         This patch adds an explicit host pointer PseudoElement and switches the call sites over. Memory
3737         impact is negligible as there are not that many ::befores and ::afters.
3738
3739         * dom/ComposedShadowTreeWalker.cpp:
3740         (WebCore::ComposedShadowTreeWalker::traverseParent):
3741         * dom/EventPathWalker.cpp:
3742         (WebCore::EventPathWalker::moveToParent):
3743         * dom/EventRetargeter.h:
3744         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
3745         * dom/Node.cpp:
3746         (WebCore::Node::~Node):
3747         
3748             Add consistency assertions. Remove unnecessary clearing of sibling pointers. They should be cleared already.
3749
3750         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
3751         * dom/PseudoElement.cpp:
3752         (WebCore::PseudoElement::PseudoElement):
3753         (WebCore::PseudoElement::customStyleForRenderer):
3754         * dom/PseudoElement.h:
3755         (WebCore::toPseudoElement):
3756         
3757             Add casting functions.
3758
3759         * inspector/InspectorLayerTreeAgent.cpp:
3760         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
3761         * rendering/HitTestResult.cpp:
3762         (WebCore::HitTestResult::setInnerNode):
3763         (WebCore::HitTestResult::setInnerNonSharedNode):
3764
3765 2013-08-17  Darin Adler  <darin@apple.com>
3766
3767         <https://webkit.org/b/119948> Change drag-specific clipboard writing in DragController to go straight to Pasteboard, not forward through Clipboard
3768
3769         Reviewed by Andreas Kling.
3770
3771         * dom/Clipboard.cpp: Removed writeRange, writePlainText, and writeURL functions.
3772         All three are just unneeded forwarding to pasteboard.
3773         * dom/Clipboard.h: Ditto.
3774
3775         * page/DragController.cpp:
3776         (WebCore::DragController::startDrag): Move the logic in here. Later we might
3777         want to straighten this out a bit, perhaps using functions in Editor, but it's
3778         not much code so fine to just have it here for now.
3779
3780 2013-08-17  Darin Adler  <darin@apple.com>
3781
3782         <https://webkit.org/b/119947> Remove LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS
3783
3784         Reviewed by Andreas Kling.
3785
3786         * dom/Clipboard.cpp:
3787         (WebCore::Clipboard::Clipboard):
3788         (WebCore::Clipboard::~Clipboard):
3789         * dom/Clipboard.h:
3790         Remove LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS, LEGACY_VIRTUAL, and LEGACY_PURE.
3791         Keep only the !USE(LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS) side of all conditionals.
3792
3793 2013-08-17  Darin Adler  <darin@apple.com>
3794
3795         <https://webkit.org/b/119946> Move some code used only by EventHandler from Clipboard to EventHandler
3796
3797         Reviewed by Andreas Kling.
3798
3799         Later it would be good to move this all to DragController, but there is no reason to have
3800         these functions as member functions of the DOM-exposed Clipboard class.
3801
3802         * dom/Clipboard.cpp: Deleted hasFileOfType, hasStringOfType, convertDropZoneOperationToDragOperation,
3803         convertDragOperationToDropZoneOperation.
3804         * dom/Clipboard.h: Ditto.
3805
3806         * page/EventHandler.cpp:
3807         (WebCore::convertDropZoneOperationToDragOperation): Moved here.
3808         (WebCore::convertDragOperationToDropZoneOperation): Moved here. Also changed to use ASCIILiteral.
3809         (WebCore::hasFileOfType): Moved here and made a free function instead of a member function. Removed
3810         canReadTypes check because Clipboard::files already takes care of that.
3811         (WebCore::hasStringOfType): Moved here and made a free function instead of a member function.
3812         Added a check for the null string because HashSet::contains will not work on a null string.
3813         (WebCore::hasDropZoneType): Moved here and made a free function instead of a member function.
3814         (WebCore::findDropZone): Call the hasDropZoneType function instead of Clipboard::hasDropZoneType.
3815
3816 2013-08-17  Darin Adler  <darin@apple.com>
3817
3818         <https://webkit.org/b/119943> Clean up the Document class a bit
3819
3820         Reviewed by Antti Koivisto.
3821
3822         * dom/Document.cpp:
3823         (WebCore::Document::~Document): Fixed typo in comment.
3824         (WebCore::Document::suggestedMIMEType): Use ASCIILiteral for literals.
3825         Also name local variable just loader rather than documentLoader.
3826         (WebCore::Document::updateTitle): Call loader rather than going indirectly
3827         through frame to get to the loader.
3828         (WebCore::Document::setTitleElement): Fixed formatting (add braces).
3829         (WebCore::Document::removeTitle): Iterate elements instead of nodes.
3830         (WebCore::Document::isPageBoxVisible): Use ensureStyleResolver to call
3831         styleForPage to avoid the need for a simple forwarding function. Also
3832         eliminated local variable to increase clarity.
3833         (WebCore::Document::pageSizeAndMarginsInPixels): Use ensureStyleResolver
3834         to call styleForPage to avoid the need for a simple forwarding function.
3835         (WebCore::Document::setIsViewSource): Renamed a local variable.
3836
3837         * dom/Document.h: Removed unneeded childNeedsAndNotInStyleRecalc and
3838         styleForPage functions.
3839
3840         * loader/FrameLoader.cpp: Removed unnneeded setTitle function.
3841         * loader/FrameLoader.h: Ditto.
3842
3843         * page/PrintContext.cpp:
3844         (WebCore::PrintContext::pageProperty): Use ensureStyleResolver to call
3845         styleForPage to avoid the need for a simple forwarding function.
3846
3847 2013-08-17  Darin Adler  <darin@apple.com>
3848
3849         <https://webkit.org/b/119939> Remove some unused clipboard and pasteboard code
3850
3851         Reviewed by Andreas Kling.
3852
3853         * PlatformWinCE.cmake: Removed EditorWin.cpp.
3854         * WebCore.vcxproj/WebCore.vcxproj: Removed EditorWin.cpp.
3855         * WebCore.vcxproj/WebCore.vcxproj.filters: Removed EditorWin.cpp.
3856         * WebCore.xcodeproj/project.pbxproj: Removed ClipboardIOS.h and
3857         ClipboardIOS.mm, and also let Xcode edit/reorder this file.
3858
3859         * editing/Editor.cpp:
3860         (WebCore::Editor::dispatchCPPEvent): Removed some LEGACY_STYLE_ABSTRACT_CLIPBOARD
3861         class code. Will remove the rest later.
3862
3863         * editing/Editor.h: Removed declaration of newGeneralClipboard.
3864
3865         * platform/Pasteboard.h: Removed declaration of writeClipboard. Also updated a
3866         comment to make it clearer.
3867
3868         * platform/blackberry/PasteboardBlackBerry.cpp: Removed Pasteboard::writeClipboard.
3869         * platform/efl/PasteboardEfl.cpp: Ditto.
3870         * platform/ios/PasteboardIOS.mm: Ditto.
3871         * platform/win/PasteboardWin.cpp: Ditto.
3872
3873         * platform/ios/ClipboardIOS.h: Removed. Was an empty file.
3874         * platform/ios/ClipboardIOS.mm: Removed. Was an empty file.
3875         * platform/win/EditorWin.cpp: Removed. Had only newGeneralClipboard in the file,
3876         a function that is never called.
3877
3878 2013-08-17  Darin Adler  <darin@apple.com>
3879
3880         <https://webkit.org/b/119940> Rename Clipboard::m_dragLoc to m_dragLocation
3881
3882         Reviewed by Andreas Kling.
3883
3884         * dom/Clipboard.h: Removed unused dragLocation member function.
3885         Renamed m_dragLoc to m_dragLocation.
3886
3887         * dom/Clipboard.cpp:
3888         (WebCore::Clipboard::setDragImage):
3889         * platform/gtk/ClipboardGtk.cpp:
3890         (WebCore::Clipboard::createDragImage):
3891         * platform/mac/ClipboardMac.mm:
3892         (WebCore::Clipboard::createDragImage):
3893         * platform/qt/ClipboardQt.cpp:
3894         (WebCore::Clipboard::createDragImage):
3895         * platform/win/ClipboardWin.cpp:
3896         (WebCore::Clipboard::createDragImage):
3897         Updated for new name.
3898
3899 2013-08-17  Darin Adler  <darin@apple.com>
3900
3901         <https://webkit.org/b/119942> Remove unnecessary uses of Element::ownerDocument
3902
3903         Reviewed by Andreas Kling.
3904
3905         The Element::document is a simpler faster alternative to Element::ownerDocument.
3906         The only behavior difference between the two is that ownerDocument returns 0 when
3907         called on a Document.
3908
3909         * html/HTMLMediaElement.cpp:
3910         (WebCore::HTMLMediaElement::supportsFocus): Call document instead of ownerDocument.
3911         (WebCore::HTMLMediaElement::mediaPlayerOwningDocument): Removed null checking of
3912         document and call to ownerDocument, since ownerDocument will never return non-null
3913         if document returns null.
3914         (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks): Call document instead
3915         of ownerDocument.
3916
3917         * inspector/DOMEditor.cpp:
3918         (WebCore::DOMEditor::SetOuterHTMLAction::perform): Call document instead of ownerDocument.
3919
3920         * inspector/InspectorCSSAgent.cpp:
3921         (WebCore::InspectorCSSAgent::getMatchedStylesForNode): Call document instead of ownerDocument.
3922         (WebCore::InspectorCSSAgent::forcePseudoState): Call document instead of ownerDocument.
3923         (WebCore::InspectorCSSAgent::resetPseudoStates): Call document instead of ownerDocument.
3924
3925         * inspector/InspectorDOMAgent.cpp:
3926         (WebCore::InspectorDOMAgent::setOuterHTML): Call document instead of expression that
3927         does the same thing in a roundabout way.
3928         (WebCore::InspectorDOMAgent::focusNode): Call document instead of ownerDocument.
3929         (WebCore::InspectorDOMAgent::resolveNode): Call document instead of expression that
3930         does the same thing in a roundabout way.
3931
3932         * page/DragController.cpp:
3933         (WebCore::DragController::concludeEditDrag): Call document instead of ownerDocument.
3934
3935         * svg/SVGElementInstance.cpp:
3936         (WebCore::SVGElementInstance::ownerDocument): Call document instead of ownerDocument.
3937
3938 2013-08-17  Darin Adler  <darin@apple.com>
3939
3940         <https://webkit.org/b/119941> Make Page::dragController return a reference
3941
3942         Reviewed by Andreas Kling.
3943
3944         * page/Page.h:
3945         (WebCore::Page::dragController): Return a reference instead of a pointer.
3946
3947         * page/DragController.cpp:
3948         (WebCore::DragController::concludeEditDrag):
3949         * page/EventHandler.cpp:
3950         (WebCore::EventHandler::eventMayStartDrag):
3951         (WebCore::EventHandler::updateDragSourceActionsAllowed):
3952         (WebCore::EventHandler::handleDrag):
3953         * page/mac/EventHandlerMac.mm:
3954         (WebCore::EventHandler::passSubframeEventToSubframe):
3955         Updated call sites.
3956
3957 2013-08-17  Morten Stenshorne  <mstensho@opera.com>
3958
3959         <https://webkit.org/b/119795> Propagate writing-mode from the first region to the flow thread
3960
3961         Reviewed by Darin Adler.
3962
3963         Since the flow thread is a direct child of RenderView, it doesn't inherit
3964         proper writing-mode automatically. It should be mentioned that if the thread's
3965         contents' writing-mode differs from that of the first region, things are
3966         typically going to look useless (although perhaps that's how it should be),
3967         but as long as writing-mode is only specified on a common parent of the
3968         thread's contents and the regions, things look fine, and also, we're now
3969         following what the spec has to say on the matter:
3970
3971         http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-flow-into-property
3972
3973             "The first region defines the principal writing mode for the entire flow.
3974              The writing mode on subsequent regions is ignored."
3975
3976         This is a back-port of the fix for Blink bug 257965.
3977         Reviewed by esprehn and mihnea there.
3978         Blink review URL: https://chromiumcodereview.appspot.com/18374008
3979
3980         Tests: fast/regions/changing-writing-mode-2.html
3981                fast/regions/changing-writing-mode-3.html
3982                fast/regions/changing-writing-mode-4.html
3983                fast/regions/changing-writing-mode-5.html
3984                fast/regions/changing-writing-mode.html
3985                fast/regions/invalid-first-region-with-writing-mode-2.html
3986                fast/regions/invalid-first-region-with-writing-mode.html
3987                fast/regions/subtree-with-horiz-bt.html
3988                fast/regions/subtree-with-horiz-tb.html
3989                fast/regions/subtree-with-vert-lr.html
3990                fast/regions/subtree-with-vert-rl.html
3991
3992         * rendering/RenderFlowThread.cpp:
3993         (WebCore::RenderFlowThread::styleDidChange):
3994         * rendering/RenderFlowThread.h:
3995         * rendering/RenderNamedFlowThread.cpp:
3996         (WebCore::RenderNamedFlowThread::updateWritingMode):
3997         (WebCore::RenderNamedFlowThread::addRegionToNamedFlowThread):
3998         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
3999         (WebCore::RenderNamedFlowThread::regionChangedWritingMode):
4000         * rendering/RenderNamedFlowThread.h:
4001         * rendering/RenderRegion.cpp:
4002         (WebCore::RenderRegion::styleDidChange):
4003
4004 2013-08-16  Andreas Kling  <akling@apple.com>
4005
4006         <https://webkit.org/b/119903> Make Settings ref-counted (and let Frame keep a ref!)
4007
4008         Reviewed by Geoff Garen.
4009
4010         Let Frame hold a RefPtr<Settings> so Frame::settings() isn't forced to go through Page.
4011         It now also returns a reference, as it can never be null.
4012
4013         Removed 8.8 million lines of null-checking as a result.
4014
4015 2013-08-16  Ryosuke Niwa  <rniwa@webkit.org>
4016
4017         <https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a redundant call to rendererIsEditable
4018
4019         Reviewed by Benjamin Poulain.
4020
4021         Refactor highestEditableRoot to avoid an extra tree walk. We now walk up the ancestor chain up to
4022         the first root editable element exactly once.
4023
4024         * dom/Node.cpp:
4025         (WebCore::Node::rendererIsEditable): Change the order of conditions to make the evaluation faster
4026         when we don't have to check RenderStyle's value.
4027         * editing/htmlediting.cpp:
4028         (WebCore::highestEditableRoot):
4029
4030 2013-08-16  Benjamin Poulain  <benjamin@webkit.org>
4031
4032         Remove a useless #include of SelectorChecker.h
4033
4034         Rubber-stamped by Ryosuke Niwa.
4035
4036         * dom/DocumentStyleSheetCollection.cpp:
4037
4038 2013-08-16  Brent Fulgham  <bfulgham@apple.com>
4039
4040         [Windows] Update RenderMediaControls for new API
4041         https://bugs.webkit.org/show_bug.cgi?id=119910
4042
4043         Reviewed by Eric Carlson.
4044
4045         * rendering/RenderMediaControls.cpp: Update calls to WebKitSystemInterface for
4046         the changed API.
4047
4048 2013-08-16  Arunprasad Rajkumar  <arurajku@cisco.com>
4049
4050         <https://webkit.org/b/119912> Fix WebKit build error when SVG is disabled(broken since r154174)
4051
4052         Reviewed by Simon Fraser.
4053
4054         No new tests required, just a build fix.
4055
4056         Since r154174 CSS keywords alpha and luminance used by -webkit-mask-source-type. Move those
4057         keywords from SVGCSSValueKeywords.in to CSSValueKeywords.in.
4058
4059         * css/CSSValueKeywords.in:
4060         * css/SVGCSSValueKeywords.in:
4061
4062 2013-08-16  Arunprasad Rajkumar  <arurajku@cisco.com>
4063
4064         <https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime() in WebCore
4065
4066         Reviewed by Alexey Proskuryakov.
4067
4068         WTF::currentTime() is prone to DST changes and NTP adjustments, so use