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