Garbage on page background while http://canberraballoons.com.au is loading
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-05-17  Simon Fraser  <simon.fraser@apple.com>
2
3         Garbage on page background while http://canberraballoons.com.au is loading
4         https://bugs.webkit.org/show_bug.cgi?id=116384
5         <rdar://problem/13930328>
6
7         Reviewed by Dan Bernstein.
8
9         This page loads a large JPEG image as the body background.
10         ImageSource::frameHasAlphaAtIndex() always claims that JPEG images
11         are opaque, but this isn't true if the frame is only partially loaded.
12         However, this would cause FillLayer::hasOpaqueImage() to report that the
13         background image is opaque, so we'd skip painting the background color.
14         Unpainted content in an opaque layer results in garbage.
15         
16         Fix by having ImageSource::frameHasAlphaAtIndex() always return true
17         for frames that are not complete. When the image load completes, we
18         recompute metadata and correctly determine that the frame is opaque.
19
20         * platform/graphics/cg/ImageSourceCG.cpp:
21         (WebCore::ImageSource::frameHasAlphaAtIndex):
22
23 2013-05-18  Timothy Hatcher  <timothy@apple.com>
24
25         Simplify EventLoop::cycle() on Mac.
26
27         https://webkit.org/b/116392
28
29         Reviewed by Anders Carlsson.
30
31         * platform/mac/EventLoopMac.mm:
32         (WebCore::EventLoop::cycle): Use CFRunLoopRunInMode instead.
33
34 2013-05-18  Andreas Kling  <akling@apple.com>
35
36         Use CSSParserSelector::appendTagHistory() from CSS grammar.
37         <http://webkit.org/b/116382>
38
39         Reviewed by Antti Koivisto.
40
41         CSSParserSelector already knows how to append another component to itself,
42         no need to duplicate that logic in the grammar.
43
44         * css/CSSGrammar.y.in:
45
46 2013-05-18  Patrick Gansterer  <paroga@webkit.org>
47
48         [CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
49         https://bugs.webkit.org/show_bug.cgi?id=114554
50
51         Reviewed by Gyuyoung Kim.
52
53         Using variables as target names is very uncommon in CMake.
54         The usual way to specify the name of the resulting binary
55         is to set the OUTPUT_NAME target property.
56
57         * CMakeLists.txt:
58
59 2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>
60
61         [GTK] Move GTK port off legacy clipboard
62         https://bugs.webkit.org/show_bug.cgi?id=116221
63
64         Reviewed by Martin Robinson.
65
66         Merge clipboard methods into PasteboardGtk that now wraps a
67         DataObjectGtk.
68
69         * GNUmakefile.list.am: Remove ClipboardGtk.h.
70         * dom/Clipboard.h: Remove GTK from the list of ports using legacy
71         clipboard.
72         * page/gtk/EventHandlerGtk.cpp:
73         (WebCore::EventHandler::createDraggingClipboard): Use
74         Clipboard::createForDragAndDrop().
75         * platform/Pasteboard.h:
76         (Pasteboard):
77         * platform/gtk/ClipboardGtk.cpp:
78         (WebCore::Editor::newGeneralClipboard): Use
79         Clipboard::createForCopyAndPaste().
80         (WebCore::Clipboard::createDragImage):
81         (WebCore::Clipboard::declareAndWriteDragImage):
82         * platform/gtk/ClipboardGtk.h: Removed.
83         * platform/gtk/DragDataGtk.cpp:
84         * platform/gtk/PasteboardGtk.cpp:
85         (WebCore::Pasteboard::create): Create a new Pasteboard for a given
86         GtkClipboard or DataObjectGtk.
87         (WebCore::Pasteboard::createForCopyAndPaste): Create a Pasteboard
88         for the GDK_SELECTION_CLIPBOARD clipboard.
89         (WebCore::Pasteboard::createPrivate): Create a Pasteboard without
90         a GtkClipboard associated.
91         (WebCore::Pasteboard::createForDragAndDrop): Create a Pasteboard
92         for drag and drop operations.
93         (WebCore::selectionClipboard): Return a static Pasteboard for the
94         GDK_SELECTION_CLIPBOARD clipboard.
95         (WebCore::primaryClipboard): Return a static Pasteboard for the
96         GDK_SELECTION_PRIMARY clipboard.
97         (WebCore::Pasteboard::generalPasteboard): Return
98         selectionClipboard() or primaryClipboard() depending on whether
99         primary selection clipboard is the active one or not.
100         (WebCore::Pasteboard::Pasteboard):
101         (WebCore::Pasteboard::~Pasteboard):
102         (WebCore::Pasteboard::dataObject): Return the wrapped DataObjectGtk.
103         (WebCore::dataObjectTypeFromHTMLClipboardType): Copied from
104         ClipboardGtk.cpp.
105         (WebCore::Pasteboard::writeString): Adapted to upate the wrapped
106         DataObjectGtk and the GtkClipboard if needed.
107         (WebCore::Pasteboard::writeSelection): Ditto.
108         (WebCore::Pasteboard::writePlainText): Ditto.
109         (WebCore::Pasteboard::writeURL): Ditto.
110         (WebCore::Pasteboard::writeImage): Ditto.
111         (WebCore::Pasteboard::writePasteboard): Copy the wrapped
112         DataObjectGtk from the DataObjectGtk of the given Pasteboard and
113         upsate the GtkClipboard if needed.
114         (WebCore::Pasteboard::clear): Copied from ClipboardGtk.cpp.
115         (WebCore::Pasteboard::canSmartReplace): Check if current
116         GtkClipboard supports smart replace.
117         (WebCore::Pasteboard::setDragImage):
118         (WebCore::Pasteboard::documentFragment): Adapted to use the
119         wrapped DataObjectGtk reading from the current GtkClipboard if
120         present.
121         (WebCore::Pasteboard::plainText): Ditto.
122         (WebCore::Pasteboard::hasData): Copied from ClipboardGtk.cpp.
123         (WebCore::Pasteboard::types): Ditto.
124         (WebCore::Pasteboard::readString): Ditto.
125         (WebCore::Pasteboard::readFilenames): Ditto.
126
127 2013-05-18  Alberto Garcia  <agarcia@igalia.com>
128
129         [GTK] Parallel build fails if gtk-doc is enabled
130         https://bugs.webkit.org/show_bug.cgi?id=116227
131
132         Reviewed by Martin Robinson.
133
134         * GNUmakefile.am:
135         Don't overwrite noinst_DATA, modify its existing value instead.
136
137 2013-05-17  Michelangelo De Simone  <michelangelo@webkit.org>
138
139         CSSParser parsing of CSSPropertyFontStretch falls into CSSPropertyGeometry
140         https://bugs.webkit.org/show_bug.cgi?id=116370
141
142         CSSPropertyFontStretch mistakenly fell through the shader parsing logic.
143
144         Reviewed by Alexandru Chiculita.
145
146         No new test possible, the feature is not implemented nor exposed.
147
148         * css/CSSParser.cpp:
149         (WebCore::CSSParser::parseValue):
150
151 2013-05-17  Timothy Hatcher  <timothy@apple.com>
152
153         Force the script debug server to continue when disabling the debugger.
154
155         There might be some cases where the debugger will stay in the nested run loop
156         which cause weird issues.
157
158         Speculative fix for: https://webkit.org/b/111438
159
160         Reviewed by Joseph Pecoraro.
161
162         * inspector/InspectorDebuggerAgent.cpp:
163         (WebCore::InspectorDebuggerAgent::disable):
164
165 2013-05-16  Darin Adler  <darin@apple.com>
166
167         [BlackBerry] Get BlackBerry port off legacy clipboard
168         https://bugs.webkit.org/show_bug.cgi?id=116287
169
170         Reviewed by Rob Buis.
171
172         * PlatformBlackBerry.cmake: Removed ClipboardBlackBerry.cpp.
173
174         * dom/Clipboard.h: Removed BLACKBERRY from the list of platforms that
175         use the legacy clipboard.
176
177         * editing/blackberry/EditorBlackBerry.cpp:
178         (WebCore::Editor::newGeneralClipboard): Changed to just create a copy
179         and paste clipboard.
180
181         * page/blackberry/EventHandlerBlackBerry.cpp: Removed a drag-related
182         function that wasn't doing any good.
183
184         * platform/blackberry/ClipboardBlackBerry.cpp: Removed.
185         * platform/blackberry/ClipboardBlackBerry.h: Removed.
186
187         * platform/blackberry/PasteboardBlackBerry.cpp:
188         (WebCore::Pasteboard::createForCopyAndPaste): Added.
189         (WebCore::Pasteboard::createPrivate): Added.
190         (WebCore::Pasteboard::hasData): Added. Moved code here from ClipboardBlackBerry.cpp.
191         (WebCore::Pasteboard::clear): Ditto.
192         (WebCore::Pasteboard::readString): Ditto.
193         (WebCore::Pasteboard::writeString): Ditto.
194         (WebCore::Pasteboard::types): Ditto.
195         (WebCore::Pasteboard::readFilenames): Ditto.
196
197 2013-05-17  Andreas Kling  <akling@apple.com>
198
199         Ads on theverge.com cause repaints when hovered, even though content doesn't visibly change.
200         <http://webkit.org/b/116344>
201
202         Reviewed by Darin Adler.
203
204         Teach RenderStyle::diff() to ignore differences in the outline value if both styles have non-visible outlines.
205
206         * rendering/style/RenderStyle.cpp:
207         (WebCore::RenderStyle::diff):
208         * rendering/style/StyleBackgroundData.cpp:
209         (WebCore::StyleBackgroundData::isEquivalentForPainting):
210         * rendering/style/StyleBackgroundData.h:
211         (StyleBackgroundData):
212
213 2013-05-17  Andreas Kling  <akling@apple.com>
214
215         Plug leak in CSSSelectorList::deleteSelectors().
216         <http://webkit.org/b/116371>
217         <rdar://problem/13930698>
218
219         Reviewed by Ryosuke Niwa.
220
221         Don't forget to destroy the very last selector in the list.
222
223         * css/CSSSelectorList.cpp:
224         (WebCore::CSSSelectorList::deleteSelectors):
225
226 2013-05-17  Anders Carlsson  <andersca@apple.com>
227
228         Share code between WebKit1 and WebKit2 StorageArea subclasses
229         https://bugs.webkit.org/show_bug.cgi?id=116367
230
231         Reviewed by Andreas Kling.
232
233         * inspector/InspectorDOMStorageAgent.cpp:
234         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
235         Remove ec parameter.
236
237         * inspector/InspectorDOMStorageAgent.h:
238         Add forward declaration.
239
240         * page/DOMWindow.cpp:
241         (WebCore::DOMWindow::sessionStorage):
242         (WebCore::DOMWindow::localStorage):
243         Storage::StorageArea returns a reference now.
244
245         * storage/Storage.cpp:
246         (WebCore::Storage::length):
247         Check that the storage area can be accessed by the frame, and that it's not disabled by private browsing.
248         Then call down to the (now simplified) StorageArea::length().
249
250         (WebCore::Storage::isDisabledByPrivateBrowsing):
251         New helper function that's based on StorageAreaImpl::disabledByPrivateBrowsingInFrame, but reordered
252         to make it easier to follow.
253
254         * storage/Storage.h:
255         (WebCore::Storage::area):
256         Return a reference.
257
258         * storage/StorageAreaImpl.cpp:
259         (WebCore::StorageAreaImpl::storageType):
260         Add this new virtual member funciton that's needed by Storage::isDisabledByPrivateBrowsing.
261
262         (WebCore::StorageAreaImpl::length):
263         Remove unneeded code.
264
265 2013-05-17  Commit Queue  <commit-queue@webkit.org>
266
267         Unreviewed, rolling out r150294.
268         http://trac.webkit.org/changeset/150294
269         https://bugs.webkit.org/show_bug.cgi?id=116369
270
271         Caused 31 tests to fail (Requested by rniwa on #webkit).
272
273         * WebCore.exp.in:
274         * rendering/InlineFlowBox.h:
275         * rendering/InlineTextBox.h:
276         (InlineTextBox):
277         * rendering/RenderApplet.h:
278         * rendering/RenderBR.h:
279         * rendering/RenderBlock.h:
280         (RenderBlock):
281         (WebCore::RenderBlock::virtualContinuation):
282         * rendering/RenderBox.h:
283         (WebCore::RenderBox::borderBoundingBox):
284         (RenderBox):
285         (WebCore::RenderBox::marginLogicalLeft):
286         (WebCore::RenderBox::marginLogicalRight):
287         * rendering/RenderBoxModelObject.h:
288         (WebCore::RenderBoxModelObject::isBoxModelObject):
289         * rendering/RenderButton.h:
290         * rendering/RenderCombineText.h:
291         * rendering/RenderCounter.h:
292         * rendering/RenderDeprecatedFlexibleBox.h:
293         * rendering/RenderDetailsMarker.h:
294         * rendering/RenderEmbeddedObject.h:
295         (RenderEmbeddedObject):
296         (WebCore::RenderEmbeddedObject::isEmbeddedObject):
297         (WebCore::RenderEmbeddedObject::virtualChildren):
298         * rendering/RenderFieldset.h:
299         * rendering/RenderFileUploadControl.h:
300         * rendering/RenderFlexibleBox.h:
301         * rendering/RenderFlowThread.h:
302         * rendering/RenderFrame.h:
303         * rendering/RenderFrameSet.h:
304         * rendering/RenderFullScreen.cpp:
305         * rendering/RenderFullScreen.h:
306         * rendering/RenderGrid.h:
307         * rendering/RenderHTMLCanvas.h:
308         * rendering/RenderIFrame.h:
309         * rendering/RenderImage.h:
310         (RenderImage):
311         (WebCore::RenderImage::isRenderImage):
312         * rendering/RenderInline.h:
313         (RenderInline):
314         (WebCore::RenderInline::virtualContinuation):
315         (WebCore::RenderInline::virtualChildren):
316         (WebCore::RenderInline::isRenderInline):
317         (WebCore::RenderInline::layout):
318         (WebCore::RenderInline::requiresLayer):
319         (WebCore::RenderInline::offsetWidth):
320         (WebCore::RenderInline::offsetHeight):
321         (WebCore::RenderInline::borderBoundingBox):
322         (WebCore::RenderInline::dirtyLinesFromChangedChild):
323         * rendering/RenderLayerModelObject.h:
324         * rendering/RenderListBox.h:
325         * rendering/RenderListItem.h:
326         * rendering/RenderListMarker.h:
327         * rendering/RenderMedia.h:
328         (WebCore::RenderMedia::virtualChildren):
329         (WebCore::RenderMedia::canHaveChildren):
330         (WebCore::RenderMedia::isMedia):
331         (WebCore::RenderMedia::isImage):
332         (WebCore::RenderMedia::requiresForcedStyleRecalcPropagation):
333         * rendering/RenderMediaControlElements.h:
334         * rendering/RenderMenuList.h:
335         * rendering/RenderMeter.h:
336         * rendering/RenderMultiColumnBlock.h:
337         * rendering/RenderMultiColumnFlowThread.h:
338         * rendering/RenderMultiColumnSet.h:
339         * rendering/RenderNamedFlowThread.h:
340         * rendering/RenderPart.h:
341         (RenderPart):
342         (WebCore::RenderPart::isRenderPart):
343         (WebCore::RenderPart::renderName):
344         * rendering/RenderProgress.h:
345         * rendering/RenderRegion.h:
346         (WebCore::RenderRegion::isRenderRegion):
347         * rendering/RenderRegionSet.h:
348         * rendering/RenderReplaced.h:
349         (RenderReplaced):
350         (WebCore::RenderReplaced::renderName):
351         * rendering/RenderReplica.h:
352         * rendering/RenderRuby.h:
353         * rendering/RenderRubyBase.h:
354         * rendering/RenderRubyRun.h:
355         * rendering/RenderRubyText.h:
356         * rendering/RenderScrollbarPart.h:
357         * rendering/RenderSearchField.h:
358         * rendering/RenderSlider.h:
359         * rendering/RenderSnapshottedPlugIn.h:
360         (RenderSnapshottedPlugIn):
361         * rendering/RenderTable.h:
362         (RenderTable):
363         (WebCore::RenderTable::renderName):
364         (WebCore::RenderTable::isTable):
365         (WebCore::RenderTable::avoidsFloats):
366         * rendering/RenderTableCaption.h:
367         * rendering/RenderTableCell.h:
368         * rendering/RenderTableCol.h:
369         * rendering/RenderTableRow.h:
370         * rendering/RenderTableSection.h:
371         * rendering/RenderText.h:
372         (RenderText):
373         (WebCore::RenderText::marginLeft):
374         (WebCore::RenderText::marginRight):
375         (WebCore::RenderText::styleWillChange):
376         (WebCore::RenderText::length):
377         (WebCore::RenderText::paint):
378         (WebCore::RenderText::layout):
379         * rendering/RenderTextControl.h:
380         (RenderTextControl):
381         (WebCore::RenderTextControl::renderName):
382         (WebCore::RenderTextControl::isTextControl):
383         (WebCore::RenderTextControl::avoidsFloats):
384         * rendering/RenderTextControlMultiLine.h:
385         * rendering/RenderTextControlSingleLine.h:
386         (RenderTextControlSingleLine):
387         (WebCore::RenderTextControlSingleLine::isTextField):
388         * rendering/RenderTextFragment.h:
389         * rendering/RenderTextTrackCue.h:
390         * rendering/RenderVideo.h:
391         * rendering/RenderView.h:
392         * rendering/RenderWidget.h:
393         (RenderWidget):
394         (WebCore::RenderWidget::isWidget):
395         * rendering/RenderWordBreak.h:
396         * rendering/RootInlineBox.h:
397         (RootInlineBox):
398         * rendering/mathml/RenderMathMLBlock.h:
399         * rendering/svg/RenderSVGBlock.h:
400         (RenderSVGBlock):
401         * rendering/svg/RenderSVGContainer.h:
402         (WebCore::RenderSVGContainer::setNeedsBoundariesUpdate):
403         (WebCore::RenderSVGContainer::virtualChildren):
404         (WebCore::RenderSVGContainer::isSVGContainer):
405         (WebCore::RenderSVGContainer::renderName):
406         (RenderSVGContainer):
407         (WebCore::RenderSVGContainer::objectBoundingBox):
408         (WebCore::RenderSVGContainer::strokeBoundingBox):
409         (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
410         * rendering/svg/RenderSVGEllipse.h:
411         * rendering/svg/RenderSVGForeignObject.h:
412         * rendering/svg/RenderSVGGradientStop.h:
413         * rendering/svg/RenderSVGHiddenContainer.h:
414         (WebCore::RenderSVGHiddenContainer::renderName):
415         (RenderSVGHiddenContainer):
416         (WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
417         * rendering/svg/RenderSVGImage.h:
418         * rendering/svg/RenderSVGInline.h:
419         (WebCore::RenderSVGInline::renderName):
420         (WebCore::RenderSVGInline::requiresLayer):
421         (WebCore::RenderSVGInline::isSVGInline):
422         (RenderSVGInline):
423         * rendering/svg/RenderSVGInlineText.h:
424         * rendering/svg/RenderSVGModelObject.h:
425         (WebCore::RenderSVGModelObject::requiresLayer):
426         (RenderSVGModelObject):
427         * rendering/svg/RenderSVGPath.h:
428         * rendering/svg/RenderSVGRect.h:
429         * rendering/svg/RenderSVGResourceClipper.h:
430         * rendering/svg/RenderSVGResourceContainer.h:
431         (RenderSVGResourceContainer):
432         (WebCore::RenderSVGResourceContainer::isSVGResourceContainer):
433         (WebCore::RenderSVGResourceContainer::toRenderSVGResourceContainer):
434         * rendering/svg/RenderSVGResourceFilter.h:
435         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
436         * rendering/svg/RenderSVGResourceGradient.h:
437         (RenderSVGResourceGradient):
438         (WebCore::RenderSVGResourceGradient::resourceBoundingBox):
439         * rendering/svg/RenderSVGResourceLinearGradient.h:
440         * rendering/svg/RenderSVGResourceMarker.h:
441         * rendering/svg/RenderSVGResourceMasker.h:
442         * rendering/svg/RenderSVGResourcePattern.h:
443         * rendering/svg/RenderSVGResourceRadialGradient.h:
444         * rendering/svg/RenderSVGRoot.h:
445         * rendering/svg/RenderSVGShape.h:
446         (WebCore::RenderSVGShape::setNeedsBoundariesUpdate):
447         (WebCore::RenderSVGShape::setNeedsTransformUpdate):
448         (WebCore::RenderSVGShape::repaintRectInLocalCoordinates):
449         (WebCore::RenderSVGShape::localToParentTransform):
450         (WebCore::RenderSVGShape::localTransform):
451         (WebCore::RenderSVGShape::isSVGShape):
452         (RenderSVGShape):
453         (WebCore::RenderSVGShape::objectBoundingBox):
454         (WebCore::RenderSVGShape::strokeBoundingBox):
455         * rendering/svg/RenderSVGTSpan.h:
456         * rendering/svg/RenderSVGText.h:
457         * rendering/svg/RenderSVGTextPath.h:
458         * rendering/svg/RenderSVGTransformableContainer.h:
459         * rendering/svg/RenderSVGViewportContainer.h:
460
461 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
462
463         Get rid of Custom code for Audio global constructor
464         https://bugs.webkit.org/show_bug.cgi?id=116343
465
466         Reviewed by Geoffrey Garen.
467
468         Remove custom code for Audio global constructor. It is no longer needed
469         now that the the bindings generator no longer require custom code for
470         named constructors and now that [EnabledAtRuntime] extended attribute is
471         supported for global constructors.
472
473         HTMLAudioElement global constructors are now automatically generated.
474
475         No new tests, no behavior change for layout tests.
476
477         * bindings/js/JSDOMWindowCustom.cpp:
478         * html/HTMLAudioElement.idl:
479         * page/DOMWindow.idl:
480
481 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
482
483         <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
484         https://bugs.webkit.org/show_bug.cgi?id=116359
485
486         Reviewed by Anders Carlsson.
487
488         This feature was already RuntimeEnabled. Call through layers to get the answer from
489         a platform strategy.
490
491         * workers/DefaultSharedWorkerRepository.cpp:
492         (WebCore::DefaultSharedWorkerRepository::isAvailable):
493         * workers/DefaultSharedWorkerRepository.h:
494         * workers/SharedWorkerRepository.cpp:
495         (WebCore::SharedWorkerRepository::isAvailable):
496         * workers/SharedWorkerStrategy.h:
497         (WebCore::SharedWorkerStrategy::isAvailable):
498
499 2013-05-17  Anders Carlsson  <andersca@apple.com>
500
501         Move Storage member functions out of line
502         https://bugs.webkit.org/show_bug.cgi?id=116364
503
504         Reviewed by Andreas Kling.
505
506         This is preparation for sharing more code between the WebKit1 and WebKit2 storage area subclasses.
507         Also remove unnecessary null checks and make m_storageArea const.
508
509         * storage/Storage.cpp:
510         (WebCore::Storage::length):
511         (WebCore::Storage::key):
512         (WebCore::Storage::getItem):
513         (WebCore::Storage::setItem):
514         (WebCore::Storage::removeItem):
515         (WebCore::Storage::clear):
516         (WebCore::Storage::contains):
517         * storage/Storage.h:
518         (WebCore::Storage::area):
519
520 2013-05-17  Beth Dakin  <bdakin@apple.com>
521
522         Headers and footers will sometimes disappear and re-appear during page loads
523         https://bugs.webkit.org/show_bug.cgi?id=116336
524         -and corresponding-
525         <rdar://problem/13886753>
526
527         Reviewed by Simon Fraser.
528
529         This patch changes the WebCore-level API that WebKit uses to create a banner. 
530         Specifically this patch removes FrameView::setWantsLayerForHeader(), which created 
531         and returned a layer. Instead, WK2 will call Page::addHeaderWithHeight(). When the 
532         layer has been created, it will call back into WK2 via ChromeClient. This will 
533         allow WebCore to re-create the header/footer layers as needed whenever the 
534         FrameView/RenderLayerCompositor have been destroyed and recreated.
535
536         Remove references to old FrameView functions. Add references to new Page 
537         functions.
538         * WebCore.exp.in:
539
540         New ChromeClient functions will pass the new layers up to WK2.
541         * page/ChromeClient.h:
542         (WebCore::ChromeClient::didAddHeaderLayer):
543         (WebCore::ChromeClient::didAddFooterLayer):
544         (ChromeClient):
545
546         Remove setWantsLayerForHeader/Footer.
547         * page/FrameView.cpp:
548         * page/FrameView.h:
549         (FrameView):
550
551         Page now caches the header and footer height. When the FrameView/RLC have been 
552         destroyed, and the cached layer/height information on those classes has been lost, 
553         this data on Page will persist so that we can build the layers back up.
554         * page/Page.cpp:
555         (WebCore::Page::Page):
556         (WebCore::Page::addHeaderWithHeight):
557         (WebCore::Page::addFooterWithHeight):
558         * page/Page.h:
559         (WebCore::Page::headerHeight):
560         (WebCore::Page::footerHeight):
561
562         As soon as the root gets a backing, recreate the header and footer layers if 
563         needed.
564         * rendering/RenderLayerCompositor.cpp:
565         (WebCore::RenderLayerCompositor::updateBacking):
566
567         Call into ChromeClient.
568         (WebCore::RenderLayerCompositor::updateLayerForHeader):
569         (WebCore::RenderLayerCompositor::updateLayerForFooter):
570
571 2013-05-18  Claudio Saavedra  <csaavedra@igalia.com>
572
573         [CSS] Minor cleanups in CSS variables handling
574         https://bugs.webkit.org/show_bug.cgi?id=116318
575
576         Reviewed by Ryosuke Niwa.
577
578         No new tests, only a cleanup.
579
580         * css/CSSParser.cpp:
581         (WebCore::CSSParserString::substring): Optimize.
582         (WebCore::CSSParser::createPrimitiveVariableNameValue):
583         Remove intermediate variable.
584
585 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
586
587         [Mac] Add DOMWindowConstructors.idl to Xcode project file
588         https://bugs.webkit.org/show_bug.cgi?id=116351
589
590         Reviewed by Anders Carlsson.
591
592         * WebCore.xcodeproj/project.pbxproj: Added the file, so that Xcode includes it
593         in searches.
594
595 2013-05-17  Ryosuke Niwa  <rniwa@webkit.org>
596
597         Remove the declaration of Element::detachAttrNodeAtIndex erroneously added in r150072.
598
599         * dom/Element.h:
600         (Element):
601
602 2013-05-17  Anders Carlsson  <andersca@apple.com>
603
604         WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
605         https://bugs.webkit.org/show_bug.cgi?id=116346
606         <rdar://problem/13852829>
607
608         Reviewed by Andreas Kling.
609
610         Export the UTF8Encoding symbol.
611
612         * WebCore.exp.in:
613
614 2013-05-17  Andreas Kling  <akling@apple.com>
615
616         Apply FINAL to the RenderObject hierarchy.
617         <http://webkit.org/b/115977>
618
619         Mostly from Blink r148795 by <cevans@chromium.org>
620         <http://src.chromium.org/viewvc/blink?view=revision&revision=148795>
621
622         Re-landing without devirtualization tweaks.
623
624         * rendering/: Beat things with the FINAL stick.
625         * WebCore.exp.in: Export a now-needed symbol.
626
627 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
628
629         Build fix.
630
631         * loader/FrameLoader.cpp: (WebCore::FrameLoader::willTransitionToCommitted):
632         Frame:editor() now returns a reference.
633
634 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
635
636         Get rid of [ConstructorParameters] extended attributes
637         https://bugs.webkit.org/show_bug.cgi?id=116308
638
639         Reviewed by Kentaro Hara.
640
641         Get rid of WebKit-specific [ConstructorParameters] IDL extended attribute. Instead,
642         [CustomConstructor] arguments are now explicitly specified, similarly to [Constructor]
643         arguments and the constructor object's "length" property is now automatically
644         computed for custom constructors as well.
645
646         This is less error-prone as the value is not hardcoded, more consistent with
647         [Constructor] extended attribute and gives more information about the custom constructor
648         in the IDL file. We also get rid of a WebKit-specific IDL attribute which is always
649         nice.
650
651         No new tests, already covered by fast/js/constructor-length.html.
652
653         * Modules/mediastream/MediaStream.idl:
654         * Modules/webaudio/AudioContext.idl:
655         * Modules/websockets/WebSocket.idl:
656         * bindings/scripts/CodeGeneratorJS.pm:
657         (GenerateConstructorHelperMethods):
658         * bindings/scripts/IDLAttributes.txt:
659         * bindings/scripts/IDLParser.pm:
660         (applyTypedefs):
661         (parseAttributeRest):
662         (copyExtendedAttributes):
663         (parseExtendedAttributeRest):
664         (applyExtendedAttributeList):
665         * bindings/scripts/test/JS/JSFloat64Array.cpp:
666         (WebCore::JSFloat64ArrayConstructor::finishCreation):
667         * bindings/scripts/test/TestTypedArray.idl:
668         * dom/MutationObserver.idl:
669         * fileapi/Blob.idl:
670         * html/DOMFormData.idl:
671         * html/canvas/ArrayBuffer.idl:
672         * html/canvas/DataView.idl:
673         * page/WebKitPoint.idl:
674         * workers/SharedWorker.idl:
675         * workers/Worker.idl:
676
677 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
678
679         Text input is largely broken when there are subframes loading
680         http://bugs.webkit.org/show_bug.cgi?id=59121
681         <rdar://problem/9320468>
682
683         Reviewed by Darin Adler.
684
685         This addresses text input being abandoned when another frame in a page is navigated.
686
687         There are still many opportunities for improvement:
688         - Track other cases where WebCore interferes may want to cancel input without
689         direct user action (e.g. deleting the whole editable element on a timer).
690         - Fix how dictionary panel and autocorrection are dismissed (they still have the
691         same issue, and get dismissed with any frame navigation).
692
693         Test: platform/mac/editing/input/unconfirmed-text-navigation-with-page-cache.html
694
695         * loader/FrameLoader.h:
696         * loader/FrameLoader.cpp:
697         (WebCore::FrameLoader::willTransitionToCommitted): Make sure that we
698         do not keep an inline session in a frame that's no longer active, as WebKit2 no
699         longer takes care of this case (and more of the logic should be in WebCore anyway).
700         (WebCore::FrameLoader::commitProvisionalLoad): Added a hook that gets invoked right
701         before transitioning to committed state starts. We may want to move more code here
702         eventually, e.g. from Frame::setView.
703
704 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
705
706         Get rid of [CustomGetter] for global named constructors
707         https://bugs.webkit.org/show_bug.cgi?id=116116
708
709         Reviewed by Geoffrey Garen.
710
711         Improve the JSC bindings generator so that global named constructors no longer
712         require a [CustomGetter] IDL extended attribute. As a consequence, attributes
713         on the global window object can now be automatically generated for interfaces
714         that have a [NamedConstructor], namely HTMLOptionElement.
715
716         The HTMLAudioElement global constructors are still manually defined because it
717         requires custom code at the moment to check if the media player is available.
718
719         No new tests, no behavior change.
720
721         * bindings/js/JSDOMWindowCustom.cpp:
722         * bindings/scripts/CodeGeneratorJS.pm:
723         * bindings/scripts/preprocess-idls.pl:
724         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
725         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
726         * html/HTMLOptionElement.idl:
727         * page/DOMWindow.idl:
728
729 2013-05-17  Joseph Pecoraro  <pecoraro@apple.com>
730
731         Web Inspector: SyntaxError evaluating "1+1; //@ sourceURL=test" in console
732         https://bugs.webkit.org/show_bug.cgi?id=116292
733
734         Add a newline after the expression so a single line comment doesn't
735         erroneously comment out the closing brace of the with block.
736
737         Reviewed by Timothy Hatcher.
738
739         Test: inspector/console/console-eval-comment.html
740
741         * inspector/InjectedScriptSource.js:
742
743 2013-05-17  David Hyatt  <hyatt@apple.com>
744
745         fast/flexbox/auto-height-with-flex.html failing only on release builds.
746         https://bugs.webkit.org/show_bug.cgi?id=116240
747
748         Reviewed by Darin Adler.
749
750         Fix the mainAxisContentExtent method so no overflow occurs, since it
751         doesn't work right on release builds.
752
753         * rendering/RenderFlexibleBox.cpp:
754         (WebCore::RenderFlexibleBox::mainAxisContentExtent):
755
756 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
757
758         Add [EnabledAtRuntime] extended attribute support for global constructors
759         https://bugs.webkit.org/show_bug.cgi?id=116147
760
761         Reviewed by Geoffrey Garen.
762
763         Add [EnabledAtRuntime] extended attribute support for global constructors.
764         This patch adds [EnabledAtRuntime] extended attribute to SharedWorker and
765         WebSocket IDL interfaces so that their global constructors on the global
766         Window object can now be automatically generated.
767
768         The behavior on JavaScript side is unchanged. We simply leverage
769         RuntimeEnabledFeatures class and the new [EnabledAtRuntime] IDL extended
770         attribute to generate the code for global constructors getters instead
771         of using custom code.
772
773         No new tests, no behavior change for layout tests.
774
775         * GNUmakefile.list.am:
776         * Modules/websockets/WebSocket.cpp: Enable WebSockets at runtime by default.
777         * Modules/websockets/WebSocket.idl:
778         * Target.pri:
779         * UseJSC.cmake:
780         * WebCore.vcproj/WebCore.vcproj:
781         * WebCore.vcxproj/WebCore.vcxproj:
782         * WebCore.vcxproj/WebCore.vcxproj.filters:
783         * WebCore.xcodeproj/project.pbxproj:
784         * bindings/js/JSBindingsAllInOne.cpp:
785         * bindings/js/JSDOMWindowCustom.cpp:
786         (WebCore):
787         * bindings/js/JSDOMWindowWebSocketCustom.cpp: Removed.
788         * bindings/scripts/CodeGeneratorJS.pm:
789         (ToMethodName):
790         (GetRuntimeEnableFunctionName):
791         (GenerateImplementation):
792         * bindings/scripts/IDLAttributes.txt:
793         * page/DOMWindow.idl:
794         * workers/SharedWorker.idl:
795
796 2013-05-17  Darin Adler  <darin@apple.com>
797
798         [EFL] Move EFL port off legacy clipboard
799         https://bugs.webkit.org/show_bug.cgi?id=116181
800
801         Reviewed by Anders Carlsson.
802
803         * dom/Clipboard.h: Switched EFL away from "legacy" mode for Clipboard.
804
805         * page/efl/EventHandlerEfl.cpp:
806         (WebCore::EventHandler::createDraggingClipboard): Changed to call Clipboard member function.
807
808         * platform/efl/ClipboardEfl.cpp: Deleted most of the functions.
809         (WebCore::Editor::newGeneralClipboard): Changed to call Clipboard member function.
810         (WebCore::Clipboard::createDragImage): Moved from ClipboardEfl to Clipboard.
811         (WebCore::Clipboard::declareAndWriteDragImage): Moved from ClipboardEfl to Clipboard.
812         (WebCore::Clipboard::items): Ditto.
813
814         * platform/efl/PasteboardEfl.cpp: A lot of copyright notices for a file that
815         has no code in it other than notImplemented lines! I didn't add a new one.
816         (WebCore::Pasteboard::createForCopyAndPaste): Added.
817         (WebCore::Pasteboard::createPrivate): Added.
818         (WebCore::Pasteboard::createForDragAndDrop): Added.
819         (WebCore::Pasteboard::hasData): Added.
820         (WebCore::Pasteboard::readString): Added.
821         (WebCore::Pasteboard::writeString): Added.
822         (WebCore::Pasteboard::types): Added.
823         (WebCore::Pasteboard::readFilenames): Added.
824         (WebCore::Pasteboard::setDragImage): Added.
825         (WebCore::Pasteboard::writePasteboard): Added.
826
827 2013-05-17  Frédéric Wang  <fred.wang@free.fr>
828
829         Bad spacing inside MathML formulas when text-indent is specified
830         https://bugs.webkit.org/show_bug.cgi?id=106600
831
832         Reviewed by Martin Robinson.
833
834         When MathML is used in a HTML page that modifies the CSS text-indent,
835         large gaps appear inside the mathematical expressions. Resetting it to
836         0 on the math root (as Gecko does) fixes the issue.
837
838         Tests: mathml/presentation/text-indent.html
839                mathml/presentation/text-indent-expected.html
840
841         * css/mathml.css:
842         (math): reset text-indent to its default value.
843
844 2013-05-17  Alberto Garcia  <agarcia@igalia.com>
845
846         Fix code that expects Page::chrome() to return a pointer
847         https://bugs.webkit.org/show_bug.cgi?id=116313
848
849         Reviewed by Darin Adler.
850
851         Page::chrome() returns a reference after r150214.
852
853         * platform/network/blackberry/NetworkManager.cpp:
854         (WebCore::NetworkManager::startJob):
855         * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
856         (WebCore::SocketStreamHandle::SocketStreamHandle):
857         * testing/Internals.cpp:
858         (WebCore::Internals::resetToConsistentState):
859         (WebCore::Internals::setEnableMockPagePopup):
860
861 2013-05-17  Alberto Garcia  <agarcia@igalia.com>
862
863         [BlackBerry] ImageBlackBerry: add missing BlendMode parameter
864         https://bugs.webkit.org/show_bug.cgi?id=116316
865
866         Reviewed by Carlos Garcia Campos.
867
868         When the new BitmapImage::draw() method was added in r147110 it
869         didn't include the BlendMode parameter, which has been there since
870         r137011.
871
872         * platform/graphics/blackberry/ImageBlackBerry.cpp:
873         (WebCore::BitmapImage::draw):
874
875 2013-05-16  Jer Noble  <jer.noble@apple.com>
876
877         Some media/track tests fail or assert on Mac
878         https://bugs.webkit.org/show_bug.cgi?id=97132
879
880         Reviewed by Simon Fraser.
881
882         Rationalize the font and padding behavior of cues and cue boxes; ::cue pseudo elements cannot have padding
883         values applied via CSS (due to padding not being included in the whitelist of applicable CSS properties).
884         Also, the font values were being applied to the box at one level and the cue at another, leading to incorrect
885         layout in the snapToLines case. Padding has been removed from the cue, and the font settings are now applied
886         to the box exclusively.
887
888         Additionally, a few drive-by changes were made in TextTrackCue to the return values of displayTreeInternal() &
889         element(), which previously returned a PassRefPtr<> instead of a plain pointer.
890
891         * css/mediaControls.css:
892         (video::-webkit-media-text-track-container): Move the font size to the display selector.
893         (video::cue): Remove the display:inline and padding:2px declarations.
894         (video::-webkit-media-text-track-display): Remove the -webkit-line-content now that the ::cue has no padding.
895         * html/track/TextTrackCue.cpp:
896         (WebCore::TextTrackCue::TextTrackCue): The background box is now a span, rather than a forced-inline div.
897         (WebCore::TextTrackCue::displayTreeInternal): Return a plain pointer.
898         (WebCore::TextTrackCue::getDisplayTree): Ditto.
899         (WebCore::TextTrackCue::setFontSize): Set the font on the box, not the cue.
900         * html/track/TextTrackCue.h:
901         (WebCore::TextTrackCue::element): Return a plain pointer.
902         * html/track/TextTrackCueGeneric.cpp:
903         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): The cue element is now a span, not a div.
904         * page/CaptionUserPreferencesMac.mm:
905         (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Whitespace.
906         (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Do not set padding on the cue.
907
908 2013-05-16  Andreas Kling  <akling@apple.com>
909
910         Changes in text-only properties shouldn't cause repaints unless there is actually text.
911         <http://webkit.org/b/116250>
912
913         Reviewed by Antti Koivisto.
914
915         Add a new StyleDifferenceRepaintIfText value to the repertoire of RenderStyle::diff().
916         This result means that the renderer only needs to repaint if one of its immediate children contains text.
917
918         This lets us avoid repainting the same pixels when hovering over constructs like:
919
920             <style>
921                 a { text-decoration: none; }
922                 a:hover { text-decoration: underline; }
923             </style>
924             <a href="http://is.gd/andersca">
925                 <img src="cool-hat.jpg">
926             </a>
927
928         Since the change in text-decoration has no effect on the rendering of the <img> element,
929         we'll now be smart enough to avoid repainting it.
930
931         * rendering/style/RenderStyleConstants.h:
932         * rendering/style/RenderStyle.cpp:
933         (WebCore::RenderStyle::diff):
934
935             Move checking of text-only properties until the very end, and return StyleDifferenceRepaintIfText
936             in case a difference is found, giving precedence to StyleDifferenceRepaint.
937
938         * rendering/RenderObject.h:
939         * rendering/RenderObject.cpp:
940         (WebCore::RenderObject::hasImmediateNonWhitespaceTextChild):
941
942             Helper to check if a RenderObject has at least one RenderText child containing more than just
943             collapsible whitespace.
944
945         (WebCore::RenderObject::shouldRepaintForStyleDifference):
946
947             Helper to check if a StyleDifference is either ...Repaint or ...RepaintIfText and the renderer
948             has an immediate text child.
949
950         (WebCore::RenderObject::styleWillChange):
951         (WebCore::RenderObject::setStyle):
952
953             Don't repaint for StyleDifferenceRepaintIfText unless hasImmediateNonWhitespaceTextChild().
954
955         * rendering/RenderBox.cpp:
956         (WebCore::RenderBox::styleDidChange):
957         * rendering/svg/SVGResourcesCache.cpp:
958         (WebCore::SVGResourcesCache::clientStyleChanged):
959
960             Tweak for new StyleDifference enum value.
961
962         * rendering/RenderText.h:
963         * rendering/RenderText.cpp:
964         (WebCore::RenderText::isAllCollapsibleWhitespace):
965
966             Made this const.
967
968 2013-05-17  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
969
970         Improve -webkit-text-underline-position memory usage.
971         https://bugs.webkit.org/show_bug.cgi?id=116108
972
973         Reviewed by Benjamin Poulain.
974
975         Remove m_maxLogicalTop private variable from RootInlineBox to reduce
976         the overall memory used to render RootInlineBoxes (eight bytes per RootInlineBox
977         instance in a 64-bit machine). RootInline::maxLogicalTop() now computes
978         the maxLogicalTop value everytime it is called. In a typical page
979         computeMaxLogicalTop is called less than 10 times for each
980         InlineTextBox that uses -webkit-text-underline-position. That is a small
981         price users of -webkit-text-underline-position will pay so that
982         everybody can benefit from the memory reduction in RootInlineBox.
983
984         No new tests, no change in behavior.
985
986         * rendering/InlineFlowBox.cpp:
987         (WebCore::InlineFlowBox::computeMaxLogicalTop): Make it const.
988         * rendering/InlineFlowBox.h:
989         * rendering/RootInlineBox.cpp:
990         (WebCore::RootInlineBox::RootInlineBox): Remove m_maxLogicalTop.
991         (WebCore::RootInlineBox::alignBoxesInBlockDirection): Remove
992         computeMaxLogicalTop call and obsolete comment.
993         (WebCore):
994         (WebCore::RootInlineBox::maxLogicalTop): Compute maxLogicalTop before
995         returning its value.
996         * rendering/RootInlineBox.h:
997         (RootInlineBox):
998
999 2013-05-17  Alexis Menard  <alexis@webkit.org>
1000
1001         Make sure to call release() on our smart pointers when we should.
1002         https://bugs.webkit.org/show_bug.cgi?id=116307
1003
1004         Reviewed by Andreas Kling.
1005
1006         Call release() when we should call it. There is probably more occurence
1007         of this problem on the codebase but this is a first bunch of fixes.
1008
1009         No new tests : existing ones should cover.
1010
1011         * css/CSSComputedStyleDeclaration.cpp:
1012         (WebCore::valueForNinePieceImage):
1013         (WebCore::getBorderRadiusShorthandValue):
1014         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
1015         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1016         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
1017         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForGridShorthand):
1018         * css/CSSParser.cpp:
1019         (WebCore::CSSParser::parseBorderImage):
1020         * html/HTMLBodyElement.cpp:
1021         (WebCore::HTMLBodyElement::collectStyleForPresentationAttribute):
1022
1023 2013-05-17  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1024
1025         Make PNGImageDecoder::rowAvailable auto-vectorizable
1026         https://bugs.webkit.org/show_bug.cgi?id=116151
1027
1028         Reviewed by Benjamin Poulain.
1029
1030         Changed the main loops under PNGImageDecoder::rowAvailable so that they
1031         avoid branches and non-sequential table look ups.
1032
1033         Together with automatic vectorization by the compiler this provides around
1034         4x speed-up with AVX or 2x speed-up on generic x64. Shaving off 12-40% on
1035         PNG decoding in general.
1036
1037         * platform/graphics/Color.cpp:
1038         (WebCore::premultipliedARGBFromColor):
1039         * platform/graphics/Color.h:
1040         (WebCore::fastDivideBy255):
1041         * platform/graphics/filters/FEBlend.cpp:
1042         * platform/image-decoders/png/PNGImageDecoder.cpp:
1043         (WebCore::setPixelRGB):
1044         (WebCore::setPixelRGBA):
1045         (WebCore::setPixelRGBA_Premultiplied):
1046         (WebCore::PNGImageDecoder::rowAvailable):
1047
1048 2013-05-17  Joseph Pecoraro  <pecoraro@apple.com>
1049
1050         Web Inspector: Allow "//# sourceMappingURL" syntax alongside "//@"
1051         https://bugs.webkit.org/show_bug.cgi?id=116290
1052
1053         Follow an update to the spec and support the new and old syntax.
1054
1055         Reviewed by Timothy Hatcher.
1056
1057         * inspector/ContentSearchUtils.cpp:
1058         (WebCore::ContentSearchUtils::scriptCommentPattern):
1059         (WebCore::ContentSearchUtils::stylesheetCommentPattern):
1060         * inspector/front-end/SASSSourceMapping.js:
1061         (WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
1062
1063 2013-05-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1064
1065         Remove custom code for MessageEvent.ports getter
1066         https://bugs.webkit.org/show_bug.cgi?id=116304
1067
1068         Reviewed by Kentaro Hara.
1069
1070         Remove Custom code for the "ports" attribute getter in MessageEvent
1071         IDL interface. The JSC bindings generator already supports attributes
1072         of type MessagePortArray.
1073
1074         No new tests, already covered by existing layout tests and bindings
1075         tests.
1076
1077         * bindings/js/JSMessageEventCustom.cpp: Remove Custom code for ports getter.
1078         * bindings/scripts/CodeGeneratorJS.pm:
1079         (NativeToJSValue): Small tweak to correctly handle the case where impl->ports()
1080         returns NULL and avoid crashing in this case.
1081         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Rebaseline due
1082         to bindings generator tweak.
1083         * dom/MessageEvent.idl: Remove [CustomGetter] extended attribute for 'ports' attribute
1084         and switch to MessagePortArray type.
1085
1086 2013-05-16  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
1087
1088         Add stubs for ContextMenu and ContextMenuItem
1089         https://bugs.webkit.org/show_bug.cgi?id=116235
1090
1091         Reviewed by Antonio Gomes.
1092
1093         No new tests needed, only a refactor.
1094
1095         Add ContextMenuNone.cpp and ContextMenuItemNone.cpp
1096         so ports using ENABLE(CROSS_PLATFORM_CONTEXT_MENU) don't
1097         need to replicate these stubs.
1098
1099         * PlatformEfl.cmake:
1100         * Target.pri:
1101         * platform/ContextMenuNone.cpp: Added.
1102         (WebCore):
1103         (WebCore::ContextMenu::ContextMenu):
1104         (WebCore::ContextMenu::getContextMenuItems):
1105         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
1106         (WebCore::ContextMenu::platformContextMenu):
1107         * platform/ContextMenuItemNone.cpp: Added.
1108         (WebCore):
1109         (WebCore::ContextMenuItem::platformContextMenuItem):
1110         * platform/efl/ContextMenuEfl.cpp: Removed.
1111         * platform/efl/ContextMenuItemEfl.cpp: Removed.
1112         * platform/qt/ContextMenuQt.cpp: Removed.
1113         * platform/qt/ContextMenuItemQt.cpp: Removed.
1114
1115 2013-05-16  Alexis Menard  <alexis@webkit.org>
1116
1117         Regression: Event#stopPropagation() does not halt bubbling for webkitTransitionEnd
1118         https://bugs.webkit.org/show_bug.cgi?id=115656
1119
1120         Reviewed by Darin Adler.
1121
1122         If we create a prefixed event to dispatch it (in the case we have only
1123         prefixed event listeners in client's code) then we need to make sure to
1124         keep it in sync with the original unprefixed event after it has been
1125         dispatched. While being dispatched the event can be modified by
1126         client's code and when propagated back to outer elements, attributes were
1127         not updated. This patch changes the old design of creating a separate event
1128         for the prefixed case and now change the type of the event (so the name) before
1129         dispatching it, keeping the attributes if changed and then rename it
1130         back to unprefixed when the dispatching is finished.
1131
1132         Tests: transitions/transition-end-event-prefixed-01.html
1133                transitions/transition-end-event-prefixed-02.html
1134                transitions/transition-end-event-prefixed-03.html
1135
1136         * dom/Event.h:
1137         (WebCore::Event::setType):
1138         * dom/EventTarget.cpp:
1139         (WebCore::EventTarget::fireEventListeners):
1140
1141 2013-05-16  Mike Fenton  <mifenton@rim.com>
1142
1143         [BlackBerry] Strip invoke URLs when writing to the clipboard.
1144         https://bugs.webkit.org/show_bug.cgi?id=116226
1145
1146         Reviewed by Rob Buis.
1147
1148         PR 333516.
1149
1150         Invoke URLs should not be included in the paste data.
1151
1152         Internally Reviewed by Gen Mak.
1153
1154         * platform/blackberry/PasteboardBlackBerry.cpp:
1155         (WebCore::Pasteboard::writeSelection):
1156
1157 2013-05-16  Eduardo Lima Mitev  <elima@igalia.com>
1158
1159         Missing UNUSED_PARAM macro for textPosition argument in WebKitAccessibleInterfaceText
1160         https://bugs.webkit.org/show_bug.cgi?id=116230
1161
1162         Reviewed by Chris Fleizach.
1163
1164         No new functionality, no new tests.
1165
1166         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1167         (webkitAccessibleTextGetTextForOffset): List textPosition argument as
1168         unused parameter for all platforms except GTK.
1169
1170 2013-05-16  Jaehun Lim  <ljaehun.lim@samsung.com>
1171
1172         Frame flattening prevents <HTML> in <OBJECT> from having scrollbars
1173         https://bugs.webkit.org/show_bug.cgi?id=115884
1174         
1175         Reviewed by Antonio Gomes.
1176
1177         Frame flattening should be applied when the frame owner is frame or iframe. But when
1178         the frame owner is object element, frame flattening prevents it from having scrollbars.
1179         In this situation, we can't scroll the html document in object element.
1180
1181         This patch adds two helper functions to verify flattening conditions.
1182         
1183         Test: fast/frames/flattening/scrolling-in-object.html
1184
1185         * page/FrameView.cpp:
1186         (WebCore::frameFlatteningEnabled): Added. Helper to check whether flattening is enabled or not.
1187         (WebCore::supportsFrameFlattening): Added. Helper to check whether the frame owner is <frame> or <iframe>.
1188         (WebCore::FrameView::avoidScrollbarCreation):
1189         (WebCore::FrameView::calculateScrollbarModesForLayout): Use frameFlatteningEnabled().
1190         (WebCore::FrameView::layout): Use frameFlatteningEnabled().
1191         (WebCore::FrameView::isInChildFrameWithFrameFlattening): Use frameFlatteningEnabled().
1192
1193 2013-05-16  Patrick Gansterer  <paroga@webkit.org>
1194
1195         Port functions for pathhandling to Windows CE in FileSystemWin
1196         https://bugs.webkit.org/show_bug.cgi?id=116208
1197
1198         Reviewed by Darin Adler.
1199
1200         This will allow us to remove FileSystemWinCE in a next step.
1201
1202         * platform/win/FileSystemWin.cpp:
1203         (WebCore::pathByAppendingComponent):
1204         (WebCore::pathGetFileName):
1205
1206 2013-05-16  Tim Horton  <timothy_horton@apple.com>
1207
1208         PDFPlugins don't load when plugins are disabled, but they should
1209         https://bugs.webkit.org/show_bug.cgi?id=75790
1210         <rdar://problem/11650197>
1211
1212         Reviewed by Anders Carlsson.
1213
1214         Make it possible to load "application" plug-ins even if settings or the FrameLoaderClient
1215         say that plug-ins should be disabled, providing a mechanism for WebKit* to offer built-in
1216         functionality which happens to use the plug-in infrastructure, and which also doesn't
1217         unexpectedly disappear for users with plug-ins off.
1218
1219         * WebCore.exp.in:
1220         Export SubframeLoader::allowPlugins().
1221         Update signature for PluginData::supportsMimeType to include the AllowedPluginTypes argument.
1222
1223         * dom/DOMImplementation.cpp:
1224         (WebCore::DOMImplementation::createDocument):
1225         Load PluginData even if plug-ins are disabled, but if that is the case, only
1226         create a PluginDocument for application plug-ins.
1227
1228         * html/PluginDocument.cpp:
1229         (WebCore::PluginDocumentParser::appendBytes):
1230         Don't bail if plug-ins are disabled, because we could still be a PluginDocument
1231         for an application plug-in.
1232
1233         * page/Page.cpp:
1234         (WebCore::Page::pluginData):
1235         Allow PluginData to be constructed even if plug-ins are disabled, as there might
1236         be application plug-ins that we want to load anyway.
1237
1238         * platform/mac/MIMETypeRegistryMac.mm:
1239         (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
1240         On Mac, if we have PDFPlugin, we can support PDF and PostScript with a native application plug-in.
1241
1242         * plugins/PluginData.cpp:
1243         (WebCore::PluginData::supportsMimeType):
1244         Add an AllowedPluginTypes argument to supportsMimeType, allowing callers to specify
1245         whether they are looking for any plug-in, or are looking only for application plug-ins.
1246
1247         * plugins/PluginData.h:
1248         (PluginInfo): Added an isApplicationPlugin field, to specify whether this is a "built-in" plug-in.
1249         (PluginData): Add the aforementioned AllowedPluginTypes enum and the argument to supportsMimeType.
1250
1251 2013-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1252
1253         [BlackBerry] Crash due to an assert running test editing/execCommand/indent-paragraphs.html
1254         https://bugs.webkit.org/show_bug.cgi?id=114944
1255
1256         Reviewed by Rob Buis.
1257
1258         It crashes in network platform code when trying to save an
1259         invalid URL in the disk cache. That test contains references to
1260         empty URLs like http://. Those empty URLs, are parsed as http:/ by
1261         KURL and considered valid. BlackBerry network platform uses GURL
1262         which considers those URLs invalid. We needed to check that the
1263         URLs are valid for our platform before starting the network
1264         operation.
1265
1266         Fixes a crash running test
1267         editing/execCommand/indent-paragraphs.html.
1268
1269         * platform/network/blackberry/NetworkManager.cpp:
1270         (WebCore::NetworkManager::startJob): Check if the request URL is
1271         valid from the platform point of view right after creating the
1272         platform network request and return early if the URL is invalid
1273         with StatusErrorInvalidUrl error.
1274
1275 2013-05-16  Patrick Gansterer  <paroga@webkit.org>
1276
1277         Remove unused function safeCreateFile() from WebCore
1278         https://bugs.webkit.org/show_bug.cgi?id=116211
1279
1280         Reviewed by Anders Carlsson.
1281
1282         * platform/FileSystem.h:
1283         * platform/win/FileSystemWin.cpp:
1284
1285 2013-05-16  Peter Gal  <galpeter@inf.u-szeged.hu>
1286
1287         [curl] MIME type should be in lowercase
1288         https://bugs.webkit.org/show_bug.cgi?id=116218
1289
1290         Reviewed by Benjamin Poulain.
1291
1292         Existing testcase: http/tests/mime/uppercase-mime-type.html
1293
1294         * platform/network/curl/ResourceHandleManager.cpp:
1295         (WebCore::headerCallback): Convert the MIME type to lowercase.
1296
1297 2013-05-16  Seokju Kwon  <seokju.kwon@gmail.com>
1298
1299         Web Inspector: Fix optional value of promptText in Inspector.json
1300         https://bugs.webkit.org/show_bug.cgi?id=116203
1301
1302         Reviewed by Joseph Pecoraro.
1303
1304         Merge from https://chromiumcodereview.appspot.com/14672031.
1305
1306         No new tests needed.
1307
1308         * inspector/Inspector.json:
1309
1310 2013-05-16  Mary Wu  <mary.wu@torchmobile.com.cn>
1311
1312         [BlackBerry] Unable to download blob resource
1313         https://bugs.webkit.org/show_bug.cgi?id=115888
1314
1315         Reviewed by Benjamin Poulain.
1316
1317         Add BlobStream to handle over blob data from BlobResourceHandle to download stream.
1318         RIM bug 331086, internally reviewed by Charles Wei and Leo Yang.
1319
1320         * PlatformBlackBerry.cmake:
1321         * platform/network/blackberry/BlobStream.cpp: Added.
1322         (WebCore):
1323         (WebCore::BlobStream::BlobStream):
1324         (WebCore::BlobStream::~BlobStream):
1325         (WebCore::BlobStream::didReceiveData):
1326         (WebCore::BlobStream::didFinishLoading):
1327         (WebCore::BlobStream::didFail):
1328         (WebCore::BlobStream::url):
1329         (WebCore::BlobStream::mimeType):
1330         * platform/network/blackberry/BlobStream.h: Added.
1331         (WebCore):
1332         (BlobStream):
1333
1334 2013-05-16  Anders Carlsson  <andersca@apple.com>
1335
1336         Remove SystemTime header and implementations
1337         https://bugs.webkit.org/show_bug.cgi?id=116200
1338
1339         Reviewed by Alexey Proskuryakov.
1340
1341         SystemTim just had a single function that's not called anymore. Remove it.
1342
1343         * GNUmakefile.list.am:
1344         * PlatformBlackBerry.cmake:
1345         * PlatformEfl.cmake:
1346         * PlatformWinCE.cmake:
1347         * Target.pri:
1348         * WebCore.vcproj/WebCore.vcproj:
1349         * WebCore.vcxproj/WebCore.vcxproj:
1350         * WebCore.vcxproj/WebCore.vcxproj.filters:
1351         * WebCore.xcodeproj/project.pbxproj:
1352         * history/PageCache.cpp:
1353         * platform/SystemTime.h: Removed.
1354         * platform/blackberry/SystemTimeBlackBerry.cpp: Removed.
1355         * platform/efl/SystemTimeEfl.cpp: Removed.
1356         * platform/graphics/ca/GraphicsLayerCA.cpp:
1357         * platform/mac/SystemTimeMac.cpp: Removed.
1358         * platform/qt/TemporaryLinkStubsQt.cpp:
1359         * platform/win/SystemTimeWin.cpp: Removed.
1360
1361 2013-05-16  Glenn Adams  <glenn@skynav.com>
1362
1363         [Inspector] Don't filter syntax error caused by asterisk in CSS Property name.
1364         https://bugs.webkit.org/show_bug.cgi?id=116196
1365
1366         Reviewed by Benjamin Poulain.
1367
1368         * inspector/InspectorConsoleAgent.cpp:
1369         (WebCore::InspectorConsoleAgent::addMessageToConsole):
1370             - Remove questionable IE7 related error filtering
1371
1372 2013-05-16  Andreas Kling  <akling@apple.com>
1373
1374         Page::chrome() should return a reference.
1375         <http://webkit.org/b/116185>
1376
1377         Reviewed by Anders Carlsson.
1378
1379         A Page's chrome() can never be null. Change Page::chrome() to return a reference to reflect this.
1380         Also, make Page::m_chrome a const member variable so nobody will accidentally set it to null.
1381
1382 2013-05-16  Simon Fraser  <simon.fraser@apple.com>
1383
1384         Content disappears when scrolling http://www.childrenscancer.org/zach/
1385         https://bugs.webkit.org/show_bug.cgi?id=116206
1386
1387         Reviewed by Darin Adler.
1388         
1389         When a RenderLayerBacking gains or loses a foregroundLayer or backgroundLayer,
1390         we need to repaint the primary layer, since what paints into that primary
1391         layer will change.
1392         
1393         On the page in question, we gained/lost a foreground layer when scrolling because
1394         the page popped an element into position:fixed.
1395
1396         Test: compositing/repaint/foreground-layer-change.html
1397
1398         * rendering/RenderLayerBacking.cpp:
1399         (WebCore::RenderLayerBacking::updateForegroundLayer):
1400         (WebCore::RenderLayerBacking::updateBackgroundLayer):
1401
1402 2013-05-16  Andy Estes  <aestes@apple.com>
1403
1404         Do not indefinitely cache resources from blob URLs.
1405
1406         Reviewed by Alexey Proskuryakov.
1407
1408         Alexey pointed out after I landed r150169 that blob URLs backed by
1409         files should return an error if the file changed after the URL was
1410         created. By indefinitely caching them in memory, we don't give the
1411         loader a chance to check for modification. Remove "blob" from the list
1412         of schemes that should be indefinitely cached.
1413
1414         * platform/SchemeRegistry.cpp:
1415         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
1416
1417 2013-05-16  Claudio Saavedra  <csaavedra@igalia.com>
1418
1419         [CSS] CSS Variables are case-sensitive
1420         https://bugs.webkit.org/show_bug.cgi?id=116239
1421
1422         Reviewed by Ryosuke Niwa.
1423
1424         The CSS Variables specification states that variables are
1425         case-sensitive, unlike other CSS properties.
1426
1427         Test: fast/css/variables/case-sensitive.html
1428
1429         * css/CSSParser.cpp:
1430         (WebCore::CSSParserString::substring): Replace
1431         the now unnecessary lowerSubstring() with this method.
1432         Also, since the method is only used by the CSS variables
1433         implementation, #ifdef it.
1434         (WebCore::CSSParser::createPrimitiveVariableNameValue):
1435         (WebCore::CSSParser::storeVariableDeclaration):
1436         Do not normalize variable declarations to lowercase.
1437         * css/CSSParserValues.h:
1438         (CSSParserString): Replace the lowerSubstring() declaration
1439         and wrap with #if/#endif.
1440
1441 2013-05-16  Brady Eidson  <beidson@apple.com>
1442
1443         svg/as-image/img-zoom-svg-stylesheet.html crashes with NetworkProcess enabled.
1444         <rdar://problem/13837408> and https://bugs.webkit.org/show_bug.cgi?id=115917
1445
1446         Reviewed by Sam Weinig.
1447
1448         Give WebKit2 the ability to not mis-cast.
1449
1450         * loader/FrameLoaderClient.h:
1451         (WebCore::FrameLoaderClient::isEmptyFrameLoaderClient): Defaults to false, and include a FIXME
1452           to remove it once https://bugs.webkit.org/show_bug.cgi?id=116233 is resolved.
1453
1454         * loader/EmptyClients.h: Make isEmptyFrameLoaderClient() return true, and add a FIXME to remove it.
1455
1456 2013-05-14  Martin Robinson  <mrobinson@igalia.com>
1457
1458         [GTK] Add support for building WebCore to the cmake build
1459         https://bugs.webkit.org/show_bug.cgi?id=116128
1460
1461         Reviewed by Gustavo Noronha Silva.
1462
1463         * PlatformGTK.cmake: Added.
1464         * platform/gtk/GtkVersioning.c: Include "config.h" because we removed
1465         the autotoolsconfig.h include from the header.
1466         * platform/gtk/GtkVersioning.h: Remove autotoolsconfig.h include to support for
1467         non-autotools build systems.
1468
1469 2013-05-15  Ryosuke Niwa  <rniwa@webkit.org>
1470
1471         DocumentOrderedMap doesn't need to have two HashMaps
1472         https://bugs.webkit.org/show_bug.cgi?id=116167
1473
1474         Reviewed by Geoffrey Garen.
1475
1476         Previously, we had two hash maps: m_map and m_duplicateCounts in DocumentOrderedMap to keep track
1477         of the first element and the number of duplicates for a given name. This patch simplifies this structure
1478         by having a single hash map that contains both the pointer and the number of duplicates.
1479
1480         In addition, this patch fixes a regression introduced in r149652 that window and document name maps
1481         were not updated for some elements inside a SVG use element, and makes use of the newly added list of
1482         the matching elements in SelectorQuery.
1483
1484         * dom/DocumentOrderedMap.cpp:
1485         (WebCore::DocumentOrderedMap::clear): Updated to use the new hash map.
1486         (WebCore::DocumentOrderedMap::add): Ditto.
1487         (WebCore::DocumentOrderedMap::remove): Ditto.
1488         (WebCore::DocumentOrderedMap::get): Ditto.
1489         (WebCore::DocumentOrderedMap::getAllElementsById): Added.
1490
1491         * dom/DocumentOrderedMap.h:
1492
1493         (WebCore::DocumentOrderedMap::MapEntry::MapEntry): Added.
1494         (WebCore::DocumentOrderedMap::containsSingle): Updated to use new hash map.
1495         (WebCore::DocumentOrderedMap::contains): Ditto.
1496         (WebCore::DocumentOrderedMap::containsMultiple): Ditto.
1497
1498         * dom/Element.cpp:
1499         (WebCore::Element::insertedInto): This function didn't add this element to window and document's name maps
1500         if the element had already been inserted into a tree scope, and the current call was inserting an ancestor
1501         of the tree scope into the document. We were exiting early per scope != treeScope().
1502
1503         Fixed the bug by splitting updateId into two functions updateIdForTreeScope and updateIdForDocument.
1504         The former is called when this element is inserted into a new tree scope, and the latter is called when
1505         this element is inserted into a HTML document even if it had already been inside some tree scope.
1506
1507         (WebCore::Element::removedFrom): This function didn't remove this element from tree scope's id maps if
1508         the tree scope wasn't a document. Fixed the bug by simply checking that the removal happens beneath the
1509         current tree scope.
1510         (WebCore::Element::updateName):
1511         (WebCore::Element::updateNameForTreeScope): Renamed from updateName.
1512         (WebCore::Element::updateNameForDocument): Extracted from updateName.
1513         (WebCore::Element::updateId):
1514         (WebCore::Element::updateIdForTreeScope): Renamed from updateId.
1515         (WebCore::Element::updateIdForDocument): Extracted from updateId.
1516
1517         * dom/Element.h:
1518
1519         * dom/SelectorQuery.cpp:
1520         (WebCore::SelectorDataList::canUseIdLookup): Refactored to return the id subselector instead of checking if
1521         the first subselector happens to be matching an id.
1522         (WebCore::SelectorDataList::execute): Use the subselector canUseIdLookup returned. Also make use of newly
1523         added getAllElementsById when there are multiple matching elements for a given id.
1524
1525         * dom/SelectorQuery.h:
1526
1527         * dom/TreeScope.cpp:
1528         (WebCore::TreeScope::getAllElementsById): Added.
1529
1530         * dom/TreeScope.h:
1531
1532 2013-05-15  Darin Adler  <darin@apple.com>
1533
1534         [Mac] Make Clipboard::create functions for Mac platform independent by moving Pasteboard creation to Pasteboard functions
1535         https://bugs.webkit.org/show_bug.cgi?id=116179
1536
1537         Reviewed by Andreas Kling.
1538
1539         * dom/Clipboard.cpp:
1540         (WebCore::Clipboard::createForCopyAndPaste): Moved the function here from
1541         ClipboardMac, and have it use Pasteboard functions that are not Mac-specific.
1542         (WebCore::Clipboard::create): Ditto.
1543         (WebCore::Clipboard::createForDragAndDrop): Ditto.
1544
1545         * platform/DragData.h:
1546         (WebCore::DragData::pasteboardName): Made this const.
1547
1548         * platform/Pasteboard.h: Added new create functions, used by the clipboard
1549         create functions above.
1550
1551         * platform/mac/ClipboardMac.mm: Removed the functions that were moved to the
1552         Clipboard.cpp file.
1553
1554         * platform/mac/PasteboardMac.mm:
1555         (WebCore::Pasteboard::createForCopyAndPaste): Added.
1556         (WebCore::Pasteboard::createPrivate): Added.
1557         (WebCore::Pasteboard::createForDragAndDrop): Added.
1558
1559 2013-05-15  Anders Carlsson  <andersca@apple.com>
1560
1561         Fix a thinko.
1562
1563         We want to invalidate the file icon loader if it exists, not create it!
1564
1565         * html/FileInputType.cpp:
1566         (WebCore::FileInputType::requestIcon):
1567
1568 2013-05-15  Darin Adler  <darin@apple.com>
1569
1570         Move drag-specific Clipboard functions inside ENABLE(DRAG_SUPPORT)
1571         https://bugs.webkit.org/show_bug.cgi?id=116176
1572
1573         Reviewed by Andreas Kling.
1574
1575         * dom/Clipboard.cpp:
1576         (WebCore::Clipboard::writeRange):
1577         (WebCore::Clipboard::writePlainText):
1578         (WebCore::Clipboard::writeURL):
1579         Move these three functions inside ENABLE(DRAG_SUPPORT). Even though their names do
1580         not make it obvious, these are here only for use by dragging code. Later we may
1581         refactor them away entirely, but for now it's good not to compile them in on any
1582         platform that does not support dragging.
1583
1584 2013-05-15  Andy Estes  <aestes@apple.com>
1585
1586         Resources from non-HTTP schemes should not be cached indefinitely
1587         https://bugs.webkit.org/show_bug.cgi?id=113626
1588
1589         Reviewed by Ryosuke Niwa.
1590
1591         With the exception of schemes that we know will always return the same
1592         result for a given URL, we should not indefinitely cache non-HTTP
1593         resources when their freshness cannot be verified.
1594
1595         Writing a test for this is blocked on https://webkit.org/b/116199.
1596
1597         The following two existing tests of memory cache behavior were
1598         converted to HTTP tests so that they continue to function as expected:
1599
1600         Tests: http/tests/cache/display-image-unset-allows-cached-image-load.html
1601                http/tests/cache/willsendrequest-returns-null-for-memory-cache-load.html
1602
1603         * loader/cache/CachedResource.cpp:
1604         (WebCore::CachedResource::freshnessLifetime): Returned a freshness
1605         lifetime of 0 for non-HTTP schemes that can't be indefinitely cached.
1606         * platform/SchemeRegistry.cpp:
1607         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
1608         Checked whether the scheme is blob:, data:, or applewebdata:.
1609         * platform/SchemeRegistry.h:
1610
1611 2013-05-15  Tim Horton  <timothy_horton@apple.com>
1612
1613         makeRGBAFromNSColor throws an exception if given a color in a greyscale colorspace
1614         https://bugs.webkit.org/show_bug.cgi?id=116198
1615         <rdar://problem/13904395>
1616
1617         Reviewed by Simon Fraser.
1618
1619         Block Objective-C exceptions in makeRGBAFromNSColor.
1620         Remove a comment saying that they're impossible.
1621
1622         Convert the incoming color to the DeviceRGB colorspace to match
1623         existing color sources. Some rare cases (attributed strings that come
1624         from PDFKit) can have DeviceGrayscale color spaces, which would
1625         previously throw an exception here.
1626
1627         * platform/graphics/mac/ColorMac.mm:
1628         (WebCore::makeRGBAFromNSColor):
1629
1630 2013-05-15  David Kilzer  <ddkilzer@apple.com>
1631
1632         BUILD FIX (r150140): Frame::editor() should return a reference for iOS, too
1633
1634         * platform/ios/ClipboardIOS.mm:
1635         (WebCore::ClipboardIOS::ClipboardIOS):
1636         (WebCore::ClipboardIOS::hasData):
1637         (WebCore::ClipboardIOS::clearData):
1638         (WebCore::ClipboardIOS::clearAllData):
1639         (WebCore::ClipboardIOS::getData):
1640         (WebCore::ClipboardIOS::setData):
1641         (WebCore::ClipboardIOS::types):
1642         (WebCore::ClipboardIOS::writeRange):
1643         * platform/ios/PasteboardIOS.mm:
1644         (WebCore::Pasteboard::getStringSelection):
1645         (WebCore::Pasteboard::writeSelection):
1646         (WebCore::Pasteboard::writePlainText):
1647         (WebCore::Pasteboard::writeImage):
1648         (WebCore::Pasteboard::plainText):
1649         (WebCore::documentFragmentWithRTF):
1650         (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
1651         (WebCore::Pasteboard::documentFragment):
1652
1653 2013-05-15  Anders Carlsson  <andersca@apple.com>
1654
1655         Stop using the factory pattern in FileIconLoaderClient
1656         https://bugs.webkit.org/show_bug.cgi?id=116197
1657
1658         Reviewed by Andreas Kling.
1659
1660         Move the FileIconLoader member out of FileIconLoaderClient and into FileInputType and remove the factory gunk.
1661
1662         * html/FileInputType.cpp:
1663         (WebCore::FileInputType::~FileInputType):
1664         (WebCore::FileInputType::requestIcon):
1665         * html/FileInputType.h:
1666         (FileInputType):
1667         * platform/FileIconLoader.cpp:
1668         (WebCore::FileIconLoader::invalidate):
1669         * platform/FileIconLoader.h:
1670         (WebCore::FileIconLoaderClient::~FileIconLoaderClient):
1671         (FileIconLoader):
1672
1673 2013-05-15  Anders Carlsson  <andersca@apple.com>
1674
1675         Fix FileChooserClient design
1676         https://bugs.webkit.org/show_bug.cgi?id=116195
1677
1678         Reviewed by Andreas Kling.
1679
1680         FileChooserClient doesn't match the standard WebCore client idiom of only having virtual member functions.
1681         Instead it holds on to its FileChooser and it's even a factory for creating new file choosers(!).
1682
1683         Fix this by making it an abstract class, and moving FileChooser into FileInputType.
1684
1685         * html/FileInputType.cpp:
1686         (WebCore::FileInputType::~FileInputType):
1687         Invalidate the file chooser.
1688
1689         (WebCore::FileInputType::handleDOMActivateEvent):
1690         Apply the file chooser settings.
1691
1692         (WebCore::FileInputType::applyFileChooserSettings):
1693         Recreate the file chooser with new settings.
1694
1695         (WebCore::FileInputType::receiveDropForDirectoryUpload):
1696         Apply the settings.
1697
1698         * platform/FileChooser.cpp:
1699         (WebCore::FileChooser::invalidate):
1700         Set m_client to null.
1701
1702         (WebCore::FileChooser::chooseFiles):
1703         Early return.
1704
1705         * platform/FileChooser.h:
1706
1707 2013-05-15  Gavin Barraclough  <barraclough@apple.com>
1708
1709         ScriptedAnimationController::setThrottled should extend MinimumAnimationInterval
1710         https://bugs.webkit.org/show_bug.cgi?id=116193
1711
1712         Reviewed by Darin Adler
1713
1714         * dom/ScriptedAnimationController.cpp:
1715         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
1716         (WebCore::ScriptedAnimationController::setThrottled):
1717         (WebCore::ScriptedAnimationController::scheduleAnimation):
1718         * dom/ScriptedAnimationController.h:
1719         (ScriptedAnimationController):
1720             - Fixes for review comments.
1721
1722 2013-05-15  Anders Carlsson  <andersca@apple.com>
1723
1724         Move HTTPRequest class to WebKit2
1725         https://bugs.webkit.org/show_bug.cgi?id=116192
1726
1727         Reviewed by Darin Adler.
1728
1729         HTTPRequest is only used by the "remote inspector" feature in WebKit2,
1730         so there's no need to have it in WebCore.
1731
1732         * CMakeLists.txt:
1733         * GNUmakefile.list.am:
1734         * Target.pri:
1735         * WebCore.vcproj/WebCore.vcproj:
1736         * WebCore.vcxproj/WebCore.vcxproj:
1737         * WebCore.vcxproj/WebCore.vcxproj.filters:
1738         * WebCore.xcodeproj/project.pbxproj:
1739
1740 2013-05-15  Oliver Hunt  <oliver@apple.com>
1741
1742         RefCountedArray needs to use vector initialisers for its backing store
1743         https://bugs.webkit.org/show_bug.cgi?id=116194
1744
1745         Reviewed by Gavin Barraclough.
1746
1747         Update to use new functions for operating on the exception stack.
1748
1749         * bindings/js/ScriptCallStackFactory.cpp:
1750         (WebCore::createScriptCallStackFromException):
1751
1752 2013-05-15  Gavin Barraclough  <barraclough@apple.com>
1753
1754         ScriptedAnimationController::setThrottled should extend MinimumAnimationInterval
1755         https://bugs.webkit.org/show_bug.cgi?id=116193
1756
1757         Reviewed by Simon Fraser.
1758
1759         * dom/ScriptedAnimationController.cpp:
1760         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
1761             - initialize m_throttled
1762         (WebCore::ScriptedAnimationController::setThrottled):
1763             - sets m_throttled, reschedule when this changes.
1764         (WebCore::ScriptedAnimationController::scheduleAnimation):
1765             - if throtled don't use a display link, and extend the timeout.
1766         * dom/ScriptedAnimationController.h:
1767         (ScriptedAnimationController):
1768             - Added m_throttled
1769
1770 2013-05-08  Gavin Barraclough  <barraclough@apple.com>
1771
1772         Process suppression should throttle scripted animations
1773         https://bugs.webkit.org/show_bug.cgi?id=115812
1774
1775         Reviewed by Simon Fraser.
1776
1777         <rdar://problem/13799726>
1778
1779         * WebCore.exp.in:
1780             - Expose Page::setThrottled
1781         * dom/Document.cpp:
1782         (WebCore::Document::scriptedAnimationControllerSetThrottled):
1783         (WebCore):
1784         * dom/Document.h:
1785         (Document):
1786             - Forwards to ScriptedAnimationController::setThrottled
1787         * dom/ScriptedAnimationController.cpp:
1788         (WebCore::ScriptedAnimationController::setThrottled):
1789         (WebCore):
1790         * dom/ScriptedAnimationController.h:
1791             - Force use of a timer.
1792         (ScriptedAnimationController):
1793         * page/Page.cpp:
1794         (WebCore::Page::setThrottled):
1795         (WebCore):
1796         * page/Page.h:
1797         (Page):
1798             - When under throttling force the ScriptedAnimationController to use a timer.
1799
1800 2013-05-15  Igor Oliveira  <igor.o@sisa.samsung.com>
1801
1802         Implement run-in remove child cases.
1803         https://bugs.webkit.org/show_bug.cgi?id=86520
1804
1805         Move runin to original position when sibling element is destroyed.
1806
1807         Reviewed by David Hyatt.
1808
1809         Tests: fast/runin/runin-remove-child-simple.html
1810                fast/runin/runin-sibling-inline.html
1811
1812         * rendering/RenderBlock.cpp:
1813         (WebCore::RenderBlock::willBeDestroyed):
1814         (WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
1815             If moveRunInUnderSiblingBlockIfNeeded is called when the sibling run-in block
1816             is being destroyed, it means that the run-in is moving to original position and
1817             we do not need to do nothing.
1818
1819 2013-05-15  Anders Carlsson  <andersca@apple.com>
1820
1821         Remove WebSocketHandshakeResponse class
1822         https://bugs.webkit.org/show_bug.cgi?id=116190
1823
1824         Reviewed by Andreas Kling.
1825
1826         Just use ResourceResponse instead of WebSocketHandshakeResponse.
1827
1828         * CMakeLists.txt:
1829         * GNUmakefile.list.am:
1830         * Modules/websockets/WebSocketHandshake.cpp:
1831         (WebCore::WebSocketHandshake::readServerHandshake):
1832         (WebCore::WebSocketHandshake::serverWebSocketProtocol):
1833         (WebCore::WebSocketHandshake::serverSetCookie):
1834         (WebCore::WebSocketHandshake::serverSetCookie2):
1835         (WebCore::WebSocketHandshake::serverUpgrade):
1836         (WebCore::WebSocketHandshake::serverConnection):
1837         (WebCore::WebSocketHandshake::serverWebSocketAccept):
1838         (WebCore::WebSocketHandshake::serverHandshakeResponse):
1839         (WebCore::WebSocketHandshake::readHTTPHeaders):
1840         * Modules/websockets/WebSocketHandshake.h:
1841         * Modules/websockets/WebSocketHandshakeResponse.cpp: Removed.
1842         * Modules/websockets/WebSocketHandshakeResponse.h: Removed.
1843         * Target.pri:
1844         * WebCore.vcproj/WebCore.vcproj:
1845         * WebCore.vcxproj/WebCore.vcxproj:
1846         * WebCore.vcxproj/WebCore.vcxproj.filters:
1847         * WebCore.xcodeproj/project.pbxproj:
1848         * inspector/InspectorInstrumentation.cpp:
1849         (WebCore):
1850         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
1851         * inspector/InspectorInstrumentation.h:
1852         (InspectorInstrumentation):
1853         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
1854         * inspector/InspectorResourceAgent.cpp:
1855         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
1856         * inspector/InspectorResourceAgent.h:
1857         (WebCore):
1858         (InspectorResourceAgent):
1859
1860 2013-05-15  Eric Carlson  <eric.carlson@apple.com>
1861
1862         [Mac] media engine may deliver NULL in-band "cue"
1863         https://bugs.webkit.org/show_bug.cgi?id=116180
1864
1865         Reviewed by Jer Noble.
1866
1867         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1868         (WebCore::InbandTextTrackPrivateAVF::processCue): NULL check before logging cue count.
1869
1870 2013-05-15  Darin Adler  <darin@apple.com>
1871
1872         List platforms that still use the legacy clipboard instead of just saying "not Mac"
1873         https://bugs.webkit.org/show_bug.cgi?id=116177
1874
1875         Reviewed by Andreas Kling.
1876
1877         * dom/Clipboard.h: Replaced the "!MAC || IOS" with a list of platforms still on the
1878         legacy model.
1879
1880 2013-05-15  Yongjun Zhang  <yongjun_zhang@apple.com>
1881
1882         We should clear mainResource in DocumentLoader::cancelMainResourceLoad.
1883         https://bugs.webkit.org/show_bug.cgi?id=116119
1884
1885         Reviewed by Oliver Hunt.
1886
1887         MainResourceLoader::clearResource() was left out in r146239 when moving MainResourceLoader::cancel()
1888         to DocumentLoader::cancelMainResourceLoad(), we need to add it back to make sure m_mainResource is
1889         cleared when we cancel the loader.
1890
1891         No new tests needed.
1892
1893         * loader/DocumentLoader.cpp:
1894         (WebCore::DocumentLoader::~DocumentLoader):
1895         (WebCore::DocumentLoader::continueAfterNavigationPolicy):
1896         (WebCore::DocumentLoader::cancelMainResourceLoad):
1897         (WebCore::DocumentLoader::clearMainResource):
1898         (WebCore):
1899         * loader/DocumentLoader.h: add helper method clearMainResource()
1900         (DocumentLoader):
1901
1902 2013-05-15  Joe Mason  <jmason@blackberry.com>
1903
1904         [BlackBerry] When HTTP auth fails, only purge credentials that match the failed credentials
1905         https://bugs.webkit.org/show_bug.cgi?id=116164
1906
1907         Reviewed by Rob Buis.
1908
1909         Internal PR: 338490
1910         Internally Reviewed By: Lyon Chen
1911
1912         When there are multiple HTTP requests in flight with the same bad credentials (common with
1913         proxy auth if the user mistyped their password), the first 407 that's received will cause
1914         the credentials to be purged and the password dialog to open for new credentials. This means
1915         that all 407's received after this should only purge the credentials if they have not
1916         already been updated from the dialog; otherwise they will be wiping out credentials that
1917         haven't failed yet.
1918
1919         * platform/network/blackberry/NetworkJob.cpp:
1920         (WebCore::NetworkJob::sendRequestWithCredentials):
1921         (WebCore::NetworkJob::purgeCredentials):
1922
1923 2013-05-15  Chris Fleizach  <cfleizach@apple.com>
1924
1925         AX: Use caching when requesting children object on iOS
1926         https://bugs.webkit.org/show_bug.cgi?id=116112
1927
1928         Reviewed by David Kilzer.
1929
1930         Building up the children list in the AX hierarchy can be time consuming. On iOS, this
1931         is now much more noticeable (I believe due to the way tables calculate their AX ignored flag).
1932
1933         We can speed everything up if we just cache the isIgnored() attribute while building up children.
1934
1935         * accessibility/AXObjectCache.cpp:
1936         (WebCore::AXAttributeCacheEnabler::AXAttributeCacheEnabler):
1937         (WebCore):
1938         (WebCore::AXAttributeCacheEnabler::~AXAttributeCacheEnabler):
1939         * accessibility/AXObjectCache.h:
1940         (AXAttributeCacheEnabler):
1941         (WebCore):
1942         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1943         (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
1944         (-[WebAccessibilityObjectWrapper accessibilityElementCount]):
1945         (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
1946         (-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
1947         (-[WebAccessibilityObjectWrapper accessibilityContainer]):
1948
1949 2013-05-15  Anders Carlsson  <andersca@apple.com>
1950
1951         Remove WebSocketHandshakeRequest class
1952         https://bugs.webkit.org/show_bug.cgi?id=116178
1953
1954         Reviewed by Andreas Kling.
1955
1956         Turns out WebSocketHandshakeRequest is just used by the web inspector, and there's no reason 
1957         why we can't just use a ResourceRequest instead.
1958
1959         * CMakeLists.txt:
1960         * GNUmakefile.list.am:
1961         * Modules/websockets/WebSocketChannel.cpp:
1962         (WebCore::WebSocketChannel::didOpenSocketStream):
1963         * Modules/websockets/WebSocketHandshake.cpp:
1964         (WebCore::WebSocketHandshake::clientHandshakeRequest):
1965         * Modules/websockets/WebSocketHandshake.h:
1966         (WebCore):
1967         * Modules/websockets/WebSocketHandshakeRequest.cpp: Removed.
1968         * Modules/websockets/WebSocketHandshakeRequest.h: Removed.
1969         * Target.pri:
1970         * WebCore.vcproj/WebCore.vcproj:
1971         * WebCore.vcxproj/WebCore.vcxproj:
1972         * WebCore.vcxproj/WebCore.vcxproj.filters:
1973         * WebCore.xcodeproj/project.pbxproj:
1974         * inspector/InspectorInstrumentation.cpp:
1975         (WebCore):
1976         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
1977         * inspector/InspectorInstrumentation.h:
1978         (InspectorInstrumentation):
1979         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
1980         * inspector/InspectorResourceAgent.cpp:
1981         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
1982         * inspector/InspectorResourceAgent.h:
1983         (WebCore):
1984         (InspectorResourceAgent):
1985         * platform/network/HTTPRequest.cpp:
1986         (WebCore):
1987
1988 2013-05-15  Darin Adler  <darin@apple.com>
1989
1990         Try to fix iOS build.
1991
1992         * platform/Pasteboard.h: Fix #if so that we don't try to compile pasteboard name code
1993         on iOS.
1994
1995 2013-05-13  Anders Carlsson  <andersca@apple.com>
1996
1997         Frame::editor() should return a reference
1998         https://bugs.webkit.org/show_bug.cgi?id=116037
1999
2000         Reviewed by Darin Adler.
2001
2002         A frame's editor can never be null. Change Frame::editor() to return a reference to reflect this.
2003         Also, make Frame::m_editor a const member variable so nobody will accidentally set it to null.
2004
2005         * accessibility/AccessibilityObject.cpp:
2006         (WebCore::AccessibilityObject::hasMisspelling):
2007         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2008         (AXAttributeStringSetSpelling):
2009         * dom/ContainerNode.cpp:
2010         (WebCore::ContainerNode::cloneChildNodes):
2011         * dom/Document.cpp:
2012         (WebCore::acceptsEditingFocus):
2013         (WebCore::Document::setFocusedNode):
2014         (WebCore::command):
2015         * editing/AlternativeTextController.cpp:
2016         (WebCore::AlternativeTextController::timerFired):
2017         (WebCore::AlternativeTextController::applyDictationAlternative):
2018         * editing/CompositeEditCommand.cpp:
2019         (WebCore::EditCommandComposition::unapply):
2020         (WebCore::EditCommandComposition::reapply):
2021         (WebCore::CompositeEditCommand::apply):
2022         (WebCore::CompositeEditCommand::moveParagraphs):
2023         * editing/DeleteButton.cpp:
2024         (WebCore::DeleteButton::defaultEventHandler):
2025         * editing/DeleteButtonController.cpp:
2026         (WebCore::DeleteButtonController::show):
2027         * editing/DeleteButtonController.h:
2028         (WebCore::DeleteButtonControllerDisableScope::DeleteButtonControllerDisableScope):
2029         (WebCore::DeleteButtonControllerDisableScope::~DeleteButtonControllerDisableScope):
2030         * editing/DeleteSelectionCommand.cpp:
2031         (WebCore::DeleteSelectionCommand::mergeParagraphs):
2032         (WebCore::DeleteSelectionCommand::doApply):
2033         * editing/EditCommand.cpp:
2034         (WebCore::EditCommand::EditCommand):
2035         * editing/EditingStyle.cpp:
2036         (WebCore::StyleChange::StyleChange):
2037         * editing/Editor.cpp:
2038         (WebCore::Editor::markMisspellingsAfterTypingToWord):
2039         * editing/EditorCommand.cpp:
2040         (WebCore::applyCommandToFrame):
2041         (WebCore::executeToggleStyle):
2042         (WebCore::executeApplyParagraphStyle):
2043         (WebCore::expandSelectionToGranularity):
2044         (WebCore::stateStyle):
2045         (WebCore::valueStyle):
2046         (WebCore::executeCopy):
2047         (WebCore::executeCut):
2048         (WebCore::executeDefaultParagraphSeparator):
2049         (WebCore::executeDelete):
2050         (WebCore::executeDeleteBackward):
2051         (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter):
2052         (WebCore::executeDeleteForward):
2053         (WebCore::executeDeleteToBeginningOfLine):
2054         (WebCore::executeDeleteToBeginningOfParagraph):
2055         (WebCore::executeDeleteToEndOfLine):
2056         (WebCore::executeDeleteToEndOfParagraph):
2057         (WebCore::executeDeleteToMark):
2058         (WebCore::executeDeleteWordBackward):
2059         (WebCore::executeDeleteWordForward):
2060         (WebCore::executeFindString):
2061         (WebCore::executeForwardDelete):
2062         (WebCore::executeIgnoreSpelling):
2063         (WebCore::executeInsertNewline):
2064         (WebCore::executeMakeTextWritingDirectionLeftToRight):
2065         (WebCore::executeMakeTextWritingDirectionNatural):
2066         (WebCore::executeMakeTextWritingDirectionRightToLeft):
2067         (WebCore::executeToggleOverwrite):
2068         (WebCore::executePaste):
2069         (WebCore::executePasteGlobalSelection):
2070         (WebCore::executePasteAndMatchStyle):
2071         (WebCore::executePasteAsPlainText):
2072         (WebCore::executeRedo):
2073         (WebCore::executeRemoveFormat):
2074         (WebCore::executeSelectToMark):
2075         (WebCore::executeSetMark):
2076         (WebCore::executeStyleWithCSS):
2077         (WebCore::executeUseCSS):
2078         (WebCore::executeSwapWithMark):
2079         (WebCore::executeTakeFindStringFromSelection):
2080         (WebCore::executeTranspose):
2081         (WebCore::executeUndo):
2082         (WebCore::executeYank):
2083         (WebCore::executeYankAndSelect):
2084         (WebCore::supportedCopyCut):
2085         (WebCore::supportedPaste):
2086         (WebCore::enabledVisibleSelection):
2087         (WebCore::enabledVisibleSelectionAndMark):
2088         (WebCore::enableCaretInEditableText):
2089         (WebCore::enabledCopy):
2090         (WebCore::enabledCut):
2091         (WebCore::enabledInEditableText):
2092         (WebCore::enabledDelete):
2093         (WebCore::enabledPaste):
2094         (WebCore::enabledRedo):
2095         (WebCore::enabledTakeFindStringFromSelection):
2096         (WebCore::enabledUndo):
2097         (WebCore::stateOrderedList):
2098         (WebCore::stateStyleWithCSS):
2099         (WebCore::stateUnorderedList):
2100         (WebCore::valueDefaultParagraphSeparator):
2101         * editing/FrameSelection.cpp:
2102         (WebCore::shouldAlwaysUseDirectionalSelection):
2103         (WebCore::FrameSelection::setSelection):
2104         (WebCore::FrameSelection::nextWordPositionForPlatform):
2105         (WebCore::FrameSelection::modifyMovingRight):
2106         (WebCore::FrameSelection::modifyMovingLeft):
2107         (WebCore::FrameSelection::modify):
2108         (WebCore::shouldStopBlinkingDueToTypingCommand):
2109         (WebCore::FrameSelection::shouldDeleteSelection):
2110         (WebCore::FrameSelection::shouldChangeSelection):
2111         * editing/InsertTextCommand.cpp:
2112         (WebCore::InsertTextCommand::doApply):
2113         * editing/SpellChecker.cpp:
2114         (WebCore::SpellChecker::didCheck):
2115         * editing/SpellingCorrectionCommand.cpp:
2116         * editing/TypingCommand.cpp:
2117         (WebCore::TypingCommand::insertText):
2118         (WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
2119         (WebCore::TypingCommand::markMisspellingsAfterTyping):
2120         (WebCore::TypingCommand::typingAddedToOpenCommand):
2121         (WebCore::TypingCommand::deleteKeyPressed):
2122         (WebCore::TypingCommand::forwardDeleteKeyPressed):
2123         * editing/htmlediting.cpp:
2124         (WebCore::createDefaultParagraphElement):
2125         * editing/mac/EditorMac.mm:
2126         (WebCore::Editor::pasteWithPasteboard):
2127         * editing/markup.cpp:
2128         (WebCore::createMarkup):
2129         * html/HTMLInputElement.cpp:
2130         (WebCore::HTMLInputElement::endEditing):
2131         * html/HTMLTextAreaElement.cpp:
2132         (WebCore::HTMLTextAreaElement::subtreeHasChanged):
2133         * html/TextFieldInputType.cpp:
2134         (WebCore::TextFieldInputType::handleKeydownEvent):
2135         (WebCore::TextFieldInputType::didSetValueByUserEdit):
2136         * loader/FrameLoader.cpp:
2137         (WebCore::FrameLoader::closeURL):
2138         (WebCore::FrameLoader::didOpenURL):
2139         (WebCore::FrameLoader::clear):
2140         * page/ContextMenuController.cpp:
2141         (WebCore::insertUnicodeCharacter):
2142         (WebCore::ContextMenuController::contextMenuItemSelected):
2143         (WebCore::ContextMenuController::populate):
2144         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
2145         * page/DOMWindow.cpp:
2146         (WebCore::DOMWindow::find):
2147         * page/DragController.cpp:
2148         (WebCore::DragController::dispatchTextInputEventFor):
2149         (WebCore::DragController::concludeEditDrag):
2150         (WebCore::DragController::startDrag):
2151         * page/EventHandler.cpp:
2152         (WebCore::EventHandler::selectClosestWordFromMouseEvent):
2153         (WebCore::EventHandler::handleMousePressEventSingleClick):
2154         (WebCore::EventHandler::handlePasteGlobalSelection):
2155         (WebCore::EventHandler::sendContextMenuEvent):
2156         (WebCore::EventHandler::sendContextMenuEventForKey):
2157         (WebCore::EventHandler::keyEvent):
2158         (WebCore::EventHandler::defaultKeyboardEventHandler):
2159         (WebCore::EventHandler::defaultTextInputEventHandler):
2160         (WebCore::EventHandler::defaultBackspaceEventHandler):
2161         * page/FocusController.cpp:
2162         (WebCore::relinquishesEditingFocus):
2163         * page/Frame.cpp:
2164         (WebCore::Frame::rangeForPoint):
2165         * page/Frame.h:
2166         (Frame):
2167         (WebCore::Frame::editor):
2168         * page/Page.cpp:
2169         (WebCore::Page::findString):
2170         (WebCore::Page::findStringMatchingRanges):
2171         (WebCore::Page::rangeOfString):
2172         (WebCore::Page::markAllMatchesForText):
2173         (WebCore::Page::setDeviceScaleFactor):
2174         * platform/mac/ClipboardMac.mm:
2175         (WebCore::ClipboardMac::writeRange):
2176         * platform/mac/DragDataMac.mm:
2177         (WebCore::DragData::asURL):
2178         * platform/mac/PasteboardMac.mm:
2179         (WebCore::Pasteboard::getStringSelection):
2180         (WebCore::Pasteboard::getDataSelection):
2181         (WebCore::Pasteboard::writeSelectionForTypes):
2182         (WebCore::writeURLForTypes):
2183         (WebCore::Pasteboard::plainText):
2184         (WebCore::documentFragmentWithRTF):
2185         (WebCore::Pasteboard::documentFragment):
2186         * rendering/HitTestResult.cpp:
2187         (WebCore::HitTestResult::dictationAlternatives):
2188         * rendering/InlineTextBox.cpp:
2189         (WebCore::InlineTextBox::paint):
2190         (WebCore::InlineTextBox::paintTextMatchMarker):
2191         * rendering/RenderBlock.cpp:
2192         (WebCore::RenderBlock::positionForPointWithInlineChildren):
2193         * testing/Internals.cpp:
2194         (WebCore::spellchecker):
2195         (WebCore::Internals::resetToConsistentState):
2196         (WebCore::Internals::hasSpellingMarker):
2197         (WebCore::Internals::hasAutocorrectedMarker):
2198         (WebCore::Internals::setContinuousSpellCheckingEnabled):
2199         (WebCore::Internals::setAutomaticQuoteSubstitutionEnabled):
2200         (WebCore::Internals::setAutomaticLinkDetectionEnabled):
2201         (WebCore::Internals::setAutomaticDashSubstitutionEnabled):
2202         (WebCore::Internals::setAutomaticTextReplacementEnabled):
2203         (WebCore::Internals::setAutomaticSpellingCorrectionEnabled):
2204         (WebCore::Internals::isOverwriteModeEnabled):
2205         (WebCore::Internals::toggleOverwriteModeEnabled):
2206         (WebCore::Internals::hasGrammarMarker):
2207
2208 2013-05-15  Darin Adler  <darin@apple.com>
2209
2210         [Mac] Make Clipboard class no longer polymorphic by removing the last virtual functions
2211         https://bugs.webkit.org/show_bug.cgi?id=116166
2212
2213         Reviewed by Anders Carlsson.
2214
2215         * WebCore.exp.in: Add ~Clipboard since it's no longer a virtual function, but to the
2216         non-iOS section, since iOS is still using the legacy version of Clipboard.
2217
2218         * dom/Clipboard.h: Mark items non-virtual, too. It's not implemented on Mac yet.
2219
2220 2013-05-15  Dongseong Hwang  <dongseong.hwang@intel.com>
2221
2222         Remove an overloaded strokeRect in <canvas>
2223         https://bugs.webkit.org/show_bug.cgi?id=116017
2224
2225         Reviewed by Benjamin Poulain.
2226
2227         The canvas spec [1] does not define strokeRect with 5 arguments, so this issue
2228         remains only strokeRect with 4 arguments.
2229
2230         [1] http://www.w3.org/TR/2dcontext2/
2231
2232         Covered by existing tests: canvas/philip/tests/2d.missingargs.html
2233
2234         * html/canvas/CanvasRenderingContext2D.cpp:
2235         (WebCore::CanvasRenderingContext2D::strokeRect):
2236         * html/canvas/CanvasRenderingContext2D.h:
2237         (CanvasRenderingContext2D):
2238         * html/canvas/CanvasRenderingContext2D.idl:
2239
2240 2013-05-15  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
2241
2242         [css3-text] text-decoration-line now accepts "blink" as valid value
2243         https://bugs.webkit.org/show_bug.cgi?id=116104
2244
2245         Reviewed by Andreas Kling.
2246
2247         As of November 13th 2012, the W3C specification has been updated to
2248         accept "blink" as a valid property value in text-decoration-line. Though
2249         accepting the value as valid, it is ignored as CSS Level 1
2250         text-decoration property currently does.
2251
2252         Updated related layout tests to reflect changes in specification.
2253
2254         * css/CSSParser.cpp:
2255         (WebCore::CSSParser::parseValue):
2256         (WebCore::CSSParser::parseTextDecoration):
2257
2258 2013-05-14  Simon Fraser  <simon.fraser@apple.com>
2259
2260         Revert http://trac.webkit.org/changeset/150047
2261         
2262         It introduced unwanted behavioral differences between
2263         Retina and non-Retina Mac hardware.
2264
2265         * platform/graphics/ca/GraphicsLayerCA.cpp:
2266         (WebCore::GraphicsLayerCA::requiresTiledLayer):
2267         (WebCore::GraphicsLayerCA::computePixelAlignment):
2268
2269 2013-05-15  Darin Adler  <darin@apple.com>
2270
2271         [Mac] Remove the ClipboardMac class and header file
2272         https://bugs.webkit.org/show_bug.cgi?id=116165
2273
2274         Reviewed by Anders Carlsson.
2275
2276         * WebCore.xcodeproj/project.pbxproj: Remove ClipboardMac.h.
2277         * editing/mac/EditorMac.mm: Import Clipboard.h rather than ClipboardMac.h.
2278         * page/mac/EventHandlerMac.mm: Ditto.
2279         * platform/mac/ClipboardMac.h: Removed.
2280
2281         * platform/mac/ClipboardMac.mm: Import Clipboard.h rather than ClipboardMac.h.
2282         Deleted ClipboardMac constructor.
2283
2284 2013-05-15  Darin Adler  <darin@apple.com>
2285
2286         [Mac] Change Clipboard::create functions so they don't use ClipboardMac::create any more
2287         https://bugs.webkit.org/show_bug.cgi?id=116163
2288
2289         Reviewed by Anders Carlsson.
2290
2291         * dom/Clipboard.h: Made the file drag boolean default to false, better for most callers.
2292
2293         * platform/mac/ClipboardMac.mm: Remove #if ENABLE(DRAG_SUPPORT); that's always on for Mac
2294         and it's not helpful to have the conditionals in here. It's helpful in cross-platform
2295         source files.
2296         (WebCore::Clipboard::create): Create a Pasteboard and then create a Clipboard with new.
2297         Later could refactor to have the Pasteboard creation be platform-specific, and make these
2298         functions platform-independent.
2299         (WebCore::Clipboard::createForDragAndDrop): Ditto.
2300         (WebCore::Clipboard::createForCopyAndPaste): Ditto.
2301
2302 2013-05-15  Darin Adler  <darin@apple.com>
2303
2304         [Mac] Remove call to ClipboardMac::create from Editor::newGeneralClipboard
2305         https://bugs.webkit.org/show_bug.cgi?id=116162
2306
2307         Reviewed by Andreas Kling.
2308
2309         * dom/Clipboard.h: Add createForCopyAndPaste function.
2310
2311         * editing/mac/EditorMac.mm:
2312         (WebCore::Editor::newGeneralClipboard): Call createForCopyAndPaste.
2313
2314         * platform/mac/ClipboardMac.mm:
2315         (WebCore::Clipboard::createForCopyAndPaste): Added. Moved code here from
2316         Editor::newGeneralClipboard.
2317
2318 2013-05-15  Darin Adler  <darin@apple.com>
2319
2320         [Mac] Remove call to ClipboardMac::create from EventHandler::createDraggingClipboard
2321         https://bugs.webkit.org/show_bug.cgi?id=116161
2322
2323         Reviewed by Andreas Kling.
2324
2325         * dom/Clipboard.h: Added createForDragAndDrop function.
2326
2327         * page/mac/EventHandlerMac.mm:
2328         (WebCore::EventHandler::createDraggingClipboard): Changed to use new Clipboard function
2329         instead of ClipboardMac::create.
2330
2331         * platform/mac/ClipboardMac.mm:
2332         (WebCore::Clipboard::createForDragAndDrop): Added. For now it does exactly what the
2333         EventHandler::createDraggingClipboard function did, soon to be refactored better.
2334
2335 2013-05-15  Darin Adler  <darin@apple.com>
2336
2337         [Mac] Thin out the ClipboardMac class and header file to prepare for deleting them
2338         https://bugs.webkit.org/show_bug.cgi?id=116159
2339
2340         Reviewed by Andreas Kling.
2341
2342         * dom/Clipboard.h:
2343         (WebCore::Clipboard::pasteboard): Added. For clients that have a DOM clipboard
2344         object and need to get to the Pasteboard platform abstraction.
2345
2346         * editing/Editor.cpp:
2347         (WebCore::Editor::dispatchCPPEvent): Call writePasteboard instead of writeClipboard.
2348         Our long term plan is to delete writeClipboard.
2349
2350         * platform/Pasteboard.h: Added writePasteboard function.
2351         (WebCore::Pasteboard::name): Made this const.
2352
2353         * platform/mac/ClipboardMac.h: Deleted unneeded includes and forward declarations.
2354         Deleted all the data members and the virtual destructor.
2355
2356         * platform/mac/ClipboardMac.mm: Deleted the many includes that are no longer needed.
2357         Deleted the destructor, since it's now automatically generated. Deleted the comment
2358         on an #endif since it's only a few source lines away from the #if.
2359         (WebCore::ClipboardMac::ClipboardMac): Deleted the code to set the data members,
2360         since they are no longer used.
2361
2362         * platform/mac/PasteboardMac.mm: Changed include to Clipboard.h instead of ClipboardMac.h.
2363         (WebCore::Pasteboard::writePasteboard): Replaced writeClipboard with this.
2364
2365 2013-05-15  Seokju Kwon  <seokju.kwon@gmail.com>
2366
2367         Web Inspector: Get rid of addNativeSnapshotChunk and HeapSnapshotChunk from Memory domain
2368         https://bugs.webkit.org/show_bug.cgi?id=116144
2369
2370         Reviewed by Timothy Hatcher.
2371
2372         No new tests, no behavior change.
2373
2374         * inspector/Inspector.json:
2375
2376 2013-05-15  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
2377
2378         [Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
2379         https://bugs.webkit.org/show_bug.cgi?id=116035
2380
2381         Reviewed by Allan Sandfeld Jensen.
2382
2383         The previous fix only moved the crash location from WebKit down to QNetworkReplyHttpImpl
2384         which expects its QNetworkAccessManager to still be alive.
2385
2386         Fix it by watching the QNetworkReply's destroyed() signal and avoid the dangling pointer
2387         instead. The QNetworkReply doesn't need to be aborted in this case anyway.
2388
2389         * platform/network/qt/QNetworkReplyHandler.cpp:
2390         (WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
2391         (WebCore::QNetworkReplyWrapper::release):
2392         (WebCore::QNetworkReplyWrapper::stopForwarding):
2393           Rename resetConnections to stopForwarding since not all connections are related
2394           to data forwarding to the client anymore.
2395         (WebCore::QNetworkReplyWrapper::receiveMetaData):
2396         (WebCore::QNetworkReplyWrapper::replyDestroyed):
2397         (WebCore::QNetworkReplyWrapper::didReceiveFinished):
2398         * platform/network/qt/QNetworkReplyHandler.h:
2399         (QNetworkReplyWrapper):
2400
2401 2013-05-15  Darin Adler  <darin@apple.com>
2402
2403         [Mac] Make Clipboard::declareAndWriteDragImage non-virtual
2404         https://bugs.webkit.org/show_bug.cgi?id=116156
2405
2406         Reviewed by Anders Carlsson.
2407
2408         * dom/Clipboard.h: Make declareAndWriteDragImage non-virtual for non-legacy.
2409
2410         * platform/Pasteboard.h:
2411         (WebCore::Pasteboard::name): Added. Can be used in Mac platform code to do
2412         pasteboard operations directly instead of through the Pasteboard class
2413         functions. Not sure if we'll need it long term or not.
2414
2415         * platform/mac/ClipboardMac.h: Removed declareAndWriteDragImage function.
2416
2417         * platform/mac/ClipboardMac.mm:
2418         (WebCore::Clipboard::declareAndWriteDragImage): Made this function a Clipboard
2419         member instead of ClipboardMac.
2420
2421 2013-05-15  Peter Gal  <galpeter@inf.u-szeged.hu>
2422
2423         [curl] Remove version #if guards
2424         https://bugs.webkit.org/show_bug.cgi?id=116152
2425
2426         Reviewed by Brent Fulgham.
2427
2428         No tests required.
2429
2430         * platform/network/curl/ResourceHandleCurl.cpp:
2431         (WebCore::ResourceHandle::platformSetDefersLoading): Removed version guard.
2432         * platform/network/curl/ResourceHandleManager.cpp:
2433         (WebCore::writeCallback): Ditto.
2434         (WebCore::headerCallback): Ditto.
2435         (WebCore::readCallback): Ditto.
2436         (WebCore::ResourceHandleManager::dispatchSynchronousJob): Ditto.
2437         (WebCore::ResourceHandleManager::initializeHandle): Ditto.
2438
2439 2013-05-15  David Kilzer  <ddkilzer@apple.com>
2440
2441         BUILD FIX (r150089): Make WebCoreTestShim build for iOS
2442
2443         * Configurations/WebCoreTestShim.xcconfig: Exclude
2444         WebCoreTestShimLibrary.cpp when building for iOS.
2445
2446 2013-05-15  Radu Stavila  <stavila@adobe.com>
2447
2448         [CSSRegions] Implement offsetParent for elements inside named flow
2449         https://bugs.webkit.org/show_bug.cgi?id=113276
2450
2451         In the offsetParent algorithm, the nearest ancestor search skips from the topmost named flow elements directly to the body element.
2452         http://dev.w3.org/csswg/css-regions/#cssomview-offset-attributes
2453
2454         As a result of this change, the DumpRenderTree tool would crash in 
2455         WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent when running the selecting-text-through-different-region-flows.html
2456         test. The RenderObjects inside a flow are attached to the RenderFlowThread. However, the RenderFlowThread is attached to the 
2457         RenderView directly, meaning that we are going to bypass the <body>'s RenderObject while iterating the parents.
2458
2459         Reviewed by Darin Adler.
2460
2461         Tests: fast/regions/offsetParent-body-in-flow-thread.html
2462                fast/regions/offsetParent-in-flow-thread.html
2463
2464         * rendering/RenderBoxModelObject.cpp:
2465         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
2466         * rendering/RenderObject.cpp:
2467         (WebCore::RenderObject::offsetParent):
2468
2469 2013-05-15  Darin Adler  <darin@apple.com>
2470
2471         [Mac] Make Clipboard::createDragImage non-virtual
2472         https://bugs.webkit.org/show_bug.cgi?id=116136
2473
2474         Reviewed by Benjamin Poulain.
2475
2476         * dom/Clipboard.h: Made createDragImage non-virtual for non-legacy.
2477
2478         * platform/mac/ClipboardMac.h: Removed frame argument from create function
2479         and constructor. Removed createDragImage and dragNSImage. Removed m_frame
2480         data member.
2481
2482         * platform/mac/ClipboardMac.mm:
2483         (WebCore::ClipboardMac::ClipboardMac): Removed frame argument and code
2484         to initialize m_frame.
2485         (WebCore::Clipboard::createDragImage): Merged the createDragImage and
2486         dragNSImage functions, since they were the same thing. Changed code to get
2487         the frame from the drag image element. Made the createDragImage function
2488         a Clipboard member instead of ClipboardMac.
2489
2490 2013-05-15  Patrick Gansterer  <paroga@webkit.org>
2491
2492         [WINCE] Fix calls to GlyphPage::setGlyphDataForIndex()
2493         https://bugs.webkit.org/show_bug.cgi?id=116137
2494
2495         Reviewed by Andreas Kling.
2496
2497         Use zero for the glyp when the fontData pointer is null.
2498         This aligns GlyphPageTreeNodeWinCE with the other implementations
2499         and makes all ASSERT() pass in setGlyphDataForIndex().
2500
2501         * platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp:
2502         (WebCore::GlyphPage::fill):
2503
2504 2013-05-15  Benjamin Poulain  <bpoulain@apple.com>
2505
2506         Do not bloat HTMLTokenizer with a giant inline InputStreamPreprocessor::peek
2507         https://bugs.webkit.org/show_bug.cgi?id=116066
2508
2509         Reviewed by Ryosuke Niwa.
2510
2511         Merge https://chromium.googlesource.com/chromium/blink/+/45e0337b2f2db535ab08365f6e763a5015e4d990.
2512
2513         On x86_64, this removes 40kb from the binary. On my machine it is completely neutral on performance.
2514
2515         * html/parser/InputStreamPreprocessor.h:
2516         (WebCore::InputStreamPreprocessor::peek):
2517         (InputStreamPreprocessor):
2518         (WebCore::InputStreamPreprocessor::advance):
2519         (WebCore::InputStreamPreprocessor::skipNextNewLine):
2520         (WebCore::InputStreamPreprocessor::reset):
2521         (WebCore::InputStreamPreprocessor::processNextInputCharacter):
2522
2523 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2524
2525         Remove WTF_USE_PLATFORM_STRATEGIES
2526         https://bugs.webkit.org/show_bug.cgi?id=114431
2527
2528         Reviewed by Darin Adler.
2529
2530         * Modules/webdatabase/DatabaseManager.cpp:
2531         (WebCore::DatabaseManager::DatabaseManager):
2532         * dom/ContainerNode.cpp:
2533         (WebCore::ContainerNode::suspendPostAttachCallbacks):
2534         (WebCore::ContainerNode::resumePostAttachCallbacks):
2535         * dom/VisitedLinkState.cpp:
2536         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
2537         * loader/CookieJar.cpp:
2538         (WebCore::cookies):
2539         (WebCore::setCookies):
2540         (WebCore::cookiesEnabled):
2541         (WebCore::cookieRequestHeaderFieldValue):
2542         (WebCore::getRawCookies):
2543         (WebCore::deleteCookie):
2544         * loader/FrameLoader.cpp:
2545         (WebCore::FrameLoader::loadResourceSynchronously):
2546         * loader/HistoryController.cpp:
2547         (WebCore::addVisitedLink):
2548         * loader/LoaderStrategy.cpp:
2549         * loader/LoaderStrategy.h:
2550         * loader/ResourceLoadScheduler.cpp:
2551         (WebCore::resourceLoadScheduler):
2552         * loader/ResourceLoader.cpp:
2553         (WebCore::ResourceLoader::releaseResources):
2554         (WebCore::ResourceLoader::willSendRequest):
2555         * loader/cache/CachedResource.cpp:
2556         (WebCore::CachedResource::load):
2557         * loader/cache/CachedResourceLoader.cpp:
2558         (WebCore::CachedResourceLoader::performPostLoadActions):
2559         * platform/CookiesStrategy.h:
2560         * platform/DatabaseStrategy.cpp:
2561         * platform/DatabaseStrategy.h:
2562         * platform/PasteboardStrategy.h:
2563         * platform/PlatformStrategies.cpp:
2564         * platform/PlatformStrategies.h:
2565         * platform/VisitedLinkStrategy.h:
2566         * platform/mac/PasteboardMac.mm:
2567         * platform/network/BlobRegistry.cpp:
2568         (WebCore::blobRegistry):
2569         * plugins/PluginData.cpp:
2570         (WebCore::PluginData::initPlugins):
2571         * plugins/PluginStrategy.h:
2572         * storage/StorageNamespace.cpp:
2573         (WebCore::StorageNamespace::localStorageNamespace):
2574         (WebCore::StorageNamespace::transientLocalStorageNamespace):
2575         (WebCore::StorageNamespace::sessionStorageNamespace):
2576         * storage/StorageStrategy.cpp:
2577         * storage/StorageStrategy.h:
2578         * workers/SharedWorkerStrategy.h:
2579
2580 2013-05-15  Dávid Szabolcs  <David.Szabolcs@stud.u-szeged.hu>
2581
2582         [curl] Add support for HttpOnly cookies
2583         https://bugs.webkit.org/show_bug.cgi?id=116102
2584
2585         Reviewed by Brent Fulgham.
2586
2587         * platform/network/curl/CookieJarCurl.cpp:
2588         (WebCore::addMatchingCurlCookie):
2589         (WebCore::cookiesForSession):
2590         (WebCore::cookiesForDOM):
2591         (WebCore):
2592         (WebCore::cookieRequestHeaderFieldValue):
2593
2594 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2595
2596         REGRESSION(r147548): Broken comboboxes
2597         https://bugs.webkit.org/show_bug.cgi?id=115475
2598
2599         Reviewed by Gustavo Noronha Silva.
2600
2601         The problem is that r147548 made the popup to be closed when a
2602         blur event is received. Right before showing the popup the input
2603         element is focused, so that after the the popup is shown the focus
2604         event is emitted and the event handler is called again hiding the
2605         popup.
2606
2607         * html/HTMLSelectElement.cpp:
2608         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Check
2609         element has lost the focus before closing the popup menu.
2610
2611 2013-05-14  Darin Adler  <darin@apple.com>
2612
2613         [Mac] Move setDragImage from ClipboardMac to PasteboardMac
2614         https://bugs.webkit.org/show_bug.cgi?id=116036
2615
2616         Reviewed by Anders Carlsson.
2617
2618         * dom/Clipboard.cpp:
2619         (WebCore::Clipboard::~Clipboard): Stop loading the drag image when
2620         the clipboard object is deallocated. It would be better if there was
2621         a more-well-defined time to stop the load.
2622         (WebCore::Clipboard::setDragImage): Added. Sets up a drag image
2623         based on a CachedImage. This tells the image loader to load the image
2624         and updates the drag image when the image arrives. Copied from the
2625         code in ClipboardMac, but refactored to use a separate loader object.
2626         (WebCore::Clipboard::setDragImageElement): Added. Sets up a drag image
2627         based on an element.
2628         (WebCore::Clipboard::updateDragImage): Added. Common code to update
2629         drag image when a new one is set or when a drag image load completes.
2630         (WebCore::DragImageLoader::create): Added.
2631         (WebCore::DragImageLoader::DragImageLoader): Ditto.
2632         (WebCore::DragImageLoader::startLoading): Ditto.
2633         (WebCore::DragImageLoader::stopLoading): Ditto.
2634         (WebCore::DragImageLoader::imageChanged): Ditto.
2635
2636         * dom/Clipboard.h: Made setDragImage and setDragImageElement non-virtual
2637         for non-legacy. Added updateDragImage and m_dragImageLoader.
2638
2639         * platform/Pasteboard.h: Added setDragImage function.
2640
2641         * platform/mac/ClipboardMac.h: Removed CachedImageClient as a base class
2642         for ClipboardMac. Removed setDragImage and setDragImageElement.
2643
2644         * platform/mac/ClipboardMac.mm: Removed setDragImage and setDragImageElement.
2645         (WebCore::ClipboardMac::~ClipboardMac): Removed code to remove self as
2646         client loading the drag image. This is now in the Clipboard base class.
2647
2648         * platform/mac/PasteboardMac.mm:
2649         (WebCore::Pasteboard::setDragImage): Added. Contains code moved here
2650         from ClipboardMac.
2651
2652 2013-05-14  Ryosuke Niwa  <rniwa@webkit.org>
2653
2654         Use ElementTraversal in SelectorDataList::execute
2655         https://bugs.webkit.org/show_bug.cgi?id=116131
2656
2657         Reviewed by Darin Adler.
2658
2659         Use ElementTraversal::firstWithin and ElementTraversal::next to simplify the code.
2660
2661         * dom/SelectorQuery.cpp:
2662         (WebCore::SelectorDataList::execute):
2663
2664 2013-05-14  Tim Horton  <timothy_horton@apple.com>
2665
2666         [wk2] Not updating tiled backing coverage when main frame scrollability changes
2667         https://bugs.webkit.org/show_bug.cgi?id=116123
2668         <rdar://problem/13836559>
2669
2670         Reviewed by Simon Fraser.
2671
2672         Export FrameView::adjustTiledBackingCoverage.
2673
2674         * WebCore.exp.in:
2675
2676 2013-05-14  Alexey Proskuryakov  <ap@apple.com>
2677
2678         [Mac] Add a testing shim for secure event input functions
2679         https://bugs.webkit.org/show_bug.cgi?id=116122
2680
2681         Reviewed by Mark Rowe.
2682
2683         Added a new target with a dynamic library that interposes secure event input functions.
2684         We need this to avoid interfering with user session state.
2685
2686         * Configurations/WebCoreTestShim.xcconfig: Added.
2687         * WebCore.xcodeproj/project.pbxproj:
2688         * platform/mac/DynamicLinkerInterposing.h: Moved from Source/WebKit2/Shared/mac/DyldInterpose.h.
2689         * testing/WebCoreTestShimLibrary.cpp: Added.
2690         (shimEnableSecureEventInput):
2691         (shimDisableSecureEventInput):
2692         (shimIsSecureEventInputEnabled):
2693
2694 2013-05-14  Benjamin Poulain  <bpoulain@apple.com>
2695
2696         Get rid of Gradient::getColor()
2697         https://bugs.webkit.org/show_bug.cgi?id=116089
2698
2699         Reviewed by Andreas Kling.
2700
2701         This code is now useless, remove it.
2702
2703         * html/canvas/CanvasGradient.h:
2704         (CanvasGradient):
2705         * platform/graphics/Gradient.cpp:
2706         (WebCore::Gradient::Gradient):
2707         (WebCore::Gradient::hash):
2708         * platform/graphics/Gradient.h:
2709         (Gradient):
2710
2711 2013-05-14  David Hyatt  <hyatt@apple.com>
2712
2713         REGRESSION: united.com has overlapping elements and is broken by flex box changes.
2714         https://bugs.webkit.org/show_bug.cgi?id=115329
2715         <rdar://problem/13690610>
2716         
2717         The new flexbox spec says that flex-basis omitted in the flex shorthand defaults to
2718         0 when flex-grow/shrink are set. This has undesirable behavior when objects don't
2719         end up flexing at all, and it's something the spec is going to eventually address.
2720         
2721         For now, though, to fix the regression, I'm making a targeted "hack" to deliberately
2722         violate the spec, but to do so as minimally as possible. This hack detects if there
2723         is infinite available space on a line, and if so, it treats a flex-basis of 0 like
2724         auto.
2725         
2726         This means that when height is constrained and set by a container, flexing will do
2727         the right thing. Basically any time you end up actually flexing, the spec behavior
2728         should happen. If you're just laying out at intrinsic sizes, though, and no flexing
2729         is going to occur, we ignore a flex-basis of 0 and just use the child's normal size.
2730         
2731         Note that widths don't have to be patched because the preferred logical widths
2732         algorithm is broken right now and not checking flex-basis. If it did, we'd have seen
2733         the same bug in the width direction.
2734         
2735         This width issue is covered by https://bugs.webkit.org/show_bug.cgi?id=116117
2736         
2737         Reviewed by Simon Fraser.
2738
2739         Added fast/flexbox/auto-height-with-flex.html
2740
2741         * rendering/RenderFlexibleBox.cpp:
2742         (WebCore::RenderFlexibleBox::mainAxisContentExtent):
2743         Make sure we return LayoutUnit::max when you have infinite free space and not
2744         max - borderPadding.
2745
2746         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
2747         Only clear override size if it was set. Only mark for relayout if we did
2748         an override size clear (i.e., if we were actually flexed). Add a new parameter,
2749         hasInfiniteLineLength, that - if set - causes us to special case flex-basis:0
2750         and treat it like flex-basis:auto.
2751
2752         (WebCore::RenderFlexibleBox::layoutFlexItems):
2753         Define hasInfiniteLineLength and pass it to all the functions that need it.
2754
2755         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
2756         Remove the code that marks for layout and does a layout so early. This code
2757         is moving (and changing) to preferredMainAxisContentExtentForChild.
2758
2759         (WebCore::RenderFlexibleBox::computeNextFlexLine):
2760         Computes whether or not we have infinite line length now.
2761
2762         (WebCore::RenderFlexibleBox::freezeViolations):
2763         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
2764         Propagate hasInfiniteLineLength through to preferredMainAxisContentExtentForChild.
2765
2766         * rendering/RenderFlexibleBox.h:
2767         (RenderFlexibleBox):
2768         Add hasInfiniteLineLength parameter to a bunch of functions.
2769
2770 2013-05-14  Andreas Kling  <akling@apple.com>
2771
2772         Assertion failure in GlyphPage::setGlyphDataForIndex: (!glyph || fontData == m_fontDataForAllGlyphs)
2773         <http://webkit.org/b/116113>
2774         <rdar://problem/13833790>
2775
2776         Reviewed by Dan Bernstein.
2777
2778         If we're filling a full GlyphPage with a SimpleFontData that is actually a composite font reference,
2779         we need to make sure we have per-glyph font data pointers, since it may end up using them.
2780
2781         Added GlyphPage::mayUseMixedFontDataWhenFilling() which can be implemented by the platform to let
2782         GlyphPageTreeNode know that it should allocate a full-sized GlyphPage for mixed font data pointers
2783         in case the font is a composite font reference, or if there are CJK ideographs in the text.
2784
2785         This code can be made smarter, but that's outside the scope of this change.
2786         Fixes heavy asserting on bots running unreleased software.
2787
2788         * platform/graphics/GlyphPage.h:
2789         (GlyphPage):
2790         (WebCore::GlyphPage::mayUseMixedFontDataWhenFilling):
2791         * platform/graphics/GlyphPageTreeNode.cpp:
2792         (WebCore::GlyphPageTreeNode::initializePage):
2793         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
2794         (WebCore::shouldUseCoreText):
2795         (WebCore::GlyphPage::mayUseMixedFontDataWhenFilling):
2796
2797 2013-05-14  Bem Jones-Bey  <bjonesbe@adobe.com>
2798
2799         Heap-use-after-free in WebCore::RenderBox::exclusionShapeOutsideInfo
2800         https://bugs.webkit.org/show_bug.cgi?id=115566
2801
2802         Reviewed by David Hyatt.
2803
2804         When a portion of the render tree is being detached, anonymous blocks
2805         will be combined as their children are deleted. In this process, the
2806         anonymous block later in the tree is merged into the one preceeding it.
2807         It can happen that the later block contains floats that the previous
2808         block did not contain, and thus are not in the floating objects list for
2809         the new block. This can result in the new block containing floats that
2810         are not in it's floating objects list, but are in the floating objects
2811         lists of siblings and parents. This can cause problems when the float
2812         itself is deleted, since the deletion code assumes that if a float is not
2813         in it's containing block's floating objects list, it isn't in any
2814         floating objects list, causing dangling pointers in the floating objects
2815         lists of the siblings and parents. In order to preserve this condition
2816         (removing it has serious performance implications), we need to copy the
2817         floating objects from the old block to the new block.  The float's
2818         metrics will likely all be wrong, but since the new block is already
2819         marked for layout, this will get fixed before anything gets displayed.
2820
2821         Test: fast/block/float/float-append-child-crash.html
2822
2823         * rendering/RenderBlock.cpp:
2824         (WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo): Copy
2825             floating objects list in addition to children.
2826         (WebCore::RenderBlock::FloatingObject::clone): Added.
2827         (WebCore::RenderBlock::removeChild): Use new method to copy children.
2828         * rendering/RenderBlock.h:
2829         (RenderBlock): Add method.
2830
2831 2013-05-14  Commit Queue  <commit-queue@webkit.org>
2832
2833         Unreviewed, rolling out r150023.
2834         http://trac.webkit.org/changeset/150023
2835         https://bugs.webkit.org/show_bug.cgi?id=116120
2836
2837         Causes table layout issues (Bug 116118) and crashes on
2838         buildbot waterfall pages. (Requested by ddkilzer on #webkit).
2839
2840         * rendering/RenderTableSection.cpp:
2841         (WebCore::RenderTableSection::calcRowLogicalHeight):
2842         * rendering/RenderTableSection.h:
2843         (RenderTableSection):
2844
2845 2013-05-14  Antoine Quint  <graouts@apple.com>
2846
2847         Snapshotted plug-ins shadow tree should reset style inheritance
2848         https://bugs.webkit.org/show_bug.cgi?id=116098
2849
2850         Reset the styles such that only injected user-agent stylesheets affect
2851         the rendering of snapshotted plug-ins' shadow content.
2852
2853         Reviewed by Darin Adler.
2854
2855         * html/HTMLPlugInImageElement.cpp:
2856         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
2857
2858 2013-05-14  Mihnea Ovidenie  <mihnea@adobe.com>
2859
2860         [CSSRegions] Improve hit testing for empty regions
2861         https://bugs.webkit.org/show_bug.cgi?id=115534
2862
2863         Reviewed by David Hyatt.
2864
2865         As a better follow up after WebKit bug https://bugs.webkit.org/show_bug.cgi?id=107752,
2866         we can improve the code by not doing hit testing on the render flow thread object when
2867         we are trying to hit test the render flow thread background. In this case, we should just bail out.
2868         No new tests, covered by existing regions tests.
2869
2870         * rendering/RenderFlowThread.cpp:
2871         (WebCore::RenderFlowThread::nodeAtPoint):
2872         (WebCore):
2873         (WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
2874         * rendering/RenderFlowThread.h:
2875
2876 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2877
2878         [BlackBerry] Handle network errors when starting a new job
2879         https://bugs.webkit.org/show_bug.cgi?id=116101
2880
2881         Reviewed by Rob Buis.
2882
2883         Make startJob() return a network status that can be used by the
2884         caller to create a network error.
2885
2886         * platform/network/blackberry/NetworkJob.cpp:
2887         (WebCore::NetworkJob::initialize): createNetworkStream() should
2888         always return a valid pointer so use an ASSERT instead of an early
2889         return to make sure we have a valid stream.
2890         (WebCore::NetworkJob::startNewJobWithRequest): Only return true if
2891         the network job was started successfully.
2892         * platform/network/blackberry/NetworkJob.h:
2893         (NetworkJob): Make initialize method void instead of bool since it
2894         can't fail.
2895         * platform/network/blackberry/NetworkManager.cpp:
2896         (WebCore::NetworkManager::startJob): Return a network error or
2897         StatusSuccess.
2898         * platform/network/blackberry/NetworkManager.h:
2899         (NetworkManager):
2900         * platform/network/blackberry/ResourceHandleBlackBerry.cpp:
2901         (WebCore::ResourceHandle::start): Return true if job was started
2902         successfully.
2903         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
2904         Check return value of startJob and fill the ResourceError with the
2905         network status returned to finish the load.
2906
2907 2013-05-14  Antoine Quint  <graouts@apple.com>
2908
2909         [Mac] captions menu is not positioned correctly in full-screen
2910         https://bugs.webkit.org/show_bug.cgi?id=116103
2911
2912         Update the positioning properties of the captions menu in full-screen
2913         following the fix for https://webkit.org/b/115968.
2914
2915         Reviewed by Darin Adler.
2916
2917         * css/fullscreenQuickTime.css:
2918         (video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
2919         Add 50px to the bottom position since we're now positioned relative to the
2920         media element, and use a calc() command to be right-aligned to the captions
2921         icon in the media controller. The max-width and max-height properties follow
2922         the same technique used for the non-full-screen mode.
2923
2924 2013-05-14  Zan Dobersek  <zdobersek@igalia.com>
2925
2926         [GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into libPlatform
2927         https://bugs.webkit.org/show_bug.cgi?id=115921
2928
2929         Reviewed by Gustavo Noronha Silva.
2930
2931         No new tests - no new functionality.
2932
2933         * GNUmakefile.am: Add platform_cppflags to the list of CPPFLAGS for libWebCoreSVG, libWebCore,
2934         libWebCorePlatform, libWebCoreGtk. Remove generation rules for ColorData.cpp and WebKitFontFamilyNames.(cpp|h).
2935         * GNUmakefile.list.am: Include the ColorData.cpp and WebKitFontFamilyNames.(cpp|h) build targers under
2936         platform_built_sources.
2937         * bindings/gobject/GNUmakefile.am: Add platform_cppflags to the list of libWebCoreDOM CPPFLAGS.
2938
2939 2013-05-14  Zan Dobersek  <zdobersek@igalia.com>
2940
2941         [GTK] libPlatform, libPlatformGtk must depend on the related GNUmakefiles
2942         https://bugs.webkit.org/show_bug.cgi?id=115937
2943
2944         Reviewed by Martin Robinson.
2945
2946         No new tests - no new functionality.
2947
2948         * GNUmakefile.am: Fix typos in two libraries' names - Webcore -> WebCore.
2949
2950 2013-05-13  Ryosuke Niwa  <rniwa@webkit.org>
2951
2952         Removing Attr can delete a wrong Attribute in ElementData
2953         https://bugs.webkit.org/show_bug.cgi?id=116077
2954
2955         Reviewed by Benjamin Poulain.
2956         
2957         Merge https://chromium.googlesource.com/chromium/blink/+/e861452a292e185501e48940305947aa6a4e23c2
2958         after simplifying and renaming functions to be more WebKit style.
2959
2960         The XML parser can produce elements with attributes whose names have
2961         distinct prefixes, but the same expanded name. When one of these
2962         attributes is put up for adoption, it may be its similarly named
2963         sibling that is removed from its owner element. As a result the
2964         original owner hangs onto the adopted attribute, despite the fact that
2965         it is now in a different document. Sometimes it's just hard to let go.
2966
2967         Test: fast/dom/adopt-attribute-crash.svg
2968
2969         * dom/Element.cpp:
2970         (WebCore::Element::setAttributeNode):
2971         (WebCore::Element::removeAttributeNode):
2972         (WebCore::ElementData::getAttributeItemIndex):
2973         * dom/Element.h:
2974         (ElementData):
2975         (Element):
2976
2977 2013-05-14  Antti Koivisto  <antti@apple.com>
2978
2979         Remove ::-webkit-distributed()
2980         https://bugs.webkit.org/show_bug.cgi?id=116106
2981
2982         Reviewed by Andreas Kling.
2983
2984         This experimental Shadow DOM selector code is unused and has no owner.
2985
2986         * css/CSSGrammar.y.in:
2987         * css/CSSParser.cpp:
2988         (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded):
2989         (WebCore::CSSParser::rewriteSpecifiersWithElementName):
2990         * css/CSSParser.h:
2991         * css/CSSParserValues.cpp:
2992         (WebCore::CSSParserSelector::CSSParserSelector):
2993         * css/CSSParserValues.h:
2994         (CSSParserSelector):
2995         * css/CSSSelector.cpp:
2996         (WebCore::CSSSelector::pseudoId):
2997         (WebCore::nameToPseudoTypeMap):
2998         (WebCore::CSSSelector::selectorText):
2999         * css/CSSSelector.h:
3000         * css/CSSSelectorList.cpp:
3001         * css/CSSSelectorList.h:
3002         (CSSSelectorList):
3003         * css/DocumentRuleSets.cpp:
3004         (WebCore::DocumentRuleSets::resetAuthorStyle):
3005         * css/DocumentRuleSets.h:
3006         (DocumentRuleSets):
3007         * css/ElementRuleCollector.cpp:
3008         (WebCore::ElementRuleCollector::matchAuthorRules):
3009         * css/ElementRuleCollector.h:
3010         (ElementRuleCollector):
3011         * css/RuleSet.cpp:
3012         (WebCore::RuleSet::addChildRules):
3013         * css/SelectorChecker.cpp:
3014         (WebCore::SelectorChecker::match):
3015         * css/SelectorFilter.cpp:
3016         (WebCore::SelectorFilter::collectIdentifierHashes):
3017         * html/shadow/InsertionPoint.cpp:
3018         * html/shadow/InsertionPoint.h:
3019
3020 2013-05-14  Daker Fernandes Pinheiro  <daker.pinheiro@openbossa.org>
3021
3022         Remove RenderTheme::supportsCalendarPicker
3023         https://bugs.webkit.org/show_bug.cgi?id=116068
3024
3025         Reviewed by Benjamin Poulain.
3026
3027         No new tests needed because it doesn't affect behaviour.
3028
3029         This method was never overrided by any platform
3030         and always leaded to the same behaviour.
3031         The code which depended on it was also removed.
3032
3033         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
3034         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
3035         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility):
3036         * html/BaseMultipleFieldsDateAndTimeInputType.h:
3037         (BaseMultipleFieldsDateAndTimeInputType):
3038         * page/ChromeClient.h:
3039         (ChromeClient):
3040         * rendering/RenderTheme.h:
3041
3042 2013-04-30  Balazs Kelemen  <b.kelemen@sisa.samsung.com>
3043
3044         [GStreamer] cannot seek after video finished
3045         https://bugs.webkit.org/show_bug.cgi?id=114044
3046
3047         Reviewed by Philippe Normand.
3048
3049         Test: media/video-seek-after-end.html
3050
3051         Reland without wrong assertion. If seek is called after didEnd the pipeline
3052         state will not be in GST_STATE_NULL yet but it is not a problem because we handle that.
3053
3054         Rework the seeking logic to be able to seek after reseting the pipeline.
3055         In addition to solve the actual problem this patch supposed to make seeking
3056         more robust and correct.
3057         The previous implementation tried to hide the complexity of asynchronous operations
3058         on the pipeline. It did not handle the GST_MESSAGE_ASYNC_DONE message from the bus
3059         but instead reported the seek as finished when it saw an asynchronous pending state
3060         (GST_STATE_CHANGE_ASYNC) which could happen way before the seek is really done.
3061         Now we pay attention to the GST_MESSAGE_ASYNC_DONE message to track the status of seeks.
3062         Seeks are not the only operations executed asynchronously, changing the pipeling state is
3063         similar. It means a seek can overlap with onother ongoing asynchronous operation.
3064         This change address this by introducing an invariant for seeks, which is that we only request
3065         a seek if there are no other ongoing asynchronous operations and the pipeline state is either
3066         paused or playing (which is recommended anyway according to GStreamer's documentation).
3067         This way we can be sure that the time when we get the next GST_MESSAGE_ASYNC_DONE message the
3068         seek has been completed.
3069
3070         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3071         (WebCore::toGstClockTime): Factored time conversation into a helper.
3072         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3073
3074         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition): The position might not be available
3075         if the pipeline still has a pending state. As a workaround, if we are right after a seek we can
3076         use the seek time. Avoiding this situation would be possible by not allowing any asynchronous
3077         operation to overlap. I believe it would add a lot more complexity so I decided to rather introduce
3078         this workaround. Otherwise those overlapping operations are handled fine by GStreamer.
3079
3080         (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Do not reset internal state variables.
3081         This function called when there is an intent to restart playback but it does not actually restart it.
3082         (WebCore::MediaPlayerPrivateGStreamer::currentTime): Just removed a staling newline.
3083         (WebCore::MediaPlayerPrivateGStreamer::seek): Take a look to the pipeline state and act upon that.
3084         If there is an ongoing asynchronous operation make the seek pending, otherwise do it now.
3085         Now we handle overlapping seeks as well because I saw that it can happen in some tests.
3086         Added an early return for live streams as it doesn't makes sense to try seeking in them.
3087
3088         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Handle GST_MESSAGE_ASYNC_DONE and some refactoring.
3089         (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
3090         (WebCore::MediaPlayerPrivateGStreamer::updateStates): Only handle seeks in the pending case, the rest is
3091         now handled in asyncStateChangeDone.
3092         (WebCore::MediaPlayerPrivateGStreamer::cacheDuration): Do not reset the m_mediaDurationKnown if the pipeline
3093         has an asynchronous pending state because it would fail. It does actually happen when we get a duration message
3094         after restarting the pipeline and it would result in restarting playback from the start. It seems to be a bug
3095         in GStreamer that it sends the duration message too early. Also sanitized this function by merging redundant branches.
3096         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3097         (MediaPlayerPrivateGStreamer):
3098
3099 2013-05-14  Zalan Bujtas  <zalan@apple.com>
3100
3101         Ellipsis text is placed to wrong position, when the truncated text is fully cut off in RTL direction.
3102         https://bugs.webkit.org/show_bug.cgi?id=115858
3103
3104         Reviewed by Darin Adler.
3105
3106         Take text direction into account to calculate ellipsis position in case of
3107         full truncation.
3108
3109         Test: fast/css/text-overflow-ellipsis-full-truncate-rtl.html
3110
3111         * rendering/InlineTextBox.cpp:
3112         (WebCore::InlineTextBox::placeEllipsisBox):
3113
3114 2013-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3115
3116         [BlackBerry] Implement platform strategies
3117         https://bugs.webkit.org/show_bug.cgi?id=112162
3118
3119         Reviewed by Rob Buis.
3120
3121         This is just a refactoring, covered by existing tests.
3122
3123         * CMakeLists.txt: Move PlatformStrategies.cpp from platform
3124         specific makefiles to the global one now that all platforms using
3125         cmake implement platform strategies.
3126         * PlatformBlackBerry.cmake:
3127         * PlatformEfl.cmake:
3128         * PlatformWinCE.cmake:
3129         * loader/CookieJar.cpp: Remove the preprocessor error that is not
3130         needed anymore.
3131         * loader/blackberry/CookieJarBlackBerry.cpp: Removed.
3132         * platform/network/blackberry/CookieJarBlackBerry.cpp: Added.
3133         (WebCore):
3134         (WebCore::setCookiesFromDOM):
3135         (WebCore::cookiesForDOM):
3136         (WebCore::cookieRequestHeaderFieldValue):
3137         (WebCore::cookiesEnabled):
3138         (WebCore::getRawCookies):
3139         (WebCore::deleteCookie):
3140         (WebCore::getHostnamesWithCookies):
3141         (WebCore::deleteCookiesForHostname):
3142         (WebCore::deleteAllCookies):
3143         * plugins/blackberry/PluginDataBlackBerry.cpp: Removed.
3144
3145 2013-05-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
3146
3147         [Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
3148         https://bugs.webkit.org/show_bug.cgi?id=116035
3149
3150         Reviewed by Simon Hausmann.
3151
3152         Reproduced with arora which does destroy the QNetworkAccessManager in some situations.
3153         The problem is that PingLoader can still be pending meanwhile, holding a ResourceHandle
3154         with a dangling pointer to a QNetworkReply destroyed with the QNetworkAccessManager.
3155
3156         * platform/network/qt/QNetworkReplyHandler.cpp:
3157         (WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
3158           Set the parent to 0 like we did before the introduction of QNetworkReplyWrapper.
3159         (WebCore::QNetworkReplyWrapper::release):
3160
3161 2013-05-13  Eric Carlson  <eric.carlson@apple.com>
3162
3163         [Mac] update in-band caption attributes
3164         https://bugs.webkit.org/show_bug.cgi?id=116057
3165
3166         Reviewed by Dean Jackson.
3167
3168         * html/track/InbandTextTrack.cpp:
3169         (WebCore::InbandTextTrack::updateCueFromCueData): Copy highlight color.
3170
3171         * html/track/TextTrackCueGeneric.cpp:
3172         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): "highlight" color sets the cue
3173             background, "background" color sets the cue container background.
3174         * html/track/TextTrackCueGeneric.h:
3175
3176         * platform/graphics/InbandTextTrackPrivateClient.h:
3177
3178         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3179         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Process "highlight" color.
3180
3181 2013-05-13  David Kilzer  <ddkilzer@apple.com>
3182
3183         BUILD FIX (r150049): Fix RetainPtr<> type in PasteboardIOS.mm
3184
3185         * platform/ios/PasteboardIOS.mm:
3186         (WebCore::Pasteboard::writeImage): Use RetainPtr<CFStringRef>
3187         instead of RetainPtr<NSString>.
3188
3189 2013-05-13  Benjamin Poulain  <bpoulain@apple.com>
3190
3191         Remove platform/graphic's Generator
3192         https://bugs.webkit.org/show_bug.cgi?id=116084
3193
3194         Reviewed by Darin Adler.
3195
3196         The Generator no longer abstract anything useful, its only
3197         implementation is Gradient.
3198
3199         * GNUmakefile.list.am:
3200         * WebCore.exp.in:
3201         * WebCore.vcproj/WebCore.vcproj:
3202         * WebCore.vcxproj/WebCore.vcxproj:
3203         * WebCore.vcxproj/WebCore.vcxproj.filters:
3204         * WebCore.xcodeproj/project.pbxproj:
3205         * platform/graphics/GeneratedImage.h:
3206         * platform/graphics/Generator.h: Removed.
3207         * platform/graphics/GeneratorGeneratedImage.cpp:
3208         (WebCore::GeneratorGeneratedImage::draw):
3209         (WebCore::GeneratorGeneratedImage::drawPattern):
3210         * platform/graphics/GeneratorGeneratedImage.h:
3211         (WebCore::GeneratorGeneratedImage::create):
3212         (WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
3213         (GeneratorGeneratedImage):
3214         * platform/graphics/Gradient.h:
3215         (WebCore):
3216         (Gradient):
3217         * platform/graphics/GraphicsContext.cpp:
3218         (WebCore::GraphicsContext::fillRect):
3219         * platform/graphics/GraphicsContext.h:
3220         (WebCore):
3221         (GraphicsContext):
3222
3223 2013-05-13  David Kilzer  <ddkilzer@apple.com>
3224
3225         Upstream iOS Clipboard and Pasteboard changes
3226         <http://webkit.org/b/116062>
3227
3228         Reviewed by Darin Adler.
3229
3230         * WebCore.xcodeproj/project.pbxproj:
3231         * dom/Clipboard.h:
3232         * platform/Pasteboard.h:
3233         * platform/ios/ClipboardIOS.h: Added.
3234         * platform/ios/ClipboardIOS.mm: Added.
3235         * platform/ios/PasteboardIOS.mm: Added.
3236
3237 2013-05-13  Huang Dongsung  <luxtella@company100.net>
3238
3239         [Mac] Use pageScaleFactor * deviceScaleFactor in requiresTiledLayer() and computePixelAlignment() of GraphicsLayerCA.
3240         https://bugs.webkit.org/show_bug.cgi?id=107359
3241
3242         Reviewed by Darin Adler.
3243
3244         Currently GraphicsLayerCA uses pageScaleFactor in requiresTiledLayer() and
3245         computePixelAlignment(), but we must use pageScaleFactor * deviceScaleFactor in
3246         them.
3247         It is because:
3248         1. requiresTiledLayer() uses the scale to compute an actual layer size in the device
3249         pixel unit.
3250         2. computePixelAlignment() uses the scale to compute an aligned layer position
3251         in the device pixel unit.
3252
3253         No new tests. We can not test about requiresTiledLayer() because it depends on
3254         gpu. computePixelAlignment() is correct now because fortunately Mac uses
3255         only 2 (for retina display) as a deviceScaleFactor.
3256
3257         * platform/graphics/ca/GraphicsLayerCA.cpp:
3258         (WebCore::GraphicsLayerCA::requiresTiledLayer):
3259         (WebCore::GraphicsLayerCA::computePixelAlignment):
3260
3261 2013-05-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3262
3263         Rename BarInfo to BarProp and remove [NoInterfaceObject]
3264         https://bugs.webkit.org/show_bug.cgi?id=116027
3265
3266         Reviewed by Andreas Kling.
3267
3268         Rename BarInfo to BarProp and remove [NoInterfaceObject] extended attribute from
3269         the IDL interface to match the specification:
3270         http://www.w3.org/html/wg/drafts/html/master/browsers.html#barprop
3271
3272         The new behavior also matches Firefox and Blink.
3273
3274         No new tests, covered by LayoutTests/fast/js/global-constructors-attributes.html.
3275
3276         * CMakeLists.txt:
3277         * DerivedSources.cpp:
3278         * DerivedSources.make:
3279         * DerivedSources.pri:
3280         * GNUmakefile.list.am:
3281         * Target.pri:
3282         * WebCore.order:
3283         * WebCore.vcproj/WebCore.vcproj:
3284         * WebCore.vcxproj/WebCore.vcxproj:
3285         * WebCore.vcxproj/WebCore.vcxproj.filters:
3286         * WebCore.xcodeproj/project.pbxproj:
3287         * bindings/gobject/GNUmakefile.am:
3288         * page/BarProp.cpp: Renamed from Source/WebCore/page/BarInfo.cpp.
3289         * page/BarProp.h: Renamed from Source/WebCore/page/BarInfo.h.
3290         * page/BarProp.idl: Renamed from Source/WebCore/page/BarInfo.idl.
3291         * page/DOMWindow.cpp:
3292         * page/DOMWindow.h:
3293         * page/DOMWindow.idl:
3294
3295 2013-05-13  Anders Carlsson  <andersca@apple.com>
3296
3297         Remove ChromeClient::willPopupMenu
3298         https://bugs.webkit.org/show_bug.cgi?id=116063
3299
3300         Reviewed by Andreas Kling.
3301
3302         Remove ChromeClient::willPopupMenu.
3303
3304         * page/ChromeClient.h:
3305
3306 2013-05-13  Beth Dakin  <bdakin@apple.com>
3307
3308         Headers and footers should be pinned to the left edge of the window when scrolling 
3309         horizontally
3310         https://bugs.webkit.org/show_bug.cgi?id=116061
3311         -and corresponding-
3312         <rdar://problem/13599215>
3313
3314         Reviewed by Simon Fraser.
3315
3316         The scrolling thread will need to know about the header and footer layers in order 
3317         the implement this custom scrolling behavior. 
3318
3319         These getters will fetch the header or footer layer from the FrameView as 
3320         appropriate.
3321         * page/scrolling/ScrollingCoordinator.cpp:
3322         (WebCore::ScrollingCoordinator::headerLayerForFrameView):
3323         (WebCore::ScrollingCoordinator::footerLayerForFrameView):
3324         * page/scrolling/ScrollingCoordinator.h:
3325
3326         When we’re scrolling on the main thread, adjust the position of the header and 
3327         footer layers here.
3328         (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
3329
3330         ScrollingStateScrollingNode now stores GraphicsLayers and PlatformLayers for the 
3331         header and footer, just like it already does for the counterScrollingLayer.
3332         * page/scrolling/ScrollingStateScrollingNode.cpp:
3333         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
3334         * page/scrolling/ScrollingStateScrollingNode.h:
3335         (ScrollingStateScrollingNode):
3336         (WebCore::ScrollingStateScrollingNode::headerLayer):
3337         (WebCore::ScrollingStateScrollingNode::footerLayer):
3338
3339         Setters for the new layers.
3340         * page/scrolling/mac/ScrollingCoordinatorMac.h:
3341         (ScrollingCoordinatorMac):
3342         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3343         (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
3344         (WebCore::ScrollingCoordinatorMac::setHeaderLayerForNode):
3345         (WebCore::ScrollingCoordinatorMac::setFooterLayerForNode):
3346
3347         These setters and getters mirror the existing one for counterScrollingLayer.
3348         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
3349         (WebCore::ScrollingStateScrollingNode::headerPlatformLayer):
3350         (WebCore::ScrollingStateScrollingNode::setHeaderLayer):
3351         (WebCore::ScrollingStateScrollingNode::footerPlatformLayer):
3352         (WebCore::ScrollingStateScrollingNode::setFooterLayer):
3353
3354         And the ScrollingTree will store CALayers for the header and footer.
3355         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
3356         (ScrollingTreeScrollingNodeMac):
3357         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
3358         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
3359
3360         This is where the magic happens when we are scrolling on the scrolling thread. 
3361         Adjust the horizontal position the behave like a fixed object, but keep the 
3362         vertical position what it was when layer was created.
3363         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
3364
3365         RenderLayerCompositor must now provide getters for the header and footer.
3366         * rendering/RenderLayerCompositor.h:
3367         * rendering/RenderLayerCompositor.cpp:
3368         (WebCore::RenderLayerCompositor::headerLayer):
3369         (WebCore::RenderLayerCompositor::footerLayer):
3370
3371         Set the anchor point for when we adjust the position later on. Also call 
3372         frameViewRootLayerDidChange() to get the new layers picked up and sent to the 
3373         scrolling tree.
3374         (WebCore::RenderLayerCompositor::updateLayerForHeader):
3375         (WebCore::RenderLayerCompositor::updateLayerForFooter):
3376
3377 2013-05-12  Timothy Hatcher  <timothy@apple.com>
3378
3379         Add support for updating the Web Inspector toolbar height.
3380
3381         https://bugs.webkit.org/show_bug.cgi?id=115996
3382
3383         Reviewed by Joseph Pecoraro and Benjamin Poulain.
3384
3385         * inspector/InspectorFrontendClient.h:
3386         (InspectorFrontendClient):
3387         * inspector/InspectorFrontendHost.cpp:
3388         (WebCore::InspectorFrontendHost::setToolbarHeight):
3389         * inspector/InspectorFrontendHost.h:
3390         (InspectorFrontendHost):
3391         * inspector/InspectorFrontendHost.idl:
3392         * testing/Internals.cpp:
3393
3394 2013-05-13  Dean Jackson  <dino@apple.com>
3395
3396         toDataURL can return an empty image in some cases
3397         https://bugs.webkit.org/show_bug.cgi?id=115981
3398         <rdar://problem/13760256>
3399
3400         Reviewed by Darin Adler.
3401
3402         In some accelerated rendering cases, calling toDataURL on
3403         an off-screen canvas produced an empty image. The solution
3404         was to force a CGContextFlush before extracting the data
3405         for image generation.
3406
3407         While here, I collected the flushing code from other methods
3408         into a single place. Also we were getting into a situation where
3409         we called flush two times in a row.
3410
3411         Test: fast/canvas/toDataURL-not-empty.html
3412
3413         * platform/graphics/ImageBuffer.h:
3414         (ImageBuffer): Define two new methods flushContext and flushContextIfNecessary.
3415         * platform/graphics/cg/ImageBufferCG.cpp:
3416         (WebCore::ImageBuffer::context): Call flushContextIfNecessary.
3417         (WebCore::ImageBuffer::flushContextIfNecessary): Moved the 10.7 code in here.
3418         (WebCore::ImageBuffer::flushContext): Calls CGContextFlush.
3419         (WebCore::ImageBuffer::getUnmultipliedImageData): Call new helper.
3420         (WebCore::ImageBuffer::getPremultipliedImageData): Call new helper.
3421         (WebCore::ImageBuffer::toDataURL): Flush the CG context.
3422
3423 2013-05-13  David Hyatt  <hyatt@apple.com>
3424
3425         Regressions in flexbox layout caused by the flexing optimizations.
3426         https://bugs.webkit.org/show_bug.cgi?id=116058
3427         <rdar://problem/13863647>
3428         
3429         Reviewed by Beth Dakin.
3430
3431         Roll out the flex-related changes from r149597 so that the layout
3432         algorithm goes back to the way it was. Leave the repainting optimizations
3433         in place though.
3434
3435         * rendering/RenderDeprecatedFlexibleBox.cpp:
3436         (WebCore::gatherFlexChildrenInfo):
3437         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3438         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
3439
3440 2013-05-13  Philippe Normand  <pnormand@igalia.com>
3441
3442         Unreviewed, rolling out r150014.
3443         http://trac.webkit.org/changeset/150014
3444         https://bugs.webkit.org/show_bug.cgi?id=86410
3445
3446         Broke video playback on WK2 and some webgl tests
3447
3448         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3449         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
3450         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
3451         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
3452         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3453         (MediaPlayerPrivateGStreamerBase):
3454
3455 2013-05-13  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3456
3457         Unreviewed, rolling out r150022.
3458         http://trac.webkit.org/changeset/150022
3459         https://bugs.webkit.org/show_bug.cgi?id=114044
3460
3461         Causes assertions in media tests
3462
3463         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3464         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3465         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
3466         (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
3467         (WebCore::MediaPlayerPrivateGStreamer::currentTime):
3468         (WebCore::MediaPlayerPrivateGStreamer::seek):
3469         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
3470         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3471         (MediaPlayerPrivateGStreamer):
3472
3473 2013-05-13  Bem Jones-Bey  <bjonesbe@adobe.com>
3474
3475         Floats should not overhang from flex items
3476         https://bugs.webkit.org/show_bug.cgi?id=115925
3477
3478         Reviewed by David Hyatt.
3479
3480     &n