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