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