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