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