bc1ab1792c977ef35bec9275e90a01323b33dc5e
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-05-10  Tommy Widenflycht  <tommyw@google.com>
2
3         MediaStream API: Fix MediaHints parsing
4         https://bugs.webkit.org/show_bug.cgi?id=86098
5
6         Reviewed by Adam Barth.
7
8         Not currently testable. Working on a series of patches that will fix that.
9
10         * Modules/mediastream/PeerConnection00.cpp:
11         (WebCore::PeerConnection00::createMediaHints):
12
13 2012-05-10  Tommy Widenflycht  <tommyw@google.com>
14
15         [chromium] MediaStream API: Fix the ExtraData functionality in WebMediaStreamDescriptor
16         https://bugs.webkit.org/show_bug.cgi?id=86087
17
18         Reviewed by Adam Barth.
19
20         Not easy to test but I have added code that excercises this to WebUserMediaClientMock (in DumpRenderTree).
21
22         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
23         (WebKit::WebMediaStreamDescriptor::setExtraData):
24
25 2012-05-10  Pavel Feldman  <pfeldman@chromium.org>
26
27         Web Inspector: search title is shown beside the search field (not under) in the vertical mode.
28         https://bugs.webkit.org/show_bug.cgi?id=86120
29
30         Reviewed by Yury Semikhatsky.
31
32         This change makes search title render as placeholder at all times.
33         It also adjusts the size of the search field when navigation arrows appear.
34
35         * inspector/front-end/SearchController.js:
36         (WebInspector.SearchController):
37         (WebInspector.SearchController.prototype.updateSearchLabel):
38         (WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
39         (WebInspector.SearchController.prototype._createSearchNavigationButton):
40         * inspector/front-end/inspector.css:
41         (#toolbar-search-item):
42         (.with-navigation-buttons #search):
43         (.toolbar-search-navigation-label):
44         (.with-navigation-buttons .toolbar-search-navigation-label):
45         * inspector/front-end/inspector.html:
46
47 2012-05-10  Varun Jain  <varunjain@google.com>
48
49         [chromium] Trigger context menu for long press gesture
50         https://bugs.webkit.org/show_bug.cgi?id=85919
51
52         Reviewed by Adam Barth.
53
54         Test: fast/events/touch/gesture/context-menu-on-long-press.html
55
56         * page/EventHandler.cpp:
57         (WebCore):
58         (WebCore::EventHandler::sendContextMenuEventForGesture):
59         * page/EventHandler.h:
60         (EventHandler):
61
62 2012-05-10  Abhishek Arya  <inferno@chromium.org>
63
64         Crash in ApplyStyleCommand::joinChildTextNodes.
65         https://bugs.webkit.org/show_bug.cgi?id=85939
66
67         Reviewed by Ryosuke Niwa.
68
69         Test: editing/style/apply-style-join-child-text-nodes-crash.html
70
71         * editing/ApplyStyleCommand.cpp:
72         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): add conditions
73         to bail out if our start and end position nodes are removed due to 
74         mutation events in joinChildTextNodes.
75         (WebCore::ApplyStyleCommand::applyInlineStyle): this executes after
76         applyRelativeFontStyleChange in ApplyStyleCommand::doApply. So, need
77         to bail out if our start and end position nodes are removed due to
78         mutation events.
79         (WebCore::ApplyStyleCommand::joinChildTextNodes): hold all the children
80         in a ref vector to prevent them from getting destroyed due to mutation events.
81
82 2012-05-10  Erik Arvidsson  <arv@chromium.org>
83
84         Unreviewed, rebaselined run-bindings-tests results.
85
86         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
87         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
88         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
89         * bindings/scripts/test/JS/JSTestObj.cpp:
90         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
91         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
92         * bindings/scripts/test/V8/V8TestException.cpp:
93         (WebCore::V8TestException::wrapSlow):
94         * bindings/scripts/test/V8/V8TestException.h:
95         (WebCore::V8TestException::wrap):
96
97 2012-05-10  Abhishek Arya  <inferno@chromium.org>
98
99         Crash in InsertParagraphSeparatorCommand::doApply.
100         https://bugs.webkit.org/show_bug.cgi?id=84995
101
102         Reviewed by Ryosuke Niwa.
103
104         Test: editing/inserting/insert-paragraph-seperator-crash.html
105
106         * editing/DeleteSelectionCommand.cpp:
107         (WebCore::DeleteSelectionCommand::mergeParagraphs): no need of static cast, since
108         type of enclosingBlock returned is already Element*.
109         * editing/IndentOutdentCommand.cpp:
110         (WebCore::IndentOutdentCommand::tryIndentingAsListItem): no need of static cast, since
111         type of enclosingBlock returned is already Element*.
112         * editing/InsertParagraphSeparatorCommand.cpp:
113         (WebCore::InsertParagraphSeparatorCommand::doApply): RefPtr startBlock to guard against
114         mutation events.
115         * editing/htmlediting.cpp:
116         (WebCore::enclosingBlock): make sure type of enclosingNode is an element before doing
117         the static cast. This was already failing in a couple of layout tests. Also, isBlock
118         check already exists in the function call to enclosingNodeOfType, so don't need it
119         again on enclosingNode's renderer.
120         * editing/htmlediting.h: 
121         (WebCore):
122
123 2012-05-10  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
124
125         TouchAdjustment doesn't correct for scroll-offsets.
126         https://bugs.webkit.org/show_bug.cgi?id=86083
127
128         Reviewed by Kenneth Rohde Christiansen.
129
130         Already tested by: touchadjustment/scroll-delegation
131
132         * page/EventHandler.cpp:
133         (WebCore::EventHandler::bestClickableNodeForTouchPoint):
134         (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
135         * page/TouchAdjustment.cpp:
136         (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
137         * testing/Internals.cpp:
138         (WebCore::Internals::bestZoomableAreaForTouchPoint):
139
140 2012-05-10  Konrad Piascik  <kpiascik@rim.com>
141
142         Fix typo in filename
143         https://bugs.webkit.org/show_bug.cgi?id=86095
144
145         Reviewed by Andreas Kling.
146
147         * UseJSC.cmake:
148
149 2012-05-10  Stephen Chenney  <schenney@chromium.org>
150
151         SVG Filters allow invalid elements as children
152         https://bugs.webkit.org/show_bug.cgi?id=83979
153
154         Reviewed by Nikolas Zimmermann.
155
156         According to the SVG spec, there are numerous restrictions on the
157         content of nodes (that is, their children). Specific to this problem,
158         SVGFilter elements may only contain SVGFilterPrimitive elements, and
159         those may only contain animation related elements. This patch enforces
160         the restriction on filters in the render tree, thus preventing us from
161         having (for instance) content that is inside a filter yet filtered by
162         the filter.
163
164         Manual test: ManualTests/bugzilla-83979.svg
165
166         * svg/SVGFilterElement.cpp:
167         (WebCore::SVGFilterElement::childShouldCreateRenderer): Added to only allow renderers for fe* children
168         (WebCore):
169         * svg/SVGFilterElement.h:
170         (SVGFilterElement):
171         * svg/SVGFilterPrimitiveStandardAttributes.h: Do not allow any children at all for fe* elements.
172         (SVGFilterPrimitiveStandardAttributes):
173
174 2012-05-10  Joe Thomas  <joethomas@motorola.com>
175
176         [CSS3 Backgrounds and Borders] Add background-size to the background shorthand
177         https://bugs.webkit.org/show_bug.cgi?id=27577
178
179         Reviewed by Alexis Menard.
180
181         Added CSSPropertyBackgroundSize to the background shorthand propery. Added the logic for parsing background-size.
182         bakground-size appears after background-position followed by a '/'.
183         The specification related to this change is http://www.w3.org/TR/css3-background/#the-background
184
185         Tests: fast/backgrounds/background-shorthand-with-backgroundSize-style.html
186                fast/backgrounds/size/backgroundSize-in-background-shorthand.html
187
188         * css/CSSComputedStyleDeclaration.cpp:
189         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
190         (WebCore::CSSComputedStyleDeclaration::getBackgroundShorthandValue):
191         (WebCore):
192         * css/CSSComputedStyleDeclaration.h:
193         (CSSComputedStyleDeclaration):
194         * css/CSSParser.cpp:
195         (WebCore::CSSParser::parseValue):
196         (WebCore::CSSParser::parseFillShorthand):
197         * css/StylePropertySet.cpp:
198         (WebCore::StylePropertySet::getLayeredShorthandValue):
199         * css/StylePropertyShorthand.cpp:
200         (WebCore):
201         (WebCore::backgroundShorthand):
202
203 2012-05-10  MORITA Hajime <morrita@google.com>
204
205         Node::InDetachFlag could be removed.
206         https://bugs.webkit.org/show_bug.cgi?id=85963
207
208         Reviewed by Antti Koivisto.
209
210         Removed Node::inDetach() since it can never true
211         on the only call site setFocusedNode().
212
213         No new test. Covered by existing tests.
214
215         * dom/Document.cpp:
216         (WebCore::Document::setFocusedNode):
217         * dom/Node.cpp:
218         (WebCore::Node::detach):
219         * dom/Node.h:
220         (WebCore):
221         (Node):
222
223 2012-05-10  Keishi Hattori  <keishi@webkit.org>
224
225         Crash in HTMLFormControlElement::m_fieldSetAncestor
226         https://bugs.webkit.org/show_bug.cgi?id=86070
227
228         Reviewed by Kent Tamura.
229
230         No new tests.
231
232         The previous patch r115990 didn't completely resolve the crash (Bug 85453)
233         We don't have a reproducible test case, so we are reverting to the old code for setting m_fieldSetAncestor.
234
235         * html/HTMLFormControlElement.cpp:
236         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
237         (WebCore::HTMLFormControlElement::updateFieldSetAndLegendAncestor):
238         (WebCore::HTMLFormControlElement::insertedInto): Set m_dataListAncestorState to Unknown because ancestor has changed. Call setNeedsWillValidateCheck because style might need to be updated.
239         (WebCore::HTMLFormControlElement::removedFrom):
240         (WebCore::HTMLFormControlElement::disabled):
241         (WebCore::HTMLFormControlElement::recalcWillValidate):
242         (WebCore::HTMLFormControlElement::willValidate):
243         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
244         * html/HTMLFormControlElement.h:
245         (HTMLFormControlElement): Added m_dataListAncestorState.
246
247 2012-05-10  Sam D  <dsam2912@gmail.com>
248
249         Web Inspector: rename InspectorBackendStub.js to InspectorBackendCommands.js
250         https://bugs.webkit.org/show_bug.cgi?id=72306
251
252         Changed name for InspectorBackendStub.js to
253         InspectorBackendCommands.js
254
255         Reviewed by Yury Semikhatsky.
256
257         No new tests required. File name is changed.
258
259         * DerivedSources.pri:
260         * GNUmakefile.am:
261         * Target.pri:
262         * WebCore.gyp/WebCore.gyp:
263         * WebCore.gypi:
264         * WebCore.vcproj/copyWebCoreResourceFiles.cmd:
265         * WebCore.xcodeproj/project.pbxproj:
266         * gyp/copy-inspector-resources.sh:
267         * inspector/CodeGeneratorInspector.py:
268         * inspector/front-end/InspectorBackendCommands.qrc: Added.
269         * inspector/front-end/InspectorBackendStub.qrc: Removed.
270         * inspector/front-end/inspector.html:
271
272 2012-05-10  Alexis Menard  <alexis.menard@openbossa.org>
273
274         [Qt] Avoid string conversions to construct a QUrl when using Qt5.
275         https://bugs.webkit.org/show_bug.cgi?id=86006
276
277         Reviewed by Kenneth Rohde Christiansen.
278
279         In Qt5, the QUrl constructor can handle the string directly, even in UTF-16 because the
280         constructor QUrl(QString) has been fixed. Unfortunately we still need to use the old
281         code path when building with Qt4.
282
283         No new tests : it's a performance improvement which should be covered by tests.
284
285         * platform/qt/KURLQt.cpp:
286         (WebCore::KURL::operator QUrl):
287
288 2012-05-10  Noel Gordon  <noel.gordon@gmail.com>
289
290         [chromium] REGRESSION(r107389) Visible line artifacts on some JPEG images
291         https://bugs.webkit.org/show_bug.cgi?id=85772
292
293         Reviewed by Kent Tamura.
294
295         On some JPEG images, vertical and horizontal lines artifacts might appear in image
296         regions with very high frequency color variation when using DCT_IFAST decodes. Use
297         DCT_IFAST on small screen devices only (Chromium Android).
298
299         No new tests. Covered by existing tests.
300
301         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
302         (dctMethod): Permit DCT_IFAST decoding for Chromium Android only.
303
304 2012-05-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
305
306         [Qt] Implement fit-to-width behaviour
307         https://bugs.webkit.org/show_bug.cgi?id=86085
308
309         Reviewed by Simon Hausmann.
310
311         Add a method to get the minimum scale factor that contains the content
312         without showing any chrome background.
313
314         * dom/ViewportArguments.cpp:
315         (WebCore::computeMinimumScaleFactorForContentContained):
316         (WebCore):
317         * dom/ViewportArguments.h:
318         (WebCore):
319
320 2012-05-10  MORITA Hajime  <morrita@google.com>
321
322         Remove support for Node::willRemove()
323         https://bugs.webkit.org/show_bug.cgi?id=55209
324
325         Reviewed by Ryosuke Niwa.
326
327         This change de-virtualizes Node::willRemove(), gains
328         5% speedup on Dromaeo dom-modify.
329
330         Originally there were 5 willRemove() overrides:
331         - Element
332         - HTMLStyleElement
333         - HTMLSourceElement
334         - HTMLTrackElement
335         - HTMLFrameOwnerElement
336
337         For first 4 items, this change moves their implementations to
338         Node::removedFrom() overrides.
339
340         Then HTMLFrameOwnerElement is the only class which needs the
341         notification.  Because it emits the "unload" event, it needs some
342         notification _before_ its removal. To handle that, this change
343         introduces ChildFrameDisconnector which collects
344         corresponding decendant elements and disconnect their content frame.
345
346         Even though this approach doesn't kill pre-removal tree traversal
347         completely, it's a bit more efficient due to the de-virtualization.
348
349         No new tests. Covered by existing test.
350
351         * dom/ContainerNode.cpp:
352         (WebCore::willRemoveChild): Replaced willRemove() call with ChildFrameDisconnector.
353         (WebCore::willRemoveChildren): Ditto.
354         (WebCore::ContainerNode::disconnectDescendantFrames): Added. Used from FrameLoader to replace Document::willRemove() call.
355         (WebCore):
356         * dom/ContainerNode.h:
357         (ContainerNode):
358         * dom/ContainerNodeAlgorithms.cpp:
359         (WebCore::ChildFrameDisconnector::collectDescendant):
360         (WebCore):
361         (WebCore::ChildFrameDisconnector::Target::disconnect):
362         * dom/ContainerNodeAlgorithms.h:
363         (ChildFrameDisconnector):
364         (Target):
365         (WebCore::ChildFrameDisconnector::Target::Target):
366         (WebCore::ChildFrameDisconnector::Target::isValid):
367         (WebCore):
368         (WebCore::ChildFrameDisconnector::ChildFrameDisconnector):
369         (WebCore::ChildFrameDisconnector::collectDescendant):
370         (WebCore::ChildFrameDisconnector::disconnect):
371         * dom/Element.cpp:
372         (WebCore::Element::removedFrom):
373         * dom/Element.h:
374         * dom/ElementShadow.cpp:
375         * dom/ElementShadow.h:
376         (ElementShadow):
377         * dom/Node.cpp:
378         * dom/Node.h: Added IsFrameOwnerElement flag to de-virtualize IsFrameOwnerElement().
379         (WebCore::Node::isFrameOwnerElement): De-virtualized.
380         (Node):
381         * html/HTMLElement.h:
382         (HTMLElement):
383         (WebCore::HTMLElement::HTMLElement):
384         * html/HTMLFrameOwnerElement.cpp:
385         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
386         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame): Extracted from original willRemove().
387         * html/HTMLFrameOwnerElement.h:
388         (HTMLFrameOwnerElement):
389         (WebCore::toFrameOwnerElement):
390         (WebCore):
391         * html/HTMLMediaElement.cpp:
392         (WebCore::HTMLMediaElement::sourceWasRemoved): Renamed from sourceWillBeRemoved(), dealing with the timing change.
393         * html/HTMLMediaElement.h:
394         (HTMLMediaElement):
395         (WebCore::isMediaElement):
396         (WebCore):
397         (WebCore::toMediaElement):
398         * html/HTMLSourceElement.cpp:
399         (WebCore::HTMLSourceElement::removedFrom): Moved some code from willRemove().
400         * html/HTMLSourceElement.h:
401         (HTMLSourceElement):
402         * html/HTMLStyleElement.cpp:
403         (WebCore::HTMLStyleElement::removedFrom):
404         (WebCore):
405         * html/HTMLStyleElement.h:
406         (HTMLStyleElement):
407         * html/HTMLTrackElement.cpp:
408         (WebCore::HTMLTrackElement::removedFrom): Moved some code from willRemove().
409         * html/HTMLTrackElement.h:
410         (HTMLTrackElement):
411         * loader/FrameLoader.cpp:
412         (WebCore::FrameLoader::clear):
413
414 2012-05-10  Kinuko Yasuda  <kinuko@chromium.org>
415
416         Change the return type of Entry.toURL() back to String from KURL
417         https://bugs.webkit.org/show_bug.cgi?id=85858
418
419         Reviewed by Ryosuke Niwa.
420
421         I once changed it from String to KURL in r116273 but it turned out that
422         it involves implicit conversion and may incur extra overhead.
423         This partly reverts r116273 while keeping some internal functions
424         returning KURL as it's what we initially create as and is more
425         convenient to operate on.
426
427         No new tests; no functional or visible changes.
428
429         * Modules/filesystem/EntryBase.cpp:
430         (WebCore::EntryBase::toURL):
431         * Modules/filesystem/EntryBase.h:
432         (EntryBase):
433
434 2012-05-10  Alexander Pavlov  <apavlov@chromium.org>
435
436         Web Inspector: Autocomplete for CSS property values in the Styles pane behaving incorrectly
437         https://bugs.webkit.org/show_bug.cgi?id=85784
438
439         Reviewed by Vsevolod Vlasov.
440
441         Before executing the number increment/decrement within CSS property value, the current word is checked
442         for being a valid suggestion for the current property, and if it is, the numeric change is skipped
443         in favor of the suggested property value switch by a suggest box.
444
445         * inspector/front-end/StylesSidebarPane.js:
446
447 2012-05-10  Abhishek Arya  <inferno@chromium.org>
448
449         Make DOMCharacterDataModified a scoped event (similar to r73690).
450         https://bugs.webkit.org/show_bug.cgi?id=85920
451
452         Reviewed by Ryosuke Niwa.
453
454         DOMCharacterDataModified was missing in the list of already scoped
455         DOM mutation events like DOMSubtreeModified, DOMNodeInserted, etc.
456         It helps to delay event dispatches until the completion of each call
457         of EditCommand::doApply. This has been useful in the past and helped to 
458         prevent unexpected DOM tree mutations while the editing command is executing.
459
460         * dom/CharacterData.cpp:
461         (WebCore::CharacterData::dispatchModifiedEvent):
462
463 2012-05-10  Alexandre Elias  <aelias@google.com>
464
465         Default to null value for HistoryItem::m_pageScaleFactor
466         https://bugs.webkit.org/show_bug.cgi?id=84385
467
468         Reviewed by Adam Barth.
469
470         Previously, HistoryItem::m_pageScaleFactor defaulted to a value
471         of 1, making it impossible to determine whether this value was never
472         set, or intentionally set to 1.  This patch introduces a default value
473         of 0 and makes restoreScrollPositionAndViewState not touch the page
474         scale factor if this value is still present at time of reload.
475
476         This is a no-op change for common navigation scenarios.  The
477         motivation for this change is the corner case of syncing history items
478         from a desktop browser to a mobile device.  In that case, we need a
479         way to specify that the history item does not contain a
480         pageScaleFactor so that the mobile device does not display the page
481         overly zoomed in.
482
483         No new tests.
484
485         * history/HistoryItem.cpp:
486         (WebCore::HistoryItem::HistoryItem):
487         * loader/HistoryController.cpp:
488         (WebCore::HistoryController::restoreScrollPositionAndViewState):
489
490 2012-05-10  Csaba Osztrogonác  <ossy@webkit.org>
491
492         Use suitable viewport values when a Mobile DTD is used.
493         https://bugs.webkit.org/show_bug.cgi?id=85425
494
495         Unreviewed debug buildfix after r116571.
496
497         * dom/Document.cpp:
498         (WebCore::Document::setDocType):
499
500 2012-05-10  Yoshifumi Inoue  <yosin@chromium.org>
501
502         [Forms] Move step related methods to InputType class from HTMLInputElement class
503         https://bugs.webkit.org/show_bug.cgi?id=85978
504
505         Reviewed by Kent Tamura.
506
507         This patch is part of re-factoring of HTMLInputElement.cpp for numeric input type.
508         In this patch, we move implementation of getAllowedValueStep and stepUp/stepUpFromRenderer
509         to InputType class because of these are for DateTime/Number/Range.
510
511         Following patches will change implementation of getAllowedValueStep to use StepRange and
512         remove step related methods, defaultStep, stepScaleFactor, and so on.
513
514         No new tests. This patch should not change behavior.
515
516         * html/HTMLInputElement.cpp:
517         (WebCore):
518         (WebCore::HTMLInputElement::getAllowedValueStep):
519         (WebCore::HTMLInputElement::stepUp):
520         (WebCore::HTMLInputElement::stepDown):
521         (WebCore::HTMLInputElement::stepUpFromRenderer):
522         * html/HTMLInputElement.h:
523         (HTMLInputElement):
524         * html/InputType.cpp:
525         (WebCore::InputType::applyStep):
526         (WebCore):
527         (WebCore::InputType::alignValueForStep):
528         (WebCore::InputType::getAllowedValueStep):
529         (WebCore::InputType::getAllowedValueStepWithDecimalPlaces):
530         (WebCore::InputType::stepUp):
531         (WebCore::InputType::stepUpFromRenderer):
532         * html/InputType.h:
533         (InputType):
534
535 2012-05-09  Kent Tamura  <tkent@chromium.org>
536
537         Calendar Picker: Fix a crash by changing input type.
538         https://bugs.webkit.org/show_bug.cgi?id=86007
539
540         Reviewed by Hajime Morita.
541
542         Manual test: forms/calendar-picker-crash-by-type-change.html
543
544         * html/shadow/CalendarPickerElement.cpp:
545         (WebCore::CalendarPickerElement::~CalendarPickerElement):
546         Added. Make sure the popup is closed.
547         * html/shadow/CalendarPickerElement.h:
548         (CalendarPickerElement): Add declaration of the destructor.
549
550 2012-05-09  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
551
552         Move suspendAnimations to use Internals interface.
553         https://bugs.webkit.org/show_bug.cgi?id=85986
554
555         Reviewed by Ryosuke Niwa.
556
557         Add suspendAnimations functions, because it is able to work in the
558         cross-port way through the Internals interface.
559
560         No new tests, since we are improving here the infra-structure for testing
561         a specific method.
562
563         * testing/Internals.cpp:
564         (WebCore::Internals::suspendAnimations):
565         (WebCore):
566         * testing/Internals.h:
567         (Internals):
568         * testing/Internals.idl:
569
570 2012-05-09  Charlie Reis  <creis@chromium.org>
571
572         Add dispatchMessageEventWithOriginCheck to DOMWindow
573         https://bugs.webkit.org/show_bug.cgi?id=85815
574
575         Reviewed by Adam Barth.
576
577         Useful for ports that support cross-process postMessage.
578         No new tests, since covered by existing postMessage tests.
579
580         * page/DOMWindow.cpp:
581         (WebCore::DOMWindow::postMessageTimerFired):
582         (WebCore):
583         (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
584         * page/DOMWindow.h:
585         (WebCore):
586         (DOMWindow):
587
588 2012-05-09  Jason Liu  <jason.liu@torchmobile.com.cn>
589
590         [BlackBerry] Cookie parsing issue. If the cookie value provided was (") then the browser creates a session cookie instead.
591         https://bugs.webkit.org/show_bug.cgi?id=85775
592
593         Reviewed by Rob Buis.
594
595         Make CookieParser::parseOneCookie handle (cookiename="cookievalue;expires=xxxx) correctly.
596         This cookie's value is "cookievalue not "cookievalue;expires=xxxx.
597
598         Test: http/tests/cookies/single-quoted-value.html
599
600         * platform/blackberry/CookieParser.cpp:
601         (WebCore::CookieParser::parseOneCookie):
602
603 2012-05-09  Raymond Liu  <raymond.liu@intel.com>
604
605         Add multi-channels support for CopyWithGainFrom in AudioBus
606         https://bugs.webkit.org/show_bug.cgi?id=80675
607
608         Reviewed by Chris Rogers.
609
610         * platform/audio/AudioBus.cpp:
611         (WebCore):
612         (WebCore::AudioBus::AudioBus):
613         (WebCore::AudioBus::copyWithGainFrom):
614         * platform/audio/AudioBus.h:
615         (AudioBus):
616
617 2012-05-09  Jessie Berlin  <jberlin@apple.com>
618
619         Crash using the new WKBundleDOMWindowExtensions APIs.
620         https://bugs.webkit.org/show_bug.cgi?id=85888
621
622         Reviewed by Brady Eidson.
623
624         WKBundlePageWillDestroyGlobalObjectForDOMWindowExtensionCallback was only being invoked when
625         the WKPage was destroyed, and then only for the child frames. In addition, the
626         DOMWindowExtension was holding onto a destroyed DOMWindow and attempting to unregister from
627         when the WK2 wrapper object was attempting to destroy the DOMWindowExtension.
628
629         The underlying issue here was that the DOMWindowProperties were getting disconnectFrame
630         and willDetachPage called on them at the wrong times.
631
632         Rename DOMWindowProperty::disconnectFrame and reconnectFrame to disconnectFrameForPageCache
633         and reconnectFrameFromPageCache for clarity.
634
635         Only invoke DOMWindowProperty::disconnectFrameForPageCache when the frame is going into the
636         page cache.
637
638         In the cases where the DOMWindow is getting destroyed, the frame is being destroyed, or the
639         DOMWindow is getting cleared because the frame is being navigated, invoke
640         DOMWindowProperty::willDestroyGlobalObjectInFrame instead of disconnectFrame.
641
642         Invoke DOMWindowProperty::willDetachGlobalObjectFromFrame when a document is being detached
643         because the frame has been detached (e.g. fast/storage/storage-detached-iframe.html) and
644         won't be immediately destroyed.
645
646         Invoke DOMWindowProperty::willDestroyGlobalObjectInCachedFrame when a cached frame is
647         being destroyed.
648
649         New WK2 API Test: DOMWindowExtensionNoCache.
650
651         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
652         (WebCore::DOMWindowIndexedDatabase::disconnectFrameForPageCache):
653         Updated for disconnectFrame rename.
654         (WebCore::DOMWindowIndexedDatabase::reconnectFrameFromPageCache):
655         Updated for reconnectFrame rename.
656         (WebCore::DOMWindowIndexedDatabase::willDestroyGlobalObjectInCachedFrame):
657         Get rid of the suspended IDBFactory.
658         (WebCore::DOMWindowIndexedDatabase::willDestroyGlobalObjectInFrame):
659         Get rid of the IDBFactory.
660         (WebCore::DOMWindowIndexedDatabase::willDetachGlobalObjectFromFrame):
661         Ditto.
662         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
663
664         * dom/Document.cpp:
665         (WebCore::Document::prepareForDestruction):
666         Tell the DOMWindow before detaching the Document.
667         * dom/Document.h:
668
669         * history/CachedFrame.cpp:
670         (WebCore::CachedFrame::destroy):
671         Tell the DOMWindow.
672
673         * loader/FrameLoader.cpp:
674         (WebCore::FrameLoader::clear):
675         Use Document::prepareForDestruction so that the DOMWindow is told about the main frame
676         navigation before detaching the Document.
677
678         * loader/appcache/DOMApplicationCache.cpp:
679         (WebCore::DOMApplicationCache::disconnectFrameForPageCache):
680         Updated for the disconnectFrame rename.
681         (WebCore::DOMApplicationCache::reconnectFrameFromPageCache):
682         Updated for the reconnectFrame rename.
683         (WebCore::DOMApplicationCache::willDestroyGlobalObjectInFrame):
684         Cover the cases formerly covered by disconnectFrame (which was sometimes being called when
685         called when the frame was destroyed).
686         * loader/appcache/DOMApplicationCache.h:
687
688         * notifications/DOMWindowNotifications.cpp:
689         (WebCore::DOMWindowNotifications::disconnectFrameForPageCache):
690         Updated for the disconnectFrame rename.
691         (WebCore::DOMWindowNotifications::reconnectFrameFromPageCache):
692         Updated for the reconnectFrame rename.
693         (WebCore::DOMWindowNotifications::willDestroyGlobalObjectInCachedFrame):
694         Get rid of the suspended notification center.
695         (WebCore::DOMWindowNotifications::willDestroyGlobalObjectInFrame):
696         Get rid of the notification center.
697         (WebCore::DOMWindowNotifications::willDetachGlobalObjectFromFrame):
698         Do not allow use of the notification center by detached frames.
699         * notifications/DOMWindowNotifications.h:
700
701         * page/DOMWindow.cpp:
702         (WebCore::DOMWindow::clearDOMWindowProperties):
703         Do not call disconnectDOMWindowProperties. It is now the responsibility of the callers to
704         tell the DOMWindowProperties the correct cause of being cleared.
705         (WebCore::DOMWindow::~DOMWindow):
706         Make sure the DOMWindowProperties still know that the DOMWindow is going away.
707         (WebCore::DOMWindow::frameDestroyed):
708         Invoke willDestroyGlobalObjectInFrame on the DOMWindowProperties.
709         (WebCore::DOMWindow::willDetachPage):
710         It is no longer necessary to tell the DOMWindowProperties anything here.
711         (WebCore::DOMWindow::willDestroyCachedFrame):
712         Tell the DOMWindowProperties.
713         (WebCore::DOMWindow::willDestroyDocumentInFrame):
714         Ditto.
715         (WebCore::DOMWindow::willDetachDocumentFromFrame):
716         Ditto.
717         (WebCore::DOMWindow::clear):
718         Ditto.
719         (WebCore::DOMWindow::disconnectDOMWindowProperties):
720         Updated for the disconnectFrame rename.
721         (WebCore::DOMWindow::reconnectDOMWindowProperties):
722         Ditto.
723         * page/DOMWindow.h:
724
725         * page/DOMWindowExtension.cpp:
726         (WebCore::DOMWindowExtension::DOMWindowExtension):
727         Move the responsibility for tracking the disconnected DOMWindow to DOMWindowProperty, since
728         DOMWindowProperty will need it to unregister the property when a cached frame is destroyed.
729         (WebCore::DOMWindowExtension::disconnectFrameForPageCache):
730         Remove the code to check for disconnectFrame being called twice - it is now only called when
731         a frame goes into the page cache.
732         Let the DOMWindowProperty keep track of the disconnected DOMWindow.
733         (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
734         Let the DOMWindowProperty keep track of the disconnected DOMWindow.
735         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
736         Dispatch the willDestroyGlobalObjectForDOMWindowExtension callback.
737         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInFrame):
738         Ditto, but only if the callback hasn't already been sent because the frame has been detached.
739         (WebCore::DOMWindowExtension::willDetachGlobalObjectFromFrame):
740         Send the callback because nothing interesting can be done in the frame once it has been
741         detached.
742         * page/DOMWindowExtension.h:
743
744         * page/DOMWindowProperty.cpp:
745         (WebCore::DOMWindowProperty::DOMWindowProperty):
746         Keep track of the disconnected DOMWindow so it can be used to unregister the property when a
747         cached frame is destroyed.
748         (WebCore::DOMWindowProperty::~DOMWindowProperty):
749         Also unregister the property when a DOMWindowProperty for a cached frame is destroyed.
750         (WebCore::DOMWindowProperty::disconnectFrameForPageCache):
751         Keep track of the disconnected DOMWindow.
752         (WebCore::DOMWindowProperty::reconnectFrameFromPageCache):
753         Ditto.
754         (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
755         Unregister the property from the disconnected DOMWindow.
756         (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
757         Unregister the property from the DOMWindow and stop keeping track of the frame.
758         (WebCore::DOMWindowProperty::willDetachGlobalObjectFromFrame):
759         Do not set m_frame to 0 because detached frames still have access to the DOMWindow, even if
760         they can't do anything meaningful with it.
761         * page/DOMWindowProperty.h:
762
763         * page/Frame.cpp:
764         (WebCore::Frame::setView):
765         Tell the DOMWindow that the Document is being detached so it can tell the
766         DOMWindowProperties.
767
768         * page/PointerLock.cpp:
769         (WebCore::PointerLock::disconnectFrameForPageCache):
770         Updated for disconnectFrame rename.
771         (WebCore::PointerLock::willDestroyGlobalObjectInFrame):
772         Cover the cases formerly covered by disconnectFrame (which was sometimes being called when
773         called when the frame was destroyed).
774         * page/PointerLock.h:
775
776 2012-05-09  Ian Vollick  <vollick@chromium.org>
777
778         [chromium] Ensure animations get ticked at least once when added.
779         https://bugs.webkit.org/show_bug.cgi?id=86013
780
781         Reviewed by James Robinson.
782
783         Tested in
784           CCLayerTreeHostTestTickAnimationWhileBackgrounded.runSingleThreaded
785           CCLayerTreeHostTestAddAnimationWithTimingFunction.runSingleThreaded
786           CCLayerTreeHostTestSynchronizeAnimationStartTimes.runSingleThreaded
787           CCLayerTreeHostTestAnimationFinishedEvents.runSingleThreaded
788
789         * platform/graphics/chromium/LayerChromium.cpp:
790         (WebCore::LayerChromium::addAnimation):
791         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
792         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
793         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
794         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
795         (WebCore::CCLayerTreeHost::didAddAnimation):
796         (WebCore):
797         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
798         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
799         (CCLayerTreeHost):
800         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
801         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
802         * platform/graphics/chromium/cc/CCProxy.h:
803         (CCProxy):
804         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
805         (CCSingleThreadProxyAnimationTimer):
806         (WebCore::CCSingleThreadProxyAnimationTimer::create):
807         (WebCore::CCSingleThreadProxyAnimationTimer::CCSingleThreadProxyAnimationTimer):
808         (WebCore):
809         (WebCore::CCSingleThreadProxy::CCSingleThreadProxy):
810         (WebCore::CCSingleThreadProxy::didAddAnimation):
811         (WebCore::CCSingleThreadProxy::doComposite):
812         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
813         (WebCore):
814         * platform/graphics/chromium/cc/CCThreadProxy.h:
815
816 2012-05-09  Adam Barth  <abarth@webkit.org>
817
818         Implement HTML Media Capture
819         https://bugs.webkit.org/show_bug.cgi?id=85958
820
821         Reviewed by Eric Seidel.
822
823         This patch begins the implementation of
824         http://www.w3.org/TR/html-media-capture/ by adding the capture
825         attribute to HTMLInputElement.
826
827         Test: fast/forms/file/file-input-capture.html
828
829         * html/FileInputType.cpp:
830         (WebCore::FileInputType::handleDOMActivateEvent):
831         * html/HTMLAttributeNames.in:
832         * html/HTMLInputElement.cpp:
833         (WebCore):
834         (WebCore::HTMLInputElement::capture):
835         (WebCore::HTMLInputElement::setCapture):
836         * html/HTMLInputElement.h:
837         (HTMLInputElement):
838         * html/HTMLInputElement.idl:
839         * platform/FileChooser.h:
840         (FileChooserSettings):
841
842 2012-05-09  Charles Wei  <charles.wei@torchmobile.com.cn>
843
844         [BlackBerry]  Refactor data scheme support
845         https://bugs.webkit.org/show_bug.cgi?id=85938
846
847         Reviewed by Rob Buis.
848
849         We will create a DataStream in our platform repository,
850         so that can be wrapped up by NetworkJob for webkit rendering,
851         and by DownloadStream for downloading.
852
853         Refactor, no new tests.
854
855         * platform/network/blackberry/NetworkJob.cpp:
856         (WebCore::NetworkJob::NetworkJob):
857         (WebCore::NetworkJob::initialize):
858         (WebCore::NetworkJob::cancelJob):
859         (WebCore::NetworkJob::sendResponseIfNeeded):
860         * platform/network/blackberry/NetworkJob.h:
861         (NetworkJob):
862         * platform/network/blackberry/NetworkManager.cpp:
863         (WebCore::NetworkManager::startJob):
864
865 2012-05-09  Dana Jansens  <danakj@chromium.org>
866
867         [chromium] Don't draw when canDraw() is false
868         https://bugs.webkit.org/show_bug.cgi?id=85829
869
870         Reviewed by Adrienne Walker.
871
872         This is based on the work of Daniel Sievers in bug
873         https://bugs.webkit.org/show_bug.cgi?id=82680. When canDraw() is false,
874         we should not call drawLayers() or prepareToDraw() in both Single- and
875         Multi-Threaded mode.
876
877         drawLayers() is crashing in single threaded mode, and this attempts to
878         prevent it from being called with invalid state. While making it behave
879         properly in single-threaded mode, it seems appropriate to unrevert the
880         parts of 82680 that made threaded mode behave similarly appropriately.
881
882         A single-threaded test is not included since LTHTests is unable to run
883         in single-threaded mode at this time (pending work from Ian Vollick). So
884         we test in threaded mode only with a note to include a single thread
885         version.
886
887         Tests: CCLayerTreeHostTestCanDrawBlocksDrawing.runMultiThread
888
889         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
890         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
891         (WebCore::CCLayerTreeHostImpl::drawLayers):
892         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
893         (WebCore::CCSingleThreadProxy::doComposite):
894         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
895         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
896
897 2012-05-09  Martin Robinson  <mrobinson@igalia.com>
898
899         [Cairo] GLContextGLX releases the context with an uninitialized display
900         https://bugs.webkit.org/show_bug.cgi?id=86039
901
902         Reviewed by Philippe Normand.
903
904         No new tests. This does not change behavior on most machines, but has
905         the potential to prevent a pretty nasty crash on others.
906
907         Use the shared display to release GLX contexts instead of the uninitialized
908         m_display member.
909
910         * platform/graphics/glx/GLContextGLX.cpp:
911         (WebCore::GLContextGLX::~GLContextGLX): Release the display with the shared
912         display.
913         * platform/graphics/glx/GLContextGLX.h:
914         (GLContextGLX): Remove the m_display member.
915
916 2012-05-09  Tony Gentilcore  <tonyg@chromium.org>
917
918         Subresources loaded after a reload completes shouldn't be revalidated.
919         https://bugs.webkit.org/show_bug.cgi?id=84614
920
921         Based on patch by Darin Fisher.
922
923         Reviewed by Darin Fisher.
924
925         Tests: http/tests/cache/loaded-from-cache-after-reload-within-iframe.html
926                http/tests/cache/loaded-from-cache-after-reload.html
927
928         * loader/FrameLoader.cpp:
929         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Reset m_loadType after the load completes.
930
931 2012-05-09  Erik Arvidsson  <arv@chromium.org>
932
933         [V8] Fix issue where V8BindingPerContextData could keep the context object alive
934         https://bugs.webkit.org/show_bug.cgi?id=86036
935
936         Reviewed by Kentaro Hara.
937
938         This is a partial revert of http://trac.webkit.org/changeset/114320/. This keeps
939         the layout tests that were introduced since it turns out that
940         http://trac.webkit.org/changeset/114989 fixes the tests too.
941
942         Covered by: http/tests/security/isolatedWorld/context-destroy.html
943
944         * bindings/v8/V8IsolatedContext.cpp:
945         (WebCore::V8IsolatedContext::destroy):
946
947 2012-05-09  Anders Carlsson  <andersca@apple.com>
948
949         Speed up some parts of TileCache drawing
950         https://bugs.webkit.org/show_bug.cgi?id=86033
951         <rdar://problem/10919373>
952
953         Reviewed by Sam Weinig.
954
955         * platform/graphics/ca/mac/TileCache.mm:
956         (WebCore::TileCache::tileCoverageRect):
957         If we can't have scrollbars, there's not much need to extend the tile coverage rect outside of the visible rect, since it's
958         unlikely that we'll do any form of scrolling here.
959
960         (WebCore::TileCache::revalidateTiles):
961         Don't update the tile layer frame if it's big enough to contain the tile size. Also, if there are no new tiles created,
962         don't call platformCALayerDidCreateTiles since that will trigger an extra layer flush.
963
964 2012-05-09  Alexandre Elias  <aelias@google.com>
965
966         setPageScaleFactor should setScrollPosition if scale is unchanged
967         https://bugs.webkit.org/show_bug.cgi?id=84400
968
969         Reviewed by Adam Barth.
970
971         Previously, setPageScaleFactor forgot about its "origin" argument if
972         the page scale factor is unchanged.  This has proven undesirable in
973         practice because, for example, a single pinch gesture may zoom in and
974         back out to the original page scale factor, but at a different scroll
975         offset.
976
977         New test case added to scale-and-scroll-body-expected.txt
978
979         * page/Page.cpp:
980         (WebCore::Page::setPageScaleFactor):
981
982 2012-05-09  Hugo Parente Lima  <hugo.lima@openbossa.org>
983
984         Use suitable viewport values on XHTML-MP pages.
985         https://bugs.webkit.org/show_bug.cgi?id=85425
986
987         Reviewed by Kenneth Rohde Christiansen.
988
989         Tests: fast/viewport/viewport-legacy-xhtmlmp-misplaced-doctype.html
990                fast/viewport/viewport-legacy-xhtmlmp-ordering.html
991                fast/viewport/viewport-legacy-xhtmlmp.html
992
993         Use device-width and device-height as viewport size on
994         XHTML-MP pages if the use feature LEGACY_VIEWPORT_ADAPTION
995         is set according as the non normative section of
996         http://www.w3.org/TR/css-device-adapt/
997
998         * dom/Document.cpp:
999         (WebCore::Document::setDocType):
1000
1001 2012-05-09  Beth Dakin  <bdakin@apple.com>
1002
1003         https://bugs.webkit.org/show_bug.cgi?id=86025
1004         RTL and vertical text documents do no scroll properly with the new 
1005         tiled scrolling model
1006         -and corresponding-
1007         <rdar://problem/11077589>
1008
1009         Reviewed by Dan Bernstein.
1010         
1011         Most of the fix here is just to teach the scrolling tree about the 
1012         scroll origin.
1013         * page/scrolling/ScrollingCoordinator.cpp:
1014         (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
1015         (WebCore::ScrollingCoordinator::setScrollParameters):
1016         * page/scrolling/ScrollingCoordinator.h:
1017         (ScrollParameters):
1018         * page/scrolling/ScrollingTreeNode.cpp:
1019         (WebCore::ScrollingTreeNode::update):
1020         * page/scrolling/ScrollingTreeNode.h:
1021         (WebCore::ScrollingTreeNode::scrollOrigin):
1022         (ScrollingTreeNode):
1023         * page/scrolling/ScrollingTreeState.cpp:
1024         (WebCore::ScrollingTreeState::setScrollOrigin):
1025         (WebCore):
1026         * page/scrolling/ScrollingTreeState.h:
1027         (WebCore::ScrollingTreeState::scrollOrigin):
1028         (ScrollingTreeState):
1029         * page/scrolling/mac/ScrollingTreeNodeMac.mm:
1030         (WebCore::ScrollingTreeNodeMac::scrollPosition):
1031         (WebCore::ScrollingTreeNodeMac::setScrollLayerPosition):
1032         (WebCore::ScrollingTreeNodeMac::minimumScrollPosition):
1033         (WebCore::ScrollingTreeNodeMac::maximumScrollPosition):
1034         * rendering/RenderLayerCompositor.cpp:
1035         (WebCore::RenderLayerCompositor::frameViewDidScroll):
1036
1037         Teaching the scrolling tree about the scroll origin revealed this pre-
1038         existing bug. layoutOverflowRect() is not the right rect to use since 
1039         it is not writing-mode savvy. unscaledDocumentRect() is the right rect 
1040         for the view's bounds.
1041         * rendering/RenderLayerBacking.cpp:
1042         (WebCore::RenderLayerBacking::updateCompositedBounds):
1043
1044 2012-05-09  Rob Buis  <rwlbuis@webkit.org>
1045
1046         Cleanup SVGElement.cpp
1047         https://bugs.webkit.org/show_bug.cgi?id=86004
1048
1049         Reviewed by Eric Seidel.
1050
1051         Remove unneeded includes. We do not need to check attr in SVGElement::attributeChanged,
1052         lower layers assume it is non-null and we do not call attributeChanged in SVG.
1053
1054         * svg/SVGElement.cpp:
1055         (WebCore::SVGElement::attributeChanged):
1056         (WebCore::SVGElement::isAnimatableAttribute):
1057
1058 2012-05-09  Jochen Eisinger  <jochen@chromium.org>
1059
1060         When creating a new page during a navigation, prime the initial document with the correct referrer policy
1061         https://bugs.webkit.org/show_bug.cgi?id=86001
1062
1063         Reviewed by Adam Barth.
1064
1065         Test: http/tests/security/referrer-policy-redirect-link.html
1066
1067         * dom/Document.h:
1068         (WebCore::Document::setReferrerPolicy):
1069         * loader/FrameLoader.cpp:
1070         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
1071
1072 2012-05-09  Alec Flett  <alecflett@chromium.org>
1073
1074         IndexedDB: call abort handler when there are problems committing
1075         https://bugs.webkit.org/show_bug.cgi?id=85841
1076
1077         Reviewed by Ojan Vafai.
1078
1079         No new tests. Every existing test that calls commit() is testing
1080         the success side of this, and this only throws when there are
1081         LevelDB errors, which is exactly what we're trying to diagnose
1082         with this patch.
1083
1084         * Modules/indexeddb/IDBBackingStore.h:
1085         (Transaction):
1086         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
1087         (WebCore::IDBLevelDBBackingStore::deleteDatabase):
1088         (WebCore::IDBLevelDBBackingStore::Transaction::commit):
1089         * Modules/indexeddb/IDBLevelDBBackingStore.h:
1090         (Transaction):
1091         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1092         (WebCore::IDBTransactionBackendImpl::commit):
1093
1094 2012-05-09  Mark Pilgrim  <pilgrim@chromium.org>
1095
1096         [Chromium] Remove PlatformSupport::loadPlatformImageResource, call loadResource directly
1097         https://bugs.webkit.org/show_bug.cgi?id=84417
1098
1099         Reviewed by Adam Barth.
1100
1101         Part of a refactoring series. See tracking bug 82948.
1102
1103         * WebCore.gyp/WebCore.gyp:
1104         * WebCore.gypi:
1105         * platform/chromium/PlatformSupport.h:
1106         (PlatformSupport):
1107         * platform/graphics/chromium/ImageChromium.cpp:
1108         (WebCore::Image::loadPlatformResource):
1109         * platform/graphics/chromium/ImageChromiumMac.mm: Removed.
1110
1111 2012-05-09  Rob Buis  <rbuis@rim.com>
1112
1113         Remove some isSVGFoo methods
1114         https://bugs.webkit.org/show_bug.cgi?id=86009
1115
1116         Reviewed by Eric Seidel.
1117
1118         These are not used at the moment and were probably just copy and pasted from
1119         isSVGFoo methods in RenderObject.h.
1120
1121         * rendering/RenderObject.h:
1122         * rendering/svg/RenderSVGEllipse.h:
1123         (RenderSVGEllipse):
1124         * rendering/svg/RenderSVGRect.h:
1125         (RenderSVGRect):
1126         * rendering/svg/RenderSVGShape.h:
1127
1128 2012-05-09  Ian Vollick  <vollick@chromium.org>
1129
1130         [chromium] Add impl-thread support for fill-mode and direction css animation properties
1131         https://bugs.webkit.org/show_bug.cgi?id=77662
1132
1133         Reviewed by James Robinson.
1134
1135         Adds support for accelerating css animations with -webkit-animation-fill-mode,
1136         and -webkit-animation-direction properties.
1137
1138         Tested in:
1139           CCActiveAnimationTest.TrimTimeAlternating
1140           CCLayerAnimationControllerTest.createReversedAnimation
1141           CCLayerAnimationControllerTest.createAlternatingAnimation
1142           CCLayerAnimationControllerTest.createReversedAlternatingAnimation
1143
1144         * platform/graphics/chromium/cc/CCActiveAnimation.cpp:
1145         (WebCore::CCActiveAnimation::CCActiveAnimation):
1146         (WebCore::CCActiveAnimation::trimTimeToCurrentIteration):
1147         (WebCore::CCActiveAnimation::cloneForImplThread):
1148         * platform/graphics/chromium/cc/CCActiveAnimation.h:
1149         (CCActiveAnimation):
1150         (WebCore::CCActiveAnimation::alternatesDirection):
1151         (WebCore::CCActiveAnimation::setAlternatesDirection):
1152         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
1153
1154 2012-05-09  Ken Buchanan  <kenrb@chromium.org>
1155
1156         Crash from removal of a line break object
1157         https://bugs.webkit.org/show_bug.cgi?id=85997
1158
1159         Reviewed by David Hyatt.
1160
1161         Regression from r115343. That replaced a call to setNeedsLayout()
1162         with a separate call that used a different bit during linebox
1163         invalidation after renderer child removal. There are special cases
1164         where layout isn't marked on parent nodes just from the removal, so
1165         line dirtying needs to explicitly mark ancestors for layout.
1166
1167         * rendering/RenderObject.h:
1168         (WebCore::RenderObject::setAncestorLineBoxDirty):
1169
1170 2012-05-09  Levi Weintraub  <leviw@chromium.org>
1171
1172         Fix performance regression for floats caused by LayoutUnit change
1173         https://bugs.webkit.org/show_bug.cgi?id=85834
1174
1175         Reviewed by Ojan Vafai.
1176
1177         Refactoring FractionalLayout types to alleviate performance issues. Explicitly
1178         inlining constructor and operator functions in FractionalLayoutUnit, as well as
1179         pixelSnappedIntSize and pixelSnappedIntRect (particularly hot code paths). Also
1180         further simplifying round and ceil functions when sub-pixel layout is not enabled.
1181
1182         pixelSnappedIntSize was the only function defined in FractionalLayoutSize.cpp,
1183         so it is removed.
1184
1185         No new tests. No change in functionality.
1186
1187         * CMakeLists.txt:
1188         * GNUmakefile.list.am:
1189         * Target.pri:
1190         * WebCore.gypi:
1191         * WebCore.vcproj/WebCore.vcproj:
1192         * WebCore.xcodeproj/project.pbxproj:
1193         * platform/FractionalLayoutUnit.h:
1194         (WebCore::FractionalLayoutUnit::FractionalLayoutUnit):
1195         (FractionalLayoutUnit):
1196         (WebCore::FractionalLayoutUnit::toInt):
1197         (WebCore::FractionalLayoutUnit::toFloat):
1198         (WebCore::FractionalLayoutUnit::toDouble):
1199         (WebCore::FractionalLayoutUnit::toUnsigned):
1200         (WebCore::FractionalLayoutUnit::operator int):
1201         (WebCore::FractionalLayoutUnit::operator unsigned):
1202         (WebCore::FractionalLayoutUnit::operator float):
1203         (WebCore::FractionalLayoutUnit::operator double):
1204         (WebCore::FractionalLayoutUnit::operator bool):
1205         (WebCore::FractionalLayoutUnit::ceil):
1206         (WebCore::FractionalLayoutUnit::round):
1207         * platform/graphics/FractionalLayoutRect.cpp:
1208         (WebCore):
1209         * platform/graphics/FractionalLayoutRect.h:
1210         (WebCore::FractionalLayoutRect::pixelSnappedSize):
1211         (WebCore::pixelSnappedIntRect):
1212         (WebCore):
1213         * platform/graphics/FractionalLayoutSize.cpp: Removed.
1214         * platform/graphics/FractionalLayoutSize.h:
1215         (WebCore):
1216         * rendering/LayoutTypes.h:
1217         (WebCore::pixelSnappedIntSize):
1218         (WebCore):
1219
1220 2012-05-09  Abhishek Arya  <inferno@chromium.org>
1221
1222         Crash in ReplaceSelectionCommand::performTrivialReplace
1223         https://bugs.webkit.org/show_bug.cgi?id=85943
1224
1225         Reviewed by Ryosuke Niwa.
1226
1227         RefPtr nodeAfterInsertionPos to guard against mutation events.
1228
1229         Test: editing/inserting/insert-html-crash.html
1230
1231         * editing/ReplaceSelectionCommand.cpp:
1232         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
1233
1234 2012-05-03  Shawn Singh  <shawnsingh@chromium.org>
1235
1236         Hit testing is incorrect in some cases with perspective transforms
1237         https://bugs.webkit.org/show_bug.cgi?id=79136
1238
1239         Reviewed by Simon Fraser.
1240
1241         Tests: transforms/3d/hit-testing/coplanar-with-camera.html
1242                transforms/3d/hit-testing/perspective-clipped.html
1243
1244         * platform/graphics/transforms/TransformationMatrix.cpp:
1245         (WebCore::TransformationMatrix::projectPoint): Fix a
1246         divide-by-zero error so that values do not become Inf or Nan. Also
1247         fix an overflow error by using a large, but not-too-large constant
1248         to represent infinity.
1249
1250         (WebCore::TransformationMatrix::projectQuad): Fix an error where
1251         incorrect quads were being returned. Incorrect quads can occur
1252         when projectPoint clamped==true after returning.
1253
1254 2012-05-09  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1255
1256         Simplify CSSParser::parseSimpleLengthValue()
1257         https://bugs.webkit.org/show_bug.cgi?id=85910
1258
1259         Reviewed by Alexis Menard.
1260
1261         Various small improvements to this function, mainly:
1262         - Move the check if the property ID accepts a simple length as early as possible;
1263         - Remove the check for the characters{8,16} pointers since they'll be valid (we ASSERT that);
1264         - Use a template to avoid duplicate code for 8 and 16 bit characters.
1265
1266         * css/CSSParser.cpp:
1267         (WebCore):
1268         (WebCore::parseSimpleLength):
1269         (WebCore::parseSimpleLengthValue):
1270
1271 2012-05-09  Ami Fischman  <fischman@chromium.org>
1272
1273         [chromium] Support multiple buffered time ranges
1274         https://bugs.webkit.org/show_bug.cgi?id=85926
1275
1276         Reviewed by Eric Carlson.
1277
1278         Preserve existing rendering of a single rect even in the presence of multiple buffered regions.
1279
1280         No new tests as this change has no functional effects.
1281
1282         * rendering/RenderMediaControlsChromium.cpp:
1283         (WebCore::paintMediaSlider):
1284
1285 2012-05-09  Dana Jansens  <danakj@chromium.org>
1286
1287         Early-out and avoid any copying when possible for Region operations
1288         https://bugs.webkit.org/show_bug.cgi?id=85260
1289
1290         Reviewed by Anders Carlsson.
1291
1292         For an empty region, any intersection or subtraction will not modify
1293         the region, so we can simply return instead of creating a new Shape
1294         and replacing the current empty Shape.
1295
1296         When a region is united with a region it contains, the orignal
1297         containing region is the result. So, if A.unite(B) and A.contains(B)
1298         then A does not need to change at all and we can return without making
1299         a copy of A's shape. When A is a rect, we can do this test even more
1300         simply.
1301
1302         We also remove redundant checks from trySimpleOperation() methods, where
1303         the test is already done in the Region calling site.
1304
1305         This change improves the performance of the Region overlap testing for
1306         composited layers, and allows us to avoid unnecessary copies of the
1307         Region during unite. With a layout test (attached to bug #81087), that
1308         creates a Region from the union of 225 composited layers, as well as
1309         600 overlapping layers above them, this change decreases the running
1310         time of the test by 3.2% by avoiding a copy of the entire Region for
1311         each insertion that does not change the resulting Region.
1312
1313         Unit tests: RegionTest.unite
1314
1315         * platform/graphics/Region.cpp:
1316         (WebCore::Region::Shape::UnionOperation::trySimpleOperation):
1317         (WebCore::Region::Shape::IntersectOperation::trySimpleOperation):
1318         (WebCore::Region::Shape::SubtractOperation::trySimpleOperation):
1319         (WebCore::Region::intersect):
1320         (WebCore::Region::unite):
1321         (WebCore::Region::subtract):
1322         * platform/graphics/Region.h:
1323         (WebCore::Region::isRect):
1324         (WebCore::Region::Shape::isRect):
1325
1326 2012-05-09  Tommy Widenflycht  <tommyw@google.com>
1327
1328         MediaStream API: SessionDescription::addCandidate should not crash for malformed input
1329         https://bugs.webkit.org/show_bug.cgi?id=85988
1330
1331         Reviewed by Adam Barth.
1332
1333         Sending null would crash the browser. Added safeguards in both the bindings and the native code.
1334
1335         Test: fast/mediastream/SessionDescription.html
1336
1337         * Modules/mediastream/SessionDescription.cpp:
1338         (WebCore::SessionDescription::addCandidate):
1339         * Modules/mediastream/SessionDescription.h:
1340         (SessionDescription):
1341         * Modules/mediastream/SessionDescription.idl:
1342
1343 2012-05-09  Tommy Widenflycht  <tommyw@google.com>
1344
1345         MediaStream API: Adding the possibility of port specific information in MediaStreamDescriptor
1346         https://bugs.webkit.org/show_bug.cgi?id=85794
1347
1348         Reviewed by Adam Barth.
1349
1350         To facilitate for ports I have added an ExtraData field that can be used for whatever purpose is needed.
1351
1352         No behavioral changes.
1353
1354         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
1355         (ExtraDataContainer):
1356         (WebKit::ExtraDataContainer::ExtraDataContainer):
1357         (WebKit::ExtraDataContainer::extraData):
1358         (WebKit):
1359         (WebKit::WebMediaStreamDescriptor::extraData):
1360         (WebKit::WebMediaStreamDescriptor::setExtraData):
1361         * platform/mediastream/MediaStreamDescriptor.h:
1362         (ExtraData):
1363         (WebCore::MediaStreamDescriptor::ExtraData::~ExtraData):
1364         (MediaStreamDescriptor):
1365         (WebCore::MediaStreamDescriptor::extraData):
1366         (WebCore::MediaStreamDescriptor::setExtraData):
1367
1368 2012-05-09  Takashi Sakamoto  <tasak@google.com>
1369
1370         Crash in WebCore::RenderBoxModelObject::paddingLeft
1371         https://bugs.webkit.org/show_bug.cgi?id=83889
1372
1373         Reviewed by Abhishek Arya.
1374
1375         RenderScrollbar creates RenderScrollbarPart without any parent
1376         renderers. However, if the scrollbar has percent padding styles,
1377         non-null parent renderer is required. So after creating/destroying
1378         RenderScrollbarPart instances, set owningRenderer(creating)/0
1379         (destroying) as its parent renderer.
1380
1381         Test: scrollbars/scrollbar-percent-padding-crash.html
1382               scrollbars/scrollbar-percent-padding-crash-expected.txt
1383
1384         * rendering/RenderScrollbar.cpp:
1385         (WebCore::RenderScrollbar::updateScrollbarPart):
1386         Added setParent after creating/destroying RenderScrollbarPart.
1387         * rendering/RenderScrollbarPart.cpp:
1388         Made RenderScollbar friend, because setParent is protected and
1389         RenderScrollbar is not inherited from class RenderObject.
1390
1391 2012-05-09  Takashi Sakamoto  <tasak@google.com>
1392
1393         ShadowRoot needs applyAuthorStyles
1394         https://bugs.webkit.org/show_bug.cgi?id=78472
1395
1396         Reviewed by Hajime Morita.
1397
1398         Implemented applyAuthorStyles attribute defined in the following spec:
1399         http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#shadow-root-attributes
1400         Since applyAuthorSheets attribute has been already implemented,
1401         renamed all applyAuthorSheets to applyAuthorStyles and
1402         added applyAuthorStyles to ShadowRoot.idl.
1403         Currently, changing dynamically applyAuthorStyles doesn't work. I will fix this isse in bugs:84215: https://bugs.webkit.org/show_bug.cgi?id=84251
1404
1405         Test: fast/dom/shadow/shadow-root-applyAuthorStyles.html
1406               fast/dom/shadow/shadow-root-applyAuthorStyles-expected.html
1407
1408         * css/StyleResolver.cpp:
1409         (WebCore::StyleResolver::collectMatchingRulesForList):
1410         * dom/ShadowRoot.cpp:
1411         (WebCore::ShadowRoot::ShadowRoot):
1412         (WebCore::ShadowRoot::applyAuthorStyles):
1413         (WebCore::ShadowRoot::setApplyAuthorStyles):
1414         * dom/ShadowRoot.h:
1415         * dom/TreeScope.cpp:
1416         (WebCore::TreeScope::applyAuthorStyles):
1417         * dom/TreeScope.h:
1418         (TreeScope):
1419         Changed all applyAuthorSheets to applyAuthorSytles.
1420         (ShadowRoot):
1421         * dom/ShadowRoot.idl:
1422         Added a new attribute, boolean applyAuthorStyles.
1423
1424 2012-05-09  Yoshifumi Inoue  <yosin@chromium.org>
1425
1426         [Chromium][Forms] HTMLOptionsCollection doesn't have indexed properties on property enumeration
1427         https://bugs.webkit.org/show_bug.cgi?id=85937
1428
1429         Reviewed by Kentaro Hara.
1430
1431         This patch adds numeric indices to properties in enumeration to HTMLOptionsCollection V8 binding
1432         to changes Objects.keys in ECMAScript5 and for-in statement behavior for compatibility with
1433         Firefox 12, IE9, Opera 11, and Safari 5.
1434
1435         Test: fast/forms/select/options-indexed-properties.html
1436
1437         * bindings/scripts/CodeGeneratorV8.pm:
1438         (GenerateImplementationIndexer): Set $hasEnumerator true for interface HTMLOptionsCollection
1439
1440 2012-05-09  Shinya Kawanaka  <shinyak@chromium.org>
1441
1442         Position should be able to have ShadowRoot as a container.
1443         https://bugs.webkit.org/show_bug.cgi?id=82021
1444
1445         Reviewed by Ryosuke Niwa.
1446
1447         Since Position could not take a shadow root as a container node, pointing the direct children
1448         of a shadow root was difficult.
1449
1450         This patch makes it enabled, and fixes a lot of crashes caused by that limitation.
1451         Also, we confirm that ShadowRoot is not exposed to JavaScript layer.
1452
1453         Currently this change is only enabled if shadow dom flag is enabled, since we cannot
1454         prove this change does not destroy the existing behavior. However, this change is really required
1455         to fix other editing bugs in Shadow DOM. A bunch of patches and tests will be added to
1456         fix other editing bugs and they will check this patch does not break editing.
1457         We will also add a fuzzer to check the stability of editing in Shadow DOM later, and it will
1458         also help to confirm the patch will not break the editing.
1459
1460         Tests: editing/shadow/doubleclick-on-meter-in-shadow-crash.html
1461                editing/shadow/rightclick-on-meter-in-shadow-crash.html
1462                editing/shadow/shadow-selection-not-exported.html
1463
1464         * dom/Position.cpp:
1465         (WebCore::Position::Position):
1466         (WebCore::Position::containerNode):
1467         (WebCore::Position::parentAnchoredEquivalent):
1468         (WebCore::Position::previous):
1469         (WebCore::Position::next):
1470         (WebCore::Position::atStartOfTree):
1471         (WebCore::Position::atEndOfTree):
1472         (WebCore::Position::findParent):
1473         * dom/Position.h:
1474         (WebCore):
1475         (WebCore::positionInParentBeforeNode):
1476         (WebCore::positionInParentAfterNode):
1477
1478 2012-05-09  Zoltan Horvath  <zoltan@webkit.org>
1479
1480         [Qt] Build fix when using libpng version != 1.2
1481         https://bugs.webkit.org/show_bug.cgi?id=85614
1482
1483         Reviewed by Eric Seidel.
1484
1485         Don't enforce the version of libpng when passing the option to the linker.
1486
1487         No new tests, no intended functionality change.
1488
1489         * WebCore.pri:
1490
1491 2012-05-09  Oli Lan  <olilan@chromium.org>
1492
1493         Add identifying methods for date/time input types.
1494
1495         This patch adds methods isDateField(), isDateTimeField(), isDateTimeLocalField(),
1496         isMonthField(), isTimeField() and isWeekField() to InputType and the appropriate
1497         HTMLInputElement classes, to allow date/time input types to be identified.
1498
1499         The new methods match the existing methods for types such as email, search and number.
1500
1501         https://bugs.webkit.org/show_bug.cgi?id=78746
1502
1503         Reviewed by Kent Tamura.
1504
1505         A new test WebViewTest.TextInputType has been added in WebKit/chromium/tests that calls
1506         through to these methods via WebViewImpl.textInputType().
1507
1508         * html/DateInputType.cpp:
1509         (WebCore::DateInputType::isDateField):
1510         (WebCore):
1511         * html/DateInputType.h:
1512         (DateInputType):
1513         * html/DateTimeInputType.cpp:
1514         (WebCore::DateTimeInputType::isDateTimeField):
1515         (WebCore):
1516         * html/DateTimeInputType.h:
1517         (DateTimeInputType):
1518         * html/DateTimeLocalInputType.cpp:
1519         (WebCore::DateTimeLocalInputType::isDateTimeLocalField):
1520         (WebCore):
1521         * html/DateTimeLocalInputType.h:
1522         (DateTimeLocalInputType):
1523         * html/HTMLInputElement.cpp:
1524         (WebCore::HTMLInputElement::isDateField):
1525         (WebCore):
1526         (WebCore::HTMLInputElement::isDateTimeField):
1527         (WebCore::HTMLInputElement::isDateTimeLocalField):
1528         (WebCore::HTMLInputElement::isMonthField):
1529         (WebCore::HTMLInputElement::isTimeField):
1530         (WebCore::HTMLInputElement::isWeekField):
1531         * html/HTMLInputElement.h:
1532         (HTMLInputElement):
1533         * html/InputType.cpp:
1534         (WebCore::InputType::isDateField):
1535         (WebCore):
1536         (WebCore::InputType::isDateTimeField):
1537         (WebCore::InputType::isDateTimeLocalField):
1538         (WebCore::InputType::isMonthField):
1539         (WebCore::InputType::isTimeField):
1540         (WebCore::InputType::isWeekField):
1541         * html/InputType.h:
1542         (InputType):
1543         * html/MonthInputType.cpp:
1544         (WebCore::MonthInputType::isMonthField):
1545         (WebCore):
1546         * html/MonthInputType.h:
1547         (MonthInputType):
1548         * html/TimeInputType.cpp:
1549         (WebCore::TimeInputType::isTimeField):
1550         (WebCore):
1551         * html/TimeInputType.h:
1552         (TimeInputType):
1553         * html/WeekInputType.cpp:
1554         (WebCore::WeekInputType::isWeekField):
1555         (WebCore):
1556         * html/WeekInputType.h:
1557         (WeekInputType):
1558
1559 2012-05-09  Nikolas Zimmermann  <nzimmermann@rim.com>
1560
1561         REGRESSION(r105057): Infinite loop inside SVGTextLayoutEngine::currentLogicalCharacterMetrics
1562         https://bugs.webkit.org/show_bug.cgi?id=83405
1563
1564         Reviewed by Darin Adler.
1565
1566         Dynamically adding tspans carrying position information in the x/y/dx/dy/rotate lists is broken.
1567         To avoid mistakes like this in future, simplify the calling code in RenderSVGInlineText and centralize
1568         the managment of all caches (text positioning element cache / metrics map / layout attributes) in
1569         RenderSVGText. This avoids the hack in SVGRootInlineBox::computePerCharacterLayoutInformation() which
1570         called textRoot->rebuildLayoutAttributes(), which was used to fix previous security issues with this code.
1571         Instead correctly handle destruction of RenderSVGInlineText in RenderSVGText, keeping the m_layoutAttributes
1572         synchronized with the current state of the render tree. Fixes highcharts problems.
1573
1574         Tests: svg/text/add-tspan-position-bug.html
1575                svg/text/modify-tspan-position-bug.html
1576
1577         * rendering/svg/RenderSVGInline.cpp:
1578         (WebCore::RenderSVGInline::addChild):
1579         * rendering/svg/RenderSVGInlineText.cpp:
1580         (WebCore::RenderSVGInlineText::willBeDestroyed):
1581         (WebCore::RenderSVGInlineText::setTextInternal):
1582         (WebCore::RenderSVGInlineText::styleDidChange):
1583         * rendering/svg/RenderSVGText.cpp:
1584         (WebCore::recursiveUpdateMetrics):
1585         (WebCore::RenderSVGText::subtreeChildAdded):
1586         (WebCore::RenderSVGText::subtreeChildWillBeDestroyed):
1587         (WebCore::recursiveCollectLayoutAttributes):
1588         (WebCore::checkLayoutAttributesConsistency):
1589         (WebCore::RenderSVGText::subtreeChildWasDestroyed):
1590         (WebCore::RenderSVGText::subtreeStyleChanged):
1591         (WebCore::RenderSVGText::subtreeTextChanged):
1592         (WebCore::RenderSVGText::layout):
1593         (WebCore::RenderSVGText::addChild):
1594         (WebCore::RenderSVGText::rebuildAllLayoutAttributes):
1595         (WebCore::RenderSVGText::rebuildLayoutAttributes):
1596         * rendering/svg/RenderSVGText.h:
1597         (WebCore::RenderSVGText::layoutAttributes):
1598         * rendering/svg/SVGRootInlineBox.cpp:
1599         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
1600         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
1601         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributes):
1602
1603 2012-05-08  Dongwoo Im  <dw.im@samsung.com>
1604
1605         NavigatorRegisterProtocolHandler can call ChromeClient directly.
1606         https://bugs.webkit.org/show_bug.cgi?id=85944
1607
1608         Reviewed by Adam Barth.
1609
1610         Covered by fast/dom/register-protocol-handler.html
1611
1612         * page/Chrome.cpp: Remove registerProtocolHandler function.
1613         * page/Chrome.h: Remove registerProtocolHandler prototype.
1614         (Chrome):
1615         * page/NavigatorRegisterProtocolHandler.cpp: Call ChromeClient::registerProtocolHandler directly.
1616         (WebCore::NavigatorRegisterProtocolHandler::registerProtocolHandler):
1617
1618 2012-05-08  Mario Sanchez Prada  <msanchez@igalia.com>
1619
1620         Coding style issues present in RenderFrameSet.cpp
1621         https://bugs.webkit.org/show_bug.cgi?id=85955
1622
1623         Reviewed by Eric Seidel.
1624
1625         Just fixed those coding style issues.
1626
1627         * rendering/RenderFrameSet.cpp:
1628         (WebCore::RenderFrameSet::GridAxis::resize):
1629         (WebCore::RenderFrameSet::layOutAxis):
1630         (WebCore::RenderFrameSet::continueResizing):
1631
1632 2012-05-08  Jon Lee  <jonlee@apple.com>
1633
1634         Unreviewed build fix.
1635
1636         * platform/mac/WebCoreSystemInterface.h:
1637
1638 2012-05-08  Jason Liu  <jason.liu@torchmobile.com.cn>
1639
1640         [BlackBerry] Auth credentials set in private mode are reused in public mode.
1641         https://bugs.webkit.org/show_bug.cgi?id=84697
1642
1643         Reviewed by Rob Buis.
1644
1645         Add setPrivateMode function for CredentialStorage.
1646
1647         Now, we only save credentials in memory and CredentialBackingStore isn't enabled.
1648         When we set private mode from on to off, we clear all these temporary credentials.
1649
1650         We have to change Private Browsing to test, so have to write a manual test case.
1651         Test: ManualTests/blackberry/http-auth-private-mode-changed.html
1652
1653         * network/CredentialStorage.cpp:
1654         (WebCore::CredentialStorage::setPrivateMode):
1655         (WebCore):
1656         * platform/network/CredentialStorage.h:
1657         (CredentialStorage):
1658
1659 2012-05-08  Rakesh KN  <rakesh.kn@motorola.com>
1660
1661         RadioNodeList support in HTMLFormElement::elements
1662         https://bugs.webkit.org/show_bug.cgi?id=81854
1663
1664         Reviewed by Ryosuke Niwa.
1665
1666         Implement RadioNodeList support spec'ed at
1667         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#radionodelist
1668
1669         Test: fast/forms/form-collection-radio-node-list.html
1670
1671         * CMakeLists.txt:
1672         Added entries for new files.
1673         * DerivedSources.cpp: Ditto.
1674         * DerivedSources.make: Ditto.
1675         * DerivedSources.pri: Ditto.
1676         * GNUmakefile.list.am: Ditto.
1677         * Target.pri: Ditto.
1678         * WebCore.gypi: Ditto.
1679         * WebCore.vcproj/WebCore.vcproj: Ditto.
1680         * WebCore.xcodeproj/project.pbxproj: Ditto.
1681         * bindings/js/JSHTMLCollectionCustom.cpp:
1682         (WebCore::getNamedItems):
1683         Modified to create RadioNodeList object when FormControlCollection has more than
1684         one element of same name/id.
1685         * bindings/scripts/CodeGeneratorJS.pm:
1686         (GenerateImplementation):
1687         Added code to include Node.h and JSNode.h in JSRadioNodeElement.cpp.
1688         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
1689         (WebCore::getNamedItems):
1690         Modified to create RadioNodeList object when FormControlCollection has more than
1691         one element of same name/id.
1692         * dom/Node.cpp:
1693         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
1694         Invalidate lists even for change in id, type, checked attributes.
1695         (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes):
1696         Invalidate radioNodeList cache.
1697         (WebCore::NodeListsNodeData::isEmpty):
1698         Changes for radioNodeList.
1699         (WebCore::Node::radioNodeList):
1700         Creates if needed a RadioNodeList and adds it to the cache.
1701         (WebCore::Node::removeCachedRadioNodeList):
1702         Removes a cached radioNodeList.
1703         * dom/Node.h: Ditto
1704         * dom/NodeRareData.h:
1705         (WebCore):
1706         (NodeListsNodeData):
1707         Added radioNodeList list.
1708         * html/CollectionType.h:
1709         Added new FormControls type.
1710         * html/HTMLCollection.cpp:
1711         (WebCore::HTMLCollection::shouldIncludeChildren):
1712         (WebCore::HTMLCollection::isAcceptableElement):
1713         Handle FormControls collection type.
1714         * html/HTMLFormCollection.cpp:
1715         (WebCore::HTMLFormCollection::HTMLFormCollection):
1716         Contruct collection of FormControls type.
1717         * html/RadioNodeList.cpp: Added.
1718         (WebCore):
1719         (WebCore::RadioNodeList::RadioNodeList):
1720         (WebCore::RadioNodeList::~RadioNodeList):
1721         (WebCore::toRadioButtonInputElement):
1722         (WebCore::RadioNodeList::value):
1723         (WebCore::RadioNodeList::setValue):
1724         (WebCore::RadioNodeList::nodeMatches):
1725         * html/RadioNodeList.h: Added.
1726         (WebCore):
1727         (RadioNodeList):
1728         (WebCore::RadioNodeList::create):
1729         RadioNodeList implementation.
1730         * html/RadioNodeList.idl: Added.
1731         Idl for generating RadioNodeList JS/V8 bindings.
1732
1733 2012-05-08  Benjamin Poulain  <bpoulain@apple.com>
1734
1735         [JSC] Regression: addEventListener() and removeEventListener() raise an exception on missing args
1736         https://bugs.webkit.org/show_bug.cgi?id=85928
1737
1738         Reviewed by Geoffrey Garen.
1739
1740         The functions addEventListener() and removeEventListener() raise an exception if there are missin arguments.
1741         This behavior breaks existing content.
1742
1743         This patch change the code generator of JavaScript core to have an exception for addEventListener() and removeEventListener().
1744         For those function, we do not raise an exception on missin argument.
1745
1746         This patch does not modify the V8 code generator because such exceptions are already in place there.
1747
1748         Tests: fast/dom/Window/window-legacy-event-listener.html
1749                fast/dom/XMLHttpRequest-legacy-event-listener.html
1750                fast/dom/node-legacy-event-listener.html
1751
1752         * bindings/scripts/CodeGeneratorJS.pm:
1753         (GenerateImplementation):
1754
1755 2012-05-08  Chris Rogers  <crogers@google.com>
1756
1757         AudioParam should directly be given context in create() method
1758         https://bugs.webkit.org/show_bug.cgi?id=85905
1759
1760         Reviewed by James Robinson.
1761
1762         No new tests.  This is a low-level re-factoring and is covered by existing tests.
1763
1764         * Modules/webaudio/AudioBufferSourceNode.cpp:
1765         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
1766         * Modules/webaudio/AudioGain.h:
1767         (WebCore::AudioGain::create):
1768         (WebCore::AudioGain::AudioGain):
1769         * Modules/webaudio/AudioGainNode.cpp:
1770         (WebCore::AudioGainNode::AudioGainNode):
1771         * Modules/webaudio/AudioPannerNode.cpp:
1772         (WebCore::AudioPannerNode::AudioPannerNode):
1773         * Modules/webaudio/AudioParam.h:
1774         (WebCore::AudioParam::create):
1775         (AudioParam):
1776         (WebCore::AudioParam::AudioParam):
1777         * Modules/webaudio/BiquadFilterNode.cpp:
1778         (WebCore::BiquadFilterNode::BiquadFilterNode):
1779         * Modules/webaudio/BiquadProcessor.cpp:
1780         (WebCore::BiquadProcessor::BiquadProcessor):
1781         * Modules/webaudio/BiquadProcessor.h:
1782         * Modules/webaudio/DelayNode.cpp:
1783         (WebCore::DelayNode::DelayNode):
1784         * Modules/webaudio/DelayProcessor.cpp:
1785         (WebCore::DelayProcessor::DelayProcessor):
1786         * Modules/webaudio/DelayProcessor.h:
1787         (DelayProcessor):
1788         * Modules/webaudio/DynamicsCompressorNode.cpp:
1789         (WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
1790         * Modules/webaudio/Oscillator.cpp:
1791         (WebCore::Oscillator::Oscillator):
1792
1793 2012-05-08  Dana Jansens  <danakj@chromium.org>
1794
1795         [chromium] Show borders for partial-draw-culled quads to visualize culling behaviour
1796         https://bugs.webkit.org/show_bug.cgi?id=85414
1797
1798         Reviewed by Adrienne Walker.
1799
1800         The borders are brown, and are only shown when the quad's visible rect
1801         is non-empty and is different from the quad's original rect.
1802
1803         Adds a flag to CCQuadCuller constructor, to enable showing debug borders
1804         around what it leaves after culling (when it culls anything in a quad
1805         at all).
1806
1807         * platform/graphics/chromium/cc/CCDrawQuad.h:
1808         (WebCore::CCDrawQuad::isDebugQuad):
1809         (WebCore::CCDrawQuad::sharedQuadState):
1810         (CCDrawQuad):
1811         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1812         (WebCore):
1813         (WebCore::CCQuadCuller::CCQuadCuller):
1814         (WebCore::appendQuadInternal):
1815         (WebCore::CCQuadCuller::append):
1816         (WebCore::CCQuadCuller::appendSurface):
1817         (WebCore::CCQuadCuller::appendReplica):
1818         * platform/graphics/chromium/cc/CCQuadCuller.h:
1819         (CCQuadCuller):
1820         * platform/graphics/chromium/cc/CCRenderPass.cpp:
1821         (WebCore::CCRenderPass::appendQuadsForLayer):
1822         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
1823
1824 2012-05-08  Julien Chaffraix  <jchaffraix@webkit.org>
1825
1826         Move RenderLayers z-index lists dirtying to post style change
1827         https://bugs.webkit.org/show_bug.cgi?id=85437
1828
1829         Reviewed by Darin Adler.
1830
1831         No expected change in behavior.
1832
1833         This change moves the z-order lists to RenderLayer::styleChanged. As part of this
1834         change, also added proper handling of stacking context transition. This enabled
1835         us to tighten more of the dirtyZOrderLists / clearZOrderLists code.
1836
1837         * rendering/RenderBoxModelObject.cpp:
1838         (WebCore::RenderBoxModelObject::styleWillChange):
1839         Removed this code, moved to updateStackingContextsAfterStyleChange.
1840
1841         * rendering/RenderLayer.cpp:
1842         (WebCore::RenderLayer::RenderLayer):
1843         Only stacking contexts start with dirty z-order lists.
1844
1845         (WebCore::RenderLayer::dirtyZOrderLists):
1846         Added an ASSERT.
1847
1848         (WebCore::RenderLayer::updateStackingContextsAfterStyleChange):
1849         Refactored the code to handle the transition between stacking context status.
1850
1851         (WebCore::RenderLayer::styleChanged):
1852         Added a call to updateStackingContextsAfterStyleChange.
1853
1854         * rendering/RenderLayer.h:
1855         (WebCore::RenderLayer::isStackingContext):
1856         Added a call to the next function.
1857
1858         (WebCore::RenderLayer::layerWithStyleIsStackingContext):
1859         Factored the isStackingContext logic here so that we can reuse it inside
1860         updateStackingContextsAfterStyleChange.
1861
1862         (WebCore::RenderLayer::clearZOrderLists):
1863         Added an ASSERT.
1864
1865 2012-05-08  Abhishek Arya  <inferno@chromium.org>
1866
1867         Crash due to owning renderer not removed from custom scrollbar.
1868         https://bugs.webkit.org/show_bug.cgi?id=80610
1869
1870         Reviewed by Eric Seidel.
1871
1872         Test: scrollbars/scrollbar-owning-renderer-crash.html
1873
1874         Changed RenderScrollbar to keep pointer to owning node, instead of the
1875         renderer. Renderer can get destroyed without informing the scrollbar, causing
1876         crashes later. Remove code from r94107 since it is not needed anymore and saves
1877         times when RenderBox is getting destroyed.
1878
1879         * page/FrameView.cpp:
1880         (WebCore::FrameView::createScrollbar): pass renderer's node.
1881         * page/FrameView.h:
1882         * rendering/RenderBox.cpp:
1883         (WebCore::RenderBox::willBeDestroyed): no longer need this. came originally from r94107.
1884         * rendering/RenderLayer.cpp:
1885         (WebCore::RenderLayer::createScrollbar): pass renderer's node.
1886         (WebCore::RenderLayer::destroyScrollbar): no longer need to clear owning renderer.
1887         * rendering/RenderListBox.cpp:
1888         (WebCore::RenderListBox::createScrollbar): pass renderer's node.
1889         * rendering/RenderMenuList.cpp:
1890         (WebCore::RenderMenuList::createScrollbar): pass renderer's node.
1891         * rendering/RenderScrollbar.cpp:
1892         (WebCore::RenderScrollbar::createCustomScrollbar): Store owner node instead of renderer.
1893         (WebCore::RenderScrollbar::RenderScrollbar): Store owner node instead of renderer.
1894         (WebCore::RenderScrollbar::owningRenderer): calculate owning renderer from owner node.
1895         * rendering/RenderScrollbar.h:
1896         (RenderScrollbar):
1897         * rendering/RenderTextControlSingleLine.cpp:
1898         (WebCore::RenderTextControlSingleLine::createScrollbar): pass renderer's node.
1899
1900 2012-05-08  Jon Lee  <jonlee@apple.com>
1901
1902         Safari warns that it needs to resend the form in an iFrame when going back
1903         https://bugs.webkit.org/show_bug.cgi?id=82658
1904         <rdar://problem/11292558>
1905
1906         Reviewed by Darin Adler.
1907
1908         Test: http/tests/loading/post-in-iframe-with-back-navigation.html
1909
1910         * WebCore.exp.in: Add _wkCFURLRequestAllowAllPostCaching.
1911         * platform/mac/WebCoreSystemInterface.h: Add wkCFURLRequestAllowAllPostCaching.
1912         * platform/mac/WebCoreSystemInterface.mm: Add wkCFURLRequestAllowAllPostCaching.
1913         * platform/network/cf/ResourceRequestCFNet.cpp:
1914         (WebCore::ResourceRequest::doUpdatePlatformRequest): Set the bit to cache all POST responses.
1915         * platform/network/mac/ResourceRequestMac.mm:
1916         (WebCore::ResourceRequest::doUpdatePlatformRequest): Set the bit to cache all POST responses.
1917
1918 2012-05-08  Dana Jansens  <danakj@chromium.org>
1919
1920         [chromium] Reflections with masks should not occlude
1921         https://bugs.webkit.org/show_bug.cgi?id=85927
1922
1923         Reviewed by James Robinson.
1924
1925         When a surface does not have a mask, we make both it and its reflection
1926         occlude the things below them. However, if the reflection has a mask
1927         applied to it, then we should not consider it as occluding.
1928
1929         Adds replicaHasMask() to the render surface classes so we can test if
1930         the mask is present.
1931
1932         Unit Tests: CCOcclusionTrackerTestReplicaWithMask
1933
1934         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
1935         (WebCore::RenderSurfaceChromium::hasMask):
1936         This is unusued right now, but will allow us to remove a FIXME from
1937         CCOcclusionTracker::finishedTargetRenderSurface().
1938         (WebCore):
1939         (WebCore::RenderSurfaceChromium::replicaHasMask):
1940         * platform/graphics/chromium/RenderSurfaceChromium.h:
1941         (RenderSurfaceChromium):
1942         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1943         (WebCore::::leaveToTargetRenderSurface):
1944         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1945         (WebCore::CCRenderSurface::hasMask):
1946         This is unusued right now, but will allow us to remove a FIXME from
1947         CCOcclusionTracker::finishedTargetRenderSurface().
1948         (WebCore):
1949         (WebCore::CCRenderSurface::replicaHasMask):
1950         * platform/graphics/chromium/cc/CCRenderSurface.h:
1951         (CCRenderSurface):
1952
1953 2012-05-08  Eric Seidel  <eric@webkit.org>
1954
1955         Add stylesheet inheritance support to IFRAME_SEAMLESS
1956         https://bugs.webkit.org/show_bug.cgi?id=85914
1957
1958         Reviewed by Ojan Vafai.
1959
1960         This work is already guarded by IFRAME_SEAMLESS, as
1961         Document::shouldDisplaySeamlesslyWithParent always returns false
1962         when IFRAME_SEAMLESS is off.
1963
1964         This makes the child document use all author stylesheets from all parent documents,
1965         per the seamless spec:
1966         http://www.whatwg.org/specs/web-apps/current-work/#attr-iframe-seamless
1967
1968         This support is slightly inefficient as every time a sheet is added
1969         to a parent document, the child document must do a full style selector recalc.
1970         Normally author sheet additions have a fast-path which avoids the full selector recalc,
1971         but such is not possible in the seamless case as we're inserting the parents sheets
1972         earlier in the child's cascade (instead of just appending them to the end of the list).
1973
1974         The test covers both the static inheritance as well as addition of a stylesheet
1975         to the parent and testing that it caused a recalc of the child.
1976
1977         Covered by fast/frames/seamless/seamless-css-cascade.html
1978
1979         * css/StyleResolver.cpp:
1980         (WebCore::StyleResolver::StyleResolver):
1981         (WebCore::StyleResolver::addStylesheetsFromSeamlessParents):
1982         (WebCore):
1983         * css/StyleResolver.h:
1984         (StyleResolver):
1985         * dom/Document.cpp:
1986         (WebCore::Document::seamlessParentUpdatedStylesheets):
1987         (WebCore):
1988         (WebCore::Document::notifySeamlessChildDocumentsOfStylesheetUpdate):
1989         (WebCore::Document::updateActiveStylesheets):
1990         * dom/Document.h:
1991         (Document):
1992
1993 2012-05-08  Raphael Kubo da Costa  <rakuco@webkit.org>
1994
1995         [CMake] FindGStreamer: Fix the build with static WebCore.
1996         https://bugs.webkit.org/show_bug.cgi?id=85930
1997
1998         Reviewed by Daniel Bates.
1999
2000         No new tests, build fix.
2001
2002         Building WebCore statically was failing because files in
2003         WebCore/platform/gstreamer when ENABLE_VIDEO was set required
2004         gstreamer-base, which was not being linked to after r116453.
2005
2006         Fix that by looking for gstreamer-base, requiring and linking
2007         against it if GStreamer is used.
2008
2009         * PlatformEfl.cmake: Link to GSTREAMER_LIBRARIES and
2010         GSTREAMER_BASE_LIBRARIES, and include GSTREAMER_INCLUDE_DIRS and
2011         GSTREAMER_BASE_INCLUDE_DIRS.
2012
2013 2012-05-08  Raymond Toy  <rtoy@google.com>
2014
2015         JavaScriptAudioNode should not ASSERT if number of input channels is 0
2016         https://bugs.webkit.org/show_bug.cgi?id=85818
2017
2018         Reviewed by Eric Seidel.
2019
2020         Test: webaudio/javascriptaudionode-zero-input-channels.html
2021
2022         * Modules/webaudio/JavaScriptAudioNode.cpp:
2023         (WebCore::JavaScriptAudioNode::process): Update buffersAreGood.
2024         (WebCore::JavaScriptAudioNode::fireProcessEvent): Remove ASSERT.
2025
2026 2012-05-08  Dana Jansens  <danakj@chromium.org>
2027
2028         Region reads past end of spans
2029         https://bugs.webkit.org/show_bug.cgi?id=85909
2030
2031         Reviewed by Anders Carlsson.
2032
2033         Region currently checks aSpan == aSpanEnd as the indicator that
2034         we passed all the spans. When aSpan < aSpanEnd, it uses aSpan+1
2035         to find the height of the span.
2036
2037         If aSpan == aSpanEnd - 1, then aSpan+1 == aSpanEnd. This does not
2038         represent a valid span, since aSpanEnd is past the end of the
2039         array, not the last element in the array. The loop should terminate
2040         in this case.
2041
2042         Checking aSegment != aSegmentEnd is acceptable in the inner loop since
2043         it increments by two each time (segments come in pairs, while spans
2044         come in singles).
2045
2046         Test: RegionTest.ReadPastFullSpanVectorInIntersectsTest
2047
2048         * platform/graphics/Region.cpp:
2049         (WebCore::Region::Shape::compareShapes):
2050
2051 2012-05-08  Philip Rogers  <pdr@google.com>
2052
2053         Prevent crash in animated lists
2054         https://bugs.webkit.org/show_bug.cgi?id=85382
2055
2056         Reviewed by Nikolas Zimmermann.
2057
2058         Animated lists blindly assign the last list value to m_toAtEndOfDurationType
2059         in SVGAnimationElement::startedActiveInterval. If the last list value's length
2060         is larger or smaller than the animated "to" length, we crash.
2061
2062         This change prevents accessing values off the end of toAtEndOfDuration by adding
2063         a check for this case. It may seem inefficient to perform this check on every
2064         animation update but the "to" value can change (in cardinality) while animating.
2065
2066         I checked each of the other animation types (e.g., SVGAnimatedAngle,
2067         SVGAnimatedBoolean, etc.) and was only able to hit this style of crash
2068         in the three types modified in this change:
2069         SVGAnimatedLengthList, SVGAnimatedNumberList, and SVGAnimatedPointList.
2070
2071         Tests: svg/animations/animate-linear-discrete-additive-b-expected.svg
2072                svg/animations/animate-linear-discrete-additive-b.svg
2073                svg/animations/animate-linear-discrete-additive-c-expected.svg
2074                svg/animations/animate-linear-discrete-additive-c.svg
2075                svg/animations/animate-linear-discrete-additive-expected.svg
2076                svg/animations/animate-linear-discrete-additive.svg
2077                svg/animations/animate-list-crash.svg
2078
2079         * svg/SVGAnimatedLengthList.cpp:
2080         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
2081         * svg/SVGAnimatedNumberList.cpp:
2082         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
2083         * svg/SVGAnimatedPointList.cpp:
2084         (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
2085
2086 2012-05-08  Rafael Weinstein  <rafaelw@chromium.org>
2087
2088         HTMLElementStack::hasOnlyHTMLElementsInScope is no longer called
2089         https://bugs.webkit.org/show_bug.cgi?id=85908
2090
2091         Reviewed by Eric Seidel.
2092
2093         This patch just removes the dead code.
2094
2095         No tests needed. Cleanup only.
2096
2097         * html/parser/HTMLElementStack.cpp:
2098         * html/parser/HTMLElementStack.h:
2099         (HTMLElementStack):
2100
2101 2012-05-08  W. James MacLean  <wjmaclean@chromium.org>
2102
2103         [chromium] Create LinkHighlightLayerChromium class to provide link-highlight preview animations for GraphicsLayerChromium.
2104         https://bugs.webkit.org/show_bug.cgi?id=85084
2105
2106         Reviewed by James Robinson.
2107
2108         Unit test provided.
2109
2110         Creates a layer delegate class to provide link highlight animations for link-preview feature.
2111         These are added to a GraphicsLayerChromium via provided methods. Moves dispensing of animation
2112         ids into a separate class.
2113
2114         * WebCore.gypi:
2115         * platform/graphics/chromium/AnimationIdVendor.cpp: Added.
2116         (WebCore):
2117         (WebCore::AnimationIdVendor::getNextAnimationId):
2118         (WebCore::AnimationIdVendor::getNextGroupId):
2119         * platform/graphics/chromium/AnimationIdVendor.h: Added.
2120         (WebCore):
2121         (AnimationIdVendor):
2122         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2123         (WebCore::GraphicsLayerChromium::willBeDestroyed):
2124         (WebCore::GraphicsLayerChromium::updateNames):
2125         (WebCore::GraphicsLayerChromium::addAnimation):
2126         (WebCore::GraphicsLayerChromium::addLinkHighlight):
2127         (WebCore):
2128         (WebCore::GraphicsLayerChromium::didFinishLinkHighlight):
2129         (WebCore::GraphicsLayerChromium::updateChildList):
2130         (WebCore::GraphicsLayerChromium::mapAnimationNameToId):
2131         * platform/graphics/chromium/GraphicsLayerChromium.h:
2132         (WebCore):
2133         (GraphicsLayerChromium):
2134         * platform/graphics/chromium/LinkHighlight.cpp: Added.
2135         (WebCore):
2136         (WebCore::LinkHighlight::create):
2137         (WebCore::LinkHighlight::LinkHighlight):
2138         (WebCore::LinkHighlight::~LinkHighlight):
2139         (WebCore::LinkHighlight::contentLayer):
2140         (WebCore::LinkHighlight::paintContents):
2141         (WebCore::LinkHighlight::notifyAnimationStarted):
2142         (WebCore::LinkHighlight::notifyAnimationFinished):
2143         * platform/graphics/chromium/LinkHighlight.h: Added.
2144         (WebCore):
2145         (LinkHighlight):
2146
2147 2012-05-08  Raphael Kubo da Costa  <rakuco@webkit.org>
2148
2149         [CMake] Rewrite FindGStreamer.cmake.
2150         https://bugs.webkit.org/show_bug.cgi?id=85857
2151
2152         Reviewed by Daniel Bates.
2153
2154         No new tests, build system change.
2155
2156         We are currently kind of duplicating the same
2157         FindGStreamer-Foo.cmake file whenever a new GStreamer plugin needs
2158         to be found. Besides this approach not scaling very well, it
2159         relies on pkg-config for version checking, uses the LibFindMacros
2160         package that we should deprecate and all the find files could be
2161         merged into one, with users using the COMPONENTS feature of the
2162         FIND_PACKAGE() call to find the desired plugins.
2163
2164         FindGStreamer.cmake has then been rewritten to take all that into
2165         account:
2166         - The LibFindMacros.cmake package is not used anymore.
2167         - Version check is performed in the CMake file itself by parsing
2168         the gstversion.h header.
2169         - All GStreamer plugins are searched and the COMPONENTS keyword
2170         used in the FIND_PACKAGE() call is used to check which plugins are
2171         required.
2172         - The plugins-base and base GStreamer plugins are not searched, as
2173         they were not used anywhere in the build system.
2174
2175         * PlatformEfl.cmake: Update GStreamer-related variable names.
2176
2177 2012-05-08  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2178
2179         [EFL] Handling of numeric-pad keys in EFL's PlatformKeyboardEvent
2180         https://bugs.webkit.org/show_bug.cgi?id=85479
2181
2182         Reviewed by Gustavo Noronha Silva.
2183
2184         EFL's PlatformKeyboardEvent::isKeypad() now returns meaningful value.
2185         Added numeric-pad keys to the Key Map and Windows Key Map.
2186
2187         No new tests.
2188
2189         * platform/efl/EflKeyboardUtilities.cpp:
2190         (WebCore::createKeyMap):
2191         (WebCore::createWindowsKeyMap):
2192         * platform/efl/PlatformKeyboardEventEfl.cpp:
2193         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2194
2195 2012-05-04  Nikolas Zimmermann  <nzimmermann@rim.com>
2196
2197         Tie lifetime of SVGAnimateElement::m_animatedType to the duration of the animation
2198         https://bugs.webkit.org/show_bug.cgi?id=85627
2199
2200         Reviewed by Antti Koivisto.
2201
2202         Example:
2203         <rect width="10" height="100">
2204             <animate attributeName="width" from="10" to="100" begin="2s" dur="4s" fill="remove"/>
2205         </rect>
2206
2207         At t=0s the <animate> element receives its first interval: begin=2s, end=6s.
2208         At this point we've created the 'OwnPtr<SVGAnimatedType> m_animatedType' in
2209         SVGAnimateElement, which holds the current animated value of the target type.
2210         In this example it contains a SVGLength with '10' as value at t=0s.
2211
2212         Calling "rect.width.animVal.value" will return the value currently contained in the
2213         m_animatedType from the SVGAnimateElement, even though the animation didn't begin
2214         yet. This is fine, as the animVal equals to the baseVal, as long as no animation is
2215         running.
2216
2217         At t=6s you'd expect that the whole 'animVal' object is destructed again, as it's no
2218         longer needed, as animVal will be equal to baseVal again, but the current code keeps
2219         the animVal alive, and just resets it to the baseVal. The animVals will be destructed
2220         once the animate element leaves the tree.
2221
2222         CSS animations suffer from the same problem, we never remove the animated SMIL properties
2223         but we only reset them to the base value. This makes integration with CSS Animations and
2224         CSS Transitions harder, so this needs to be changed.
2225
2226         This patch starts tracking the start/end of an animation chain properly, to destruct
2227         the animation effect for non-frozen animations at the end of their duration. This has to
2228         work properly together with seeking (SVGSVGElement.setCurrentTime), as our testing relies
2229         on the ability to drive the SMIL timeline from script.
2230
2231         Tests: svg/animations/list-wrapper-assertion-expected.svg
2232                svg/animations/list-wrapper-assertion.svg
2233
2234         * svg/SVGAnimateElement.cpp:
2235         (WebCore::SVGAnimateElement::resetAnimatedType):
2236         (WebCore::applyCSSPropertyToTarget):
2237         (WebCore::removeCSSPropertyFromTarget):
2238         (WebCore::applyCSSPropertyToTargetAndInstances):
2239         (WebCore::removeCSSPropertyFromTargetAndInstances):
2240         (WebCore::notifyTargetAboutAnimValChange):
2241         (WebCore::notifyTargetAndInstancesAboutAnimValChange):
2242         (WebCore::SVGAnimateElement::clearAnimatedType):
2243         (WebCore::SVGAnimateElement::applyResultsToTarget):
2244         (WebCore::SVGAnimateElement::targetElementWillChange):
2245         * svg/SVGAnimateElement.h:
2246         (SVGAnimateElement):
2247         * svg/SVGAnimateMotionElement.cpp:
2248         (WebCore::SVGAnimateMotionElement::resetAnimatedType):
2249         (WebCore::SVGAnimateMotionElement::clearAnimatedType):
2250         * svg/SVGAnimateMotionElement.h:
2251         (SVGAnimateMotionElement):
2252         * svg/SVGAnimationElement.cpp:
2253         * svg/SVGAnimationElement.h:
2254         * svg/animation/SMILTimeContainer.cpp:
2255         (WebCore::SMILTimeContainer::updateAnimations):
2256         * svg/animation/SVGSMILElement.cpp:
2257         (WebCore::SVGSMILElement::reset):
2258         (WebCore::SVGSMILElement::targetElementWillChange):
2259         (WebCore::SVGSMILElement::determineActiveState):
2260         (WebCore::SVGSMILElement::progress):
2261         * svg/animation/SVGSMILElement.h:
2262         (SVGSMILElement):
2263         * svg/properties/SVGAnimatedListPropertyTearOff.h:
2264             Remove svgAttributeChanged() calls from animationEnded/animValDidChange.
2265             Callers are now required to notify the target about changes. There are cases
2266             where we want to call animValDidChange without invoking svgAttributeChanged().
2267             That is supported now.
2268         (WebCore::SVGAnimatedListPropertyTearOff::animationEnded):
2269         (WebCore::SVGAnimatedListPropertyTearOff::animValDidChange):
2270         * svg/properties/SVGAnimatedProperty.h: Ditto.
2271         (WebCore::SVGAnimatedProperty::commitChange): Add safety guard.
2272         * svg/properties/SVGAnimatedPropertyTearOff.h: Ditto.
2273         (WebCore::SVGAnimatedPropertyTearOff::animationEnded):
2274         (WebCore::SVGAnimatedPropertyTearOff::animValDidChange):
2275         * svg/properties/SVGAnimatedStaticPropertyTearOff.h: Ditto.
2276         (WebCore::SVGAnimatedStaticPropertyTearOff::animationEnded):
2277         (WebCore::SVGAnimatedStaticPropertyTearOff::animValDidChange):
2278
2279 2012-05-08  Ryuan Choi  <ryuan.choi@samsung.com>
2280
2281         [EFL][DRT]Do not create ScrollbarEfl when mockScrollbar is enabled.
2282         https://bugs.webkit.org/show_bug.cgi?id=81315
2283
2284         Reviewed by Chang Shu.
2285
2286         ScrollbarEfl creates custom scrollbars as separated layer and they are
2287         not related to ScrollbarTheme.
2288         So, DRT/Efl creates custom scrollbars on webview which paints mockScrollbar.
2289
2290         This patch prevents creating custom scrollbars when mockScrollbar is enabled.
2291
2292         Because DRT/Efl only renders the webview now, expected results are same
2293         until Bug 79853 is landed.
2294
2295         * platform/efl/ScrollbarEfl.cpp:
2296         (Scrollbar::createNativeScrollbar):
2297
2298 2012-05-08  Timothy Hatcher  <timothy@apple.com>
2299
2300         Fix the SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL macro so it passes the full path to dlopen.
2301
2302         dyld only considers libraries in the versioned framework path if their install name
2303         matches the library that it is attempting to load. The path we were passing to
2304         dlopen lacked the Versions/A component of the path so dyld did not recognize that
2305         we wanted it to use the staged version if it is newer.
2306
2307         <rdar://problem/11406517>
2308
2309         Reviewed by Mark Rowe.
2310
2311         * platform/mac/SoftLinking.h: Have SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL take the
2312         framework version as an argument and use it when constructing the path to dlopen.
2313
2314 2012-05-08  Rafael Brandao  <rafael.lobo@openbossa.org>
2315
2316         Build fix for Qt Snowleopard Release
2317         https://bugs.webkit.org/show_bug.cgi?id=85895
2318
2319         Reviewed by Alexis Menard.
2320
2321         The enum value JSUint8ClampedArray conflicted with the JSUint8ClampedArray class.
2322         I've added the 'Type' suffix to the enum value to make their names different.
2323
2324         No new tests needed.
2325
2326         * bridge/qt/qt_runtime_qt4.cpp:
2327         (JSC::Bindings::valueRealType):
2328         (JSC::Bindings::convertValueToQVariant):
2329
2330 2012-05-08  Shezan Baig  <shezbaig.wk@gmail.com>
2331
2332         offsetLeft broken within CSS3 columns
2333         https://bugs.webkit.org/show_bug.cgi?id=34875
2334
2335         Reviewed by Julien Chaffraix.
2336
2337         Reimplement offsetLeft and offsetTop in terms of a new method called
2338         'offsetTopLeft'. The new method starts from a reference point (the
2339         top-left coordinate of a box or inline) and adjusts this reference
2340         point for columns as we traverse each parent. Note that the reference
2341         point needs to be adjusted in both dimensions, even though offsetLeft
2342         and offsetTop return only one of them.
2343
2344         A new method called 'offsetForColumns' was added to RenderObject. This
2345         method is similar to adjustForColumns, except that it returns the
2346         offset instead of modifying a reference. This method is necessary to
2347         simplify the implementation of offsetTopLeft.
2348
2349         Tests: fast/block/positioning/offsetLeft-offsetTop-multicolumn-expected.txt
2350                fast/block/positioning/offsetLeft-offsetTop-multicolumn.html
2351
2352         * rendering/RenderBox.h:
2353         (RenderBox):
2354         Override offsetLeft and offsetTop.
2355         * rendering/RenderBox.cpp:
2356         (WebCore::RenderBox::offsetLeft):
2357         Implemented in terms of RenderBoxModelObject::offsetTopLeft, using
2358         topLeftLocation as startPoint.
2359         (WebCore::RenderBox::offsetTop):
2360         Implemented in terms of RenderBoxModelObject::offsetTopLeft, using
2361         topLeftLocation as startPoint.
2362         * rendering/RenderBoxModelObject.cpp:
2363         (WebCore::RenderBoxModelObject::offsetTopLeft):
2364         New method to compute offsetLeft and offsetTop simultaneously, and
2365         adjusting for columns at each parent.
2366         (WebCore::RenderBoxModelObject::offsetLeft):
2367         Reimplemented in terms of offsetTopLeft.
2368         (WebCore::RenderBoxModelObject::offsetTop):
2369         Reimplemented in terms of offsetTopLeft.
2370         * rendering/RenderBoxModelObject.h:
2371         (RenderBoxModelObject):
2372         Declare new offsetTopLeft method.
2373         * rendering/RenderInline.cpp:
2374         (WebCore::RenderInline::offsetLeft):
2375         Reimplemented in terms of RenderBoxModelObject::offsetTopLeft.
2376         (WebCore::RenderInline::offsetTop):
2377         Reimplemented in terms of RenderBoxModelObject::offsetTopLeft.
2378         * rendering/RenderObject.h:
2379         (RenderObject):
2380         (WebCore::RenderObject::offsetForColumns):
2381         New helper method to simplify implementation of offsetTopLeft.
2382
2383 2012-03-31  Robert Hogan  <robert@webkit.org>
2384
2385         CSS 2.1 failure: first-letter-nested-004.htm fails
2386         https://bugs.webkit.org/show_bug.cgi?id=72987
2387
2388         Reviewed by Eric Seidel.
2389
2390         When styling first-letter check each sibling and drill into its inlines until we find either (i) a text node 
2391         that is not all whitespace, or (ii) a line break.
2392
2393         This makes our rendering of the following tests compatible with FF and Opera. Our current behaviour is also conformant
2394         since the spec allows UAs to style just one element:
2395             css2.1/20110323/first-letter-quote-002.htm
2396             css2.1/20110323/first-letter-quote-003.htm
2397             css2.1/20110323/first-letter-quote-004.htm
2398             css2.1/20110323/first-letter-quote-005.htm
2399
2400         This fixes the following two tests. We now drill into the descendants of an element styled with :first-letter looking
2401         for text to style:
2402             css2.1/20110323/first-letter-nested-004.htm
2403             css2.1/20110323/first-letter-nested-006.htm
2404
2405         This patch changes our rendering of first-letter-dynamic-001.htm as we now render adjacent quotes in the second line as 
2406         green. This is consistent with the spec, which allows this behaviour but does not require it. It's the 'right' behaviour
2407         since it is consistent with the rendering of such quotes in a single element with :first-letter style.
2408
2409         * rendering/RenderBlock.cpp:
2410         (WebCore::RenderBlock::findLastObjectWithFirstLetterText): Iterate through the child's siblings looking for the last
2411           object to be styled :first-letter.
2412         (WebCore::RenderBlock::findLastObjectAfterFirstLetterPunctuation): Style any leading punctuation as first-letter, drill
2413           down into the child's descendants looking for text if necessary.
2414         (WebCore::RenderBlock::updateFirstLetter): Refactor to drill into sibling's children looking for inlines
2415          that should be styled as first-letter.
2416         (WebCore::RenderBlock::addFirstLetter): Split out from updateFirstLetter so that it can be used when a
2417          descendant node inside a sibling is found in findLastObjectWithFirstLetterText() needs to be styled as first-letter.
2418         * rendering/RenderBlock.h:
2419
2420 2012-05-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2421
2422         Unreviewed, rolling out r116402.
2423         http://trac.webkit.org/changeset/116402
2424         https://bugs.webkit.org/show_bug.cgi?id=85898
2425
2426         Caused a 3% regression on Chromium's bloat-http test on Linux
2427         (Requested by ojan_gardening on #webkit).
2428
2429         * WebCore.exp.in:
2430         * bindings/v8/RetainedDOMInfo.cpp:
2431         * dom/ContainerNode.h:
2432         * dom/Node.cpp:
2433         (WebCore::Node::traverseNextNode):
2434         (WebCore):
2435         (WebCore::Node::traverseNextSibling):
2436         * dom/Node.h:
2437         (Node):
2438
2439 2012-05-08  Hironori Bono  <hbono@chromium.org>
2440
2441         [Chromium] Fix the position of an RTL resizer
2442         https://bugs.webkit.org/show_bug.cgi?id=80640
2443
2444         Reviewed by Tony Chang.
2445
2446         When rendering an RTL resizer, my r110073 renders it at the same position as the
2447         one used for rendering a LTR resizer. Unfortunately, this code renders the RTL
2448         resizer image at an incorrect position on Mac and Linux. This change uses the
2449         correct formula to calculate the position of an RTL resizer.
2450
2451         Test: platform/chromium/scrollbars/rtl-resizer-position.html
2452
2453         * rendering/RenderLayer.cpp:
2454         (WebCore::RenderLayer::drawPlatformResizerImage):
2455
2456 2012-05-08  Andreas Kling  <kling@webkit.org>
2457
2458         Element: isURLAttribute() should take a const Attribute&.
2459         <http://webkit.org/b/85890>
2460
2461         Reviewed by Anders Carlsson.
2462
2463         Change isURLAttribute(Attribute*) to isURLAttribute(const Attribute&) to enforce
2464         the fact that the Attribute can't be null, and shouldn't be mutated, at compile-time.
2465         Also sprinkle OVERRIDE while we're at it.
2466
2467         * dom/Element.cpp:
2468         (WebCore::Element::getURLAttribute):
2469         (WebCore::Element::getNonEmptyURLAttribute):
2470         * dom/Element.h:
2471         (WebCore::Element::isURLAttribute):
2472         * editing/MarkupAccumulator.cpp:
2473         (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
2474         (WebCore::MarkupAccumulator::appendAttribute):
2475         * editing/markup.cpp:
2476         (WebCore::completeURLs):
2477         * html/HTMLAnchorElement.cpp:
2478         (WebCore::HTMLAnchorElement::isURLAttribute):
2479         * html/HTMLAnchorElement.h:
2480         * html/HTMLBaseElement.cpp:
2481         (WebCore::HTMLBaseElement::isURLAttribute):
2482         * html/HTMLBaseElement.h:
2483         * html/HTMLBodyElement.cpp:
2484         (WebCore::HTMLBodyElement::isURLAttribute):
2485         * html/HTMLBodyElement.h:
2486         * html/HTMLButtonElement.cpp:
2487         (WebCore::HTMLButtonElement::isURLAttribute):
2488         * html/HTMLButtonElement.h:
2489         * html/HTMLElement.cpp:
2490         (WebCore::HTMLElement::isURLAttribute):
2491         * html/HTMLElement.h:
2492         * html/HTMLEmbedElement.cpp:
2493         (WebCore::HTMLEmbedElement::isURLAttribute):
2494         * html/HTMLEmbedElement.h:
2495         * html/HTMLFormElement.cpp:
2496         (WebCore::HTMLFormElement::isURLAttribute):
2497         * html/HTMLFormElement.h:
2498         * html/HTMLFrameElementBase.cpp:
2499         (WebCore::HTMLFrameElementBase::isURLAttribute):
2500         * html/HTMLFrameElementBase.h:
2501         (HTMLFrameElementBase):
2502         * html/HTMLHtmlElement.cpp:
2503         (WebCore::HTMLHtmlElement::isURLAttribute):
2504         * html/HTMLHtmlElement.h:
2505         * html/HTMLImageElement.cpp:
2506         (WebCore::HTMLImageElement::isURLAttribute):
2507         * html/HTMLImageElement.h:
2508         * html/HTMLInputElement.cpp:
2509         (WebCore::HTMLInputElement::isURLAttribute):
2510         * html/HTMLInputElement.h:
2511         * html/HTMLLinkElement.cpp:
2512         (WebCore::HTMLLinkElement::isURLAttribute):
2513         * html/HTMLLinkElement.h:
2514         * html/HTMLMediaElement.cpp:
2515         (WebCore::HTMLMediaElement::isURLAttribute):
2516         * html/HTMLMediaElement.h:
2517         * html/HTMLModElement.cpp:
2518         (WebCore::HTMLModElement::isURLAttribute):
2519         * html/HTMLModElement.h:
2520         * html/HTMLObjectElement.cpp:
2521         (WebCore::HTMLObjectElement::isURLAttribute):
2522         * html/HTMLObjectElement.h:
2523         * html/HTMLParamElement.cpp:
2524         (WebCore::HTMLParamElement::isURLAttribute):
2525         * html/HTMLParamElement.h:
2526         * html/HTMLQuoteElement.cpp:
2527         (WebCore::HTMLQuoteElement::isURLAttribute):
2528         * html/HTMLQuoteElement.h:
2529         * html/HTMLScriptElement.cpp:
2530         (WebCore::HTMLScriptElement::isURLAttribute):
2531         * html/HTMLScriptElement.h:
2532         * html/HTMLSourceElement.cpp:
2533         (WebCore::HTMLSourceElement::isURLAttribute):
2534         * html/HTMLSourceElement.h:
2535         * html/HTMLTableCellElement.cpp:
2536         (WebCore::HTMLTableCellElement::isURLAttribute):
2537         * html/HTMLTableCellElement.h:
2538         * html/HTMLTableElement.cpp:
2539         (WebCore::HTMLTableElement::isURLAttribute):
2540         * html/HTMLTableElement.h:
2541         * html/HTMLTrackElement.cpp:
2542         (WebCore::HTMLTrackElement::isURLAttribute):
2543         * html/HTMLTrackElement.h:
2544         * html/HTMLVideoElement.cpp:
2545         (WebCore::HTMLVideoElement::isURLAttribute):
2546         * html/HTMLVideoElement.h:
2547         * svg/SVGScriptElement.cpp:
2548         (WebCore::SVGScriptElement::isURLAttribute):
2549         * svg/SVGScriptElement.h:
2550
2551 2012-05-08  Stephen Chenney  <schenney@chromium.org>
2552
2553         Shrink ElementAttributeData by factoring out Attr object count.
2554         https://bugs.webkit.org/show_bug.cgi?id=85825
2555
2556         Unreviewed build fix.
2557
2558         * dom/ElementAttributeData.cpp:
2559         (WebCore::attrListForElement): Was returning false instead of 0 for a pointer value. Now returns 0.
2560
2561 2012-05-08  Andreas Kling  <kling@webkit.org>
2562
2563         Element: Merge idAttributeChanged() into attributeChanged().
2564         <http://webkit.org/b/85885>
2565
2566         Reviewed by Antti Koivisto.
2567
2568         No new tests, code churn only.
2569
2570         * dom/Element.h:
2571         * dom/Element.cpp:
2572         (WebCore::Element::attributeChanged): There's no need for this to be a standalone function anymore.
2573
2574 2012-05-08  Andreas Kling  <kling@webkit.org>
2575
2576         Shrink ElementAttributeData by factoring out Attr object count.
2577         <http://webkit.org/b/85825>
2578
2579         Reviewed by Antti Koivisto.
2580
2581         Stop tracking the number of Attr objects that point to a given Element on the
2582         Element itself and manage this by having a global hashmap of Element => AttrList,
2583         where AttrList is a vector of (pointers to) the associated Attr objects.
2584
2585         This shrinks ElementAttributeData by one integer, effectively reducing memory
2586         consumption by ~530kB when viewing the full HTML5 spec at <http://whatwg.org/c>.
2587
2588         * dom/ElementAttributeData.h:
2589         (ElementAttributeData):
2590
2591             Remove m_attrCount...
2592
2593         * dom/Node.h:
2594         (WebCore::Node::hasAttrList):
2595         (WebCore::Node::setHasAttrList):
2596         (WebCore::Node::clearHasAttrList):
2597
2598             ...replacing it with a Node flag that tells us whether there's an Attr
2599             object map for this Node (only applies to Elements.)
2600
2601         * dom/ElementAttributeData.cpp:
2602         (WebCore::attrListMap):
2603         (WebCore::attrListForElement):
2604         (WebCore::ensureAttrListForElement):
2605         (WebCore::removeAttrListForElement):
2606         (WebCore::ElementAttributeData::attrIfExists):
2607         (WebCore::ElementAttributeData::ensureAttr):
2608         (WebCore::ElementAttributeData::setAttr):
2609         (WebCore::ElementAttributeData::removeAttr):
2610         (WebCore::ElementAttributeData::detachAttributesFromElement):
2611
2612             Map Element => per-Element AttrList in a global hash.
2613
2614 2012-05-08  Chris Guan  <chris.guan@torchmobile.com.cn>
2615
2616         [Blackberry] remove m_isRequestedByPlugin in ResourceRequest
2617         https://bugs.webkit.org/show_bug.cgi?id=84559
2618
2619         Reviewed by Antonio Gomes.
2620
2621         ResourceRequest is a network level abstraction, and it should
2622         not know anything about web concepts such as plug-ins, and Blackberry
2623         does not need m_isRequestedByPlugin any longer, So clean up all related
2624         code.
2625
2626         Tested on a website of http://edition.cnn.com, a new window should be
2627         opened only when user has a singe tap gesture on a plugin element.
2628
2629         * platform/network/blackberry/ResourceRequest.h:
2630         (WebCore::ResourceRequest::ResourceRequest):
2631         (ResourceRequest):
2632         (CrossThreadResourceRequestData):
2633         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
2634         (WebCore::ResourceRequest::doPlatformCopyData):
2635         (WebCore::ResourceRequest::doPlatformAdopt):
2636
2637 2012-05-03  Alexander Pavlov  <apavlov@chromium.org>
2638
2639         Extra line-breaks added when copying from source.
2640         https://bugs.webkit.org/show_bug.cgi?id=85282
2641
2642         Reviewed by Ryosuke Niwa.
2643
2644         The code used to replace any \n by \r\n, even the one that had a preceding \r, resulting in \r\r\n.
2645         This change introduces a check for the preceding \r when replacing \n's.
2646
2647         Test: platform/win/editing/pasteboard/pasting-crlf-isnt-translated-to-crcrlf-win.html
2648
2649         * platform/chromium/ClipboardUtilitiesChromium.cpp:
2650         (WebCore::replaceNewlinesWithWindowsStyleNewlines):
2651         * platform/win/ClipboardUtilitiesWin.cpp:
2652         (WebCore::replaceNewlinesWithWindowsStyleNewlines):
2653
2654 2012-05-08  Adam Barth  <abarth@webkit.org>
2655
2656         OS(ANDROID) JNI AttachCurrentThread take JNIEnv** as a parameter, not void**
2657         https://bugs.webkit.org/show_bug.cgi?id=85869
2658
2659         Reviewed by Eric Seidel.
2660
2661         According to
2662         http://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/invocation.html,
2663         AttachCurrentThread takes a JNIEnv** rather than a void**.  Apparently,
2664         most implementations actually take a void**.  The OS(ANDROID)
2665         implementation, however, actually takes an JNIEnv**.  This patch
2666         introduces a typedef to give each implementation what it desires.
2667
2668         * bridge/jni/JNIUtility.cpp:
2669         (JSC::Bindings::getJNIEnv):
2670
2671 2012-05-08  Balazs Kelemen  <kbalazs@webkit.org>
2672
2673         [Qt] X11 plugins need to be reworked for Qt5+WK1
2674         https://bugs.webkit.org/show_bug.cgi?id=80691
2675
2676         Reviewed by Simon Hausmann.
2677
2678         Implement basic windowless plugin support with Qt5.
2679         The solution is the same that has been chosen for
2680         WebKit2. We get the content drawed by the plugin
2681         from the X server as an image, create a QImage
2682         from it and paint it to the window surface with QPainter.
2683         Performance is sufficient for basic video playback.
2684
2685         No new tests, covered by existing plugin tests.
2686
2687         * Target.pri:
2688         * WebCore.pri:
2689         * platform/qt/QWebPageClient.h:
2690         (QWebPageClient):
2691         * plugins/PluginView.h:
2692         (PluginView):
2693         * plugins/qt/PluginPackageQt.cpp:
2694         (WebCore::PluginPackage::isPluginBlacklisted):
2695         Blacklist plugins that are incompatible with Qt5.
2696         The only one I know about currently is skypebuttons
2697         but the list can be extended in the future.
2698         (WebCore):
2699         (WebCore::PluginPackage::load):
2700         * plugins/qt/PluginViewQt.cpp:
2701         (X11Environment):
2702         (WebCore):
2703         (WebCore::x11Display):
2704         (WebCore::x11Screen):
2705         (WebCore::rootWindowID):
2706         (WebCore::displayDepth):
2707         (WebCore::syncX):
2708         (WebCore::PluginView::platformPageClient): Added a safe
2709         convenience getter for the QWebpageClient.
2710         (WebCore::PluginView::updatePluginWidget):
2711         (WebCore::PluginView::setFocus):
2712         (WebCore::setupGraphicsExposeEvent):
2713         (WebCore::PluginView::paintUsingXPixmap):
2714         (WebCore::setSharedXEventFields):
2715         (WebCore::PluginView::initXEvent):
2716         (WebCore::PluginView::setXKeyEventSpecificFields):
2717         (WebCore::setXButtonEventSpecificFields):
2718         (WebCore::setXMotionEventSpecificFields):
2719         (WebCore::setXCrossingEventSpecificFields):
2720         (WebCore::PluginView::setNPWindowIfNeeded):
2721         (WebCore::PluginView::setParentVisible):
2722         (WebCore::PluginView::platformGetValue):
2723         (WebCore::PluginView::invalidateRect):
2724         (WebCore::getVisualAndColormap):
2725         Refactored this function to make it more clear
2726         what does it actually do.
2727         (WebCore::PluginView::platformStart):
2728         (WebCore::PluginView::platformDestroy):
2729
2730 2012-05-07  Antti Koivisto  <antti@apple.com>
2731
2732         Inline Node::traverseNextNode
2733         https://bugs.webkit.org/show_bug.cgi?id=85844
2734
2735         Reviewed by Ryosuke Niwa.
2736
2737         Inline traverseNextNode and traverseNextSibling to reduce entry/exit overhead and allow better code generation
2738         for many hot loops. Also added separate versions of stayWithin and unscoped cases (the function is
2739         so simple that this seemed like the cleanest way to do it, the most reliable too) and used UNLIKELY for the 
2740         end-of-traversal conditions.
2741         
2742         The traversal function can show up to ~1% in normal page loading profiles.
2743         
2744         run-perf-tests seems to think this is a progression in some subtests though bots will tell for certain.
2745
2746         * WebCore.exp.in:
2747         * dom/ContainerNode.h:
2748         
2749             Following the existing pattern, function bodies go to ContainerNode.h so they can call parentNode().
2750             (which returns ContainerNode, not Node).
2751
2752         (WebCore::Node::traverseNextNode):
2753         (WebCore):
2754         (WebCore::Node::traverseNextSibling):
2755         * dom/Node.cpp:
2756         (WebCore):
2757         * dom/Node.h:
2758         (Node):
2759
2760 2012-05-05  Pavel Feldman  <pfeldman@chromium.org>
2761
2762         Web Inspector: make JavaScriptSourceFrame use breakpoint manager's breakpoints store.
2763         https://bugs.webkit.org/show_bug.cgi?id=85714
2764
2765         Reviewed by Yury Semikhatsky.
2766
2767         It is currently using its own copy of breakpoints which is not necessary.
2768
2769         * inspector/front-end/BreakpointManager.js:
2770         (WebInspector.BreakpointManager):
2771         (WebInspector.BreakpointManager.prototype.restoreBreakpoints):
2772         (WebInspector.BreakpointManager.prototype.setBreakpoint):
2773         (WebInspector.BreakpointManager.prototype._innerSetBreakpoint):
2774         (WebInspector.BreakpointManager.prototype.findBreakpoint):
2775         (WebInspector.BreakpointManager.prototype.reset):
2776         (WebInspector.BreakpointManager.prototype._debuggerReset):
2777         (WebInspector.BreakpointManager.prototype._breakpointResolved):
2778         (WebInspector.BreakpointManager.prototype._uiLocationAdded):
2779         (WebInspector.BreakpointManager.prototype._uiLocationRemoved):
2780         (WebInspector.BreakpointManager.Breakpoint.prototype._breakpointStorageId):
2781         (WebInspector.BreakpointManager.Storage.prototype._restoreBreakpoints):
2782         (set WebInspector.BreakpointManager.Storage.Item):
2783         * inspector/front-end/JavaScriptSource.js:
2784         (WebInspector.JavaScriptSource.prototype.consoleMessagesCleared):
2785         (WebInspector.JavaScriptSource.prototype.breakpointStorageId):
2786         * inspector/front-end/JavaScriptSourceFrame.js:
2787         (WebInspector.JavaScriptSourceFrame):
2788         (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged):
2789         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu):
2790         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
2791         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
2792         (WebInspector.JavaScriptSourceFrame.prototype._breakpointAdded):
2793         (WebInspector.JavaScriptSourceFrame.prototype._breakpointRemoved):
2794         (WebInspector.JavaScriptSourceFrame.prototype.onTextViewerContentLoaded):
2795         (WebInspector.JavaScriptSourceFrame.prototype._continueToLine):
2796         (WebInspector.JavaScriptSourceFrame.prototype._updateBreakpointsAfterLiveEdit):
2797
2798 2012-05-07  Pavel Feldman  <pfeldman@chromium.org>
2799
2800         Web Inspector: do not create locations for resolved provisional breakpoints
2801         https://bugs.webkit.org/show_bug.cgi?id=85716
2802
2803         Reviewed by Yury Semikhatsky.
2804
2805         Marked provisional breakpoints as such.
2806
2807         * inspector/front-end/BreakpointManager.js:
2808         (WebInspector.BreakpointManager.prototype._debuggerReset):
2809         (WebInspector.BreakpointManager.prototype._breakpointResolved):
2810
2811 2012-05-07  Simon Fraser  <simon.fraser@apple.com>
2812
2813         Compositing layers with transformed children not large enough to show contents
2814         https://bugs.webkit.org/show_bug.cgi?id=85855
2815
2816         Reviewed by Dan Bernstein.
2817         
2818         r114518 added a code path to RenderLayer::calculateLayerBounds() which
2819         does an early return if the layer has clipping. However, this code
2820         path omitted to take local transforms into account.
2821         
2822         Fix is to handle transforms as we do in the non-clipped case.
2823
2824         Test: compositing/geometry/bounds-clipped-composited-child.html
2825
2826         * rendering/RenderLayer.cpp:
2827         (WebCore::RenderLayer::calculateLayerBounds):
2828
2829 2012-05-07  Scott Graham  <scottmg@chromium.org>
2830
2831         Fix signed/unsigned mismatch
2832         https://bugs.webkit.org/show_bug.cgi?id=85845
2833
2834         Make literal in assert be unsigned to match comparison on LHS. Avoids
2835         warning on Windows.
2836
2837         Reviewed by Eric Seidel.
2838
2839         No new tests. No intended functionality change.
2840
2841         * rendering/RenderTableSection.cpp:
2842         (WebCore::RenderTableSection::splitColumn):
2843
2844 2012-05-07  Emil A Eklund  <eae@chromium.org>
2845
2846         Fix performance regression for floats caused by LayoutUnit change
2847         https://bugs.webkit.org/show_bug.cgi?id=85834
2848
2849         Reviewed by Eric Seidel.
2850
2851         Fix performance regression caused by r116009 by disabling the use of
2852         64bit math in FractionalLayoutUnit, simplifying the pixelSnappedMaxX/Y
2853         math, inlining a couple of methods and replacing the literal 0 (zero)
2854         with ZERO_LAYOUT_UNIT.
2855
2856         No new tests, no change in functionality.
2857
2858         * platform/FractionalLayoutUnit.h:
2859         (WebCore::boundedMultiply):
2860         (WebCore::operator*):
2861         (WebCore::operator/):
2862         Disable the use of 64bit (long long) math in the case where the fraction
2863         is set to 1.
2864         
2865         * platform/graphics/FractionalLayoutRect.h:
2866         (WebCore::FractionalLayoutRect::pixelSnappedMaxX):
2867         (WebCore::FractionalLayoutRect::pixelSnappedMaxY):
2868         Simplify the pixel snapping logic for maxX/maxY.
2869         
2870         * rendering/RenderBlock.cpp:
2871         (WebCore::RenderBlock::isSelfCollapsingBlock):
2872         (WebCore::RenderBlock::layoutBlock):
2873         (WebCore::RenderBlock::computeOverflow):
2874         (WebCore::RenderBlock::clearFloatsIfNeeded):
2875         (WebCore::RenderBlock::paintChildren):
2876         (WebCore::RenderBlock::blockSelectionGap):
2877         (WebCore::RenderBlock::logicalLeftSelectionGap):
2878         (WebCore::RenderBlock::logicalRightSelectionGap):
2879         (WebCore::RenderBlock::computeLogicalLocationForFloat):
2880         (WebCore::RenderBlock::lowestFloatLogicalBottom):
2881         (WebCore::RenderBlock::getClearDelta):
2882         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
2883         (WebCore::RenderBlock::addFocusRingRects):
2884         (WebCore::RenderBlock::adjustLinePositionForPagination):
2885         * rendering/RenderBlock.h:
2886         (WebCore::RenderBlock::availableLogicalWidthForLine):
2887         (WebCore::RenderBlock::availableLogicalWidthForContent):
2888         (WebCore::RenderBlock::FloatingObject::x):
2889         (WebCore::RenderBlock::FloatingObject::maxX):
2890         (WebCore::RenderBlock::FloatingObject::y):
2891         (WebCore::RenderBlock::FloatingObject::maxY):
2892         (WebCore::RenderBlock::FloatingObject::width):
2893         (WebCore::RenderBlock::FloatingObject::height):
2894         (FloatingObject):
2895         (WebCore::RenderBlock::FloatingObject::pixelSnappedX):
2896         (WebCore::RenderBlock::FloatingObject::pixelSnappedMaxX):
2897         (WebCore::RenderBlock::FloatingObject::pixelSnappedY):
2898         (WebCore::RenderBlock::FloatingObject::pixelSnappedMaxY):
2899         (WebCore::RenderBlock::FloatingObject::pixelSnappedWidth):
2900         (WebCore::RenderBlock::FloatingObject::pixelSnappedHeight):
2901         (WebCore::RenderBlock::RenderBlockRareData::positiveMarginBeforeDefault):
2902         (WebCore::RenderBlock::RenderBlockRareData::negativeMarginBeforeDefault):
2903         (WebCore::RenderBlock::RenderBlockRareData::positiveMarginAfterDefault):
2904         (WebCore::RenderBlock::RenderBlockRareData::negativeMarginAfterDefault):
2905         * rendering/RenderBoxModelObject.cpp:
2906         (WebCore::accumulateRelativePositionOffsets):
2907         (WebCore::RenderBoxModelObject::offsetLeft):
2908         (WebCore::RenderBoxModelObject::offsetTop):
2909         (WebCore::RenderBoxModelObject::computedCSSPaddingTop):
2910         (WebCore::RenderBoxModelObject::computedCSSPaddingBottom):
2911         (WebCore::RenderBoxModelObject::computedCSSPaddingLeft):
2912         (WebCore::RenderBoxModelObject::computedCSSPaddingRight):
2913         (WebCore::RenderBoxModelObject::computedCSSPaddingBefore):
2914         (WebCore::RenderBoxModelObject::computedCSSPaddingAfter):
2915         (WebCore::RenderBoxModelObject::computedCSSPaddingStart):
2916         (WebCore::RenderBoxModelObject::computedCSSPaddingEnd):
2917
2918 2012-05-07  Dongwoo Im  <dw.im@samsung.com>
2919
2920         width/height attributes of input element cannot be accessed by JavaScript.
2921         https://bugs.webkit.org/show_bug.cgi?id=70304
2922
2923         Reviewed by Darin Adler.
2924
2925         If the type of input element is image button, width/height attributes should be supported.
2926         These attributes are defined in HTML5 spec.
2927         http://www.w3.org/TR/html5/the-map-element.html#attr-dim-width
2928
2929         Tests: fast/forms/input-width-height-attributes-without-renderer-loaded-image.html
2930                fast/forms/input-width-height-attributes-without-renderer-not-loaded-image.html
2931                fast/forms/input-width-height-attributes-without-renderer.html
2932                fast/forms/input-width-height-attributes.html
2933
2934         * html/HTMLInputElement.cpp: Add setter/getter functions to query/set width/height of input element.
2935         (WebCore):
2936         (WebCore::HTMLInputElement::height): Gets height of input element.
2937         (WebCore::HTMLInputElement::width): Gets width of input element.
2938         (WebCore::HTMLInputElement::setHeight): Sets height of input element.
2939         (WebCore::HTMLInputElement::setWidth): Sets width of input element.
2940         * html/HTMLInputElement.h: Add public prototype.
2941         (HTMLInputElement):
2942         * html/HTMLInputElement.idl: Add width/height attributes.
2943         * html/ImageInputType.cpp: Add getter functions if the element is an image button.
2944         (WebCore):
2945         (WebCore::ImageInputType::height): Gets height of input element.
2946         (WebCore::ImageInputType::width): Gets width of input element.
2947         * html/ImageInputType.h: Add prototype.
2948         (ImageInputType):
2949         * html/InputType.cpp: Add getter functions.
2950         (WebCore::InputType::height): Returns zero.
2951         (WebCore):
2952         (WebCore::InputType::width): Returns zero.
2953         * html/InputType.h: Add prototype.
2954         (InputType):
2955
2956 2012-05-07  Kinuko Yasuda  <kinuko@chromium.org>
2957
2958         Support cross-filesystem operations in FileSystem API
2959         https://bugs.webkit.org/show_bug.cgi?id=84135
2960
2961         Reviewed by David Levin.
2962
2963         Currently we pass Entry's fullPath to AsyncFileSystem layer where
2964         we convert the given path to filesystem URL which includes origin and
2965         filesystem type information, but in that way we cannot handle
2966         cross-filesystem operations (e.g. cross-filesystem copy and move)
2967         well since we end up with always attaching the source filesystem's
2968         origin and type information for argument paths.
2969
2970         This patch does:
2971         - change AsyncFileSystem's operation methods not to take entry paths
2972           but complete filesystem URLs.
2973         - move type and rootURL information from AsyncFileSystem instance into
2974           DOMFileSystemBase instance (platform layer to Modules/filesystem layer)
2975         - move filesystem-type related code in AsyncFileSystemChromium.cpp into
2976           DOMFileSystemChromium.cpp, which implements chromioum-specific
2977           DOMFileSystem code.
2978         - move platform/FileSystemType.h into Modules/filesystem/FileSystemType.h.
2979         - adding FileSystemType.h entry to build files (e.g. WebCore.gypi, WebCore.xcodeproj etc)
2980
2981         Test: fast/filesystem/cross-filesystem-op.html
2982
2983         * Modules/filesystem/DOMFileSystem.cpp:
2984         (WebCore::DOMFileSystem::create):
2985         (WebCore::DOMFileSystem::DOMFileSystem):
2986         (WebCore::DOMFileSystem::createWriter):
2987         (WebCore::DOMFileSystem::createFile):
2988         * Modules/filesystem/DOMFileSystem.h:
2989         * Modules/filesystem/DOMFileSystemBase.cpp:
2990         (WebCore::DOMFileSystemBase::DOMFileSystemBase):
2991         (WebCore::DOMFileSystemBase::createFileSystemURL): Added as an internal
2992         implementation of Entry.toURL().
2993         (WebCore::DOMFileSystemBase::getMetadata):
2994         (WebCore::verifyAndGetDestinationPathForCopyOrMove):
2995         (WebCore::DOMFileSystemBase::move):
2996         (WebCore::DOMFileSystemBase::copy):
2997         (WebCore::DOMFileSystemBase::remove):
2998         (WebCore::DOMFileSystemBase::removeRecursively):
2999         (WebCore::DOMFileSystemBase::getParent):
3000         (WebCore::DOMFileSystemBase::getFile):
3001         (WebCore::DOMFileSystemBase::getDirectory):
3002         (WebCore::DOMFileSystemBase::readDirectory):
3003         * Modules/filesystem/DOMFileSystemBase.h: Changed to make each
3004         DOMFileSystemBase instance have filesystem type and rootURL (they were
3005         held by AsyncFileSystem previously)
3006         (WebCore::DOMFileSystemBase::create): Changed to take additional parameters.
3007         (WebCore::DOMFileSystemBase::type): Added.(Moved from AsyncFileSystem::type)
3008         (WebCore::DOMFileSystemBase::rootURL): Added.(Moved from AsyncFileSystem::rootURL).
3009         * Modules/filesystem/DOMFileSystemSync.cpp:
3010         (WebCore::DOMFileSystemSync::create):
3011         (WebCore::DOMFileSystemSync::DOMFileSystemSync):
3012         (WebCore::DOMFileSystemSync::createFile):
3013         (WebCore::DOMFileSystemSync::createWriter):
3014         * Modules/filesystem/DOMFileSystemSync.h:
3015         (WebCore::DOMFileSystemSync::create):
3016         * Modules/filesystem/DOMWindowFileSystem.cpp:
3017         (WebCore::DOMWindowFileSystem::webkitRequestFileSystem):
3018         (WebCore::DOMWindowFileSystem::webkitResolveLocalFileSystemURL):
3019         * Modules/filesystem/EntryBase.cpp:
3020         (WebCore::EntryBase::toURL):
3021         * Modules/filesystem/FileSystemCallbacks.cpp:
3022         (WebCore::FileSystemCallbacks::create):
3023         (WebCore::FileSystemCallbacks::FileSystemCallbacks):
3024         (WebCore::FileSystemCallbacks::didOpenFileSystem):
3025         (WebCore::ResolveURICallbacks::create):
3026         (WebCore::ResolveURICallbacks::ResolveURICallbacks):
3027         (WebCore::ResolveURICallbacks::didOpenFileSystem):
3028         * Modules/filesystem/FileSystemCallbacks.h:
3029         (FileSystemCallbacks):
3030         (ResolveURICallbacks):
3031         * Modules/filesystem/FileSystemType.h: Renamed from Source/WebCore/platform/FileSystemType.h.
3032         * Modules/filesystem/LocalFileSystem.cpp:
3033         (WebCore::openFileSystem):
3034         (WebCore::LocalFileSystem::readFileSystem):
3035         (WebCore::LocalFileSystem::requestFileSystem):
3036         * Modules/filesystem/LocalFileSystem.h:
3037         * Modules/filesystem/WorkerContextFileSystem.cpp:
3038         (WebCore::WorkerContextFileSystem::webkitRequestFileSystem):
3039         (WebCore::WorkerContextFileSystem::webkitRequestFileSystemSync):
3040         (WebCore::WorkerContextFileSystem::webkitResolveLocalFileSystemURL):
3041         (WebCore::WorkerContextFileSystem::webkitResolveLocalFileSystemSyncURL):
3042         * Modules/filesystem/chromium/DOMFileSystemChromium.cpp: Added for chromium-specific
3043         implementation. Almost all of the code is moved from AsyncFileSystemChromium.
3044         (WebCore::DOMFileSystemBase::isValidType):
3045         (WebCore::DOMFileSystemBase::crackFileSystemURL):
3046         (WebCore::DOMFileSystemBase::supportsToURL):
3047         (WebCore::DOMFileSystemBase::createFileSystemURL):
3048         (WebCore::DOMFileSystemChromium::createIsolatedFileSystem):
3049         * Modules/filesystem/chromium/DOMFileSystemChromium.h: Added.
3050         * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp:
3051         (WebCore::DataTransferItemFileSystem::webkitGetAsEntry):
3052         * Modules/filesystem/chromium/DraggedIsolatedFileSystem.cpp:
3053         (WebCore::DraggedIsolatedFileSystem::getDOMFileSystem):
3054         * WebCore.gypi:
3055         * platform/AsyncFileSystem.cpp:
3056         (WebCore::AsyncFileSystem::openFileSystem):
3057         * platform/AsyncFileSystem.h:
3058         (AsyncFileSystem):
3059         (WebCore::AsyncFileSystem::AsyncFileSystem):
3060         * platform/AsyncFileSystemCallbacks.h:
3061         (WebCore::AsyncFileSystemCallbacks::didOpenFileSystem):
3062         * platform/blackberry/AsyncFileSystemBlackBerry.cpp:
3063         (WebCore::AsyncFileSystem::create):
3064         (WebCore::AsyncFileSystem::openFileSystem):
3065         (WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry):
3066         (WebCore::AsyncFileSystemBlackBerry::move):
3067         (WebCore::AsyncFileSystemBlackBerry::copy):
3068         (WebCore::AsyncFileSystemBlackBerry::remove):
3069         (WebCore::AsyncFileSystemBlackBerry::removeRecursively):
3070         (WebCore::AsyncFileSystemBlackBerry::readMetadata):
3071         (WebCore::AsyncFileSystemBlackBerry::createFile):
3072         (WebCore::AsyncFileSystemBlackBerry::createDirectory):
3073         (WebCore::AsyncFileSystemBlackBerry::fileExists):
3074         (WebCore::AsyncFileSystemBlackBerry::directoryExists):
3075         (WebCore::AsyncFileSystemBlackBerry::readDirectory):
3076         (WebCore::AsyncFileSystemBlackBerry::createWriter):
3077         (WebCore::AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
3078         * platform/blackberry/AsyncFileSystemBlackBerry.h:
3079         * platform/chromium/PlatformSupport.h:
3080         * platform/gtk/AsyncFileSystemGtk.cpp:
3081         (WebCore::AsyncFileSystem::create):
3082         (WebCore::AsyncFileSystem::openFileSystem):
3083         (WebCore::AsyncFileSystemGtk::AsyncFileSystemGtk):
3084         (WebCore::AsyncFileSystemGtk::move):
3085         (WebCore::AsyncFileSystemGtk::copy):
3086         (WebCore::AsyncFileSystemGtk::remove):
3087         (WebCore::AsyncFileSystemGtk::removeRecursively):
3088         (WebCore::AsyncFileSystemGtk::readMetadata):
3089         (WebCore::AsyncFileSystemGtk::createFile):
3090         (WebCore::AsyncFileSystemGtk::createDirectory):
3091         (WebCore::AsyncFileSystemGtk::fileExists):
3092         (WebCore::AsyncFileSystemGtk::directoryExists):
3093         (WebCore::AsyncFileSystemGtk::readDirectory):
3094         (WebCore::AsyncFileSystemGtk::createWriter):
3095         * platform/gtk/AsyncFileSystemGtk.h:
3096
3097         * GNUmakefile.list.am: Added FileSystemType.h.
3098         * WebCore.gypi: Added FileSystemType.h.
3099         * WebCore.vcproj/WebCore.vcproj: Added FileSystemType.h.
3100         * WebCore.xcodeproj/project.pbxproj: Added FileSystemType.h.
3101
3102 2012-05-07  Adam Barth  <abarth@webkit.org>
3103
3104         [Chromium] Android wishes to use an empty implementation if AXObjectCache
3105         https://bugs.webkit.org/show_bug.cgi?id=85842
3106
3107         Reviewed by Eric Seidel.
3108
3109         Add proper HAVE(ACCESSIBILITY) ifdefs so that Chromium builds without
3110         accessibility.
3111
3112         * accessibility/chromium/AXObjectCacheChromium.cpp:
3113         * accessibility/chromium/AccessibilityObjectChromium.cpp:
3114
3115 2012-05-07  Greg Billock  <gbillock@google.com>
3116
3117         [Web Intents] Flagged-off implementation of an intent tag for registration.
3118         https://bugs.webkit.org/show_bug.cgi?id=73039
3119
3120         Reviewed by Adam Barth.
3121
3122         The intent tag is a declarative way for pages to register that they
3123         accept delivery of web intent invocations of particular types. See the
3124         spec at http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html
3125
3126         After discussion on the WhatWG list (see thread at
3127         http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-April/035301.html)
3128         the current plan is to combine declarative registration of Web
3129         Intents and protocol/content handlers with this tag. Alternatives
3130         considered were the meta and link tags.
3131
3132         * WebCore.gypi:
3133         * html/HTMLAttributeNames.in:
3134         * html/HTMLElementsAllInOne.cpp:
3135         * html/HTMLIntentElement.cpp: Added.
3136         (WebCore::HTMLIntentElement::HTMLIntentElement):
3137         (WebCore::HTMLIntentElement::create):
3138         (WebCore::HTMLIntentElement::insertedIntoDocument):
3139         * html/HTMLIntentElement.h: Added.
3140         * html/HTMLIntentElement.idl: Added.
3141         * html/HTMLTagNames.in:
3142         * loader/FrameLoaderClient.h:
3143         (WebCore::FrameLoaderClient::registerIntentService):
3144         * page/DOMWindow.idl:
3145
3146 2012-05-07  Dana Jansens  <danakj@chromium.org>
3147
3148         Region::intersects() and Region::contains() are slow due to copy overhead
3149         https://bugs.webkit.org/show_bug.cgi?id=81076
3150
3151         Reviewed by Anders Carlsson.
3152
3153         Testing contains() and intersects() requires a copy which ends up
3154         invoking a malloc on sufficiently complicated web pages, and slows down
3155         the test unnecessarily. These methods can be done by iterating over the
3156         Region::Shape values rather than making a copy of the entire region and
3157         manipulating it.
3158
3159         This uses Region::Shape::compareShapes() to walk the query regions and
3160         compute the result of the intersects or contains tests without making a
3161         copy.
3162
3163         This change improves the performance of the Region overlap testing for
3164         composited layers, and allows for testing contains() before unite() to
3165         avoid unnecessary copies of the Region when inserting into complex
3166         Regions. With a layout test that has 225 composited layers, and tests
3167         Region.intersects() for 1000 layers above them, this change decreases
3168         the running time of the test by 1.2% by avoiding a copy of the 225
3169         rects each time.
3170
3171         Unit test: RegionTest.intersectsRegion
3172                    RegionTest.containsRegion
3173
3174         * platform/graphics/Region.cpp:
3175         (WebCore::Region::contains):
3176         (WebCore::Region::intersects):
3177         (WebCore):
3178         (WebCore::Region::Shape::compareShapes):
3179         (Region::Shape::CompareContainsOperation):
3180         (WebCore::Region::Shape::CompareContainsOperation::aOutsideB):
3181         (WebCore::Region::Shape::CompareContainsOperation::bOutsideA):
3182         (WebCore::Region::Shape::CompareContainsOperation::aOverlapsB):
3183         (Region::Shape::CompareIntersectsOperation):
3184         (WebCore::Region::Shape::CompareIntersectsOperation::aOutsideB):
3185         (WebCore::Region::Shape::CompareIntersectsOperation::bOutsideA):
3186         (WebCore::Region::Shape::CompareIntersectsOperation::aOverlapsB):
3187         * platform/graphics/Region.h:
3188         (Shape):
3189
3190 2012-05-07  David Tseng  <dtseng@google.com>
3191
3192         Correct logical error in accessibilityIsIgnored.
3193         https://bugs.webkit.org/show_bug.cgi?id=85828
3194
3195         Reviewed by Chris Fleizach.
3196
3197         Covered by existing tests.
3198
3199         * accessibility/AccessibilityMenuListOption.cpp:
3200         (WebCore::AccessibilityMenuListOption::accessibilityIsIgnored):
3201         * accessibility/AccessibilityMenuListPopup.cpp:
3202         (WebCore::AccessibilityMenuListPopup::accessibilityIsIgnored):
3203
3204 2012-05-04  Zhenyao Mo  <zmo@google.com>
3205
3206         vertexAttribPointer needs to reject large negative offsets
3207         https://bugs.webkit.org/show_bug.cgi?id=85117
3208
3209         Reviewed by Kenneth Russell.
3210
3211         * html/canvas/WebGLRenderingContext.cpp: Use long long for GLsizeiptr and GLintptr
3212         (WebCore):
3213         (WebCore::WebGLRenderingContext::bufferData):
3214         (WebCore::WebGLRenderingContext::bufferSubData):
3215         (WebCore::WebGLRenderingContext::drawElements):
3216         (WebCore::WebGLRenderingContext::getVertexAttribOffset):
3217         (WebCore::WebGLRenderingContext::vertexAttribPointer):
3218         * html/canvas/WebGLRenderingContext.h: Ditto
3219         (WebGLRenderingContext):
3220         * html/canvas/WebGLRenderingContext.idl: Ditto
3221
3222 2012-05-07  Pravin D  <pravind.2k4@gmail.com>
3223
3224         :first-line text-decorations are not rendered
3225         https://bugs.webkit.org/show_bug.cgi?id=6047
3226
3227         Text-decorations are applied during paint phase. The style was not being properly selected in case of
3228         first line box. The patch fixes this. 
3229
3230         Reviewed by Eric Seidel.
3231
3232         Tests: fast/css/first-line-text-decoration-inherited-from-parent.html
3233                fast/css/first-line-text-decoration.html
3234
3235         * rendering/InlineTextBox.cpp:
3236         (WebCore::InlineTextBox::paintDecoration):
3237         Inform the decoration color retriever if this box is part of the first line box or not.
3238
3239         * rendering/RenderObject.cpp:
3240         (WebCore::decorationColor):
3241         Changed the argument from RenderObject* to RenderStyle*. As this function is just a helper to getTextDecorationColors
3242         as used RenderObject solely to retrieve the corresponding RenderStyle, which(RenderStyle*) was already available with the latter function. 
3243
3244         (WebCore::RenderObject::getTextDecorationColors):
3245         Take a new variable to check if first line style or the regular style has to be used.
3246         Sends RenderStyle* as an argument to decorationColor(). 
3247
3248         * rendering/RenderObject.h:
3249         (RenderObject):
3250
3251 2012-05-07  Julien Chaffraix  <jchaffraix@webkit.org>
3252
3253         Refactor windowClipRectForLayer to remove the explicit RenderLayer dependency
3254         https://bugs.webkit.org/show_bug.cgi?id=84090
3255
3256         Reviewed by David Hyatt.
3257
3258         No observable change in behavior.
3259
3260         The function name was ambiguous as it was not a general purpose function but was
3261         working directly on HTMLFrameOwnerElement. The rename makes this more obvious as
3262         well as removes the explicit dependency on RenderLayer.
3263
3264         One of the slight change of this refactoring is that we now always null-check the
3265         HTMLFrameOwnerElement's renderer as part windowClipRectForFrameOwner as I don't see
3266         any evidence for the other code paths not to hit that. Also we may recur more on our
3267         frame tree if we have no layer as we now call windowClipRect() in this case.
3268
3269         * page/FrameView.h:
3270         (FrameView):
3271         * plugins/PluginView.cpp:
3272         (WebCore::PluginView::windowClipRect):
3273         * WebCore.exp.in:
3274         * WebCore.order:
3275         * page/FrameView.cpp:
3276         (WebCore::FrameView::windowClipRect):
3277         Updated after windowClipRectForLayer name and signature change.
3278
3279         (WebCore::FrameView::windowClipRectForFrameOwner):
3280         This function now takes the HTMLFrameOwnerElement directly.
3281
3282         * plugins/PluginView.cpp:
3283         (WebCore::PluginView::PluginView):
3284         (WebCore::PluginView::create):
3285         * plugins/PluginView.h:
3286         (PluginView):
3287         Updated |m_element| to be an HTMLPlugInElement as this was what was
3288         passed by every caller. This makes the conversion to HTMLFrameOwnerElement
3289         possible.
3290
3291 2012-05-07  Enrica Casucci  <enrica@apple.com>
3292
3293         REGRESSION (r101575): Chinese input is broken when composing mail in iCloud using Safari.
3294         https://bugs.webkit.org/show_bug.cgi?id=85840
3295         <rdar://problem/11115520> 
3296         
3297         Reviewed by Alexey Proskuryakov.
3298
3299         The revision that broke this, introduced a way to sanitize the markup when deleting a range selection.
3300         iCloud listens for DOM modification events and clears the selection, altering the input method state.
3301         The fix consists in adding a paramenter to DeleteSelectionCommand to control when we sanitize the
3302         markup.
3303         
3304         * editing/CompositeEditCommand.cpp:
3305         (WebCore::CompositeEditCommand::deleteSelection):
3306         * editing/CompositeEditCommand.h:
3307         * editing/DeleteSelectionCommand.cpp:
3308         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
3309         (WebCore::DeleteSelectionCommand::doApply):
3310         * editing/DeleteSelectionCommand.h:
3311         (WebCore::DeleteSelectionCommand::create):
3312         * editing/InsertTextCommand.cpp:
3313         (WebCore::InsertTextCommand::doApply):
3314
3315 2012-05-07  Andy Estes  <aestes@apple.com>
3316
3317         ENABLE_IFRAME_SEAMLESS should be part of FEATURE_DEFINES.
3318
3319         * Configurations/FeatureDefines.xcconfig:
3320
3321 2012-05-06  Martin Robinson  <mrobinson@igalia.com>
3322
3323         [Cairo] Implement ImageBuffer::copyImage for BackingStoreCopy == DontCopyBackingStore
3324         https://bugs.webkit.org/show_bug.cgi?id=85728
3325
3326         Reviewed by Alejandro G. Castro.
3327
3328         No new tests. This should not change functionality, only increase performance.
3329
3330         * platform/graphics/cairo/ImageBufferCairo.cpp:
3331         (WebCore::ImageBuffer::copyImage): Add an implementation that knows how to avoid copying the backing store.
3332         (WebCore::ImageBuffer::draw): Use the copyImage constructor now that it knows how to
3333         avoid copying the backing store.
3334         (WebCore::ImageBuffer::drawPattern): Ditto.
3335         * platform/graphics/texmap/TextureMapperLayer.cpp:
3336         (WebCore::TextureMapperLayer::updateBackingStore): Use DontCopyBackingStore for Cairo
3337         as well.
3338
3339 2012-05-07  Noel Gordon  <noel.gordon@gmail.com>
3340
3341         [CG] Separate image encoding from dataURL construction
3342         https://bugs.webkit.org/show_bug.cgi?id=85782
3343
3344         Reviewed by Kenneth Russell.
3345
3346         Remove the implicit assumption that a dataURL is the only desired output format
3347         of the image encoding phase.
3348
3349         No new tests. No behavioral change. Covered by canvas 2d and 3d tests:
3350             canvas/philip/tests/*toDataURL*.html
3351             fast/canvas/webgl/premultiplyalpha-test.html
3352
3353         * platform/graphics/cg/ImageBufferCG.cpp:
3354         (WebCore::CGImageEncodeToData): Image encoding helper: encode the image using the
3355         uti-defined encoder (PNG/JPEG/etc) and output to the given CFMutableDataRef data.
3356         (WebCore):
3357         (WebCore::CGImageToDataURL): Refactor to use CGImageEncodeToData().
3358
3359 2012-05-07  Scott Graham  <scottmg@chromium.org>
3360
3361         [Chromium] Suppress switch-without-cases warning
3362         https://bugs.webkit.org/show_bug.cgi?id=85830
3363
3364         Warnings like 
3365         ...\webkit\CSSGrammar.cpp(2075) : warning C4065: switch statement contains 'default' but no 'case' labels
3366         are generated. These are bogus, so just suppress them in the build
3367         settings.
3368
3369         Reviewed by Dirk Pranke
3370
3371         No new tests, no intended functionlity change. Just changing compiler
3372         settings.
3373
3374         * WebCore.gyp/WebCore.gyp:
3375
3376 2012-05-07  Adrienne Walker  <enne@google.com>
3377
3378         [chromium] Allow for asymmetric tile sizes on composited tiled layers
3379         https://bugs.webkit.org/show_bug.cgi?id=85687
3380
3381         Reviewed by James Robinson.
3382
3383         Update TiledLayerChromium/CCLayerTilingData/TilingData to allow for a
3384         the width and height of tile sizes to differ. Modify TilingData to use
3385         IntSize everywhere for these width/height pairs.
3386
3387         Also, remove some unused functions from TilingData.
3388
3389         Test: TilingDataTest.*
3390
3391         * platform/graphics/chromium/TiledLayerChromium.cpp:
3392         (WebCore::TiledLayerChromium::TiledLayerChromium):
3393         (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption):
3394         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
3395         (WebCore::CCLayerTilingData::CCLayerTilingData):
3396         (WebCore::CCLayerTilingData::setTileSize):
3397         (WebCore):
3398         (WebCore::CCLayerTilingData::tileSize):
3399         (WebCore::CCLayerTilingData::operator=):
3400         (WebCore::CCLayerTilingData::tileRect):
3401         (WebCore::CCLayerTilingData::setBounds):
3402         (WebCore::CCLayerTilingData::bounds):
3403         * platform/graphics/chromium/cc/CCLayerTilingData.h:
3404         (CCLayerTilingData):
3405         * platform/graphics/gpu/Texture.cpp:
3406         (WebCore::Texture::Texture):
3407         (WebCore::Texture::create):
3408         (WebCore::Texture::load):
3409         (WebCore::Texture::updateSubRect):
3410         * platform/graphics/gpu/TilingData.cpp:
3411         (WebCore::TilingData::TilingData):
3412         (WebCore::TilingData::setTotalSize):
3413         (WebCore::TilingData::setMaxTextureSize):
3414         (WebCore::TilingData::tileXIndexFromSrcCoord):
3415         (WebCore::TilingData::tileYIndexFromSrcCoord):
3416         (WebCore::TilingData::tileBounds):
3417         (WebCore::TilingData::tileSizeX):
3418         (WebCore::TilingData::tileSizeY):
3419         (WebCore::TilingData::recomputeNumTiles):
3420         * platform/graphics/gpu/TilingData.h:
3421         (TilingData):
3422         (WebCore::TilingData::totalSize):
3423         (WebCore::TilingData::maxTextureSize):
3424         (WebCore::TilingData::TilingData):
3425
3426 2012-05-07  Raymond Toy  <rtoy@google.com>
3427
3428         ConvolverNode setBuffer() should not ASSERT on null buffer
3429         https://bugs.webkit.org/show_bug.cgi?id=85653
3430
3431         Reviewed by Chris Rogers.
3432
3433         Test: webaudio/convolver-setBuffer-null.html
3434
3435         * Modules/webaudio/ConvolverNode.cpp:
3436         (WebCore::ConvolverNode::setBuffer):  Don't ASSERT on null buffer.
3437
3438 2012-05-07  Ken Buchanan  <kenrb@chromium.org>
3439
3440         Crash due to positioned object list not being cleared during block flow split
3441         https://bugs.webkit.org/show_bug.cgi?id=85074
3442
3443         Reviewed by Abhishek Arya.
3444
3445         When an element is being split due to a column span element being
3446         inserted, any of its ancestors that are underneath the column
3447         containing block also get split. If an ancestor has an object in
3448         its positioned object list from a previous layout, then the list
3449         will have to be cleared because the positioned object could have moved
3450         to be under the continuation. This patch causes the list to be
3451         cleared.
3452
3453         * rendering/RenderBlock.cpp:
3454         (WebCore::RenderBlock::splitBlocks):
3455
3456 2012-05-07  Eric Seidel  <eric@webkit.org>
3457
3458         Add ENABLE_IFRAME_SEAMLESS so Apple can turn off SEAMLESS if needed
3459         https://bugs.webkit.org/show_bug.cgi?id=85822
3460
3461         Reviewed by Adam Barth.
3462
3463         * Configurations/FeatureDefines.xcconfig:
3464         * dom/Document.cpp:
3465         (WebCore::Document::shouldDisplaySeamlesslyWithParent):
3466
3467 2012-05-07  Shezan Baig  <shezbaig.wk@gmail.com>
3468
3469         Selection Background Color Error
3470         https://bugs.webkit.org/show_bug.cgi?id=80382
3471
3472         Reviewed by David Hyatt.
3473
3474         Determine the text colors and selection colors before painting the
3475         background behind the text.  This is because when determining whether
3476         to invert the selection background, the selection text color should be
3477         used instead of the regular text color.  With this patch, the selection
3478         text color is passed to 'paintSelection' so that the selection
3479         background can be compared against it, instead of comparing against the
3480         CSSPropertyColor value.
3481
3482         Test: fast/backgrounds/selection-background-color.html
3483
3484         * rendering/InlineTextBox.cpp:
3485         (WebCore::InlineTextBox::paint):
3486             Pass selection text color to paintSelection
3487
3488         (WebCore::InlineTextBox::paintSelection):
3489             Use the selection text color instead of CSSPropertyColor
3490
3491         * rendering/InlineTextBox.h:
3492         (InlineTextBox):
3493             Adjust signature of paintSelection to accept text color
3494
3495 2012-05-07  David Reveman  <reveman@chromium.org>
3496
3497         [Chromium] Use GL_CHROMIUM_command_buffer_query to throttle texture uploads.
3498         https://bugs.webkit.org/show_bug.cgi?id=81004
3499
3500         Reviewed by Adrienne Walker.
3501
3502         Add ThrottledTextureUploader class that uses GL_CHROMIUM_command_buffer_query
3503         to throttle texture uploads based on number of currently pending queries.
3504
3505         Unit test: ThrottledTextureUploaderTest.IsBusy
3506
3507         * WebCore.gypi:
3508         * platform/graphics/chromium/LayerRendererChromium.cpp:
3509         (WebCore::LayerRendererChromium::create):
3510         (WebCore::LayerRendererChromium::LayerRendererChromium):
3511         (WebCore::LayerRendererChromium::initializeSharedObjects):
3512         * platform/graphics/chromium/LayerRendererChromium.h:
3513         (LayerRendererChromium):
3514         * platform/graphics/chromium/TextureUploader.cpp: Removed.
3515         * platform/graphics/chromium/TextureUploader.h:
3516         (TextureUploader):
3517         * platform/graphics/chromium/ThrottledTextureUploader.cpp: Added.
3518         (WebCore):
3519         (WebCore::ThrottledTextureUploader::Query::Query):
3520         (WebCore::ThrottledTextureUploader::Query::~Query):
3521         (WebCore::ThrottledTextureUploader::Query::begin):
3522         (WebCore::ThrottledTextureUploader::Query::end):
3523         (WebCore::ThrottledTextureUploader::Query::isPending):
3524         (WebCore::ThrottledTextureUploader::Query::wait):
3525         (WebCore::ThrottledTextureUploader::ThrottledTextureUploader):
3526         (WebCore::ThrottledTextureUploader::~ThrottledTextureUploader):
3527         (WebCore::ThrottledTextureUploader::isBusy):
3528         (WebCore::ThrottledTextureUploader::beginUploads):
3529         (WebCore::ThrottledTextureUploader::endUploads):
3530         (WebCore::ThrottledTextureUploader::uploadTexture):
3531         (WebCore::ThrottledTextureUploader::processQueries):
3532         * platform/graphics/chromium/ThrottledTextureUploader.h: Copied from Source/WebCore/platform/graphics/chromium/TextureUploader.h.
3533         (WebCore):
3534         (ThrottledTextureUploader):
3535         (WebCore::ThrottledTextureUploader::create):
3536         (Query):
3537         (WebCore::ThrottledTextureUploader::Query::create):
3538         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3539         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
3540         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3541         (CCLayerTreeHostImpl):
3542         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3543         (UnthrottledTextureUploader):
3544         (WebCore::UnthrottledTextureUploader::create):
3545         (WebCore::UnthrottledTextureUploader::~UnthrottledTextureUploader):
3546         (WebCore::UnthrottledTextureUploader::isBusy):
3547         (WebCore::UnthrottledTextureUploader::beginUploads):
3548         (WebCore::UnthrottledTextureUploader::endUploads):
3549         (WebCore::UnthrottledTextureUploader::uploadTexture):
3550         (WebCore::UnthrottledTextureUploader::UnthrottledTextureUploader):
3551         (WebCore):
3552         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
3553         (WebCore::CCSingleThreadProxy::recreateContext):
3554         (WebCore::CCSingleThreadProxy::doCommit):
3555         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
3556         (WebCore::CCTextureUpdater::update):
3557         * platform/graphics/chromium/cc/CCTextureUpdater.h:
3558         (CCTextureUpdater):
3559         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3560         (WebCore):
3561         (UnthrottledTextureUploader):
3562         (WebCore::UnthrottledTextureUploader::create):
3563         (WebCore::UnthrottledTextureUploader::~UnthrottledTextureUploader):
3564         (WebCore::UnthrottledTextureUploader::isBusy):
3565         (WebCore::UnthrottledTextureUploader::beginUploads):
3566         (WebCore::UnthrottledTextureUploader::endUploads):
3567         (WebCore::UnthrottledTextureUploader::uploadTexture):
3568         (WebCore::UnthrottledTextureUploader::UnthrottledTextureUploader):
3569         (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
3570         (WebCore::CCThreadProxy::recreateContextOnImplThread):
3571
3572 2012-05-07  Rob Buis  <rbuis@rim.com>
3573
3574         Shrink SVGInlineTextBox object size
3575         https://bugs.webkit.org/show_bug.cgi?id=85805
3576
3577         Reviewed by Darin Adler.
3578
3579         Reduce the object size of SVGInlineTextBox by using bitfields. This
3580         should be 4 bytes on 32-bits and 8 bytes on 64-bits systems.
3581
3582         * rendering/svg/RenderSVGResource.h:
3583         * rendering/svg/SVGInlineTextBox.cpp:
3584         (ExpectedSVGInlineTextBoxSize):
3585         (WebCore):
3586         * rendering/svg/SVGInlineTextBox.h:
3587         (SVGInlineTextBox):
3588
3589 2012-05-07  Sheriff Bot  <webkit.review.bot@gmail.com>
3590
3591         Unreviewed, rolling out r116334.
3592         http://trac.webkit.org/changeset/116334
3593         https://bugs.webkit.org/show_bug.cgi?id=85816
3594
3595         Broke the Chromium Win/Mac compile (Requested by
3596         ojan_gardening on #webkit).
3597
3598         * WebCore.gypi:
3599         * platform/graphics/chromium/AnimationIdVendor.cpp: Removed.
3600         * platform/graphics/chromium/AnimationIdVendor.h: Removed.
3601         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3602         (std):
3603         (WebCore::GraphicsLayerChromium::updateNames):
3604         (WebCore::GraphicsLayerChromium::addAnimation):
3605         (WebCore::GraphicsLayerChromium::updateChildList):
3606         (WebCore::GraphicsLayerChromium::mapAnimationNameToId):
3607         * platform/graphics/chromium/GraphicsLayerChromium.h:
3608         (WebCore):
3609         (GraphicsLayerChromium):
3610         * platform/graphics/chromium/LinkHighlightLayerDelegate.cpp: Removed.
3611         * platform/graphics/chromium/LinkHighlightLayerDelegate.h: Removed.
3612
3613 2012-05-07  Adrienne Walker  <enne@google.com>
3614
3615         Fix containerForRepaint() assumption about non-null enclosingLayer()
3616         https://bugs.webkit.org/show_bug.cgi?id=85807
3617
3618         Reviewed by Simon Fraser.
3619
3620         * rendering/RenderObject.cpp:
3621         (WebCore::RenderObject::containerForRepaint):
3622
3623 2012-05-07  Alec Flett  <alecflett@chromium.org>
3624
3625         IndexedDB: Replace numeric constants with strings
3626         https://bugs.webkit.org/show_bug.cgi?id=84894
3627
3628         Reviewed by Tony Chang.
3629
3630         Test: storage/indexeddb/legacy-constants.html
3631
3632         Update IDBObjectStore.openCursor, IDBIndex.openCursor,
3633         IDBIndex.openKeyCursor, IDBDatabase.transaction,
3634         IDBCursor.direction, IDBTransaction.mode, and
3635         IDBRequest.readyState to meet the latest spec. All of these APIs
3636         now support string-based values in addition to the
3637         legacy/deprecated enum-based values.
3638
3639         * Modules/indexeddb/IDBCursor.cpp:
3640         (WebCore):
3641         (WebCore::IDBCursor::direction):
3642         (WebCore::IDBCursor::stringToDirection):
3643         (WebCore::IDBCursor::directionToString):
3644         * Modules/indexeddb/IDBCursor.h:
3645         (IDBCursor):
3646         * Modules/indexeddb/IDBCursor.idl:
3647         * Modules/indexeddb/IDBDatabase.cpp:
3648         (WebCore::IDBDatabase::transaction):
3649         (WebCore):
3650         * Modules/indexeddb/IDBDatabase.h:
3651         (IDBDatabase):
3652         * Modules/indexeddb/IDBDatabase.idl:
3653         * Modules/indexeddb/IDBIndex.cpp:
3654         (WebCore::IDBIndex::openCursor):
3655         (WebCore):
3656         (WebCore::IDBIndex::openKeyCursor):
3657         * Modules/indexeddb/IDBIndex.h:
3658         (WebCore::IDBIndex::openCursor):
3659         (IDBIndex):
3660         (WebCore::IDBIndex::openKeyCursor):
3661         * Modules/indexeddb/IDBIndex.idl:
3662         * Modules/indexeddb/IDBObjectStore.cpp:
3663         (WebCore::IDBObjectStore::openCursor):
3664         (WebCore):
3665         * Modules/indexeddb/IDBObjectStore.h:
3666         (WebCore::IDBObjectStore::openCursor):
3667         (IDBObjectStore):
3668         * Modules/indexeddb/IDBObjectStore.idl:
3669         * Modules/indexeddb/IDBRequest.cpp:
3670         (WebCore::IDBRequest::IDBRequest):
3671         (WebCore::IDBRequest::readyState):
3672         (WebCore::IDBRequest::markEarlyDeath):
3673         (WebCore::IDBRequest::resetReadyState):
3674         (WebCore::IDBRequest::abort):
3675         (WebCore::IDBRequest::finishCursor):
3676         (WebCore::IDBRequest::onSuccess):
3677         (WebCore::IDBRequest::stop):
3678         * Modules/indexeddb/IDBRequest.h:
3679         * Modules/indexeddb/IDBRequest.idl:
3680         * Modules/indexeddb/IDBTransaction.cpp:
3681         (WebCore):
3682         (WebCore::IDBTransaction::mode):
3683         (WebCore::IDBTransaction::stringToMode):
3684         (WebCore::IDBTransaction::modeToString):
3685         * Modules/indexeddb/IDBTransaction.h:
3686         (IDBTransaction):
3687         * Modules/indexeddb/IDBTransaction.idl:
3688
3689 2012-05-07  W. James MacLean  <wjmaclean@chromium.org>
3690
3691         [chromium] Create LinkHighlightLayerChromium class to provide link-highlight preview animations for GraphicsLayerChromium.
3692         https://bugs.webkit.org/show_bug.cgi?id=85084
3693
3694         Reviewed by Adrienne Walker.
3695
3696         Unit test provided.
3697
3698         Creates a layer delegate class to provide link highlight animations for link-preview feature.
3699         These are added to a GraphicsLayerChromium via provided methods. Moves dispensing of animation
3700         ids into a separate class.
3701
3702         * WebCore.gypi:
3703         * platform/graphics/chromium/AnimationIdVendor.cpp: Added.
3704         (WebCore):
3705         (WebCore::AnimationIdVendor::getNextAnimationId):
3706         (WebCore::AnimationIdVendor::getNextGroupId):
3707         * platform/graphics/chromium/AnimationIdVendor.h: Added.
3708         (WebCore):
3709         (AnimationIdVendor):
3710         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3711         (WebCore::GraphicsLayerChromium::updateNames):
3712         (WebCore::GraphicsLayerChromium::addAnimation):
3713         (WebCore::GraphicsLayerChromium::addLinkHighlightLayer):
3714         (WebCore):
3715         (WebCore::GraphicsLayerChromium::didFinishLinkHighlightLayer):
3716         (WebCore::GraphicsLayerChromium::updateChildList):
3717         (WebCore::GraphicsLayerChromium::mapAnimationNameToId):
3718         * platform/graphics/chromium/GraphicsLayerChromium.h:
3719         (WebCore):
3720         (GraphicsLayerChromium):
3721         * platform/graphics/chromium/LinkHighlightLayerDelegate.cpp: Added.
3722         (WebCore):
3723         (WebCore::LinkHighlightLayerDelegate::create):
3724         (WebCore::LinkHighlightLayerDelegate::LinkHighlightLayerDelegate):
3725         (WebCore::LinkHighlightLayerDelegate::~LinkHighlightLayerDelegate):
3726         (WebCore::LinkHighlightLayerDelegate::getContentLayer):
3727         (WebCore::LinkHighlightLayerDelegate::paintContents):
3728         (WebCore::LinkHighlightLayerDelegate::didScroll):
3729         (WebCore::LinkHighlightLayerDelegate::notifyAnimationStarted):
3730         (WebCore::LinkHighlightLayerDelegate::notifyAnimationFinished):
3731         * platform/graphics/chromium/LinkHighlightLayerDelegate.h: Added.
3732         (WebCore):
3733         (LinkHighlightLayerDelegate):
3734
3735 2012-05-07  Joshua Bell  <jsbell@chromium.org>
3736
3737         IndexedDB: LevelDB coding for bools is broken
3738         https://bugs.webkit.org/show_bug.cgi?id=85810
3739
3740         Reviewed by Tony Chang.
3741
3742         Code was appending to a pre-sized Vector, rather than using an
3743         index setter. This caused uninitialized data to be written out.
3744         Issue was detected on the Chromium side in http://crbug.com/126388
3745
3746         Tests: webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.*codeBool'
3747
3748         * Modules/indexeddb/IDBLevelDBCoding.cpp:
3749         (WebCore::IDBLevelDBCoding::encodeBool):
3750
3751 2012-05-07  Shawn Singh  <shawnsingh@chromium.org>
3752
3753         [chromium] CCMathUtil projectPoint needs to avoid divide-by-zero
3754         https://bugs.webkit.org/show_bug.cgi?id=85560
3755
3756         Reviewed by Adrienne Walker.
3757
3758         Unit test added: CCMathUtilTest.cpp - verifyProjectionOfPerpendicularPlane
3759         Unit test updated/renamed: CCLayerTreeHostCommonTest.cpp - verifyVisibleRectFor3dPerspectiveWhenClippedByW
3760
3761         The divide-by-zero occurs in an innocuous case where the layers
3762         are probably invisible anyway. However, producing Infs and NaNs
3763         could cause values to be used when un-intended, so its appropriate
3764         to handle the divide-by-zero correctly.
3765
3766         * platform/graphics/chromium/cc/CCMathUtil.cpp:
3767         (WebCore::projectPoint):
3768
3769 2012-05-07  Pravin D  <pravind.2k4@gmail.com>
3770
3771         Wrong positioning due to wrong width calculation wrt width:0
3772         https://bugs.webkit.org/show_bug.cgi?id=50135
3773
3774         Reviewed by Eric Seidel.
3775
3776         Test: fast/block/block-parent-with-zero-width-child.html
3777
3778         * rendering/RenderBlock.cpp:
3779         (WebCore::RenderBlock::computePreferredLogicalWidths):
3780         When width is fixed, the specified width must be taken, provided the value is positive.
3781         Width=0 case was being ignored.
3782
3783 2012-05-07  Noel Gordon  <noel.gordon@gmail.com>
3784
3785         [CG] ImageBuffer::ImageDataToDataURL: Remove alpha stuffing when encoding to JPEG
3786         https://bugs.webkit.org/show_bug.cgi?id=85779
3787
3788         Reviewed by Eric Seidel.
3789
3790         No change in behavior. Covered by fast/canvas/webgl/premultiplyalpha-test.html
3791
3792         * platform/graphics/cg/ImageBufferCG.cpp:
3793         (WebCore::ImageDataToDataURL): Remove the need to stuff the alpha channel with 255.
3794         Rename dataVector to premultipliedData and verify that its resize() worked. Rewrite
3795         the premultiplication loop without the alpha channel = 255 part and ask the CG JPEG
3796         encoder to ignore the alpha channel (kCGImageAlphaNoneSkipLast) instead.
3797
3798 2012-05-07  Dominik Röttsches  <dominik.rottsches@linux.intel.com>
3799
3800         [GTK] media/video-seek-past-end-playing.html times out
3801         https://bugs.webkit.org/show_bug.cgi?id=84858
3802
3803         Reviewed by Philippe Normand.
3804
3805         Removing the intentional state change to PAUSED on didEnd().
3806         My understanding is that the fix works because the additional
3807         state transition to PAUSED was resetting the internal m_seeking state to early,
3808         so that updatePlayState() in HTMLMediaElement was not able to
3809         correctly figure out/recover playstate after seeking.
3810
3811         No new tests, covered by existing media tests, and fixing
3812         video-seek-past-end-playing.html flakiness on GTK, failure on EFL.
3813
3814         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3815
3816 2012-05-07  Abhishek Arya  <inferno@chromium.org>
3817
3818         Crash in RenderBlock::updateFirstLetterStyle.
3819         https://bugs.webkit.org/show_bug.cgi?id=85759
3820
3821         Reviewed by Julien Chaffraix.
3822
3823         Test: fast/css-generated-content/first-letter-next-sibling-crash.html
3824
3825         RenderBlock::removeChild can bring up the children from last single anonymous block,
3826         causing |nextSibling| in RenderBlock::updateFirstLetterStyle to go stale. We prevent
3827         this by removing the child safely using removeChildNode before destroying it.
3828
3829         * rendering/RenderBlock.cpp:
3830         (WebCore::RenderBlock::updateFirstLetterStyle):
3831
3832 2012-05-07  Tommy Widenflycht  <tommyw@google.com>
3833
3834         MediaStream API: Rename MediaStreamCenter::didConstructMediaStream
3835         https://bugs.webkit.org/show_bug.cgi?id=85796
3836
3837         Reviewed by Adam Barth.
3838
3839         Renamed MediaStreamCenter::didConstructMediaStream to didCreateMediaStream,
3840         and change so that it is only called for MediaStreams created from JS.
3841
3842         Not really testable.
3843
3844         * Modules/mediastream/MediaStream.cpp:
3845         (WebCore::MediaStream::create):
3846         * platform/mediastream/MediaStreamCenter.h:
3847         (MediaStreamCenter):
3848         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
3849         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
3850         * platform/mediastream/chromium/MediaStreamCenterChromium.h:
3851         (MediaStreamCenterChromium):
3852         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
3853         (WebCore::MediaStreamCenterGStreamer::didCreateMediaStream):
3854         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
3855         (MediaStreamCenterGStreamer):
3856
3857 2012-05-07  Nat Duca  <nduca@chromium.org>
3858
3859         Unreviewed, rolling out r115525.
3860         http://trac.webkit.org/changeset/115525
3861         https://bugs.webkit.org/show_bug.cgi?id=66683
3862
3863         Too many pages rely on DOMTimeStamp as first argument.
3864         Reverting while we consider next steps.
3865
3866         * WebCore.exp.in:
3867         * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp:
3868         (WebCore::JSRequestAnimationFrameCallback::handleEvent):
3869         * dom/Document.cpp:
3870         (WebCore::Document::serviceScriptedAnimations):
3871         * dom/Document.h:
3872         (Document):
3873         * dom/RequestAnimationFrameCallback.h:
3874         (RequestAnimationFrameCallback):
3875         * dom/RequestAnimationFrameCallback.idl:
3876         * dom/ScriptedAnimationController.cpp:
3877         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
3878         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
3879         (WebCore):
3880         (WebCore::ScriptedAnimationController::windowScreenDidChange):
3881         (WebCore::ScriptedAnimationController::scheduleAnimation):
3882         (WebCore::ScriptedAnimationController::animationTimerFired):
3883         * dom/ScriptedAnimationController.h:
3884         (ScriptedAnimationController):
3885         (WebCore::ScriptedAnimationController::displayRefreshFired):
3886         * page/FrameView.cpp:
3887         (WebCore::FrameView::serviceScriptedAnimations):
3888         * page/FrameView.h:
3889         (FrameView):
3890         * platform/graphics/DisplayRefreshMonitor.cpp:
3891         (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
3892         (WebCore::DisplayRefreshMonitor::notifyClients):
3893         * platform/graphics/DisplayRefreshMonitor.h:
3894         (DisplayRefreshMonitor):
3895         * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
3896         (WebCore::DisplayRefreshMonitor::displayLinkFired):
3897         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
3898         (WebCore):
3899         (WebCore::DisplayRefreshMonitor::requestRefreshCallback):
3900         (WebCore::DisplayRefreshMonitor::displayLinkFired):
3901
3902 2012-05-07  Tommy Widenflycht  <tommyw@google.com>
3903
3904         MediaStream API: Allow UserMediaRequest::succeed to take an MediaStreamDescriptor
3905         https://bugs.webkit.org/show_bug.cgi?id=85798
3906
3907         Reviewed by Adam Barth.
3908
3909         Adding another UserMediaRequest::succeed function that takes an MediaStreamDescriptor
3910         instead of the two MediaStreamSource arrays.
3911
3912         Not currently testable.
3913
3914         * Modules/mediastream/LocalMediaStream.cpp:
3915         (WebCore::LocalMediaStream::create):
3916         (WebCore):
3917         (WebCore::LocalMediaStream::LocalMediaStream):
3918         * Modules/mediastream/LocalMediaStream.h:
3919         (LocalMediaStream):
3920         * Modules/mediastream/UserMediaRequest.cpp:
3921         (WebCore::UserMediaRequest::succeed):
3922         (WebCore):
3923         * Modules/mediastream/UserMediaRequest.h:
3924         (WebCore):
3925         (UserMediaRequest):
3926
3927 2012-05-07  Michal Mocny  <mmocny@google.com>
3928
3929         [chromium] setContentsMemoryAllocationLimitBytes needs to setNeedsCommit.
3930         https://bugs.webkit.org/show_bug.cgi?id=85801
3931
3932         Reviewed by Adrienne Walker.
3933
3934         CCLayerTreeHost::setContentsMemoryAllocationLimitBytes needs to call setNeedsCommit after adjusting memory
3935         limits, so that we push a new frame.  In particular, when returning from non visibile state, we adjust
3936         memory allocation from 0 to non 0, and we need to push a non blank frame.
3937
3938         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3939         (WebCore::CCLayerTreeHost::setVisible):
3940         (WebCore::CCLayerTreeHost::setContentsMemoryAllocationLimitBytes):
3941
3942 2012-05-07  Christophe Dumez  <christophe.dumez@intel.com>
3943
3944         [EFL] media/track/track-cue-rendering-snap-to-lines-not-set.html fails
3945         https://bugs.webkit.org/show_bug.cgi?id=85602
3946
3947         Reviewed by Eric Carlson.
3948
3949         Fix positioning of the controls panel back to relative, as it is
3950         in the parent CSS.
3951
3952         * css/mediaControlsEfl.css:
3953         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
3954
3955 2012-05-07  Adam Bergkvist  <adam.bergkvist@ericsson.com>
3956
3957         MediaStream should not be an ActiveDOMObject
3958         https://bugs.webkit.org/show_bug.cgi?id=85191
3959
3960         Reviewed by Adam Barth.
3961
3962         The model with MediaStreamDescriptor and MediaStream (and LocalMediaStream)
3963         allows the JavaScript objects (MediaStream and LocalMediaStream) to be
3964         cleaned up while the MediaStreamDescriptor lives on to manage the stream in
3965         the platform. This happens for example when a URL is created to represent
3966         a MediaStream (using createObjectURL()). In that case, the MediaStreamDescriptor
3967         is put into the MediaStreamRegistry and even though the MediaStream object is
3968         lost, the URL still works since the descriptor is kept in the registry.
3969
3970         The changes introduced in r113460 (http://webkit.org/b/83143) turned
3971         MediaStream and LocalMediaStream into ActiveDOMObjects. For example on page
3972         reload, LocalMediaStream calls MediaStreamCenter::didStopLocalMediaStream()
3973         via its ActiveDOMObject::stop() method. However, when a page reload occurs,
3974         the LocalMediaStream object may have been cleaned up already and
3975         MediaStreamCenter::didStopLocalMediaStream() will not be called.
3976
3977         One way to make the behavior consistent would be to call
3978         MediaStreamCenter::didStopLocalMediaStream() when the descriptor is cleaned up,
3979         cause then we wouldn't be dependent on the LocalMediaStream object being alive.
3980         However, calling MediaStreamCenter::didStopLocalMediaStream() might not be the
3981         correct thing to do when all references to the descriptor are lost since there
3982         can be MediaStream objects constructed from the tracks of the LocalMediaStream
3983         that should continue to work. MediaStreamCenter::didStopLocalMediaStream() was
3984         intended for LocalMediaStream.stop() which is used to revoke access to devices;
3985         that should not necessarily happen when the descriptor of a LocalMediaStream is
3986         cleaned up. If it's necessary for some ports to signal to the platform that a
3987         MediaStreamDescriptor is cleaned up, then I would suggest adding a new function,
3988         willDestroyMediaStreamDescriptor(), to the MediaStreamCenter interface.
3989
3990         The current resolution is to make MediaStream a ContextDestructionObserver
3991         instead of an ActiveDOMObject.
3992
3993         Currently not testable.
3994
3995         * Modules/mediastream/LocalMediaStream.cpp:
3996         (WebCore::LocalMediaStream::create):
3997         * Modules/mediastream/LocalMediaStream.h:
3998         (LocalMediaStream):
3999         * Modules/mediastream/LocalMediaStream.idl:
4000         * Modules/mediastream/MediaStream.cpp:
4001         (WebCore::MediaStream::create):
4002         (WebCore::MediaStream::MediaStream):
4003         (WebCore::MediaStream::scriptExecutionContext):
4004         * Modules/mediastream/MediaStream.h:
4005
4006 2012-05-07  Liam Quinn  <lquinn@rim.com>
4007
4008         [BlackBerry] WWW-Authenticate header on 200 response pops up authentication dialog
4009         https://bugs.webkit.org/show_bug.cgi?id=85643
4010
4011         Reviewed by George Staikos.
4012
4013         RIM PR: 151992
4014         Ignore WWW-Authenticate header if the response code is not 401.
4015         Ignore Proxy-Authenticate header if the response code is not 407.
4016
4017         Manual test added to observe whether the authentication dialog appears on a 200 response with WWW-Authenticate.
4018
4019         * platform/network/blackberry/NetworkJob.cpp:
4020         (WebCore::NetworkJob::handleNotifyHeaderReceived):
4021
4022 2012-05-07  Alexander Pavlov  <apavlov@chromium.org>
4023
4024         Web Inspector: [TextPrompt] Event listeners and CSS style are not removed on detachment
4025         https://bugs.webkit.org/show_bug.cgi?id=85789
4026
4027         Reviewed by Yury Semikhatsky.
4028
4029         * inspector/front-end/TextPrompt.js:
4030         (WebInspector.TextPrompt.prototype._attachInternal):
4031         (WebInspector.TextPrompt.prototype.detach):
4032
4033 2012-05-07  Csaba Osztrogonác  <ossy@webkit.org>
4034
4035         Buildfix for buggy GCC
4036         https://bugs.webkit.org/show_bug.cgi?id=85781
4037
4038         Reviewed by Zoltan Herczeg.
4039
4040         * rendering/RenderBlock.h:
4041         (WebCore::RenderBlock::MarginInfo::clearMargin):
4042
4043 2012-05-07  Alexander Pavlov  <apavlov@chromium.org>
4044
4045         Web Inspector: [REGRESSION] Context menu for the left Script view gutter is broken
4046         https://bugs.webkit.org/show_bug.cgi?id=85785
4047
4048         Reviewed by Pavel Feldman.
4049
4050         Fixed remaining usages of WebInspector.save to be WebInspector.fileManager.save.
4051
4052         * inspector/front-end/NetworkPanel.js:
4053         (WebInspector.NetworkLogView.prototype._exportAll):
4054         (WebInspector.NetworkLogView.prototype._exportRequest):
4055         * inspector/front-end/ResourcesPanel.js:
4056         (WebInspector.FrameResourceTreeElement.prototype._appendSaveAsAction.doSave):
4057         (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent.doSave):
4058         * inspector/front-end/TextViewer.js:
4059         (WebInspector.TextViewer.prototype._contextMenu):
4060
4061
4062 2012-05-07  Antti Koivisto  <antti@apple.com>
4063
4064         Share stylesheet data structures between documents
4065         https://bugs.webkit.org/show_bug.cgi?id=85598
4066
4067        &n