e76b07c18cbe038c2301d8c1c8b774ea1b42877e
[WebKit.git] / Source / WebCore / ChangeLog
1 2012-05-08  Abhishek Arya  <inferno@chromium.org>
2
3         Crash due to owning renderer not removed from custom scrollbar.
4         https://bugs.webkit.org/show_bug.cgi?id=80610
5
6         Reviewed by Eric Seidel.
7
8         Test: scrollbars/scrollbar-owning-renderer-crash.html
9
10         Changed RenderScrollbar to keep pointer to owning node, instead of the
11         renderer. Renderer can get destroyed without informing the scrollbar, causing
12         crashes later. Remove code from r94107 since it is not needed anymore and saves
13         times when RenderBox is getting destroyed.
14
15         * page/FrameView.cpp:
16         (WebCore::FrameView::createScrollbar): pass renderer's node.
17         * page/FrameView.h:
18         * rendering/RenderBox.cpp:
19         (WebCore::RenderBox::willBeDestroyed): no longer need this. came originally from r94107.
20         * rendering/RenderLayer.cpp:
21         (WebCore::RenderLayer::createScrollbar): pass renderer's node.
22         (WebCore::RenderLayer::destroyScrollbar): no longer need to clear owning renderer.
23         * rendering/RenderListBox.cpp:
24         (WebCore::RenderListBox::createScrollbar): pass renderer's node.
25         * rendering/RenderMenuList.cpp:
26         (WebCore::RenderMenuList::createScrollbar): pass renderer's node.
27         * rendering/RenderScrollbar.cpp:
28         (WebCore::RenderScrollbar::createCustomScrollbar): Store owner node instead of renderer.
29         (WebCore::RenderScrollbar::RenderScrollbar): Store owner node instead of renderer.
30         (WebCore::RenderScrollbar::owningRenderer): calculate owning renderer from owner node.
31         * rendering/RenderScrollbar.h:
32         (RenderScrollbar):
33         * rendering/RenderTextControlSingleLine.cpp:
34         (WebCore::RenderTextControlSingleLine::createScrollbar): pass renderer's node.
35
36 2012-05-08  Jon Lee  <jonlee@apple.com>
37
38         Safari warns that it needs to resend the form in an iFrame when going back
39         https://bugs.webkit.org/show_bug.cgi?id=82658
40         <rdar://problem/11292558>
41
42         Reviewed by Darin Adler.
43
44         Test: http/tests/loading/post-in-iframe-with-back-navigation.html
45
46         * WebCore.exp.in: Add _wkCFURLRequestAllowAllPostCaching.
47         * platform/mac/WebCoreSystemInterface.h: Add wkCFURLRequestAllowAllPostCaching.
48         * platform/mac/WebCoreSystemInterface.mm: Add wkCFURLRequestAllowAllPostCaching.
49         * platform/network/cf/ResourceRequestCFNet.cpp:
50         (WebCore::ResourceRequest::doUpdatePlatformRequest): Set the bit to cache all POST responses.
51         * platform/network/mac/ResourceRequestMac.mm:
52         (WebCore::ResourceRequest::doUpdatePlatformRequest): Set the bit to cache all POST responses.
53
54 2012-05-08  Dana Jansens  <danakj@chromium.org>
55
56         [chromium] Reflections with masks should not occlude
57         https://bugs.webkit.org/show_bug.cgi?id=85927
58
59         Reviewed by James Robinson.
60
61         When a surface does not have a mask, we make both it and its reflection
62         occlude the things below them. However, if the reflection has a mask
63         applied to it, then we should not consider it as occluding.
64
65         Adds replicaHasMask() to the render surface classes so we can test if
66         the mask is present.
67
68         Unit Tests: CCOcclusionTrackerTestReplicaWithMask
69
70         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
71         (WebCore::RenderSurfaceChromium::hasMask):
72         This is unusued right now, but will allow us to remove a FIXME from
73         CCOcclusionTracker::finishedTargetRenderSurface().
74         (WebCore):
75         (WebCore::RenderSurfaceChromium::replicaHasMask):
76         * platform/graphics/chromium/RenderSurfaceChromium.h:
77         (RenderSurfaceChromium):
78         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
79         (WebCore::::leaveToTargetRenderSurface):
80         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
81         (WebCore::CCRenderSurface::hasMask):
82         This is unusued right now, but will allow us to remove a FIXME from
83         CCOcclusionTracker::finishedTargetRenderSurface().
84         (WebCore):
85         (WebCore::CCRenderSurface::replicaHasMask):
86         * platform/graphics/chromium/cc/CCRenderSurface.h:
87         (CCRenderSurface):
88
89 2012-05-08  Eric Seidel  <eric@webkit.org>
90
91         Add stylesheet inheritance support to IFRAME_SEAMLESS
92         https://bugs.webkit.org/show_bug.cgi?id=85914
93
94         Reviewed by Ojan Vafai.
95
96         This work is already guarded by IFRAME_SEAMLESS, as
97         Document::shouldDisplaySeamlesslyWithParent always returns false
98         when IFRAME_SEAMLESS is off.
99
100         This makes the child document use all author stylesheets from all parent documents,
101         per the seamless spec:
102         http://www.whatwg.org/specs/web-apps/current-work/#attr-iframe-seamless
103
104         This support is slightly inefficient as every time a sheet is added
105         to a parent document, the child document must do a full style selector recalc.
106         Normally author sheet additions have a fast-path which avoids the full selector recalc,
107         but such is not possible in the seamless case as we're inserting the parents sheets
108         earlier in the child's cascade (instead of just appending them to the end of the list).
109
110         The test covers both the static inheritance as well as addition of a stylesheet
111         to the parent and testing that it caused a recalc of the child.
112
113         Covered by fast/frames/seamless/seamless-css-cascade.html
114
115         * css/StyleResolver.cpp:
116         (WebCore::StyleResolver::StyleResolver):
117         (WebCore::StyleResolver::addStylesheetsFromSeamlessParents):
118         (WebCore):
119         * css/StyleResolver.h:
120         (StyleResolver):
121         * dom/Document.cpp:
122         (WebCore::Document::seamlessParentUpdatedStylesheets):
123         (WebCore):
124         (WebCore::Document::notifySeamlessChildDocumentsOfStylesheetUpdate):
125         (WebCore::Document::updateActiveStylesheets):
126         * dom/Document.h:
127         (Document):
128
129 2012-05-08  Raphael Kubo da Costa  <rakuco@webkit.org>
130
131         [CMake] FindGStreamer: Fix the build with static WebCore.
132         https://bugs.webkit.org/show_bug.cgi?id=85930
133
134         Reviewed by Daniel Bates.
135
136         No new tests, build fix.
137
138         Building WebCore statically was failing because files in
139         WebCore/platform/gstreamer when ENABLE_VIDEO was set required
140         gstreamer-base, which was not being linked to after r116453.
141
142         Fix that by looking for gstreamer-base, requiring and linking
143         against it if GStreamer is used.
144
145         * PlatformEfl.cmake: Link to GSTREAMER_LIBRARIES and
146         GSTREAMER_BASE_LIBRARIES, and include GSTREAMER_INCLUDE_DIRS and
147         GSTREAMER_BASE_INCLUDE_DIRS.
148
149 2012-05-08  Raymond Toy  <rtoy@google.com>
150
151         JavaScriptAudioNode should not ASSERT if number of input channels is 0
152         https://bugs.webkit.org/show_bug.cgi?id=85818
153
154         Reviewed by Eric Seidel.
155
156         Test: webaudio/javascriptaudionode-zero-input-channels.html
157
158         * Modules/webaudio/JavaScriptAudioNode.cpp:
159         (WebCore::JavaScriptAudioNode::process): Update buffersAreGood.
160         (WebCore::JavaScriptAudioNode::fireProcessEvent): Remove ASSERT.
161
162 2012-05-08  Dana Jansens  <danakj@chromium.org>
163
164         Region reads past end of spans
165         https://bugs.webkit.org/show_bug.cgi?id=85909
166
167         Reviewed by Anders Carlsson.
168
169         Region currently checks aSpan == aSpanEnd as the indicator that
170         we passed all the spans. When aSpan < aSpanEnd, it uses aSpan+1
171         to find the height of the span.
172
173         If aSpan == aSpanEnd - 1, then aSpan+1 == aSpanEnd. This does not
174         represent a valid span, since aSpanEnd is past the end of the
175         array, not the last element in the array. The loop should terminate
176         in this case.
177
178         Checking aSegment != aSegmentEnd is acceptable in the inner loop since
179         it increments by two each time (segments come in pairs, while spans
180         come in singles).
181
182         Test: RegionTest.ReadPastFullSpanVectorInIntersectsTest
183
184         * platform/graphics/Region.cpp:
185         (WebCore::Region::Shape::compareShapes):
186
187 2012-05-08  Philip Rogers  <pdr@google.com>
188
189         Prevent crash in animated lists
190         https://bugs.webkit.org/show_bug.cgi?id=85382
191
192         Reviewed by Nikolas Zimmermann.
193
194         Animated lists blindly assign the last list value to m_toAtEndOfDurationType
195         in SVGAnimationElement::startedActiveInterval. If the last list value's length
196         is larger or smaller than the animated "to" length, we crash.
197
198         This change prevents accessing values off the end of toAtEndOfDuration by adding
199         a check for this case. It may seem inefficient to perform this check on every
200         animation update but the "to" value can change (in cardinality) while animating.
201
202         I checked each of the other animation types (e.g., SVGAnimatedAngle,
203         SVGAnimatedBoolean, etc.) and was only able to hit this style of crash
204         in the three types modified in this change:
205         SVGAnimatedLengthList, SVGAnimatedNumberList, and SVGAnimatedPointList.
206
207         Tests: svg/animations/animate-linear-discrete-additive-b-expected.svg
208                svg/animations/animate-linear-discrete-additive-b.svg
209                svg/animations/animate-linear-discrete-additive-c-expected.svg
210                svg/animations/animate-linear-discrete-additive-c.svg
211                svg/animations/animate-linear-discrete-additive-expected.svg
212                svg/animations/animate-linear-discrete-additive.svg
213                svg/animations/animate-list-crash.svg
214
215         * svg/SVGAnimatedLengthList.cpp:
216         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
217         * svg/SVGAnimatedNumberList.cpp:
218         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
219         * svg/SVGAnimatedPointList.cpp:
220         (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
221
222 2012-05-08  Rafael Weinstein  <rafaelw@chromium.org>
223
224         HTMLElementStack::hasOnlyHTMLElementsInScope is no longer called
225         https://bugs.webkit.org/show_bug.cgi?id=85908
226
227         Reviewed by Eric Seidel.
228
229         This patch just removes the dead code.
230
231         No tests needed. Cleanup only.
232
233         * html/parser/HTMLElementStack.cpp:
234         * html/parser/HTMLElementStack.h:
235         (HTMLElementStack):
236
237 2012-05-08  W. James MacLean  <wjmaclean@chromium.org>
238
239         [chromium] Create LinkHighlightLayerChromium class to provide link-highlight preview animations for GraphicsLayerChromium.
240         https://bugs.webkit.org/show_bug.cgi?id=85084
241
242         Reviewed by James Robinson.
243
244         Unit test provided.
245
246         Creates a layer delegate class to provide link highlight animations for link-preview feature.
247         These are added to a GraphicsLayerChromium via provided methods. Moves dispensing of animation
248         ids into a separate class.
249
250         * WebCore.gypi:
251         * platform/graphics/chromium/AnimationIdVendor.cpp: Added.
252         (WebCore):
253         (WebCore::AnimationIdVendor::getNextAnimationId):
254         (WebCore::AnimationIdVendor::getNextGroupId):
255         * platform/graphics/chromium/AnimationIdVendor.h: Added.
256         (WebCore):
257         (AnimationIdVendor):
258         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
259         (WebCore::GraphicsLayerChromium::willBeDestroyed):
260         (WebCore::GraphicsLayerChromium::updateNames):
261         (WebCore::GraphicsLayerChromium::addAnimation):
262         (WebCore::GraphicsLayerChromium::addLinkHighlight):
263         (WebCore):
264         (WebCore::GraphicsLayerChromium::didFinishLinkHighlight):
265         (WebCore::GraphicsLayerChromium::updateChildList):
266         (WebCore::GraphicsLayerChromium::mapAnimationNameToId):
267         * platform/graphics/chromium/GraphicsLayerChromium.h:
268         (WebCore):
269         (GraphicsLayerChromium):
270         * platform/graphics/chromium/LinkHighlight.cpp: Added.
271         (WebCore):
272         (WebCore::LinkHighlight::create):
273         (WebCore::LinkHighlight::LinkHighlight):
274         (WebCore::LinkHighlight::~LinkHighlight):
275         (WebCore::LinkHighlight::contentLayer):
276         (WebCore::LinkHighlight::paintContents):
277         (WebCore::LinkHighlight::notifyAnimationStarted):
278         (WebCore::LinkHighlight::notifyAnimationFinished):
279         * platform/graphics/chromium/LinkHighlight.h: Added.
280         (WebCore):
281         (LinkHighlight):
282
283 2012-05-08  Raphael Kubo da Costa  <rakuco@webkit.org>
284
285         [CMake] Rewrite FindGStreamer.cmake.
286         https://bugs.webkit.org/show_bug.cgi?id=85857
287
288         Reviewed by Daniel Bates.
289
290         No new tests, build system change.
291
292         We are currently kind of duplicating the same
293         FindGStreamer-Foo.cmake file whenever a new GStreamer plugin needs
294         to be found. Besides this approach not scaling very well, it
295         relies on pkg-config for version checking, uses the LibFindMacros
296         package that we should deprecate and all the find files could be
297         merged into one, with users using the COMPONENTS feature of the
298         FIND_PACKAGE() call to find the desired plugins.
299
300         FindGStreamer.cmake has then been rewritten to take all that into
301         account:
302         - The LibFindMacros.cmake package is not used anymore.
303         - Version check is performed in the CMake file itself by parsing
304         the gstversion.h header.
305         - All GStreamer plugins are searched and the COMPONENTS keyword
306         used in the FIND_PACKAGE() call is used to check which plugins are
307         required.
308         - The plugins-base and base GStreamer plugins are not searched, as
309         they were not used anywhere in the build system.
310
311         * PlatformEfl.cmake: Update GStreamer-related variable names.
312
313 2012-05-08  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
314
315         [EFL] Handling of numeric-pad keys in EFL's PlatformKeyboardEvent
316         https://bugs.webkit.org/show_bug.cgi?id=85479
317
318         Reviewed by Gustavo Noronha Silva.
319
320         EFL's PlatformKeyboardEvent::isKeypad() now returns meaningful value.
321         Added numeric-pad keys to the Key Map and Windows Key Map.
322
323         No new tests.
324
325         * platform/efl/EflKeyboardUtilities.cpp:
326         (WebCore::createKeyMap):
327         (WebCore::createWindowsKeyMap):
328         * platform/efl/PlatformKeyboardEventEfl.cpp:
329         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
330
331 2012-05-04  Nikolas Zimmermann  <nzimmermann@rim.com>
332
333         Tie lifetime of SVGAnimateElement::m_animatedType to the duration of the animation
334         https://bugs.webkit.org/show_bug.cgi?id=85627
335
336         Reviewed by Antti Koivisto.
337
338         Example:
339         <rect width="10" height="100">
340             <animate attributeName="width" from="10" to="100" begin="2s" dur="4s" fill="remove"/>
341         </rect>
342
343         At t=0s the <animate> element receives its first interval: begin=2s, end=6s.
344         At this point we've created the 'OwnPtr<SVGAnimatedType> m_animatedType' in
345         SVGAnimateElement, which holds the current animated value of the target type.
346         In this example it contains a SVGLength with '10' as value at t=0s.
347
348         Calling "rect.width.animVal.value" will return the value currently contained in the
349         m_animatedType from the SVGAnimateElement, even though the animation didn't begin
350         yet. This is fine, as the animVal equals to the baseVal, as long as no animation is
351         running.
352
353         At t=6s you'd expect that the whole 'animVal' object is destructed again, as it's no
354         longer needed, as animVal will be equal to baseVal again, but the current code keeps
355         the animVal alive, and just resets it to the baseVal. The animVals will be destructed
356         once the animate element leaves the tree.
357
358         CSS animations suffer from the same problem, we never remove the animated SMIL properties
359         but we only reset them to the base value. This makes integration with CSS Animations and
360         CSS Transitions harder, so this needs to be changed.
361
362         This patch starts tracking the start/end of an animation chain properly, to destruct
363         the animation effect for non-frozen animations at the end of their duration. This has to
364         work properly together with seeking (SVGSVGElement.setCurrentTime), as our testing relies
365         on the ability to drive the SMIL timeline from script.
366
367         Tests: svg/animations/list-wrapper-assertion-expected.svg
368                svg/animations/list-wrapper-assertion.svg
369
370         * svg/SVGAnimateElement.cpp:
371         (WebCore::SVGAnimateElement::resetAnimatedType):
372         (WebCore::applyCSSPropertyToTarget):
373         (WebCore::removeCSSPropertyFromTarget):
374         (WebCore::applyCSSPropertyToTargetAndInstances):
375         (WebCore::removeCSSPropertyFromTargetAndInstances):
376         (WebCore::notifyTargetAboutAnimValChange):
377         (WebCore::notifyTargetAndInstancesAboutAnimValChange):
378         (WebCore::SVGAnimateElement::clearAnimatedType):
379         (WebCore::SVGAnimateElement::applyResultsToTarget):
380         (WebCore::SVGAnimateElement::targetElementWillChange):
381         * svg/SVGAnimateElement.h:
382         (SVGAnimateElement):
383         * svg/SVGAnimateMotionElement.cpp:
384         (WebCore::SVGAnimateMotionElement::resetAnimatedType):
385         (WebCore::SVGAnimateMotionElement::clearAnimatedType):
386         * svg/SVGAnimateMotionElement.h:
387         (SVGAnimateMotionElement):
388         * svg/SVGAnimationElement.cpp:
389         * svg/SVGAnimationElement.h:
390         * svg/animation/SMILTimeContainer.cpp:
391         (WebCore::SMILTimeContainer::updateAnimations):
392         * svg/animation/SVGSMILElement.cpp:
393         (WebCore::SVGSMILElement::reset):
394         (WebCore::SVGSMILElement::targetElementWillChange):
395         (WebCore::SVGSMILElement::determineActiveState):
396         (WebCore::SVGSMILElement::progress):
397         * svg/animation/SVGSMILElement.h:
398         (SVGSMILElement):
399         * svg/properties/SVGAnimatedListPropertyTearOff.h:
400             Remove svgAttributeChanged() calls from animationEnded/animValDidChange.
401             Callers are now required to notify the target about changes. There are cases
402             where we want to call animValDidChange without invoking svgAttributeChanged().
403             That is supported now.
404         (WebCore::SVGAnimatedListPropertyTearOff::animationEnded):
405         (WebCore::SVGAnimatedListPropertyTearOff::animValDidChange):
406         * svg/properties/SVGAnimatedProperty.h: Ditto.
407         (WebCore::SVGAnimatedProperty::commitChange): Add safety guard.
408         * svg/properties/SVGAnimatedPropertyTearOff.h: Ditto.
409         (WebCore::SVGAnimatedPropertyTearOff::animationEnded):
410         (WebCore::SVGAnimatedPropertyTearOff::animValDidChange):
411         * svg/properties/SVGAnimatedStaticPropertyTearOff.h: Ditto.
412         (WebCore::SVGAnimatedStaticPropertyTearOff::animationEnded):
413         (WebCore::SVGAnimatedStaticPropertyTearOff::animValDidChange):
414
415 2012-05-08  Ryuan Choi  <ryuan.choi@samsung.com>
416
417         [EFL][DRT]Do not create ScrollbarEfl when mockScrollbar is enabled.
418         https://bugs.webkit.org/show_bug.cgi?id=81315
419
420         Reviewed by Chang Shu.
421
422         ScrollbarEfl creates custom scrollbars as separated layer and they are
423         not related to ScrollbarTheme.
424         So, DRT/Efl creates custom scrollbars on webview which paints mockScrollbar.
425
426         This patch prevents creating custom scrollbars when mockScrollbar is enabled.
427
428         Because DRT/Efl only renders the webview now, expected results are same
429         until Bug 79853 is landed.
430
431         * platform/efl/ScrollbarEfl.cpp:
432         (Scrollbar::createNativeScrollbar):
433
434 2012-05-08  Timothy Hatcher  <timothy@apple.com>
435
436         Fix the SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL macro so it passes the full path to dlopen.
437
438         dyld only considers libraries in the versioned framework path if their install name
439         matches the library that it is attempting to load. The path we were passing to
440         dlopen lacked the Versions/A component of the path so dyld did not recognize that
441         we wanted it to use the staged version if it is newer.
442
443         <rdar://problem/11406517>
444
445         Reviewed by Mark Rowe.
446
447         * platform/mac/SoftLinking.h: Have SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL take the
448         framework version as an argument and use it when constructing the path to dlopen.
449
450 2012-05-08  Rafael Brandao  <rafael.lobo@openbossa.org>
451
452         Build fix for Qt Snowleopard Release
453         https://bugs.webkit.org/show_bug.cgi?id=85895
454
455         Reviewed by Alexis Menard.
456
457         The enum value JSUint8ClampedArray conflicted with the JSUint8ClampedArray class.
458         I've added the 'Type' suffix to the enum value to make their names different.
459
460         No new tests needed.
461
462         * bridge/qt/qt_runtime_qt4.cpp:
463         (JSC::Bindings::valueRealType):
464         (JSC::Bindings::convertValueToQVariant):
465
466 2012-05-08  Shezan Baig  <shezbaig.wk@gmail.com>
467
468         offsetLeft broken within CSS3 columns
469         https://bugs.webkit.org/show_bug.cgi?id=34875
470
471         Reviewed by Julien Chaffraix.
472
473         Reimplement offsetLeft and offsetTop in terms of a new method called
474         'offsetTopLeft'. The new method starts from a reference point (the
475         top-left coordinate of a box or inline) and adjusts this reference
476         point for columns as we traverse each parent. Note that the reference
477         point needs to be adjusted in both dimensions, even though offsetLeft
478         and offsetTop return only one of them.
479
480         A new method called 'offsetForColumns' was added to RenderObject. This
481         method is similar to adjustForColumns, except that it returns the
482         offset instead of modifying a reference. This method is necessary to
483         simplify the implementation of offsetTopLeft.
484
485         Tests: fast/block/positioning/offsetLeft-offsetTop-multicolumn-expected.txt
486                fast/block/positioning/offsetLeft-offsetTop-multicolumn.html
487
488         * rendering/RenderBox.h:
489         (RenderBox):
490         Override offsetLeft and offsetTop.
491         * rendering/RenderBox.cpp:
492         (WebCore::RenderBox::offsetLeft):
493         Implemented in terms of RenderBoxModelObject::offsetTopLeft, using
494         topLeftLocation as startPoint.
495         (WebCore::RenderBox::offsetTop):
496         Implemented in terms of RenderBoxModelObject::offsetTopLeft, using
497         topLeftLocation as startPoint.
498         * rendering/RenderBoxModelObject.cpp:
499         (WebCore::RenderBoxModelObject::offsetTopLeft):
500         New method to compute offsetLeft and offsetTop simultaneously, and
501         adjusting for columns at each parent.
502         (WebCore::RenderBoxModelObject::offsetLeft):
503         Reimplemented in terms of offsetTopLeft.
504         (WebCore::RenderBoxModelObject::offsetTop):
505         Reimplemented in terms of offsetTopLeft.
506         * rendering/RenderBoxModelObject.h:
507         (RenderBoxModelObject):
508         Declare new offsetTopLeft method.
509         * rendering/RenderInline.cpp:
510         (WebCore::RenderInline::offsetLeft):
511         Reimplemented in terms of RenderBoxModelObject::offsetTopLeft.
512         (WebCore::RenderInline::offsetTop):
513         Reimplemented in terms of RenderBoxModelObject::offsetTopLeft.
514         * rendering/RenderObject.h:
515         (RenderObject):
516         (WebCore::RenderObject::offsetForColumns):
517         New helper method to simplify implementation of offsetTopLeft.
518
519 2012-03-31  Robert Hogan  <robert@webkit.org>
520
521         CSS 2.1 failure: first-letter-nested-004.htm fails
522         https://bugs.webkit.org/show_bug.cgi?id=72987
523
524         Reviewed by Eric Seidel.
525
526         When styling first-letter check each sibling and drill into its inlines until we find either (i) a text node 
527         that is not all whitespace, or (ii) a line break.
528
529         This makes our rendering of the following tests compatible with FF and Opera. Our current behaviour is also conformant
530         since the spec allows UAs to style just one element:
531             css2.1/20110323/first-letter-quote-002.htm
532             css2.1/20110323/first-letter-quote-003.htm
533             css2.1/20110323/first-letter-quote-004.htm
534             css2.1/20110323/first-letter-quote-005.htm
535
536         This fixes the following two tests. We now drill into the descendants of an element styled with :first-letter looking
537         for text to style:
538             css2.1/20110323/first-letter-nested-004.htm
539             css2.1/20110323/first-letter-nested-006.htm
540
541         This patch changes our rendering of first-letter-dynamic-001.htm as we now render adjacent quotes in the second line as 
542         green. This is consistent with the spec, which allows this behaviour but does not require it. It's the 'right' behaviour
543         since it is consistent with the rendering of such quotes in a single element with :first-letter style.
544
545         * rendering/RenderBlock.cpp:
546         (WebCore::RenderBlock::findLastObjectWithFirstLetterText): Iterate through the child's siblings looking for the last
547           object to be styled :first-letter.
548         (WebCore::RenderBlock::findLastObjectAfterFirstLetterPunctuation): Style any leading punctuation as first-letter, drill
549           down into the child's descendants looking for text if necessary.
550         (WebCore::RenderBlock::updateFirstLetter): Refactor to drill into sibling's children looking for inlines
551          that should be styled as first-letter.
552         (WebCore::RenderBlock::addFirstLetter): Split out from updateFirstLetter so that it can be used when a
553          descendant node inside a sibling is found in findLastObjectWithFirstLetterText() needs to be styled as first-letter.
554         * rendering/RenderBlock.h:
555
556 2012-05-08  Sheriff Bot  <webkit.review.bot@gmail.com>
557
558         Unreviewed, rolling out r116402.
559         http://trac.webkit.org/changeset/116402
560         https://bugs.webkit.org/show_bug.cgi?id=85898
561
562         Caused a 3% regression on Chromium's bloat-http test on Linux
563         (Requested by ojan_gardening on #webkit).
564
565         * WebCore.exp.in:
566         * bindings/v8/RetainedDOMInfo.cpp:
567         * dom/ContainerNode.h:
568         * dom/Node.cpp:
569         (WebCore::Node::traverseNextNode):
570         (WebCore):
571         (WebCore::Node::traverseNextSibling):
572         * dom/Node.h:
573         (Node):
574
575 2012-05-08  Hironori Bono  <hbono@chromium.org>
576
577         [Chromium] Fix the position of an RTL resizer
578         https://bugs.webkit.org/show_bug.cgi?id=80640
579
580         Reviewed by Tony Chang.
581
582         When rendering an RTL resizer, my r110073 renders it at the same position as the
583         one used for rendering a LTR resizer. Unfortunately, this code renders the RTL
584         resizer image at an incorrect position on Mac and Linux. This change uses the
585         correct formula to calculate the position of an RTL resizer.
586
587         Test: platform/chromium/scrollbars/rtl-resizer-position.html
588
589         * rendering/RenderLayer.cpp:
590         (WebCore::RenderLayer::drawPlatformResizerImage):
591
592 2012-05-08  Andreas Kling  <kling@webkit.org>
593
594         Element: isURLAttribute() should take a const Attribute&.
595         <http://webkit.org/b/85890>
596
597         Reviewed by Anders Carlsson.
598
599         Change isURLAttribute(Attribute*) to isURLAttribute(const Attribute&) to enforce
600         the fact that the Attribute can't be null, and shouldn't be mutated, at compile-time.
601         Also sprinkle OVERRIDE while we're at it.
602
603         * dom/Element.cpp:
604         (WebCore::Element::getURLAttribute):
605         (WebCore::Element::getNonEmptyURLAttribute):
606         * dom/Element.h:
607         (WebCore::Element::isURLAttribute):
608         * editing/MarkupAccumulator.cpp:
609         (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
610         (WebCore::MarkupAccumulator::appendAttribute):
611         * editing/markup.cpp:
612         (WebCore::completeURLs):
613         * html/HTMLAnchorElement.cpp:
614         (WebCore::HTMLAnchorElement::isURLAttribute):
615         * html/HTMLAnchorElement.h:
616         * html/HTMLBaseElement.cpp:
617         (WebCore::HTMLBaseElement::isURLAttribute):
618         * html/HTMLBaseElement.h:
619         * html/HTMLBodyElement.cpp:
620         (WebCore::HTMLBodyElement::isURLAttribute):
621         * html/HTMLBodyElement.h:
622         * html/HTMLButtonElement.cpp:
623         (WebCore::HTMLButtonElement::isURLAttribute):
624         * html/HTMLButtonElement.h:
625         * html/HTMLElement.cpp:
626         (WebCore::HTMLElement::isURLAttribute):
627         * html/HTMLElement.h:
628         * html/HTMLEmbedElement.cpp:
629         (WebCore::HTMLEmbedElement::isURLAttribute):
630         * html/HTMLEmbedElement.h:
631         * html/HTMLFormElement.cpp:
632         (WebCore::HTMLFormElement::isURLAttribute):
633         * html/HTMLFormElement.h:
634         * html/HTMLFrameElementBase.cpp:
635         (WebCore::HTMLFrameElementBase::isURLAttribute):
636         * html/HTMLFrameElementBase.h:
637         (HTMLFrameElementBase):
638         * html/HTMLHtmlElement.cpp:
639         (WebCore::HTMLHtmlElement::isURLAttribute):
640         * html/HTMLHtmlElement.h:
641         * html/HTMLImageElement.cpp:
642         (WebCore::HTMLImageElement::isURLAttribute):
643         * html/HTMLImageElement.h:
644         * html/HTMLInputElement.cpp:
645         (WebCore::HTMLInputElement::isURLAttribute):
646         * html/HTMLInputElement.h:
647         * html/HTMLLinkElement.cpp:
648         (WebCore::HTMLLinkElement::isURLAttribute):
649         * html/HTMLLinkElement.h:
650         * html/HTMLMediaElement.cpp:
651         (WebCore::HTMLMediaElement::isURLAttribute):
652         * html/HTMLMediaElement.h:
653         * html/HTMLModElement.cpp:
654         (WebCore::HTMLModElement::isURLAttribute):
655         * html/HTMLModElement.h:
656         * html/HTMLObjectElement.cpp:
657         (WebCore::HTMLObjectElement::isURLAttribute):
658         * html/HTMLObjectElement.h:
659         * html/HTMLParamElement.cpp:
660         (WebCore::HTMLParamElement::isURLAttribute):
661         * html/HTMLParamElement.h:
662         * html/HTMLQuoteElement.cpp:
663         (WebCore::HTMLQuoteElement::isURLAttribute):
664         * html/HTMLQuoteElement.h:
665         * html/HTMLScriptElement.cpp:
666         (WebCore::HTMLScriptElement::isURLAttribute):
667         * html/HTMLScriptElement.h:
668         * html/HTMLSourceElement.cpp:
669         (WebCore::HTMLSourceElement::isURLAttribute):
670         * html/HTMLSourceElement.h:
671         * html/HTMLTableCellElement.cpp:
672         (WebCore::HTMLTableCellElement::isURLAttribute):
673         * html/HTMLTableCellElement.h:
674         * html/HTMLTableElement.cpp:
675         (WebCore::HTMLTableElement::isURLAttribute):
676         * html/HTMLTableElement.h:
677         * html/HTMLTrackElement.cpp:
678         (WebCore::HTMLTrackElement::isURLAttribute):
679         * html/HTMLTrackElement.h:
680         * html/HTMLVideoElement.cpp:
681         (WebCore::HTMLVideoElement::isURLAttribute):
682         * html/HTMLVideoElement.h:
683         * svg/SVGScriptElement.cpp:
684         (WebCore::SVGScriptElement::isURLAttribute):
685         * svg/SVGScriptElement.h:
686
687 2012-05-08  Stephen Chenney  <schenney@chromium.org>
688
689         Shrink ElementAttributeData by factoring out Attr object count.
690         https://bugs.webkit.org/show_bug.cgi?id=85825
691
692         Unreviewed build fix.
693
694         * dom/ElementAttributeData.cpp:
695         (WebCore::attrListForElement): Was returning false instead of 0 for a pointer value. Now returns 0.
696
697 2012-05-08  Andreas Kling  <kling@webkit.org>
698
699         Element: Merge idAttributeChanged() into attributeChanged().
700         <http://webkit.org/b/85885>
701
702         Reviewed by Antti Koivisto.
703
704         No new tests, code churn only.
705
706         * dom/Element.h:
707         * dom/Element.cpp:
708         (WebCore::Element::attributeChanged): There's no need for this to be a standalone function anymore.
709
710 2012-05-08  Andreas Kling  <kling@webkit.org>
711
712         Shrink ElementAttributeData by factoring out Attr object count.
713         <http://webkit.org/b/85825>
714
715         Reviewed by Antti Koivisto.
716
717         Stop tracking the number of Attr objects that point to a given Element on the
718         Element itself and manage this by having a global hashmap of Element => AttrList,
719         where AttrList is a vector of (pointers to) the associated Attr objects.
720
721         This shrinks ElementAttributeData by one integer, effectively reducing memory
722         consumption by ~530kB when viewing the full HTML5 spec at <http://whatwg.org/c>.
723
724         * dom/ElementAttributeData.h:
725         (ElementAttributeData):
726
727             Remove m_attrCount...
728
729         * dom/Node.h:
730         (WebCore::Node::hasAttrList):
731         (WebCore::Node::setHasAttrList):
732         (WebCore::Node::clearHasAttrList):
733
734             ...replacing it with a Node flag that tells us whether there's an Attr
735             object map for this Node (only applies to Elements.)
736
737         * dom/ElementAttributeData.cpp:
738         (WebCore::attrListMap):
739         (WebCore::attrListForElement):
740         (WebCore::ensureAttrListForElement):
741         (WebCore::removeAttrListForElement):
742         (WebCore::ElementAttributeData::attrIfExists):
743         (WebCore::ElementAttributeData::ensureAttr):
744         (WebCore::ElementAttributeData::setAttr):
745         (WebCore::ElementAttributeData::removeAttr):
746         (WebCore::ElementAttributeData::detachAttributesFromElement):
747
748             Map Element => per-Element AttrList in a global hash.
749
750 2012-05-08  Chris Guan  <chris.guan@torchmobile.com.cn>
751
752         [Blackberry] remove m_isRequestedByPlugin in ResourceRequest
753         https://bugs.webkit.org/show_bug.cgi?id=84559
754
755         Reviewed by Antonio Gomes.
756
757         ResourceRequest is a network level abstraction, and it should
758         not know anything about web concepts such as plug-ins, and Blackberry
759         does not need m_isRequestedByPlugin any longer, So clean up all related
760         code.
761
762         Tested on a website of http://edition.cnn.com, a new window should be
763         opened only when user has a singe tap gesture on a plugin element.
764
765         * platform/network/blackberry/ResourceRequest.h:
766         (WebCore::ResourceRequest::ResourceRequest):
767         (ResourceRequest):
768         (CrossThreadResourceRequestData):
769         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
770         (WebCore::ResourceRequest::doPlatformCopyData):
771         (WebCore::ResourceRequest::doPlatformAdopt):
772
773 2012-05-03  Alexander Pavlov  <apavlov@chromium.org>
774
775         Extra line-breaks added when copying from source.
776         https://bugs.webkit.org/show_bug.cgi?id=85282
777
778         Reviewed by Ryosuke Niwa.
779
780         The code used to replace any \n by \r\n, even the one that had a preceding \r, resulting in \r\r\n.
781         This change introduces a check for the preceding \r when replacing \n's.
782
783         Test: platform/win/editing/pasteboard/pasting-crlf-isnt-translated-to-crcrlf-win.html
784
785         * platform/chromium/ClipboardUtilitiesChromium.cpp:
786         (WebCore::replaceNewlinesWithWindowsStyleNewlines):
787         * platform/win/ClipboardUtilitiesWin.cpp:
788         (WebCore::replaceNewlinesWithWindowsStyleNewlines):
789
790 2012-05-08  Adam Barth  <abarth@webkit.org>
791
792         OS(ANDROID) JNI AttachCurrentThread take JNIEnv** as a parameter, not void**
793         https://bugs.webkit.org/show_bug.cgi?id=85869
794
795         Reviewed by Eric Seidel.
796
797         According to
798         http://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/invocation.html,
799         AttachCurrentThread takes a JNIEnv** rather than a void**.  Apparently,
800         most implementations actually take a void**.  The OS(ANDROID)
801         implementation, however, actually takes an JNIEnv**.  This patch
802         introduces a typedef to give each implementation what it desires.
803
804         * bridge/jni/JNIUtility.cpp:
805         (JSC::Bindings::getJNIEnv):
806
807 2012-05-08  Balazs Kelemen  <kbalazs@webkit.org>
808
809         [Qt] X11 plugins need to be reworked for Qt5+WK1
810         https://bugs.webkit.org/show_bug.cgi?id=80691
811
812         Reviewed by Simon Hausmann.
813
814         Implement basic windowless plugin support with Qt5.
815         The solution is the same that has been chosen for
816         WebKit2. We get the content drawed by the plugin
817         from the X server as an image, create a QImage
818         from it and paint it to the window surface with QPainter.
819         Performance is sufficient for basic video playback.
820
821         No new tests, covered by existing plugin tests.
822
823         * Target.pri:
824         * WebCore.pri:
825         * platform/qt/QWebPageClient.h:
826         (QWebPageClient):
827         * plugins/PluginView.h:
828         (PluginView):
829         * plugins/qt/PluginPackageQt.cpp:
830         (WebCore::PluginPackage::isPluginBlacklisted):
831         Blacklist plugins that are incompatible with Qt5.
832         The only one I know about currently is skypebuttons
833         but the list can be extended in the future.
834         (WebCore):
835         (WebCore::PluginPackage::load):
836         * plugins/qt/PluginViewQt.cpp:
837         (X11Environment):
838         (WebCore):
839         (WebCore::x11Display):
840         (WebCore::x11Screen):
841         (WebCore::rootWindowID):
842         (WebCore::displayDepth):
843         (WebCore::syncX):
844         (WebCore::PluginView::platformPageClient): Added a safe
845         convenience getter for the QWebpageClient.
846         (WebCore::PluginView::updatePluginWidget):
847         (WebCore::PluginView::setFocus):
848         (WebCore::setupGraphicsExposeEvent):
849         (WebCore::PluginView::paintUsingXPixmap):
850         (WebCore::setSharedXEventFields):
851         (WebCore::PluginView::initXEvent):
852         (WebCore::PluginView::setXKeyEventSpecificFields):
853         (WebCore::setXButtonEventSpecificFields):
854         (WebCore::setXMotionEventSpecificFields):
855         (WebCore::setXCrossingEventSpecificFields):
856         (WebCore::PluginView::setNPWindowIfNeeded):
857         (WebCore::PluginView::setParentVisible):
858         (WebCore::PluginView::platformGetValue):
859         (WebCore::PluginView::invalidateRect):
860         (WebCore::getVisualAndColormap):
861         Refactored this function to make it more clear
862         what does it actually do.
863         (WebCore::PluginView::platformStart):
864         (WebCore::PluginView::platformDestroy):
865
866 2012-05-07  Antti Koivisto  <antti@apple.com>
867
868         Inline Node::traverseNextNode
869         https://bugs.webkit.org/show_bug.cgi?id=85844
870
871         Reviewed by Ryosuke Niwa.
872
873         Inline traverseNextNode and traverseNextSibling to reduce entry/exit overhead and allow better code generation
874         for many hot loops. Also added separate versions of stayWithin and unscoped cases (the function is
875         so simple that this seemed like the cleanest way to do it, the most reliable too) and used UNLIKELY for the 
876         end-of-traversal conditions.
877         
878         The traversal function can show up to ~1% in normal page loading profiles.
879         
880         run-perf-tests seems to think this is a progression in some subtests though bots will tell for certain.
881
882         * WebCore.exp.in:
883         * dom/ContainerNode.h:
884         
885             Following the existing pattern, function bodies go to ContainerNode.h so they can call parentNode().
886             (which returns ContainerNode, not Node).
887
888         (WebCore::Node::traverseNextNode):
889         (WebCore):
890         (WebCore::Node::traverseNextSibling):
891         * dom/Node.cpp:
892         (WebCore):
893         * dom/Node.h:
894         (Node):
895
896 2012-05-05  Pavel Feldman  <pfeldman@chromium.org>
897
898         Web Inspector: make JavaScriptSourceFrame use breakpoint manager's breakpoints store.
899         https://bugs.webkit.org/show_bug.cgi?id=85714
900
901         Reviewed by Yury Semikhatsky.
902
903         It is currently using its own copy of breakpoints which is not necessary.
904
905         * inspector/front-end/BreakpointManager.js:
906         (WebInspector.BreakpointManager):
907         (WebInspector.BreakpointManager.prototype.restoreBreakpoints):
908         (WebInspector.BreakpointManager.prototype.setBreakpoint):
909         (WebInspector.BreakpointManager.prototype._innerSetBreakpoint):
910         (WebInspector.BreakpointManager.prototype.findBreakpoint):
911         (WebInspector.BreakpointManager.prototype.reset):
912         (WebInspector.BreakpointManager.prototype._debuggerReset):
913         (WebInspector.BreakpointManager.prototype._breakpointResolved):
914         (WebInspector.BreakpointManager.prototype._uiLocationAdded):
915         (WebInspector.BreakpointManager.prototype._uiLocationRemoved):
916         (WebInspector.BreakpointManager.Breakpoint.prototype._breakpointStorageId):
917         (WebInspector.BreakpointManager.Storage.prototype._restoreBreakpoints):
918         (set WebInspector.BreakpointManager.Storage.Item):
919         * inspector/front-end/JavaScriptSource.js:
920         (WebInspector.JavaScriptSource.prototype.consoleMessagesCleared):
921         (WebInspector.JavaScriptSource.prototype.breakpointStorageId):
922         * inspector/front-end/JavaScriptSourceFrame.js:
923         (WebInspector.JavaScriptSourceFrame):
924         (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged):
925         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu):
926         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
927         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
928         (WebInspector.JavaScriptSourceFrame.prototype._breakpointAdded):
929         (WebInspector.JavaScriptSourceFrame.prototype._breakpointRemoved):
930         (WebInspector.JavaScriptSourceFrame.prototype.onTextViewerContentLoaded):
931         (WebInspector.JavaScriptSourceFrame.prototype._continueToLine):
932         (WebInspector.JavaScriptSourceFrame.prototype._updateBreakpointsAfterLiveEdit):
933
934 2012-05-07  Pavel Feldman  <pfeldman@chromium.org>
935
936         Web Inspector: do not create locations for resolved provisional breakpoints
937         https://bugs.webkit.org/show_bug.cgi?id=85716
938
939         Reviewed by Yury Semikhatsky.
940
941         Marked provisional breakpoints as such.
942
943         * inspector/front-end/BreakpointManager.js:
944         (WebInspector.BreakpointManager.prototype._debuggerReset):
945         (WebInspector.BreakpointManager.prototype._breakpointResolved):
946
947 2012-05-07  Simon Fraser  <simon.fraser@apple.com>
948
949         Compositing layers with transformed children not large enough to show contents
950         https://bugs.webkit.org/show_bug.cgi?id=85855
951
952         Reviewed by Dan Bernstein.
953         
954         r114518 added a code path to RenderLayer::calculateLayerBounds() which
955         does an early return if the layer has clipping. However, this code
956         path omitted to take local transforms into account.
957         
958         Fix is to handle transforms as we do in the non-clipped case.
959
960         Test: compositing/geometry/bounds-clipped-composited-child.html
961
962         * rendering/RenderLayer.cpp:
963         (WebCore::RenderLayer::calculateLayerBounds):
964
965 2012-05-07  Scott Graham  <scottmg@chromium.org>
966
967         Fix signed/unsigned mismatch
968         https://bugs.webkit.org/show_bug.cgi?id=85845
969
970         Make literal in assert be unsigned to match comparison on LHS. Avoids
971         warning on Windows.
972
973         Reviewed by Eric Seidel.
974
975         No new tests. No intended functionality change.
976
977         * rendering/RenderTableSection.cpp:
978         (WebCore::RenderTableSection::splitColumn):
979
980 2012-05-07  Emil A Eklund  <eae@chromium.org>
981
982         Fix performance regression for floats caused by LayoutUnit change
983         https://bugs.webkit.org/show_bug.cgi?id=85834
984
985         Reviewed by Eric Seidel.
986
987         Fix performance regression caused by r116009 by disabling the use of
988         64bit math in FractionalLayoutUnit, simplifying the pixelSnappedMaxX/Y
989         math, inlining a couple of methods and replacing the literal 0 (zero)
990         with ZERO_LAYOUT_UNIT.
991
992         No new tests, no change in functionality.
993
994         * platform/FractionalLayoutUnit.h:
995         (WebCore::boundedMultiply):
996         (WebCore::operator*):
997         (WebCore::operator/):
998         Disable the use of 64bit (long long) math in the case where the fraction
999         is set to 1.
1000         
1001         * platform/graphics/FractionalLayoutRect.h:
1002         (WebCore::FractionalLayoutRect::pixelSnappedMaxX):
1003         (WebCore::FractionalLayoutRect::pixelSnappedMaxY):
1004         Simplify the pixel snapping logic for maxX/maxY.
1005         
1006         * rendering/RenderBlock.cpp:
1007         (WebCore::RenderBlock::isSelfCollapsingBlock):
1008         (WebCore::RenderBlock::layoutBlock):
1009         (WebCore::RenderBlock::computeOverflow):
1010         (WebCore::RenderBlock::clearFloatsIfNeeded):
1011         (WebCore::RenderBlock::paintChildren):
1012         (WebCore::RenderBlock::blockSelectionGap):
1013         (WebCore::RenderBlock::logicalLeftSelectionGap):
1014         (WebCore::RenderBlock::logicalRightSelectionGap):
1015         (WebCore::RenderBlock::computeLogicalLocationForFloat):
1016         (WebCore::RenderBlock::lowestFloatLogicalBottom):
1017         (WebCore::RenderBlock::getClearDelta):
1018         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
1019         (WebCore::RenderBlock::addFocusRingRects):
1020         (WebCore::RenderBlock::adjustLinePositionForPagination):
1021         * rendering/RenderBlock.h:
1022         (WebCore::RenderBlock::availableLogicalWidthForLine):
1023         (WebCore::RenderBlock::availableLogicalWidthForContent):
1024         (WebCore::RenderBlock::FloatingObject::x):
1025         (WebCore::RenderBlock::FloatingObject::maxX):
1026         (WebCore::RenderBlock::FloatingObject::y):
1027         (WebCore::RenderBlock::FloatingObject::maxY):
1028         (WebCore::RenderBlock::FloatingObject::width):
1029         (WebCore::RenderBlock::FloatingObject::height):
1030         (FloatingObject):
1031         (WebCore::RenderBlock::FloatingObject::pixelSnappedX):
1032         (WebCore::RenderBlock::FloatingObject::pixelSnappedMaxX):
1033         (WebCore::RenderBlock::FloatingObject::pixelSnappedY):
1034         (WebCore::RenderBlock::FloatingObject::pixelSnappedMaxY):
1035         (WebCore::RenderBlock::FloatingObject::pixelSnappedWidth):
1036         (WebCore::RenderBlock::FloatingObject::pixelSnappedHeight):
1037         (WebCore::RenderBlock::RenderBlockRareData::positiveMarginBeforeDefault):
1038         (WebCore::RenderBlock::RenderBlockRareData::negativeMarginBeforeDefault):
1039         (WebCore::RenderBlock::RenderBlockRareData::positiveMarginAfterDefault):
1040         (WebCore::RenderBlock::RenderBlockRareData::negativeMarginAfterDefault):
1041         * rendering/RenderBoxModelObject.cpp:
1042         (WebCore::accumulateRelativePositionOffsets):
1043         (WebCore::RenderBoxModelObject::offsetLeft):
1044         (WebCore::RenderBoxModelObject::offsetTop):
1045         (WebCore::RenderBoxModelObject::computedCSSPaddingTop):
1046         (WebCore::RenderBoxModelObject::computedCSSPaddingBottom):
1047         (WebCore::RenderBoxModelObject::computedCSSPaddingLeft):
1048         (WebCore::RenderBoxModelObject::computedCSSPaddingRight):
1049         (WebCore::RenderBoxModelObject::computedCSSPaddingBefore):
1050         (WebCore::RenderBoxModelObject::computedCSSPaddingAfter):
1051         (WebCore::RenderBoxModelObject::computedCSSPaddingStart):
1052         (WebCore::RenderBoxModelObject::computedCSSPaddingEnd):
1053
1054 2012-05-07  Dongwoo Im  <dw.im@samsung.com>
1055
1056         width/height attributes of input element cannot be accessed by JavaScript.
1057         https://bugs.webkit.org/show_bug.cgi?id=70304
1058
1059         Reviewed by Darin Adler.
1060
1061         If the type of input element is image button, width/height attributes should be supported.
1062         These attributes are defined in HTML5 spec.
1063         http://www.w3.org/TR/html5/the-map-element.html#attr-dim-width
1064
1065         Tests: fast/forms/input-width-height-attributes-without-renderer-loaded-image.html
1066                fast/forms/input-width-height-attributes-without-renderer-not-loaded-image.html
1067                fast/forms/input-width-height-attributes-without-renderer.html
1068                fast/forms/input-width-height-attributes.html
1069
1070         * html/HTMLInputElement.cpp: Add setter/getter functions to query/set width/height of input element.
1071         (WebCore):
1072         (WebCore::HTMLInputElement::height): Gets height of input element.
1073         (WebCore::HTMLInputElement::width): Gets width of input element.
1074         (WebCore::HTMLInputElement::setHeight): Sets height of input element.
1075         (WebCore::HTMLInputElement::setWidth): Sets width of input element.
1076         * html/HTMLInputElement.h: Add public prototype.
1077         (HTMLInputElement):
1078         * html/HTMLInputElement.idl: Add width/height attributes.
1079         * html/ImageInputType.cpp: Add getter functions if the element is an image button.
1080         (WebCore):
1081         (WebCore::ImageInputType::height): Gets height of input element.
1082         (WebCore::ImageInputType::width): Gets width of input element.
1083         * html/ImageInputType.h: Add prototype.
1084         (ImageInputType):
1085         * html/InputType.cpp: Add getter functions.
1086         (WebCore::InputType::height): Returns zero.
1087         (WebCore):
1088         (WebCore::InputType::width): Returns zero.
1089         * html/InputType.h: Add prototype.
1090         (InputType):
1091
1092 2012-05-07  Kinuko Yasuda  <kinuko@chromium.org>
1093
1094         Support cross-filesystem operations in FileSystem API
1095         https://bugs.webkit.org/show_bug.cgi?id=84135
1096
1097         Reviewed by David Levin.
1098
1099         Currently we pass Entry's fullPath to AsyncFileSystem layer where
1100         we convert the given path to filesystem URL which includes origin and
1101         filesystem type information, but in that way we cannot handle
1102         cross-filesystem operations (e.g. cross-filesystem copy and move)
1103         well since we end up with always attaching the source filesystem's
1104         origin and type information for argument paths.
1105
1106         This patch does:
1107         - change AsyncFileSystem's operation methods not to take entry paths
1108           but complete filesystem URLs.
1109         - move type and rootURL information from AsyncFileSystem instance into
1110           DOMFileSystemBase instance (platform layer to Modules/filesystem layer)
1111         - move filesystem-type related code in AsyncFileSystemChromium.cpp into
1112           DOMFileSystemChromium.cpp, which implements chromioum-specific
1113           DOMFileSystem code.
1114         - move platform/FileSystemType.h into Modules/filesystem/FileSystemType.h.
1115         - adding FileSystemType.h entry to build files (e.g. WebCore.gypi, WebCore.xcodeproj etc)
1116
1117         Test: fast/filesystem/cross-filesystem-op.html
1118
1119         * Modules/filesystem/DOMFileSystem.cpp:
1120         (WebCore::DOMFileSystem::create):
1121         (WebCore::DOMFileSystem::DOMFileSystem):
1122         (WebCore::DOMFileSystem::createWriter):
1123         (WebCore::DOMFileSystem::createFile):
1124         * Modules/filesystem/DOMFileSystem.h:
1125         * Modules/filesystem/DOMFileSystemBase.cpp:
1126         (WebCore::DOMFileSystemBase::DOMFileSystemBase):
1127         (WebCore::DOMFileSystemBase::createFileSystemURL): Added as an internal
1128         implementation of Entry.toURL().
1129         (WebCore::DOMFileSystemBase::getMetadata):
1130         (WebCore::verifyAndGetDestinationPathForCopyOrMove):
1131         (WebCore::DOMFileSystemBase::move):
1132         (WebCore::DOMFileSystemBase::copy):
1133         (WebCore::DOMFileSystemBase::remove):
1134         (WebCore::DOMFileSystemBase::removeRecursively):
1135         (WebCore::DOMFileSystemBase::getParent):
1136         (WebCore::DOMFileSystemBase::getFile):
1137         (WebCore::DOMFileSystemBase::getDirectory):
1138         (WebCore::DOMFileSystemBase::readDirectory):
1139         * Modules/filesystem/DOMFileSystemBase.h: Changed to make each
1140         DOMFileSystemBase instance have filesystem type and rootURL (they were
1141         held by AsyncFileSystem previously)
1142         (WebCore::DOMFileSystemBase::create): Changed to take additional parameters.
1143         (WebCore::DOMFileSystemBase::type): Added.(Moved from AsyncFileSystem::type)
1144         (WebCore::DOMFileSystemBase::rootURL): Added.(Moved from AsyncFileSystem::rootURL).
1145         * Modules/filesystem/DOMFileSystemSync.cpp:
1146         (WebCore::DOMFileSystemSync::create):
1147         (WebCore::DOMFileSystemSync::DOMFileSystemSync):
1148         (WebCore::DOMFileSystemSync::createFile):
1149         (WebCore::DOMFileSystemSync::createWriter):
1150         * Modules/filesystem/DOMFileSystemSync.h:
1151         (WebCore::DOMFileSystemSync::create):
1152         * Modules/filesystem/DOMWindowFileSystem.cpp:
1153         (WebCore::DOMWindowFileSystem::webkitRequestFileSystem):
1154         (WebCore::DOMWindowFileSystem::webkitResolveLocalFileSystemURL):
1155         * Modules/filesystem/EntryBase.cpp:
1156         (WebCore::EntryBase::toURL):
1157         * Modules/filesystem/FileSystemCallbacks.cpp:
1158         (WebCore::FileSystemCallbacks::create):
1159         (WebCore::FileSystemCallbacks::FileSystemCallbacks):
1160         (WebCore::FileSystemCallbacks::didOpenFileSystem):
1161         (WebCore::ResolveURICallbacks::create):
1162         (WebCore::ResolveURICallbacks::ResolveURICallbacks):
1163         (WebCore::ResolveURICallbacks::didOpenFileSystem):
1164         * Modules/filesystem/FileSystemCallbacks.h:
1165         (FileSystemCallbacks):
1166         (ResolveURICallbacks):
1167         * Modules/filesystem/FileSystemType.h: Renamed from Source/WebCore/platform/FileSystemType.h.
1168         * Modules/filesystem/LocalFileSystem.cpp:
1169         (WebCore::openFileSystem):
1170         (WebCore::LocalFileSystem::readFileSystem):
1171         (WebCore::LocalFileSystem::requestFileSystem):
1172         * Modules/filesystem/LocalFileSystem.h:
1173         * Modules/filesystem/WorkerContextFileSystem.cpp:
1174         (WebCore::WorkerContextFileSystem::webkitRequestFileSystem):
1175         (WebCore::WorkerContextFileSystem::webkitRequestFileSystemSync):
1176         (WebCore::WorkerContextFileSystem::webkitResolveLocalFileSystemURL):
1177         (WebCore::WorkerContextFileSystem::webkitResolveLocalFileSystemSyncURL):
1178         * Modules/filesystem/chromium/DOMFileSystemChromium.cpp: Added for chromium-specific
1179         implementation. Almost all of the code is moved from AsyncFileSystemChromium.
1180         (WebCore::DOMFileSystemBase::isValidType):
1181         (WebCore::DOMFileSystemBase::crackFileSystemURL):
1182         (WebCore::DOMFileSystemBase::supportsToURL):
1183         (WebCore::DOMFileSystemBase::createFileSystemURL):
1184         (WebCore::DOMFileSystemChromium::createIsolatedFileSystem):
1185         * Modules/filesystem/chromium/DOMFileSystemChromium.h: Added.
1186         * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp:
1187         (WebCore::DataTransferItemFileSystem::webkitGetAsEntry):
1188         * Modules/filesystem/chromium/DraggedIsolatedFileSystem.cpp:
1189         (WebCore::DraggedIsolatedFileSystem::getDOMFileSystem):
1190         * WebCore.gypi:
1191         * platform/AsyncFileSystem.cpp:
1192         (WebCore::AsyncFileSystem::openFileSystem):
1193         * platform/AsyncFileSystem.h:
1194         (AsyncFileSystem):
1195         (WebCore::AsyncFileSystem::AsyncFileSystem):
1196         * platform/AsyncFileSystemCallbacks.h:
1197         (WebCore::AsyncFileSystemCallbacks::didOpenFileSystem):
1198         * platform/blackberry/AsyncFileSystemBlackBerry.cpp:
1199         (WebCore::AsyncFileSystem::create):
1200         (WebCore::AsyncFileSystem::openFileSystem):
1201         (WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry):
1202         (WebCore::AsyncFileSystemBlackBerry::move):
1203         (WebCore::AsyncFileSystemBlackBerry::copy):
1204         (WebCore::AsyncFileSystemBlackBerry::remove):
1205         (WebCore::AsyncFileSystemBlackBerry::removeRecursively):
1206         (WebCore::AsyncFileSystemBlackBerry::readMetadata):
1207         (WebCore::AsyncFileSystemBlackBerry::createFile):
1208         (WebCore::AsyncFileSystemBlackBerry::createDirectory):
1209         (WebCore::AsyncFileSystemBlackBerry::fileExists):
1210         (WebCore::AsyncFileSystemBlackBerry::directoryExists):
1211         (WebCore::AsyncFileSystemBlackBerry::readDirectory):
1212         (WebCore::AsyncFileSystemBlackBerry::createWriter):
1213         (WebCore::AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
1214         * platform/blackberry/AsyncFileSystemBlackBerry.h:
1215         * platform/chromium/PlatformSupport.h:
1216         * platform/gtk/AsyncFileSystemGtk.cpp:
1217         (WebCore::AsyncFileSystem::create):
1218         (WebCore::AsyncFileSystem::openFileSystem):
1219         (WebCore::AsyncFileSystemGtk::AsyncFileSystemGtk):
1220         (WebCore::AsyncFileSystemGtk::move):
1221         (WebCore::AsyncFileSystemGtk::copy):
1222         (WebCore::AsyncFileSystemGtk::remove):
1223         (WebCore::AsyncFileSystemGtk::removeRecursively):
1224         (WebCore::AsyncFileSystemGtk::readMetadata):
1225         (WebCore::AsyncFileSystemGtk::createFile):
1226         (WebCore::AsyncFileSystemGtk::createDirectory):
1227         (WebCore::AsyncFileSystemGtk::fileExists):
1228         (WebCore::AsyncFileSystemGtk::directoryExists):
1229         (WebCore::AsyncFileSystemGtk::readDirectory):
1230         (WebCore::AsyncFileSystemGtk::createWriter):
1231         * platform/gtk/AsyncFileSystemGtk.h:
1232
1233         * GNUmakefile.list.am: Added FileSystemType.h.
1234         * WebCore.gypi: Added FileSystemType.h.
1235         * WebCore.vcproj/WebCore.vcproj: Added FileSystemType.h.
1236         * WebCore.xcodeproj/project.pbxproj: Added FileSystemType.h.
1237
1238 2012-05-07  Adam Barth  <abarth@webkit.org>
1239
1240         [Chromium] Android wishes to use an empty implementation if AXObjectCache
1241         https://bugs.webkit.org/show_bug.cgi?id=85842
1242
1243         Reviewed by Eric Seidel.
1244
1245         Add proper HAVE(ACCESSIBILITY) ifdefs so that Chromium builds without
1246         accessibility.
1247
1248         * accessibility/chromium/AXObjectCacheChromium.cpp:
1249         * accessibility/chromium/AccessibilityObjectChromium.cpp:
1250
1251 2012-05-07  Greg Billock  <gbillock@google.com>
1252
1253         [Web Intents] Flagged-off implementation of an intent tag for registration.
1254         https://bugs.webkit.org/show_bug.cgi?id=73039
1255
1256         Reviewed by Adam Barth.
1257
1258         The intent tag is a declarative way for pages to register that they
1259         accept delivery of web intent invocations of particular types. See the
1260         spec at http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html
1261
1262         After discussion on the WhatWG list (see thread at
1263         http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-April/035301.html)
1264         the current plan is to combine declarative registration of Web
1265         Intents and protocol/content handlers with this tag. Alternatives
1266         considered were the meta and link tags.
1267
1268         * WebCore.gypi:
1269         * html/HTMLAttributeNames.in:
1270         * html/HTMLElementsAllInOne.cpp:
1271         * html/HTMLIntentElement.cpp: Added.
1272         (WebCore::HTMLIntentElement::HTMLIntentElement):
1273         (WebCore::HTMLIntentElement::create):
1274         (WebCore::HTMLIntentElement::insertedIntoDocument):
1275         * html/HTMLIntentElement.h: Added.
1276         * html/HTMLIntentElement.idl: Added.
1277         * html/HTMLTagNames.in:
1278         * loader/FrameLoaderClient.h:
1279         (WebCore::FrameLoaderClient::registerIntentService):
1280         * page/DOMWindow.idl:
1281
1282 2012-05-07  Dana Jansens  <danakj@chromium.org>
1283
1284         Region::intersects() and Region::contains() are slow due to copy overhead
1285         https://bugs.webkit.org/show_bug.cgi?id=81076
1286
1287         Reviewed by Anders Carlsson.
1288
1289         Testing contains() and intersects() requires a copy which ends up
1290         invoking a malloc on sufficiently complicated web pages, and slows down
1291         the test unnecessarily. These methods can be done by iterating over the
1292         Region::Shape values rather than making a copy of the entire region and
1293         manipulating it.
1294
1295         This uses Region::Shape::compareShapes() to walk the query regions and
1296         compute the result of the intersects or contains tests without making a
1297         copy.
1298
1299         This change improves the performance of the Region overlap testing for
1300         composited layers, and allows for testing contains() before unite() to
1301         avoid unnecessary copies of the Region when inserting into complex
1302         Regions. With a layout test that has 225 composited layers, and tests
1303         Region.intersects() for 1000 layers above them, this change decreases
1304         the running time of the test by 1.2% by avoiding a copy of the 225
1305         rects each time.
1306
1307         Unit test: RegionTest.intersectsRegion
1308                    RegionTest.containsRegion
1309
1310         * platform/graphics/Region.cpp:
1311         (WebCore::Region::contains):
1312         (WebCore::Region::intersects):
1313         (WebCore):
1314         (WebCore::Region::Shape::compareShapes):
1315         (Region::Shape::CompareContainsOperation):
1316         (WebCore::Region::Shape::CompareContainsOperation::aOutsideB):
1317         (WebCore::Region::Shape::CompareContainsOperation::bOutsideA):
1318         (WebCore::Region::Shape::CompareContainsOperation::aOverlapsB):
1319         (Region::Shape::CompareIntersectsOperation):
1320         (WebCore::Region::Shape::CompareIntersectsOperation::aOutsideB):
1321         (WebCore::Region::Shape::CompareIntersectsOperation::bOutsideA):
1322         (WebCore::Region::Shape::CompareIntersectsOperation::aOverlapsB):
1323         * platform/graphics/Region.h:
1324         (Shape):
1325
1326 2012-05-07  David Tseng  <dtseng@google.com>
1327
1328         Correct logical error in accessibilityIsIgnored.
1329         https://bugs.webkit.org/show_bug.cgi?id=85828
1330
1331         Reviewed by Chris Fleizach.
1332
1333         Covered by existing tests.
1334
1335         * accessibility/AccessibilityMenuListOption.cpp:
1336         (WebCore::AccessibilityMenuListOption::accessibilityIsIgnored):
1337         * accessibility/AccessibilityMenuListPopup.cpp:
1338         (WebCore::AccessibilityMenuListPopup::accessibilityIsIgnored):
1339
1340 2012-05-04  Zhenyao Mo  <zmo@google.com>
1341
1342         vertexAttribPointer needs to reject large negative offsets
1343         https://bugs.webkit.org/show_bug.cgi?id=85117
1344
1345         Reviewed by Kenneth Russell.
1346
1347         * html/canvas/WebGLRenderingContext.cpp: Use long long for GLsizeiptr and GLintptr
1348         (WebCore):
1349         (WebCore::WebGLRenderingContext::bufferData):
1350         (WebCore::WebGLRenderingContext::bufferSubData):
1351         (WebCore::WebGLRenderingContext::drawElements):
1352         (WebCore::WebGLRenderingContext::getVertexAttribOffset):
1353         (WebCore::WebGLRenderingContext::vertexAttribPointer):
1354         * html/canvas/WebGLRenderingContext.h: Ditto
1355         (WebGLRenderingContext):
1356         * html/canvas/WebGLRenderingContext.idl: Ditto
1357
1358 2012-05-07  Pravin D  <pravind.2k4@gmail.com>
1359
1360         :first-line text-decorations are not rendered
1361         https://bugs.webkit.org/show_bug.cgi?id=6047
1362
1363         Text-decorations are applied during paint phase. The style was not being properly selected in case of
1364         first line box. The patch fixes this. 
1365
1366         Reviewed by Eric Seidel.
1367
1368         Tests: fast/css/first-line-text-decoration-inherited-from-parent.html
1369                fast/css/first-line-text-decoration.html
1370
1371         * rendering/InlineTextBox.cpp:
1372         (WebCore::InlineTextBox::paintDecoration):
1373         Inform the decoration color retriever if this box is part of the first line box or not.
1374
1375         * rendering/RenderObject.cpp:
1376         (WebCore::decorationColor):
1377         Changed the argument from RenderObject* to RenderStyle*. As this function is just a helper to getTextDecorationColors
1378         as used RenderObject solely to retrieve the corresponding RenderStyle, which(RenderStyle*) was already available with the latter function. 
1379
1380         (WebCore::RenderObject::getTextDecorationColors):
1381         Take a new variable to check if first line style or the regular style has to be used.
1382         Sends RenderStyle* as an argument to decorationColor(). 
1383
1384         * rendering/RenderObject.h:
1385         (RenderObject):
1386
1387 2012-05-07  Julien Chaffraix  <jchaffraix@webkit.org>
1388
1389         Refactor windowClipRectForLayer to remove the explicit RenderLayer dependency
1390         https://bugs.webkit.org/show_bug.cgi?id=84090
1391
1392         Reviewed by David Hyatt.
1393
1394         No observable change in behavior.
1395
1396         The function name was ambiguous as it was not a general purpose function but was
1397         working directly on HTMLFrameOwnerElement. The rename makes this more obvious as
1398         well as removes the explicit dependency on RenderLayer.
1399
1400         One of the slight change of this refactoring is that we now always null-check the
1401         HTMLFrameOwnerElement's renderer as part windowClipRectForFrameOwner as I don't see
1402         any evidence for the other code paths not to hit that. Also we may recur more on our
1403         frame tree if we have no layer as we now call windowClipRect() in this case.
1404
1405         * page/FrameView.h:
1406         (FrameView):
1407         * plugins/PluginView.cpp:
1408         (WebCore::PluginView::windowClipRect):
1409         * WebCore.exp.in:
1410         * WebCore.order:
1411         * page/FrameView.cpp:
1412         (WebCore::FrameView::windowClipRect):
1413         Updated after windowClipRectForLayer name and signature change.
1414
1415         (WebCore::FrameView::windowClipRectForFrameOwner):
1416         This function now takes the HTMLFrameOwnerElement directly.
1417
1418         * plugins/PluginView.cpp:
1419         (WebCore::PluginView::PluginView):
1420         (WebCore::PluginView::create):
1421         * plugins/PluginView.h:
1422         (PluginView):
1423         Updated |m_element| to be an HTMLPlugInElement as this was what was
1424         passed by every caller. This makes the conversion to HTMLFrameOwnerElement
1425         possible.
1426
1427 2012-05-07  Enrica Casucci  <enrica@apple.com>
1428
1429         REGRESSION (r101575): Chinese input is broken when composing mail in iCloud using Safari.
1430         https://bugs.webkit.org/show_bug.cgi?id=85840
1431         <rdar://problem/11115520> 
1432         
1433         Reviewed by Alexey Proskuryakov.
1434
1435         The revision that broke this, introduced a way to sanitize the markup when deleting a range selection.
1436         iCloud listens for DOM modification events and clears the selection, altering the input method state.
1437         The fix consists in adding a paramenter to DeleteSelectionCommand to control when we sanitize the
1438         markup.
1439         
1440         * editing/CompositeEditCommand.cpp:
1441         (WebCore::CompositeEditCommand::deleteSelection):
1442         * editing/CompositeEditCommand.h:
1443         * editing/DeleteSelectionCommand.cpp:
1444         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
1445         (WebCore::DeleteSelectionCommand::doApply):
1446         * editing/DeleteSelectionCommand.h:
1447         (WebCore::DeleteSelectionCommand::create):
1448         * editing/InsertTextCommand.cpp:
1449         (WebCore::InsertTextCommand::doApply):
1450
1451 2012-05-07  Andy Estes  <aestes@apple.com>
1452
1453         ENABLE_IFRAME_SEAMLESS should be part of FEATURE_DEFINES.
1454
1455         * Configurations/FeatureDefines.xcconfig:
1456
1457 2012-05-06  Martin Robinson  <mrobinson@igalia.com>
1458
1459         [Cairo] Implement ImageBuffer::copyImage for BackingStoreCopy == DontCopyBackingStore
1460         https://bugs.webkit.org/show_bug.cgi?id=85728
1461
1462         Reviewed by Alejandro G. Castro.
1463
1464         No new tests. This should not change functionality, only increase performance.
1465
1466         * platform/graphics/cairo/ImageBufferCairo.cpp:
1467         (WebCore::ImageBuffer::copyImage): Add an implementation that knows how to avoid copying the backing store.
1468         (WebCore::ImageBuffer::draw): Use the copyImage constructor now that it knows how to
1469         avoid copying the backing store.
1470         (WebCore::ImageBuffer::drawPattern): Ditto.
1471         * platform/graphics/texmap/TextureMapperLayer.cpp:
1472         (WebCore::TextureMapperLayer::updateBackingStore): Use DontCopyBackingStore for Cairo
1473         as well.
1474
1475 2012-05-07  Noel Gordon  <noel.gordon@gmail.com>
1476
1477         [CG] Separate image encoding from dataURL construction
1478         https://bugs.webkit.org/show_bug.cgi?id=85782
1479
1480         Reviewed by Kenneth Russell.
1481
1482         Remove the implicit assumption that a dataURL is the only desired output format
1483         of the image encoding phase.
1484
1485         No new tests. No behavioral change. Covered by canvas 2d and 3d tests:
1486             canvas/philip/tests/*toDataURL*.html
1487             fast/canvas/webgl/premultiplyalpha-test.html
1488
1489         * platform/graphics/cg/ImageBufferCG.cpp:
1490         (WebCore::CGImageEncodeToData): Image encoding helper: encode the image using the
1491         uti-defined encoder (PNG/JPEG/etc) and output to the given CFMutableDataRef data.
1492         (WebCore):
1493         (WebCore::CGImageToDataURL): Refactor to use CGImageEncodeToData().
1494
1495 2012-05-07  Scott Graham  <scottmg@chromium.org>
1496
1497         [Chromium] Suppress switch-without-cases warning
1498         https://bugs.webkit.org/show_bug.cgi?id=85830
1499
1500         Warnings like 
1501         ...\webkit\CSSGrammar.cpp(2075) : warning C4065: switch statement contains 'default' but no 'case' labels
1502         are generated. These are bogus, so just suppress them in the build
1503         settings.
1504
1505         Reviewed by Dirk Pranke
1506
1507         No new tests, no intended functionlity change. Just changing compiler
1508         settings.
1509
1510         * WebCore.gyp/WebCore.gyp:
1511
1512 2012-05-07  Adrienne Walker  <enne@google.com>
1513
1514         [chromium] Allow for asymmetric tile sizes on composited tiled layers
1515         https://bugs.webkit.org/show_bug.cgi?id=85687
1516
1517         Reviewed by James Robinson.
1518
1519         Update TiledLayerChromium/CCLayerTilingData/TilingData to allow for a
1520         the width and height of tile sizes to differ. Modify TilingData to use
1521         IntSize everywhere for these width/height pairs.
1522
1523         Also, remove some unused functions from TilingData.
1524
1525         Test: TilingDataTest.*
1526
1527         * platform/graphics/chromium/TiledLayerChromium.cpp:
1528         (WebCore::TiledLayerChromium::TiledLayerChromium):
1529         (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption):
1530         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
1531         (WebCore::CCLayerTilingData::CCLayerTilingData):
1532         (WebCore::CCLayerTilingData::setTileSize):
1533         (WebCore):
1534         (WebCore::CCLayerTilingData::tileSize):
1535         (WebCore::CCLayerTilingData::operator=):
1536         (WebCore::CCLayerTilingData::tileRect):
1537         (WebCore::CCLayerTilingData::setBounds):
1538         (WebCore::CCLayerTilingData::bounds):
1539         * platform/graphics/chromium/cc/CCLayerTilingData.h:
1540         (CCLayerTilingData):
1541         * platform/graphics/gpu/Texture.cpp:
1542         (WebCore::Texture::Texture):
1543         (WebCore::Texture::create):
1544         (WebCore::Texture::load):
1545         (WebCore::Texture::updateSubRect):
1546         * platform/graphics/gpu/TilingData.cpp:
1547         (WebCore::TilingData::TilingData):
1548         (WebCore::TilingData::setTotalSize):
1549         (WebCore::TilingData::setMaxTextureSize):
1550         (WebCore::TilingData::tileXIndexFromSrcCoord):
1551         (WebCore::TilingData::tileYIndexFromSrcCoord):
1552         (WebCore::TilingData::tileBounds):
1553         (WebCore::TilingData::tileSizeX):
1554         (WebCore::TilingData::tileSizeY):
1555         (WebCore::TilingData::recomputeNumTiles):
1556         * platform/graphics/gpu/TilingData.h:
1557         (TilingData):
1558         (WebCore::TilingData::totalSize):
1559         (WebCore::TilingData::maxTextureSize):
1560         (WebCore::TilingData::TilingData):
1561
1562 2012-05-07  Raymond Toy  <rtoy@google.com>
1563
1564         ConvolverNode setBuffer() should not ASSERT on null buffer
1565         https://bugs.webkit.org/show_bug.cgi?id=85653
1566
1567         Reviewed by Chris Rogers.
1568
1569         Test: webaudio/convolver-setBuffer-null.html
1570
1571         * Modules/webaudio/ConvolverNode.cpp:
1572         (WebCore::ConvolverNode::setBuffer):  Don't ASSERT on null buffer.
1573
1574 2012-05-07  Ken Buchanan  <kenrb@chromium.org>
1575
1576         Crash due to positioned object list not being cleared during block flow split
1577         https://bugs.webkit.org/show_bug.cgi?id=85074
1578
1579         Reviewed by Abhishek Arya.
1580
1581         When an element is being split due to a column span element being
1582         inserted, any of its ancestors that are underneath the column
1583         containing block also get split. If an ancestor has an object in
1584         its positioned object list from a previous layout, then the list
1585         will have to be cleared because the positioned object could have moved
1586         to be under the continuation. This patch causes the list to be
1587         cleared.
1588
1589         * rendering/RenderBlock.cpp:
1590         (WebCore::RenderBlock::splitBlocks):
1591
1592 2012-05-07  Eric Seidel  <eric@webkit.org>
1593
1594         Add ENABLE_IFRAME_SEAMLESS so Apple can turn off SEAMLESS if needed
1595         https://bugs.webkit.org/show_bug.cgi?id=85822
1596
1597         Reviewed by Adam Barth.
1598
1599         * Configurations/FeatureDefines.xcconfig:
1600         * dom/Document.cpp:
1601         (WebCore::Document::shouldDisplaySeamlesslyWithParent):
1602
1603 2012-05-07  Shezan Baig  <shezbaig.wk@gmail.com>
1604
1605         Selection Background Color Error
1606         https://bugs.webkit.org/show_bug.cgi?id=80382
1607
1608         Reviewed by David Hyatt.
1609
1610         Determine the text colors and selection colors before painting the
1611         background behind the text.  This is because when determining whether
1612         to invert the selection background, the selection text color should be
1613         used instead of the regular text color.  With this patch, the selection
1614         text color is passed to 'paintSelection' so that the selection
1615         background can be compared against it, instead of comparing against the
1616         CSSPropertyColor value.
1617
1618         Test: fast/backgrounds/selection-background-color.html
1619
1620         * rendering/InlineTextBox.cpp:
1621         (WebCore::InlineTextBox::paint):
1622             Pass selection text color to paintSelection
1623
1624         (WebCore::InlineTextBox::paintSelection):
1625             Use the selection text color instead of CSSPropertyColor
1626
1627         * rendering/InlineTextBox.h:
1628         (InlineTextBox):
1629             Adjust signature of paintSelection to accept text color
1630
1631 2012-05-07  David Reveman  <reveman@chromium.org>
1632
1633         [Chromium] Use GL_CHROMIUM_command_buffer_query to throttle texture uploads.
1634         https://bugs.webkit.org/show_bug.cgi?id=81004
1635
1636         Reviewed by Adrienne Walker.
1637
1638         Add ThrottledTextureUploader class that uses GL_CHROMIUM_command_buffer_query
1639         to throttle texture uploads based on number of currently pending queries.
1640
1641         Unit test: ThrottledTextureUploaderTest.IsBusy
1642
1643         * WebCore.gypi:
1644         * platform/graphics/chromium/LayerRendererChromium.cpp:
1645         (WebCore::LayerRendererChromium::create):
1646         (WebCore::LayerRendererChromium::LayerRendererChromium):
1647         (WebCore::LayerRendererChromium::initializeSharedObjects):
1648         * platform/graphics/chromium/LayerRendererChromium.h:
1649         (LayerRendererChromium):
1650         * platform/graphics/chromium/TextureUploader.cpp: Removed.
1651         * platform/graphics/chromium/TextureUploader.h:
1652         (TextureUploader):
1653         * platform/graphics/chromium/ThrottledTextureUploader.cpp: Added.
1654         (WebCore):
1655         (WebCore::ThrottledTextureUploader::Query::Query):
1656         (WebCore::ThrottledTextureUploader::Query::~Query):
1657         (WebCore::ThrottledTextureUploader::Query::begin):
1658         (WebCore::ThrottledTextureUploader::Query::end):
1659         (WebCore::ThrottledTextureUploader::Query::isPending):
1660         (WebCore::ThrottledTextureUploader::Query::wait):
1661         (WebCore::ThrottledTextureUploader::ThrottledTextureUploader):
1662         (WebCore::ThrottledTextureUploader::~ThrottledTextureUploader):
1663         (WebCore::ThrottledTextureUploader::isBusy):
1664         (WebCore::ThrottledTextureUploader::beginUploads):
1665         (WebCore::ThrottledTextureUploader::endUploads):
1666         (WebCore::ThrottledTextureUploader::uploadTexture):
1667         (WebCore::ThrottledTextureUploader::processQueries):
1668         * platform/graphics/chromium/ThrottledTextureUploader.h: Copied from Source/WebCore/platform/graphics/chromium/TextureUploader.h.
1669         (WebCore):
1670         (ThrottledTextureUploader):
1671         (WebCore::ThrottledTextureUploader::create):
1672         (Query):
1673         (WebCore::ThrottledTextureUploader::Query::create):
1674         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1675         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
1676         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1677         (CCLayerTreeHostImpl):
1678         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1679         (UnthrottledTextureUploader):
1680         (WebCore::UnthrottledTextureUploader::create):
1681         (WebCore::UnthrottledTextureUploader::~UnthrottledTextureUploader):
1682         (WebCore::UnthrottledTextureUploader::isBusy):
1683         (WebCore::UnthrottledTextureUploader::beginUploads):
1684         (WebCore::UnthrottledTextureUploader::endUploads):
1685         (WebCore::UnthrottledTextureUploader::uploadTexture):
1686         (WebCore::UnthrottledTextureUploader::UnthrottledTextureUploader):
1687         (WebCore):
1688         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
1689         (WebCore::CCSingleThreadProxy::recreateContext):
1690         (WebCore::CCSingleThreadProxy::doCommit):
1691         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
1692         (WebCore::CCTextureUpdater::update):
1693         * platform/graphics/chromium/cc/CCTextureUpdater.h:
1694         (CCTextureUpdater):
1695         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1696         (WebCore):
1697         (UnthrottledTextureUploader):
1698         (WebCore::UnthrottledTextureUploader::create):
1699         (WebCore::UnthrottledTextureUploader::~UnthrottledTextureUploader):
1700         (WebCore::UnthrottledTextureUploader::isBusy):
1701         (WebCore::UnthrottledTextureUploader::beginUploads):
1702         (WebCore::UnthrottledTextureUploader::endUploads):
1703         (WebCore::UnthrottledTextureUploader::uploadTexture):
1704         (WebCore::UnthrottledTextureUploader::UnthrottledTextureUploader):
1705         (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
1706         (WebCore::CCThreadProxy::recreateContextOnImplThread):
1707
1708 2012-05-07  Rob Buis  <rbuis@rim.com>
1709
1710         Shrink SVGInlineTextBox object size
1711         https://bugs.webkit.org/show_bug.cgi?id=85805
1712
1713         Reviewed by Darin Adler.
1714
1715         Reduce the object size of SVGInlineTextBox by using bitfields. This
1716         should be 4 bytes on 32-bits and 8 bytes on 64-bits systems.
1717
1718         * rendering/svg/RenderSVGResource.h:
1719         * rendering/svg/SVGInlineTextBox.cpp:
1720         (ExpectedSVGInlineTextBoxSize):
1721         (WebCore):
1722         * rendering/svg/SVGInlineTextBox.h:
1723         (SVGInlineTextBox):
1724
1725 2012-05-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1726
1727         Unreviewed, rolling out r116334.
1728         http://trac.webkit.org/changeset/116334
1729         https://bugs.webkit.org/show_bug.cgi?id=85816
1730
1731         Broke the Chromium Win/Mac compile (Requested by
1732         ojan_gardening on #webkit).
1733
1734         * WebCore.gypi:
1735         * platform/graphics/chromium/AnimationIdVendor.cpp: Removed.
1736         * platform/graphics/chromium/AnimationIdVendor.h: Removed.
1737         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1738         (std):
1739         (WebCore::GraphicsLayerChromium::updateNames):
1740         (WebCore::GraphicsLayerChromium::addAnimation):
1741         (WebCore::GraphicsLayerChromium::updateChildList):
1742         (WebCore::GraphicsLayerChromium::mapAnimationNameToId):
1743         * platform/graphics/chromium/GraphicsLayerChromium.h:
1744         (WebCore):
1745         (GraphicsLayerChromium):
1746         * platform/graphics/chromium/LinkHighlightLayerDelegate.cpp: Removed.
1747         * platform/graphics/chromium/LinkHighlightLayerDelegate.h: Removed.
1748
1749 2012-05-07  Adrienne Walker  <enne@google.com>
1750
1751         Fix containerForRepaint() assumption about non-null enclosingLayer()
1752         https://bugs.webkit.org/show_bug.cgi?id=85807
1753
1754         Reviewed by Simon Fraser.
1755
1756         * rendering/RenderObject.cpp:
1757         (WebCore::RenderObject::containerForRepaint):
1758
1759 2012-05-07  Alec Flett  <alecflett@chromium.org>
1760
1761         IndexedDB: Replace numeric constants with strings
1762         https://bugs.webkit.org/show_bug.cgi?id=84894
1763
1764         Reviewed by Tony Chang.
1765
1766         Test: storage/indexeddb/legacy-constants.html
1767
1768         Update IDBObjectStore.openCursor, IDBIndex.openCursor,
1769         IDBIndex.openKeyCursor, IDBDatabase.transaction,
1770         IDBCursor.direction, IDBTransaction.mode, and
1771         IDBRequest.readyState to meet the latest spec. All of these APIs
1772         now support string-based values in addition to the
1773         legacy/deprecated enum-based values.
1774
1775         * Modules/indexeddb/IDBCursor.cpp:
1776         (WebCore):
1777         (WebCore::IDBCursor::direction):
1778         (WebCore::IDBCursor::stringToDirection):
1779         (WebCore::IDBCursor::directionToString):
1780         * Modules/indexeddb/IDBCursor.h:
1781         (IDBCursor):
1782         * Modules/indexeddb/IDBCursor.idl:
1783         * Modules/indexeddb/IDBDatabase.cpp:
1784         (WebCore::IDBDatabase::transaction):
1785         (WebCore):
1786         * Modules/indexeddb/IDBDatabase.h:
1787         (IDBDatabase):
1788         * Modules/indexeddb/IDBDatabase.idl:
1789         * Modules/indexeddb/IDBIndex.cpp:
1790         (WebCore::IDBIndex::openCursor):
1791         (WebCore):
1792         (WebCore::IDBIndex::openKeyCursor):
1793         * Modules/indexeddb/IDBIndex.h:
1794         (WebCore::IDBIndex::openCursor):
1795         (IDBIndex):
1796         (WebCore::IDBIndex::openKeyCursor):
1797         * Modules/indexeddb/IDBIndex.idl:
1798         * Modules/indexeddb/IDBObjectStore.cpp:
1799         (WebCore::IDBObjectStore::openCursor):
1800         (WebCore):
1801         * Modules/indexeddb/IDBObjectStore.h:
1802         (WebCore::IDBObjectStore::openCursor):
1803         (IDBObjectStore):
1804         * Modules/indexeddb/IDBObjectStore.idl:
1805         * Modules/indexeddb/IDBRequest.cpp:
1806         (WebCore::IDBRequest::IDBRequest):
1807         (WebCore::IDBRequest::readyState):
1808         (WebCore::IDBRequest::markEarlyDeath):
1809         (WebCore::IDBRequest::resetReadyState):
1810         (WebCore::IDBRequest::abort):
1811         (WebCore::IDBRequest::finishCursor):
1812         (WebCore::IDBRequest::onSuccess):
1813         (WebCore::IDBRequest::stop):
1814         * Modules/indexeddb/IDBRequest.h:
1815         * Modules/indexeddb/IDBRequest.idl:
1816         * Modules/indexeddb/IDBTransaction.cpp:
1817         (WebCore):
1818         (WebCore::IDBTransaction::mode):
1819         (WebCore::IDBTransaction::stringToMode):
1820         (WebCore::IDBTransaction::modeToString):
1821         * Modules/indexeddb/IDBTransaction.h:
1822         (IDBTransaction):
1823         * Modules/indexeddb/IDBTransaction.idl:
1824
1825 2012-05-07  W. James MacLean  <wjmaclean@chromium.org>
1826
1827         [chromium] Create LinkHighlightLayerChromium class to provide link-highlight preview animations for GraphicsLayerChromium.
1828         https://bugs.webkit.org/show_bug.cgi?id=85084
1829
1830         Reviewed by Adrienne Walker.
1831
1832         Unit test provided.
1833
1834         Creates a layer delegate class to provide link highlight animations for link-preview feature.
1835         These are added to a GraphicsLayerChromium via provided methods. Moves dispensing of animation
1836         ids into a separate class.
1837
1838         * WebCore.gypi:
1839         * platform/graphics/chromium/AnimationIdVendor.cpp: Added.
1840         (WebCore):
1841         (WebCore::AnimationIdVendor::getNextAnimationId):
1842         (WebCore::AnimationIdVendor::getNextGroupId):
1843         * platform/graphics/chromium/AnimationIdVendor.h: Added.
1844         (WebCore):
1845         (AnimationIdVendor):
1846         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1847         (WebCore::GraphicsLayerChromium::updateNames):
1848         (WebCore::GraphicsLayerChromium::addAnimation):
1849         (WebCore::GraphicsLayerChromium::addLinkHighlightLayer):
1850         (WebCore):
1851         (WebCore::GraphicsLayerChromium::didFinishLinkHighlightLayer):
1852         (WebCore::GraphicsLayerChromium::updateChildList):
1853         (WebCore::GraphicsLayerChromium::mapAnimationNameToId):
1854         * platform/graphics/chromium/GraphicsLayerChromium.h:
1855         (WebCore):
1856         (GraphicsLayerChromium):
1857         * platform/graphics/chromium/LinkHighlightLayerDelegate.cpp: Added.
1858         (WebCore):
1859         (WebCore::LinkHighlightLayerDelegate::create):
1860         (WebCore::LinkHighlightLayerDelegate::LinkHighlightLayerDelegate):
1861         (WebCore::LinkHighlightLayerDelegate::~LinkHighlightLayerDelegate):
1862         (WebCore::LinkHighlightLayerDelegate::getContentLayer):
1863         (WebCore::LinkHighlightLayerDelegate::paintContents):
1864         (WebCore::LinkHighlightLayerDelegate::didScroll):
1865         (WebCore::LinkHighlightLayerDelegate::notifyAnimationStarted):
1866         (WebCore::LinkHighlightLayerDelegate::notifyAnimationFinished):
1867         * platform/graphics/chromium/LinkHighlightLayerDelegate.h: Added.
1868         (WebCore):
1869         (LinkHighlightLayerDelegate):
1870
1871 2012-05-07  Joshua Bell  <jsbell@chromium.org>
1872
1873         IndexedDB: LevelDB coding for bools is broken
1874         https://bugs.webkit.org/show_bug.cgi?id=85810
1875
1876         Reviewed by Tony Chang.
1877
1878         Code was appending to a pre-sized Vector, rather than using an
1879         index setter. This caused uninitialized data to be written out.
1880         Issue was detected on the Chromium side in http://crbug.com/126388
1881
1882         Tests: webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.*codeBool'
1883
1884         * Modules/indexeddb/IDBLevelDBCoding.cpp:
1885         (WebCore::IDBLevelDBCoding::encodeBool):
1886
1887 2012-05-07  Shawn Singh  <shawnsingh@chromium.org>
1888
1889         [chromium] CCMathUtil projectPoint needs to avoid divide-by-zero
1890         https://bugs.webkit.org/show_bug.cgi?id=85560
1891
1892         Reviewed by Adrienne Walker.
1893
1894         Unit test added: CCMathUtilTest.cpp - verifyProjectionOfPerpendicularPlane
1895         Unit test updated/renamed: CCLayerTreeHostCommonTest.cpp - verifyVisibleRectFor3dPerspectiveWhenClippedByW
1896
1897         The divide-by-zero occurs in an innocuous case where the layers
1898         are probably invisible anyway. However, producing Infs and NaNs
1899         could cause values to be used when un-intended, so its appropriate
1900         to handle the divide-by-zero correctly.
1901
1902         * platform/graphics/chromium/cc/CCMathUtil.cpp:
1903         (WebCore::projectPoint):
1904
1905 2012-05-07  Pravin D  <pravind.2k4@gmail.com>
1906
1907         Wrong positioning due to wrong width calculation wrt width:0
1908         https://bugs.webkit.org/show_bug.cgi?id=50135
1909
1910         Reviewed by Eric Seidel.
1911
1912         Test: fast/block/block-parent-with-zero-width-child.html
1913
1914         * rendering/RenderBlock.cpp:
1915         (WebCore::RenderBlock::computePreferredLogicalWidths):
1916         When width is fixed, the specified width must be taken, provided the value is positive.
1917         Width=0 case was being ignored.
1918
1919 2012-05-07  Noel Gordon  <noel.gordon@gmail.com>
1920
1921         [CG] ImageBuffer::ImageDataToDataURL: Remove alpha stuffing when encoding to JPEG
1922         https://bugs.webkit.org/show_bug.cgi?id=85779
1923
1924         Reviewed by Eric Seidel.
1925
1926         No change in behavior. Covered by fast/canvas/webgl/premultiplyalpha-test.html
1927
1928         * platform/graphics/cg/ImageBufferCG.cpp:
1929         (WebCore::ImageDataToDataURL): Remove the need to stuff the alpha channel with 255.
1930         Rename dataVector to premultipliedData and verify that its resize() worked. Rewrite
1931         the premultiplication loop without the alpha channel = 255 part and ask the CG JPEG
1932         encoder to ignore the alpha channel (kCGImageAlphaNoneSkipLast) instead.
1933
1934 2012-05-07  Dominik R√∂ttsches  <dominik.rottsches@linux.intel.com>
1935
1936         [GTK] media/video-seek-past-end-playing.html times out
1937         https://bugs.webkit.org/show_bug.cgi?id=84858
1938
1939         Reviewed by Philippe Normand.
1940
1941         Removing the intentional state change to PAUSED on didEnd().
1942         My understanding is that the fix works because the additional
1943         state transition to PAUSED was resetting the internal m_seeking state to early,
1944         so that updatePlayState() in HTMLMediaElement was not able to
1945         correctly figure out/recover playstate after seeking.
1946
1947         No new tests, covered by existing media tests, and fixing
1948         video-seek-past-end-playing.html flakiness on GTK, failure on EFL.
1949
1950         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1951
1952 2012-05-07  Abhishek Arya  <inferno@chromium.org>
1953
1954         Crash in RenderBlock::updateFirstLetterStyle.
1955         https://bugs.webkit.org/show_bug.cgi?id=85759
1956
1957         Reviewed by Julien Chaffraix.
1958
1959         Test: fast/css-generated-content/first-letter-next-sibling-crash.html
1960
1961         RenderBlock::removeChild can bring up the children from last single anonymous block,
1962         causing |nextSibling| in RenderBlock::updateFirstLetterStyle to go stale. We prevent
1963         this by removing the child safely using removeChildNode before destroying it.
1964
1965         * rendering/RenderBlock.cpp:
1966         (WebCore::RenderBlock::updateFirstLetterStyle):
1967
1968 2012-05-07  Tommy Widenflycht  <tommyw@google.com>
1969
1970         MediaStream API: Rename MediaStreamCenter::didConstructMediaStream
1971         https://bugs.webkit.org/show_bug.cgi?id=85796
1972
1973         Reviewed by Adam Barth.
1974
1975         Renamed MediaStreamCenter::didConstructMediaStream to didCreateMediaStream,
1976         and change so that it is only called for MediaStreams created from JS.
1977
1978         Not really testable.
1979
1980         * Modules/mediastream/MediaStream.cpp:
1981         (WebCore::MediaStream::create):
1982         * platform/mediastream/MediaStreamCenter.h:
1983         (MediaStreamCenter):
1984         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
1985         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
1986         * platform/mediastream/chromium/MediaStreamCenterChromium.h:
1987         (MediaStreamCenterChromium):
1988         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
1989         (WebCore::MediaStreamCenterGStreamer::didCreateMediaStream):
1990         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
1991         (MediaStreamCenterGStreamer):
1992
1993 2012-05-07  Nat Duca  <nduca@chromium.org>
1994
1995         Unreviewed, rolling out r115525.
1996         http://trac.webkit.org/changeset/115525
1997         https://bugs.webkit.org/show_bug.cgi?id=66683
1998
1999         Too many pages rely on DOMTimeStamp as first argument.
2000         Reverting while we consider next steps.
2001
2002         * WebCore.exp.in:
2003         * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp:
2004         (WebCore::JSRequestAnimationFrameCallback::handleEvent):
2005         * dom/Document.cpp:
2006         (WebCore::Document::serviceScriptedAnimations):
2007         * dom/Document.h:
2008         (Document):
2009         * dom/RequestAnimationFrameCallback.h:
2010         (RequestAnimationFrameCallback):
2011         * dom/RequestAnimationFrameCallback.idl:
2012         * dom/ScriptedAnimationController.cpp:
2013         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
2014         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
2015         (WebCore):
2016         (WebCore::ScriptedAnimationController::windowScreenDidChange):
2017         (WebCore::ScriptedAnimationController::scheduleAnimation):
2018         (WebCore::ScriptedAnimationController::animationTimerFired):
2019         * dom/ScriptedAnimationController.h:
2020         (ScriptedAnimationController):
2021         (WebCore::ScriptedAnimationController::displayRefreshFired):
2022         * page/FrameView.cpp:
2023         (WebCore::FrameView::serviceScriptedAnimations):
2024         * page/FrameView.h:
2025         (FrameView):
2026         * platform/graphics/DisplayRefreshMonitor.cpp:
2027         (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
2028         (WebCore::DisplayRefreshMonitor::notifyClients):
2029         * platform/graphics/DisplayRefreshMonitor.h:
2030         (DisplayRefreshMonitor):
2031         * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
2032         (WebCore::DisplayRefreshMonitor::displayLinkFired):
2033         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
2034         (WebCore):
2035         (WebCore::DisplayRefreshMonitor::requestRefreshCallback):
2036         (WebCore::DisplayRefreshMonitor::displayLinkFired):
2037
2038 2012-05-07  Tommy Widenflycht  <tommyw@google.com>
2039
2040         MediaStream API: Allow UserMediaRequest::succeed to take an MediaStreamDescriptor
2041         https://bugs.webkit.org/show_bug.cgi?id=85798
2042
2043         Reviewed by Adam Barth.
2044
2045         Adding another UserMediaRequest::succeed function that takes an MediaStreamDescriptor
2046         instead of the two MediaStreamSource arrays.
2047
2048         Not currently testable.
2049
2050         * Modules/mediastream/LocalMediaStream.cpp:
2051         (WebCore::LocalMediaStream::create):
2052         (WebCore):
2053         (WebCore::LocalMediaStream::LocalMediaStream):
2054         * Modules/mediastream/LocalMediaStream.h:
2055         (LocalMediaStream):
2056         * Modules/mediastream/UserMediaRequest.cpp:
2057         (WebCore::UserMediaRequest::succeed):
2058         (WebCore):
2059         * Modules/mediastream/UserMediaRequest.h:
2060         (WebCore):
2061         (UserMediaRequest):
2062
2063 2012-05-07  Michal Mocny  <mmocny@google.com>
2064
2065         [chromium] setContentsMemoryAllocationLimitBytes needs to setNeedsCommit.
2066         https://bugs.webkit.org/show_bug.cgi?id=85801
2067
2068         Reviewed by Adrienne Walker.
2069
2070         CCLayerTreeHost::setContentsMemoryAllocationLimitBytes needs to call setNeedsCommit after adjusting memory
2071         limits, so that we push a new frame.  In particular, when returning from non visibile state, we adjust
2072         memory allocation from 0 to non 0, and we need to push a non blank frame.
2073
2074         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2075         (WebCore::CCLayerTreeHost::setVisible):
2076         (WebCore::CCLayerTreeHost::setContentsMemoryAllocationLimitBytes):
2077
2078 2012-05-07  Christophe Dumez  <christophe.dumez@intel.com>
2079
2080         [EFL] media/track/track-cue-rendering-snap-to-lines-not-set.html fails
2081         https://bugs.webkit.org/show_bug.cgi?id=85602
2082
2083         Reviewed by Eric Carlson.
2084
2085         Fix positioning of the controls panel back to relative, as it is
2086         in the parent CSS.
2087
2088         * css/mediaControlsEfl.css:
2089         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2090
2091 2012-05-07  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2092
2093         MediaStream should not be an ActiveDOMObject
2094         https://bugs.webkit.org/show_bug.cgi?id=85191
2095
2096         Reviewed by Adam Barth.
2097
2098         The model with MediaStreamDescriptor and MediaStream (and LocalMediaStream)
2099         allows the JavaScript objects (MediaStream and LocalMediaStream) to be
2100         cleaned up while the MediaStreamDescriptor lives on to manage the stream in
2101         the platform. This happens for example when a URL is created to represent
2102         a MediaStream (using createObjectURL()). In that case, the MediaStreamDescriptor
2103         is put into the MediaStreamRegistry and even though the MediaStream object is
2104         lost, the URL still works since the descriptor is kept in the registry.
2105
2106         The changes introduced in r113460 (http://webkit.org/b/83143) turned
2107         MediaStream and LocalMediaStream into ActiveDOMObjects. For example on page
2108         reload, LocalMediaStream calls MediaStreamCenter::didStopLocalMediaStream()
2109         via its ActiveDOMObject::stop() method. However, when a page reload occurs,
2110         the LocalMediaStream object may have been cleaned up already and
2111         MediaStreamCenter::didStopLocalMediaStream() will not be called.
2112
2113         One way to make the behavior consistent would be to call
2114         MediaStreamCenter::didStopLocalMediaStream() when the descriptor is cleaned up,
2115         cause then we wouldn't be dependent on the LocalMediaStream object being alive.
2116         However, calling MediaStreamCenter::didStopLocalMediaStream() might not be the
2117         correct thing to do when all references to the descriptor are lost since there
2118         can be MediaStream objects constructed from the tracks of the LocalMediaStream
2119         that should continue to work. MediaStreamCenter::didStopLocalMediaStream() was
2120         intended for LocalMediaStream.stop() which is used to revoke access to devices;
2121         that should not necessarily happen when the descriptor of a LocalMediaStream is
2122         cleaned up. If it's necessary for some ports to signal to the platform that a
2123         MediaStreamDescriptor is cleaned up, then I would suggest adding a new function,
2124         willDestroyMediaStreamDescriptor(), to the MediaStreamCenter interface.
2125
2126         The current resolution is to make MediaStream a ContextDestructionObserver
2127         instead of an ActiveDOMObject.
2128
2129         Currently not testable.
2130
2131         * Modules/mediastream/LocalMediaStream.cpp:
2132         (WebCore::LocalMediaStream::create):
2133         * Modules/mediastream/LocalMediaStream.h:
2134         (LocalMediaStream):
2135         * Modules/mediastream/LocalMediaStream.idl:
2136         * Modules/mediastream/MediaStream.cpp:
2137         (WebCore::MediaStream::create):
2138         (WebCore::MediaStream::MediaStream):
2139         (WebCore::MediaStream::scriptExecutionContext):
2140         * Modules/mediastream/MediaStream.h:
2141
2142 2012-05-07  Liam Quinn  <lquinn@rim.com>
2143
2144         [BlackBerry] WWW-Authenticate header on 200 response pops up authentication dialog
2145         https://bugs.webkit.org/show_bug.cgi?id=85643
2146
2147         Reviewed by George Staikos.
2148
2149         RIM PR: 151992
2150         Ignore WWW-Authenticate header if the response code is not 401.
2151         Ignore Proxy-Authenticate header if the response code is not 407.
2152
2153         Manual test added to observe whether the authentication dialog appears on a 200 response with WWW-Authenticate.
2154
2155         * platform/network/blackberry/NetworkJob.cpp:
2156         (WebCore::NetworkJob::handleNotifyHeaderReceived):
2157
2158 2012-05-07  Alexander Pavlov  <apavlov@chromium.org>
2159
2160         Web Inspector: [TextPrompt] Event listeners and CSS style are not removed on detachment
2161         https://bugs.webkit.org/show_bug.cgi?id=85789
2162
2163         Reviewed by Yury Semikhatsky.
2164
2165         * inspector/front-end/TextPrompt.js:
2166         (WebInspector.TextPrompt.prototype._attachInternal):
2167         (WebInspector.TextPrompt.prototype.detach):
2168
2169 2012-05-07  Csaba Osztrogon√°c  <ossy@webkit.org>
2170
2171         Buildfix for buggy GCC
2172         https://bugs.webkit.org/show_bug.cgi?id=85781
2173
2174         Reviewed by Zoltan Herczeg.
2175
2176         * rendering/RenderBlock.h:
2177         (WebCore::RenderBlock::MarginInfo::clearMargin):
2178
2179 2012-05-07  Alexander Pavlov  <apavlov@chromium.org>
2180
2181         Web Inspector: [REGRESSION] Context menu for the left Script view gutter is broken
2182         https://bugs.webkit.org/show_bug.cgi?id=85785
2183
2184         Reviewed by Pavel Feldman.
2185
2186         Fixed remaining usages of WebInspector.save to be WebInspector.fileManager.save.
2187
2188         * inspector/front-end/NetworkPanel.js:
2189         (WebInspector.NetworkLogView.prototype._exportAll):
2190         (WebInspector.NetworkLogView.prototype._exportRequest):
2191         * inspector/front-end/ResourcesPanel.js:
2192         (WebInspector.FrameResourceTreeElement.prototype._appendSaveAsAction.doSave):
2193         (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent.doSave):
2194         * inspector/front-end/TextViewer.js:
2195         (WebInspector.TextViewer.prototype._contextMenu):
2196
2197
2198 2012-05-07  Antti Koivisto  <antti@apple.com>
2199
2200         Share stylesheet data structures between documents
2201         https://bugs.webkit.org/show_bug.cgi?id=85598
2202
2203         Reviewed by Darin Adler.
2204
2205         We currently make a copy of the data structures when restoring a cached stylesheet. This patch lets us share
2206         the data until someone uses a mutating CSSOM API to modify the sheet.
2207         
2208         The patch implements copy-on-write for the internal style sheet data structures. If any mutating CSSOM API is
2209         invoked, we check if the mutation is safe (there is only one client, the sheet is not cached). If not then the
2210         internal structures are copied and any existing CSSOM objects are re-attached to the new style tree. The copied
2211         tree is mutated while the other clients stay attached to the original tree.
2212         
2213         Sharing can save significant amount of memory on sites with large stylesheets. For example if you have
2214         multiple articles open on wsj.com this saves ~2.6MB per tab.
2215         
2216         Test: http/tests/css/shared-stylesheet-mutation.html
2217               http/tests/css/shared-stylesheet-mutation-preconstruct.html
2218
2219         * css/CSSFontFaceRule.cpp:
2220         (WebCore::CSSFontFaceRule::reattach):
2221         (WebCore):
2222         * css/CSSFontFaceRule.h:
2223         (CSSFontFaceRule):
2224         * css/CSSMediaRule.cpp:
2225         (WebCore::CSSMediaRule::insertRule):
2226         (WebCore::CSSMediaRule::deleteRule):
2227         (WebCore::CSSMediaRule::reattach):
2228         (WebCore):
2229         * css/CSSMediaRule.h:
2230         (CSSMediaRule):
2231         * css/CSSPageRule.cpp:
2232         (WebCore::CSSPageRule::setSelectorText):
2233         (WebCore::CSSPageRule::reattach):
2234         (WebCore):
2235         * css/CSSPageRule.h:
2236         (CSSPageRule):
2237         * css/CSSRule.cpp:
2238         (WebCore::CSSRule::reattach):
2239         
2240             After the internal stylerule tree has been copied, the existing wrappers are re-attached using recursive reattach() function.
2241
2242         * css/CSSRule.h:
2243         (WebCore):
2244         (CSSRule):
2245         * css/CSSStyleRule.cpp:
2246         (WebCore::CSSStyleRule::setSelectorText):
2247         (WebCore::CSSStyleRule::reattach):
2248         (WebCore):
2249         * css/CSSStyleRule.h:
2250         (CSSStyleRule):
2251         * css/CSSStyleSheet.cpp:
2252         (WebCore::StyleSheetInternal::StyleSheetInternal):
2253         (WebCore::StyleSheetInternal::isCacheable):
2254         (WebCore::StyleSheetInternal::ruleAt):
2255         
2256             Add ruleAt(), use it for both wrapper creation and reattaching.  Remove createChildRuleCSSOMWrapper .
2257
2258         (WebCore):
2259         (WebCore::StyleSheetInternal::wrapperInsertRule):
2260         (WebCore::StyleSheetInternal::wrapperDeleteRule):
2261         
2262             Invalidation moves to the calling wrapper.
2263
2264         (WebCore::StyleSheetInternal::addedToMemoryCache):
2265         (WebCore::StyleSheetInternal::removedFromMemoryCache):
2266         (WebCore::CSSStyleSheet::willMutateRules):
2267         
2268             This is called whenever StyleSheetInternal is going to be mutated. It will do copy-on-write if needed.
2269             
2270             Usually invoked by CSSStyleSheet::RuleMutation RAII type.
2271
2272         (WebCore::CSSStyleSheet::didMutateRules):
2273         
2274             This is called after the mutation is complete and will trigger the style recalc in the document.
2275
2276         (WebCore::CSSStyleSheet::didMutate):
2277         
2278             This is called directly after mutations that don't change StyleSheetInternal so don't require copy-on-write.
2279
2280         (WebCore::CSSStyleSheet::reattachChildRuleCSSOMWrappers):
2281         (WebCore::CSSStyleSheet::setDisabled):
2282         (WebCore::CSSStyleSheet::insertRule):
2283         (WebCore::CSSStyleSheet::deleteRule):
2284         * css/CSSStyleSheet.h:
2285         (StyleSheetInternal):
2286         (WebCore::StyleSheetInternal::hasOneClient):
2287         (WebCore::StyleSheetInternal::isMutable):
2288         (WebCore::StyleSheetInternal::setMutable):
2289         
2290             Track mutability. Mutation is allowed only after willMutate call.
2291
2292         (WebCore::StyleSheetInternal::isInMemoryCache):
2293         
2294             Track if the object is in memory cache.
2295
2296         (WebCore::CSSStyleSheet::clearOwnerRule):
2297         (CSSStyleSheet):
2298         * css/MediaList.cpp:
2299         (WebCore::MediaList::setMediaText):
2300         (WebCore::MediaList::deleteMedium):
2301         (WebCore::MediaList::appendMedium):
2302         (WebCore::MediaList::didMutate):
2303         (WebCore):
2304         (WebCore::MediaList::reattach):
2305         * css/MediaList.h:
2306         (MediaList):
2307         * css/PropertySetCSSStyleDeclaration.cpp:
2308         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
2309         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
2310         (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
2311         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
2312         (WebCore):
2313         (WebCore::StyleRuleCSSStyleDeclaration::willMutate):
2314         (WebCore::StyleRuleCSSStyleDeclaration::didMutate):
2315         (WebCore::StyleRuleCSSStyleDeclaration::reattach):
2316         (WebCore::InlineCSSStyleDeclaration::didMutate):
2317         * css/PropertySetCSSStyleDeclaration.h:
2318         (WebCore::PropertySetCSSStyleDeclaration::willMutate):
2319         (WebCore::PropertySetCSSStyleDeclaration::didMutate):
2320         (StyleRuleCSSStyleDeclaration):
2321         * css/WebKitCSSKeyframesRule.cpp:
2322         (WebCore::WebKitCSSKeyframesRule::setName):
2323         (WebCore::WebKitCSSKeyframesRule::insertRule):
2324         (WebCore::WebKitCSSKeyframesRule::deleteRule):
2325         (WebCore::WebKitCSSKeyframesRule::reattach):
2326         (WebCore):
2327         * css/WebKitCSSKeyframesRule.h:
2328         (WebKitCSSKeyframesRule):
2329         * css/WebKitCSSRegionRule.cpp:
2330         (WebCore::WebKitCSSRegionRule::reattach):
2331         * css/WebKitCSSRegionRule.h:
2332         (WebKitCSSRegionRule):
2333         * inspector/InspectorStyleSheet.cpp:
2334         (WebCore::InspectorStyleSheet::reparseStyleSheet):
2335         * loader/cache/CachedCSSStyleSheet.cpp:
2336         (WebCore::CachedCSSStyleSheet::~CachedCSSStyleSheet):
2337         (WebCore::CachedCSSStyleSheet::destroyDecodedData):
2338         (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
2339         
2340             Don't copy when restoring. It is no longer necessary.
2341             Set the cache bit on the stylesheet.
2342
2343         (WebCore::CachedCSSStyleSheet::saveParsedStyleSheet):
2344
2345 2012-05-06  Kinuko Yasuda  <kinuko@chromium.org>
2346
2347         Cleanup: Change boolean synchronous flag argument into enum in FileSystem API code
2348         https://bugs.webkit.org/show_bug.cgi?id=85741
2349
2350         Reviewed by David Levin.
2351
2352         No new tests as this change has no functional effects.
2353
2354         * Modules/filesystem/DOMWindowFileSystem.cpp:
2355         (WebCore::DOMWindowFileSystem::webkitRequestFileSystem):
2356         * Modules/filesystem/LocalFileSystem.cpp:
2357         (WebCore::LocalFileSystem::requestFileSystem):
2358         * Modules/filesystem/LocalFileSystem.h:
2359         (LocalFileSystem):
2360         * Modules/filesystem/WorkerContextFileSystem.cpp:
2361         (WebCore::WorkerContextFileSystem::webkitRequestFileSystem):
2362         (WebCore::WorkerContextFileSystem::webkitRequestFileSystemSync):
2363         (WebCore::WorkerContextFileSystem::webkitResolveLocalFileSystemSyncURL):
2364         * platform/FileSystemType.h: Added FileSystemSynchronousType enum.
2365
2366 2012-05-07  Antti Koivisto  <antti@apple.com>
2367
2368         Revert the previous.
2369
2370         Not reviewed.
2371         
2372         Apparently r116235 was already rolled out.
2373
2374         * css/StyleResolver.cpp:
2375         (WebCore::StyleResolver::determineScope):
2376
2377 2012-05-07  Antti Koivisto  <antti@apple.com>
2378
2379         REGRESSION(r116235): broke a lot of tests on all chromium debug bots
2380         https://bugs.webkit.org/show_bug.cgi?id=85773
2381
2382         Not reviewed.
2383
2384         Try to fix assert when scoped stylesheets are enabled.
2385
2386         * css/StyleResolver.cpp:
2387         (WebCore::StyleResolver::determineScope):
2388
2389 2012-05-06  Kinuko Yasuda  <kinuko@chromium.org>
2390
2391         Cleanup: Move FileSystem API type definitions into a separate header file
2392         https://bugs.webkit.org/show_bug.cgi?id=85738
2393
2394         Reviewed by David Levin.
2395
2396         Move FileSystem API type definitions from AsyncFileSystem.h and
2397         AsyncFileSystemChromium.cpp for chromium port into a single separate
2398         header file: FileSystemType.h
2399
2400         By doing this we make it clearer that every filesystem type can be
2401         found in the header file and also can save including entire
2402         AsyncFileSystem definition just for referring type enum value.
2403
2404         No new tests as this change has no visible or functional changes.
2405
2406         * Modules/filesystem/DOMFileSystemBase.cpp:
2407         (WebCore::pathToAbsolutePath):
2408         * Modules/filesystem/DOMWindowFileSystem.cpp:
2409         (WebCore::DOMWindowFileSystem::webkitRequestFileSystem):
2410         (WebCore::DOMWindowFileSystem::webkitResolveLocalFileSystemURL):
2411         (WebCore):
2412         * Modules/filesystem/DOMWindowFileSystem.h:
2413         * Modules/filesystem/LocalFileSystem.h:
2414         (LocalFileSystem):
2415         * Modules/filesystem/WorkerContextFileSystem.cpp:
2416         (WebCore::WorkerContextFileSystem::webkitRequestFileSystem):
2417         (WebCore::WorkerContextFileSystem::webkitRequestFileSystemSync):
2418         (WebCore::WorkerContextFileSystem::webkitResolveLocalFileSystemURL):
2419         (WebCore::WorkerContextFileSystem::webkitResolveLocalFileSystemSyncURL):
2420         (WebCore):
2421         * Modules/filesystem/WorkerContextFileSystem.h:
2422         * platform/AsyncFileSystem.cpp:
2423         (WebCore::AsyncFileSystem::isValidType):
2424         (WebCore::AsyncFileSystem::create):
2425         (WebCore::AsyncFileSystem::openFileSystem):
2426         * platform/AsyncFileSystem.h:
2427         (AsyncFileSystem):
2428         (WebCore::AsyncFileSystem::type):
2429         (WebCore::AsyncFileSystem::AsyncFileSystem):
2430         * platform/FileSystemType.h: Added.
2431         (WebCore):
2432         * platform/blackberry/AsyncFileSystemBlackBerry.cpp:
2433         (WebCore::AsyncFileSystem::isValidType):
2434         (WebCore::AsyncFileSystem::create):
2435         (WebCore::AsyncFileSystem::openFileSystem):
2436         (WebCore::AsyncFileSystem::crackFileSystemURL):
2437         (WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry):
2438         * platform/blackberry/AsyncFileSystemBlackBerry.h:
2439         (AsyncFileSystemBlackBerry):
2440         * platform/gtk/AsyncFileSystemGtk.cpp:
2441         (WebCore::AsyncFileSystem::isValidType):
2442         (WebCore::AsyncFileSystem::create):
2443         (WebCore::AsyncFileSystem::openFileSystem):
2444         (WebCore::AsyncFileSystem::crackFileSystemURL):
2445         (WebCore::AsyncFileSystemGtk::AsyncFileSystemGtk):
2446         * platform/gtk/AsyncFileSystemGtk.h:
2447         (AsyncFileSystemGtk):
2448
2449 2012-05-06  MORITA Hajime  <morrita@google.com>
2450
2451         https://bugs.webkit.org/show_bug.cgi?id=85265
2452         [Shadow DOM] ShadowTree needs a better name
2453
2454         Reviewed by Dimitri Glazkov.
2455
2456         Renamed ShadowTree to ElementShadow, The ElementShadow class is
2457         going to be a facade of Shadow related APIs.
2458
2459         Following renames follow:
2460         - Element::shadowTree() to Element::shadow()
2461         - ShadowRoot::tree() to ShadowRoot::owner()
2462         - ShadowTree::recalcShadowTreeStyle() to ElementShadow::recalcStyle()
2463
2464         No new tests. Just renames.
2465
2466         * CMakeLists.txt:
2467         * GNUmakefile.list.am:
2468         * Target.pri:
2469         * WebCore.exp.in:
2470         * WebCore.gypi:
2471         * WebCore.xcodeproj/project.pbxproj:
2472         * dom/ComposedShadowTreeWalker.cpp:
2473         (WebCore::shadowFor):
2474         (WebCore::shadowOfParent):
2475         (WebCore::ComposedShadowTreeWalker::traverseChild):
2476         (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
2477         (WebCore::ComposedShadowTreeWalker::traverseParent):
2478         * dom/ContainerNodeAlgorithms.cpp:
2479         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
2480         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
2481         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
2482         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
2483         * dom/DOMAllInOne.cpp:
2484         * dom/Document.cpp:
2485         (WebCore::Document::buildAccessKeyMap):
2486         * dom/Element.cpp:
2487         (WebCore::Element::~Element):
2488         (WebCore::Element::willRemove):
2489         (WebCore::Element::attach):
2490         (WebCore::Element::detach):
2491         (WebCore::Element::recalcStyle):
2492         (WebCore::Element::hasShadowRoot):
2493         (WebCore::Element::shadow):
2494         (WebCore::Element::ensureShadow):
2495         (WebCore::Element::ensureShadowRoot):
2496         (WebCore::Element::childrenChanged):
2497         * dom/Element.h:
2498         (WebCore):
2499         (Element):
2500         * dom/ElementRareData.h:
2501         (ElementRareData):
2502         (WebCore::ElementRareData::~ElementRareData):
2503         * dom/ElementShadow.cpp: Renamed from Source/WebCore/dom/ShadowTree.cpp.
2504         (WebCore):
2505         (WebCore::ElementShadow::ElementShadow):
2506         (WebCore::ElementShadow::~ElementShadow):
2507         (WebCore::validateShadowRoot):
2508         (WebCore::ElementShadow::addShadowRoot):
2509         (WebCore::ElementShadow::removeAllShadowRoots):
2510         (WebCore::ElementShadow::willRemove):
2511         (WebCore::ElementShadow::setParentTreeScope):
2512         (WebCore::ElementShadow::attach):
2513         (WebCore::ElementShadow::attachHost):
2514         (WebCore::ElementShadow::detach):
2515         (WebCore::ElementShadow::detachHost):
2516         (WebCore::ElementShadow::insertionPointFor):
2517         (WebCore::ElementShadow::selectionFor):
2518         (WebCore::ElementShadow::reattach):
2519         (WebCore::ElementShadow::childNeedsStyleRecalc):
2520         (WebCore::ElementShadow::needsStyleRecalc):
2521         (WebCore::ElementShadow::recalcStyle):
2522         (WebCore::ElementShadow::needsReattachHostChildrenAndShadow):
2523         (WebCore::ElementShadow::hostChildrenChanged):
2524         (WebCore::ElementShadow::setNeedsReattachHostChildrenAndShadow):
2525         (WebCore::ElementShadow::reattachHostChildrenAndShadow):
2526         * dom/ElementShadow.h: Renamed from Source/WebCore/dom/ShadowTree.h.
2527         (WebCore):
2528         (ElementShadow):
2529         (WebCore::ElementShadow::hasShadowRoot):
2530         (WebCore::ElementShadow::youngestShadowRoot):
2531         (WebCore::ElementShadow::oldestShadowRoot):
2532         (WebCore::ElementShadow::selector):
2533         (WebCore::ElementShadow::clearNeedsReattachHostChildrenAndShadow):
2534         (WebCore::ElementShadow::host):
2535         (ShadowRootVector):
2536         (WebCore::ShadowRootVector::ShadowRootVector):
2537         * dom/Node.cpp:
2538         (WebCore::oldestShadowRootFor):
2539         * dom/NodeRenderingContext.cpp:
2540         (WebCore::NodeRenderingContext::NodeRenderingContext):
2541         (WebCore::NodeRenderingContext::hostChildrenChanged):
2542         * dom/NodeRenderingContext.h:
2543         (WebCore):
2544         * dom/ShadowRoot.cpp:
2545         (WebCore::ShadowRoot::create):
2546         (WebCore::ShadowRoot::owner):
2547         * dom/ShadowRoot.h:
2548         (WebCore):
2549         (ShadowRoot):
2550         * dom/TreeScopeAdopter.cpp:
2551         (WebCore::shadowFor):
2552         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2553         (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
2554         (WebCore::TreeScopeAdopter::moveShadowToNewDocument):
2555         * dom/TreeScopeAdopter.h:
2556         (TreeScopeAdopter):
2557         * html/ColorInputType.cpp:
2558         (WebCore::ColorInputType::createShadowSubtree):
2559         (WebCore::ColorInputType::shadowColorSwatch):
2560         * html/FileInputType.cpp:
2561         (WebCore::FileInputType::createShadowSubtree):
2562         (WebCore::FileInputType::multipleAttributeChanged):
2563         * html/HTMLDetailsElement.cpp:
2564         (WebCore::HTMLDetailsElement::findMainSummary):
2565         * html/HTMLKeygenElement.cpp:
2566         (WebCore::HTMLKeygenElement::shadowSelect):
2567         * html/HTMLMediaElement.cpp:
2568         (WebCore::HTMLMediaElement::mediaControls):
2569         (WebCore::HTMLMediaElement::hasMediaControls):
2570         * html/HTMLSummaryElement.cpp:
2571         * html/HTMLTextAreaElement.cpp:
2572         (WebCore::HTMLTextAreaElement::innerTextElement):
2573         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
2574         * html/InputType.cpp:
2575         (WebCore::InputType::destroyShadowSubtree):
2576         * html/RangeInputType.cpp:
2577         (WebCore::RangeInputType::handleMouseDownEvent):
2578         (WebCore::RangeInputType::createShadowSubtree):
2579         * html/TextFieldInputType.cpp:
2580         (WebCore::TextFieldInputType::createShadowSubtree):
2581         (WebCore::TextFieldInputType::updatePlaceholderText):
2582         * html/ValidationMessage.cpp:
2583         (WebCore::ValidationMessage::deleteBubbleTree):
2584         * html/shadow/HTMLContentElement.cpp:
2585         (WebCore::HTMLContentElement::parseAttribute):
2586         * html/shadow/InsertionPoint.cpp:
2587         (WebCore::InsertionPoint::attach):
2588         (WebCore::InsertionPoint::detach):
2589         (WebCore::InsertionPoint::distributeHostChildren):
2590         (WebCore::InsertionPoint::clearDistribution):
2591         * html/shadow/InsertionPoint.h:
2592         * html/shadow/SliderThumbElement.cpp:
2593         (WebCore::sliderThumbElementOf):
2594         (WebCore::RenderSliderContainer::layout):
2595         (WebCore::trackLimiterElementOf):
2596         * html/shadow/TextFieldDecorationElement.cpp:
2597         (WebCore::getDecorationRootAndDecoratedRoot):
2598         * inspector/InspectorDOMAgent.cpp:
2599         (WebCore::InspectorDOMAgent::unbind):
2600         (WebCore::InspectorDOMAgent::buildObjectForNode):
2601         * page/FocusController.cpp:
2602         (WebCore::FocusScope::focusScopeOf):
2603         (WebCore::FocusScope::focusScopeOwnedByShadowHost):
2604         * rendering/RenderFileUploadControl.cpp:
2605         (WebCore::RenderFileUploadControl::uploadButton):
2606         * svg/SVGTRefElement.cpp:
2607         (WebCore::SVGTRefElement::updateReferencedText):
2608         (WebCore::SVGTRefElement::detachTarget):
2609         * svg/SVGUseElement.cpp:
2610         (WebCore::SVGUseElement::clearResourceReferences):
2611         (WebCore::SVGUseElement::buildShadowAndInstanceTree):
2612         (WebCore::SVGUseElement::buildShadowTree):
2613         * testing/Internals.cpp:
2614         (WebCore::Internals::ensureShadowRoot):
2615         (WebCore::Internals::youngestShadowRoot):
2616         (WebCore::Internals::oldestShadowRoot):
2617         (WebCore::Internals::removeShadowRoot):
2618
2619 2012-05-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2620
2621         Unreviewed, rolling out r116235.
2622         http://trac.webkit.org/changeset/116235
2623         https://bugs.webkit.org/show_bug.cgi?id=85773
2624
2625         broke a lot of tests on all chromium debug bots (Requested by
2626         caseq_ on #webkit).
2627
2628         * bindings/objc/DOMCSS.mm:
2629         * css/CSSFontFaceRule.cpp:
2630         * css/CSSFontFaceRule.h:
2631         (CSSFontFaceRule):
2632         * css/CSSImportRule.cpp:
2633         * css/CSSMediaRule.cpp:
2634         (WebCore::CSSMediaRule::insertRule):
2635         (WebCore::CSSMediaRule::deleteRule):
2636         * css/CSSMediaRule.h:
2637         (CSSMediaRule):
2638         * css/CSSPageRule.cpp:
2639         (WebCore::CSSPageRule::setSelectorText):
2640         * css/CSSPageRule.h:
2641         (CSSPageRule):
2642         * css/CSSRule.cpp:
2643         * css/CSSRule.h:
2644         (CSSRule):
2645         (WebCore::CSSRule::parserContext):
2646         * css/CSSStyleRule.cpp:
2647         (WebCore::CSSStyleRule::setSelectorText):
2648         * css/CSSStyleRule.h:
2649         * css/CSSStyleSheet.cpp:
2650         (WebCore::StyleSheetInternal::StyleSheetInternal):
2651         (WebCore::StyleSheetInternal::isCacheable):
2652         (WebCore::StyleSheetInternal::createChildRuleCSSOMWrapper):
2653         (WebCore::StyleSheetInternal::wrapperInsertRule):
2654         (WebCore::StyleSheetInternal::wrapperDeleteRule):
2655         (WebCore::StyleSheetInternal::styleSheetChanged):
2656         (WebCore):
2657         (WebCore::CSSStyleSheet::setDisabled):
2658         (WebCore::CSSStyleSheet::item):
2659         (WebCore::CSSStyleSheet::insertRule):
2660         (WebCore::CSSStyleSheet::deleteRule):
2661         * css/CSSStyleSheet.h:
2662         (StyleSheetInternal):
2663         (WebCore::StyleSheetInternal::hasCharsetRule):
2664         (WebCore::CSSStyleSheet::styleSheetChanged):
2665         (CSSStyleSheet):
2666         * css/MediaList.cpp:
2667         (WebCore::MediaList::setMediaText):
2668         (WebCore::MediaList::deleteMedium):
2669         (WebCore::MediaList::appendMedium):
2670         (WebCore::MediaList::notifyChanged):
2671         * css/MediaList.h:
2672         (MediaList):
2673         * css/PropertySetCSSStyleDeclaration.cpp:
2674         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
2675         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
2676         (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
2677         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
2678         (WebCore::PropertySetCSSStyleDeclaration::didMutate):
2679         (WebCore):
2680         (WebCore::StyleRuleCSSStyleDeclaration::setNeedsStyleRecalc):
2681         (WebCore::InlineCSSStyleDeclaration::setNeedsStyleRecalc):
2682         * css/PropertySetCSSStyleDeclaration.h:
2683         (WebCore::PropertySetCSSStyleDeclaration::setNeedsStyleRecalc):
2684         (PropertySetCSSStyleDeclaration):
2685         (StyleRuleCSSStyleDeclaration):
2686         * css/StylePropertySet.cpp:
2687         * css/WebKitCSSKeyframesRule.cpp:
2688         (WebCore::WebKitCSSKeyframesRule::setName):
2689         (WebCore::WebKitCSSKeyframesRule::insertRule):
2690         (WebCore::WebKitCSSKeyframesRule::deleteRule):
2691         * css/WebKitCSSKeyframesRule.h:
2692         (WebKitCSSKeyframesRule):
2693         * css/WebKitCSSRegionRule.cpp:
2694         * css/WebKitCSSRegionRule.h:
2695         (WebKitCSSRegionRule):
2696         * inspector/InspectorStyleSheet.cpp:
2697         (WebCore::InspectorStyleSheet::reparseStyleSheet):
2698         * loader/cache/CachedCSSStyleSheet.cpp:
2699         (WebCore::CachedCSSStyleSheet::~CachedCSSStyleSheet):
2700         (WebCore::CachedCSSStyleSheet::destroyDecodedData):
2701         (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
2702         (WebCore::CachedCSSStyleSheet::saveParsedStyleSheet):
2703
2704 2012-05-06  Adam Barth  <abarth@webkit.org>
2705
2706         Attempt to fix the !ENABLE(INSPECTOR) build by making InspectorValues
2707         available unconditionally.  We should probably rename these classes to
2708         JSONValues and move them into WebCore/platform.
2709
2710         * inspector/InspectorValues.cpp:
2711         * inspector/InspectorValues.h:
2712
2713 2012-05-06  Adam Barth  <abarth@webkit.org>
2714
2715         CSP violation reports should have all the fields required by the spec
2716         https://bugs.webkit.org/show_bug.cgi?id=85682
2717
2718         Reviewed by Darin Adler.
2719
2720         This patch updates our CSP violation reports to include all the fields
2721         in the spec.  We've discussed all these fields in the working group,
2722         and we have fairly high confidence that these are safe to expose.
2723
2724         Tests: http/tests/security/contentSecurityPolicy/report-and-enforce.html
2725                http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin.html
2726                http/tests/security/contentSecurityPolicy/report-blocked-uri.html
2727                http/tests/security/contentSecurityPolicy/report-only-from-header.html
2728                http/tests/security/contentSecurityPolicy/report-only.html
2729                http/tests/security/contentSecurityPolicy/report-uri-from-child-frame.html
2730                http/tests/security/contentSecurityPolicy/report-uri.html
2731
2732         * page/ContentSecurityPolicy.cpp:
2733         (CSPDirectiveList):
2734         (WebCore::CSPDirectiveList::reportViolation):
2735         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
2736
2737 2012-05-06  Kinuko Yasuda  <kinuko@chromium.org>
2738
2739         Cleanup: FileSystem API's Entry.toURL() impl should return KURL instead of String
2740         https://bugs.webkit.org/show_bug.cgi?id=85736
2741
2742         Change the return type of Entry::toURL() from String to KURL.
2743
2744         Reviewed by David Levin.
2745
2746         No new tests as this change should not have any visible impact in the javascript layer.
2747
2748         * Modules/filesystem/EntryBase.cpp:
2749         (WebCore::EntryBase::toURL):
2750         * Modules/filesystem/EntryBase.h:
2751         * platform/AsyncFileSystem.h:
2752         * platform/blackberry/AsyncFileSystemBlackberry.cpp:
2753         (AsyncFileSystemBlackberry::toURL):
2754         * platform/blackberry/AsyncFileSystemBlackberry.h:
2755         * platform/gtk/AsyncFileSystemGtk.cpp:
2756         (AsyncFileSystemGtk::toURL):
2757         * platform/gtk/AsyncFileSystemGtk.h:
2758
2759 2012-05-06  Kentaro Hara  <haraken@chromium.org>
2760
2761         [V8][Performance] Remove Isolate lookup from the call path
2762         to get a cached JS wrapper object by getDOMXXXXMap().
2763         https://bugs.webkit.org/show_bug.cgi?id=85205
2764
2765         Reviewed by Adam Barth.
2766
2767         The patch improves the performance of getting a cached JS wrapper
2768         by getDOMXXXXMap(). For example, it improves the performance
2769         of toV8(NodeList*) in getElementsByTagName(), getElementsByName(),
2770         getElementsByClassName() by 7 ~ 9%.
2771
2772         Performance tests: https://bugs.webkit.org/attachment.cgi?id=139468
2773
2774         The performance test results in my Linux desktop:
2775
2776         getElementsByTagName :   40.76 ms => 37.52ms (+8.6%)
2777         getElementsByName :      41.02 ms => 37.42ms (+9.6%)
2778         getElementsByClassName : 40.32 ms => 37.68ms (+7.0%)
2779
2780         Unfortunately we cannot observe performance improvement in
2781         Dromaeo/dom-query.html, which are testing getElementsByTagName(),
2782         getElementsByName(), getElementsByClassName(). This is because
2783         the bottleneck of these Dromaeo tests is not toV8(NodeList*) but
2784         .length and .nodeType accesses. The patch for optimizing them
2785         will be coming soon.
2786
2787         No tests. No change in behavior.
2788
2789         * bindings/scripts/CodeGeneratorV8.pm: Modified as described above.
2790         (GenerateHeader):
2791         (GenerateNormalAttrGetter):
2792         (GetDomMapFunction):
2793         (NativeToJSValue):
2794         * bindings/v8/DOMData.cpp:
2795         (WebCore::DOMData::getCurrentStore):
2796
2797         * bindings/scripts/test/V8/V8Float64Array.h: Updated run-bindings-tests results.
2798         (WebCore::V8Float64Array::wrap):
2799         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2800         (WebCore::V8TestActiveDOMObject::wrap):
2801         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2802         (WebCore::V8TestCustomNamedGetter::wrap):
2803         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2804         (WebCore::V8TestEventConstructor::wrap):
2805         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2806         (WebCore::TestEventTargetV8Internal::itemCallback):
2807         * bindings/scripts/test/V8/V8TestEventTarget.h:
2808         (WebCore::V8TestEventTarget::wrap):
2809         * bindings/scripts/test/V8/V8TestInterface.cpp:
2810         (WebCore::TestInterfaceV8Internal::supplementalNodeAttrGetter):
2811         * bindings/scripts/test/V8/V8TestInterface.h:
2812         (WebCore::V8TestInterface::wrap):
2813         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2814         (WebCore::V8TestMediaQueryListListener::wrap):
2815         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2816         (WebCore::V8TestNamedConstructor::wrap):
2817         * bindings/scripts/test/V8/V8TestObj.cpp:
2818         (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter):
2819         (WebCore::TestObjV8Internal::cachedAttribute1AttrGetter):
2820         (WebCore::TestObjV8Internal::cachedAttribute2AttrGetter):
2821         (WebCore::TestObjV8Internal::contentDocumentAttrGetter):
2822         (WebCore::TestObjV8Internal::getSVGDocumentCallback):
2823         * bindings/scripts/test/V8/V8TestObj.h:
2824         (WebCore::V8TestObj::wrap):
2825         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2826         (WebCore::V8TestSerializedScriptValueInterface::wrap):
2827
2828 2012-05-06  Adam Barth  <abarth@webkit.org>
2829
2830         Content Security Policy reports should be reported with content-type application/json, should contain all required fields
2831         https://bugs.webkit.org/show_bug.cgi?id=61360
2832
2833         Reviewed by Eric Seidel.
2834
2835         This patch changes ContentSecurityPolicy to use JSON format for sending
2836         violation reports rather than wwwform-encoding.  This patch aligns our
2837         behavior with the specification and with Mozilla.  A follow up patch
2838         will update the list of fields in the report to match the spec.
2839
2840         * loader/PingLoader.cpp:
2841         (WebCore::PingLoader::reportContentSecurityPolicyViolation):
2842         * page/ContentSecurityPolicy.cpp:
2843         (WebCore::CSPDirectiveList::reportViolation):
2844
2845 2012-05-06  Mary Wu  <mary.wu@torchmobile.com.cn>
2846
2847         [BlackBerry] Support html5 download attribute.
2848         https://bugs.webkit.org/show_bug.cgi?id=85044
2849
2850         Reviewed by Antonio Gomes.
2851
2852         Pass download attribute filename to networkJob and it could be
2853         overridden by the Content-Disposition HTTP header's filename parameter.
2854
2855         * platform/network/blackberry/NetworkJob.cpp:
2856         (WebCore::NetworkJob::initialize):
2857         * platform/network/blackberry/ResourceRequest.h:
2858         (WebCore::ResourceRequest::setSuggestSaveName):
2859         (WebCore::ResourceRequest::suggestSaveName):
2860         (ResourceRequest):
2861         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
2862         (WebCore::ResourceRequest::initializePlatformRequest):
2863
2864 2012-05-06  Kenichi Ishibashi  <bashi@chromium.org>
2865
2866         Disallow unquoted -webkit-font-feature-settings tags
2867         https://bugs.webkit.org/show_bug.cgi?id=85362
2868
2869         Reviewed by Kent Tamura.
2870
2871         Disallow unquoted tags to follow the current draft.
2872         http://dev.w3.org/csswg/css3-fonts/#font-feature-settings-prop
2873
2874         No new tests. css3/font-feature-settings-parsing.html was updated.
2875
2876         * css/CSSParser.cpp:
2877         (WebCore::CSSParser::parseFontFeatureTag): Accepts only 4-characters string.
2878
2879 2012-05-06  Raphael Kubo da Costa  <rakuco@webkit.org>
2880
2881         Unreviewed build fix for r116260.
2882
2883         COMPILE_ASSERT() does not expect a string in its second parameter.
2884
2885         * platform/graphics/TextRun.cpp:
2886         (WebCore):
2887
2888 2012-05-06  Rob Buis  <rbuis@rim.com>
2889
2890         Shrink TextRun object size
2891         https://bugs.webkit.org/show_bug.cgi?id=85751
2892
2893         Reviewed by Darin Adler.
2894
2895         Reorder the member variables in TextRun so it shrinks from 56 to 40 bytes on my 64-bit build. This is important
2896         for SVG, since RenderSVGText shrinks because of this.
2897
2898         Also add a compile assert for the expected object size.
2899
2900         * platform/graphics/TextRun.cpp:
2901         (ExpectedTextRunSize):
2902         (WebCore):
2903         * platform/graphics/TextRun.h:
2904         (WebCore::TextRun::TextRun):
2905         (WebCore::TextRun::direction):
2906         (TextRun):
2907
2908 2012-05-06  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2909
2910         [BlackBerry] Autofill backing store implementation upstream
2911         https://bugs.webkit.org/show_bug.cgi?id=85575
2912
2913         Reviewed by Rob Buis.
2914
2915         Implemented class AutofillBackingStore which is responsible
2916         for handling interaction with autofill database.
2917
2918         Replaced static function
2919         CredentialBackingStore* CredentialBackingStore::instance()
2920         with a helper function
2921         CredentialBackingStore& credentialBackingStore(),
2922         and used DEFINE_STATIC_LOCAL to construct the singleton
2923         object.
2924         Also removed unnecessary function close() and combined with
2925         the destructor of class CredentialBackingStore.
2926
2927         Initial upstream, No new tests.
2928
2929         * PlatformBlackBerry.cmake:
2930         * platform/network/blackberry/AutofillBackingStore.cpp: Added.
2931         (WebCore):
2932         (WebCore::autofillBackingStore):
2933         (WebCore::AutofillBackingStore::AutofillBackingStore):
2934         (WebCore::AutofillBackingStore::~AutofillBackingStore):
2935         (WebCore::AutofillBackingStore::open):
2936         (WebCore::AutofillBackingStore::add):
2937         (WebCore::AutofillBackingStore::update):
2938         (WebCore::AutofillBackingStore::contains):
2939         (WebCore::AutofillBackingStore::get):
2940         (WebCore::AutofillBackingStore::clear):
2941         * platform/network/blackberry/AutofillBackingStore.h: Added.
2942         (WebCore):
2943         (AutofillBackingStore):
2944         * platform/network/blackberry/CredentialBackingStore.cpp:
2945         (WebCore::credentialBackingStore):
2946         (WebCore::CredentialBackingStore::~CredentialBackingStore):
2947         * platform/network/blackberry/CredentialBackingStore.h:
2948         (CredentialBackingStore):
2949         (WebCore):
2950         * platform/network/blackberry/CredentialStorageBlackBerry.cpp:
2951         (WebCore::CredentialStorage::getFromPersistentStorage):
2952
2953 2012-05-06  MORITA Hajime  <morrita@google.com>
2954
2955         [Shadow DOM] Node distribution should be refreshed before style recalc.
2956         https://bugs.webkit.org/show_bug.cgi?id=85259
2957
2958         Reviewed by Dimitri Glazkov.
2959
2960         Element::recalcStyle() calls child element's recalcStyle()
2961         recursively, following ShadowTree::recalcShadowTreeStyle(). But
2962         recalcShadowTreeStyle() should be called before such recursion if
2963         necessary.
2964
2965         This is because style calculation and following renderer attachment
2966         of each child element depends on up-to-date node distribution result
2967         which is computed during the recalcShadowTreeStyle().
2968
2969         Test: fast/dom/shadow/shadow-dynamic-style-change-via-mutation-and-selector.html
2970
2971         * dom/Element.cpp: Moved recalcShadowTreeStyle() before child traversals.
2972         (WebCore::Element::recalcStyle):
2973
2974 2012-05-06  Adam Barth  <abarth@webkit.org>
2975
2976         CSP should let sites both enforce one policy and monitor another
2977         https://bugs.webkit.org/show_bug.cgi?id=85561
2978
2979         Reviewed by Eric Seidel.
2980
2981         This patch lets us enforce and/or monitor multiple CSP policies.
2982         Rather than having a single directive list, we now have a vector of
2983         directive lists.
2984
2985         Tests: http/tests/security/contentSecurityPolicy/combine-multiple-policies.html
2986                http/tests/security/contentSecurityPolicy/report-and-enforce.html
2987
2988         * page/ContentSecurityPolicy.cpp:
2989         (WebCore::ContentSecurityPolicy::copyStateFrom):
2990         (WebCore::ContentSecurityPolicy::didReceiveHeader):
2991         (WebCore::ContentSecurityPolicy::deprecatedHeader):
2992         (WebCore::ContentSecurityPolicy::deprecatedHeaderType):
2993             - Even after this patch, workers aren't smart enough to enforce
2994               multiple policies.  They just use the first header, like they did
2995               before.  We'll need to teach workers how to enforce multiple
2996               policies in a future patch.
2997         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
2998         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
2999         (WebCore::ContentSecurityPolicy::allowInlineScript):
3000         (WebCore::ContentSecurityPolicy::allowInlineStyle):
3001         (WebCore::ContentSecurityPolicy::allowEval):
3002         (WebCore::ContentSecurityPolicy::allowScriptFromSource):
3003         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
3004         (WebCore::ContentSecurityPolicy::allowChildFrameFromSource):
3005         (WebCore::ContentSecurityPolicy::allowImageFromSource):
3006         (WebCore::ContentSecurityPolicy::allowStyleFromSource):
3007         (WebCore::ContentSecurityPolicy::allowFontFromSource):
3008         (WebCore::ContentSecurityPolicy::allowMediaFromSource):
3009         (WebCore::ContentSecurityPolicy::allowConnectFromSource):
3010         * page/ContentSecurityPolicy.h:
3011         * workers/DefaultSharedWorkerRepository.cpp:
3012         (WebCore::SharedWorkerScriptLoader::notifyFinished):
3013         * workers/WorkerMessagingProxy.cpp:
3014         (WebCore::WorkerMessagingProxy::startWorkerContext):
3015
3016 2012-05-06  Rob Buis  <rbuis@rim.com>
3017
3018         InlineBox::setHasBadParent should be debug only
3019         https://bugs.webkit.org/show_bug.cgi?id=85748
3020
3021         Reviewed by Eric Seidel.
3022
3023         Do not provide InlineBox::setHasBadParent in release builds.
3024
3025         * rendering/InlineBox.h:
3026         (InlineBox):
3027         (WebCore):
3028         (WebCore::InlineBox::setHasBadParent):
3029
3030 2012-05-06  Mike West  <mkwst@chromium.org>
3031
3032         KURL::isBlankURL would be a nicer idiom than KURL::protocolIs("about")
3033         https://bugs.webkit.org/show_bug.cgi?id=85641
3034
3035         Reviewed by Adam Barth.
3036
3037         * dom/Document.cpp:
3038         (WebCore::shouldInheritSecurityOriginFromOwner):
3039         * page/ContentSecurityPolicy.cpp:
3040         (WebCore::CSPDirectiveList::allowObjectFromSource):
3041         (WebCore::CSPDirectiveList::allowChildFrameFromSource):
3042         * page/PageSerializer.cpp:
3043         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
3044         (WebCore::PageSerializer::serializeFrame):
3045         * platform/KURL.cpp:
3046         (WebCore::KURL::isBlankURL):
3047         (WebCore):
3048         * platform/KURL.h:
3049         (KURL):
3050         (WebCore):
3051
3052 2012-05-06  Martin Robinson  <mrobinson@igalia.com>
3053
3054         [TextureMapper] Layer images is uploaded to the GPU for each sync
3055         https://bugs.webkit.org/show_bug.cgi?id=85727
3056
3057         Reviewed by Noam Rosenthal.
3058
3059         No new tests. This does not change functionality,
3060         it only improves performance.
3061
3062         * platform/graphics/texmap/TextureMapperLayer.cpp:
3063         (WebCore::TextureMapperLayer::updateBackingStore): Reset the needsDisplay
3064         and needsDisplayRect variables after uploading the layer image.
3065
3066 2012-05-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3067
3068         Convert isPageBoxVisible to use Internals interface.
3069         https://bugs.webkit.org/show_bug.cgi?id=85692
3070
3071         Reviewed by Darin Adler.
3072
3073         Add isPageBoxVisible functions, because it is able to work in the
3074         cross-port way through the Internals interface.
3075
3076         No new tests, since we are improving here the infra-structure for testing
3077         a specific method.
3078
3079         * testing/Internals.cpp:
3080         (WebCore):
3081         (WebCore::Internals::isPageBoxVisible):
3082         * testing/Internals.h:
3083         (Internals):
3084         * testing/Internals.idl:
3085
3086 2012-05-06  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3087
3088         Web Inspector: "Goto Function" filtering should be less restrictive.
3089         https://bugs.webkit.org/show_bug.cgi?id=85586
3090
3091         Reviewed by Pavel Feldman.
3092
3093         Added tests for generated regex.
3094
3095         Changes:
3096         1) Avoid asterisks in filtering queue.
3097         2) Optimization: do not create regexp for each item.
3098
3099         * inspector/front-end/FilteredItemSelectionDialog.js: 
3100         (WebInspector.FilteredItemSelectionDialog.prototype.get _itemsLoaded):
3101         Applied new filtering workflow.
3102         (WebInspector.FilteredItemSelectionDialog.prototype._checkItemAt):
3103         Removed.
3104         (WebInspector.FilteredItemSelectionDialog.prototype._createSearchRegExp):
3105         Removed unused "suffix" logic; changed the way regexp is composed from query.
3106         (WebInspector.FilteredItemSelectionDialog.prototype._filterItems):
3107         Applied new filtering workflow.
3108         (WebInspector.FilteredItemSelectionDialog.prototype._onKeyDown):
3109         Removed unused var.
3110
3111 2012-05-06  Kent Tamura  <tkent@chromium.org>
3112
3113         Rename ICULocale to LocaleICU, part 2
3114         https://bugs.webkit.org/show_bug.cgi?id=85695
3115
3116         Reviewed by Kentaro Hara.
3117
3118         No behavior change
3119
3120         * platform/text/LocaleICU.cpp: Rename ICULocale to LocaleICU.
3121         * platform/text/LocaleICU.h: ditto.
3122         Also, update obsolete comments.
3123         * platform/text/LocalizedDateICU.cpp: Rename ICULocale to LocaleICU.
3124         (WebCore::parseLocalizedDate):
3125         (WebCore::formatLocalizedDate):
3126         (WebCore::localizedDateFormatText):
3127         (WebCore::monthLabels):
3128         (WebCore::weekDayShortLabels):
3129         (WebCore::firstDayOfWeek):
3130         * platform/text/LocalizedNumberICU.cpp: ditto.
3131         (WebCore::convertToLocalizedNumber):
3132         (WebCore::convertFromLocalizedNumber):
3133
3134 2012-05-06  Kevin Ollivier  <kevino@theolliviers.com>
3135
3136         [wx] Unreviewed. Build fixes for recent trunk changes.
3137
3138         * platform/graphics/SimpleFontData.h:
3139         (SimpleFontData):
3140         * platform/graphics/wx/FontPlatformData.h:
3141         (FontPlatformData):
3142         (WebCore::FontPlatformData::isCompositeFontReference):
3143         * platform/graphics/wx/SimpleFontDataWx.cpp:
3144         (WebCore):
3145         (WebCore::SimpleFontData::getCompositeFontReferenceFontData):
3146         * plugins/mac/PluginViewMac.mm:
3147         * rendering/RenderObject.h:
3148
3149 2012-05-06  Andrey Kosyakov  <caseq@chromium.org>
3150
3151         Web Inspector: take timeline frame mode out of experimental
3152         https://bugs.webkit.org/show_bug.cgi?id=85707
3153
3154         Reviewed by Pavel Feldman.
3155
3156         - remove "Vertical timeline overview" experiment;
3157         - add supportsFrameInstrumentation capability to InspectorTimelineAgent;
3158         - show frame mode selector conditionally on supportsFrameInstrumentation capability.
3159
3160         * inspector/Inspector.json: Add Timeline.supportsFrameInstrumentation capability;
3161         * inspector/InspectorClient.h: Add supportsFrameInstrumentation();
3162         (InspectorClient):
3163         (WebCore::InspectorClient::supportsFrameInstrumentation):
3164         * inspector/InspectorController.cpp:
3165         (WebCore::InspectorController::InspectorController):
3166         * inspector/InspectorTimelineAgent.cpp:
3167         (WebCore::InspectorTimelineAgent::supportsFrameInstrumentation):
3168         (WebCore):
3169         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): Added FrameInstrumentationSupport parameter.
3170         * inspector/InspectorTimelineAgent.h:
3171         (WebCore):
3172         (WebCore::InspectorTimelineAgent::create): ditto.
3173         (InspectorTimelineAgent):
3174         * inspector/WorkerInspectorController.cpp: Updated call site for InspectorTimelineAgent::create() to indicate frame instrumentation not supported.
3175         (WebCore::WorkerInspectorController::WorkerInspectorController):
3176         * inspector/front-end/Settings.js:
3177         (WebInspector.ExperimentsSettings): Removed "Vertical Overview" experiment.
3178         * inspector/front-end/TimelineOverviewPane.js: Expose frame mode conditionally on capability, not the experiment.
3179         (WebInspector.TimelineOverviewPane):
3180         * inspector/front-end/inspector.js: Added initialization for Capabilities.timelineSupportsFrameInstrumentation;
3181         (WebInspector.doLoadedDone):
3182
3183 2012-05-06  Antti Koivisto  <antti@apple.com>
3184
3185         Build fix.
3186
3187         Not reviewed.
3188
3189         * css/PropertySetCSSStyleDeclaration.cpp:
3190
3191 2012-05-04  Antti Koivisto  <antti@apple.com>
3192
3193         Share stylesheet data structures between documents
3194         https://bugs.webkit.org/show_bug.cgi?id=85598
3195
3196         Reviewed by Darin Adler.
3197
3198         We currently make a copy of the data structures when restoring a cached stylesheet. This patch lets us share
3199         the data until someone uses CSSOM to modify the sheet.
3200         
3201         The patch implements copy-on-write for the internal style sheet data structures. If any mutation CSSOM API is
3202         invoked, we check if the stylesheet can be safely mutated (we are the only client, it is not cached). If not
3203         then the internal structures are copied and any existing CSSOM objects are re-attached to the new tree.
3204         
3205         Sharing can save significant amount of memory on sites with large stylesheets. For example if you have
3206         multiple articles open on wsj.com this saves ~2.6MB per tab.
3207         
3208         Test: http/tests/css/shared-stylesheet-mutation.html
3209               http/tests/css/shared-stylesheet-mutation-preconstruct.html
3210
3211         * css/CSSFontFaceRule.cpp:
3212         (WebCore::CSSFontFaceRule::reattach):
3213         (WebCore):
3214         * css/CSSFontFaceRule.h:
3215         (CSSFontFaceRule):
3216         * css/CSSMediaRule.cpp:
3217         (WebCore::CSSMediaRule::insertRule):
3218         (WebCore::CSSMediaRule::deleteRule):
3219         (WebCore::CSSMediaRule::reattach):
3220         (WebCore):
3221         * css/CSSMediaRule.h:
3222         (CSSMediaRule):
3223         * css/CSSPageRule.cpp:
3224         (WebCore::CSSPageRule::setSelectorText):
3225         (WebCore::CSSPageRule::reattach):
3226         (WebCore):
3227         * css/CSSPageRule.h:
3228         (CSSPageRule):
3229         * css/CSSRule.cpp:
3230         (WebCore::CSSRule::reattach):
3231         
3232             After the internal stylerule tree has been copied, the existing wrappers are re-attached using recursive reattach() function.
3233
3234         * css/CSSRule.h:
3235         (WebCore):
3236         (CSSRule):
3237         * css/CSSStyleRule.cpp:
3238         (WebCore::CSSStyleRule::setSelectorText):
3239         (WebCore::CSSStyleRule::reattach):
3240         (WebCore):
3241         * css/CSSStyleRule.h:
3242         (CSSStyleRule):
3243         * css/CSSStyleSheet.cpp:
3244         (WebCore::StyleSheetInternal::StyleSheetInternal):
3245         (WebCore::StyleSheetInternal::isCacheable):
3246         (WebCore::StyleSheetInternal::ruleAt):
3247         
3248             Add ruleAt(), use it for both wrapper creation and reattaching.  Remove createChildRuleCSSOMWrapper .
3249
3250         (WebCore):
3251         (WebCore::StyleSheetInternal::wrapperInsertRule):
3252         (WebCore::StyleSheetInternal::wrapperDeleteRule):
3253         
3254             Invalidation moves to the calling wrapper.
3255
3256         (WebCore::StyleSheetInternal::addedToMemoryCache):
3257         (WebCore::StyleSheetInternal::removedFromMemoryCache):
3258         (WebCore::CSSStyleSheet::willMutateRules):
3259         
3260             This is called whenever StyleSheetInternal is going to be mutated. It will do copy-on-write if needed.
3261             
3262             Usually invoked by CSSStyleSheet::RuleMutation RAII type.
3263
3264         (WebCore::CSSStyleSheet::didMutateRules):
3265         
3266             This is called after the mutation is complete and will trigger the style recalc in the document.
3267
3268         (WebCore::CSSStyleSheet::didMutate):
3269         
3270             This is called directly after mutations that don't change StyleSheetInternal so don't require copy-on-write.
3271
3272         (WebCore::CSSStyleSheet::reattachChildRuleCSSOMWrappers):
3273         (WebCore::CSSStyleSheet::setDisabled):
3274         (WebCore::CSSStyleSheet::insertRule):
3275         (WebCore::CSSStyleSheet::deleteRule):
3276         * css/CSSStyleSheet.h:
3277         (StyleSheetInternal):
3278         (WebCore::StyleSheetInternal::hasOneClient):
3279         (WebCore::StyleSheetInternal::isMutable):
3280         (WebCore::StyleSheetInternal::setMutable):
3281         
3282             Track mutability. Mutation is allowed only after willMutate call.
3283
3284         (WebCore::StyleSheetInternal::isInMemoryCache):
3285         
3286             Track if the object is in memory cache.
3287
3288         (WebCore::CSSStyleSheet::clearOwnerRule):
3289         (CSSStyleSheet):
3290         * css/MediaList.cpp:
3291         (WebCore::MediaList::setMediaText):
3292         (WebCore::MediaList::deleteMedium):
3293         (WebCore::MediaList::appendMedium):
3294         (WebCore::MediaList::didMutate):
3295         (WebCore):
3296         (WebCore::MediaList::reattach):
3297         * css/MediaList.h:
3298         (MediaList):
3299         * css/PropertySetCSSStyleDeclaration.cpp:
3300         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
3301         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
3302         (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
3303         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
3304         (WebCore):
3305         (WebCore::StyleRuleCSSStyleDeclaration::willMutate):
3306         (WebCore::StyleRuleCSSStyleDeclaration::didMutate):
3307         (WebCore::StyleRuleCSSStyleDeclaration::reattach):
3308         (WebCore::InlineCSSStyleDeclaration::didMutate):
3309         * css/PropertySetCSSStyleDeclaration.h:
3310         (WebCore::PropertySetCSSStyleDeclaration::willMutate):
3311         (WebCore::PropertySetCSSStyleDeclaration::didMutate):
3312         (StyleRuleCSSStyleDeclaration):
3313         * css/WebKitCSSKeyframesRule.cpp:
3314         (WebCore::WebKitCSSKeyframesRule::setName):
3315         (WebCore::WebKitCSSKeyframesRule::insertRule):
3316         (WebCore::WebKitCSSKeyframesRule::deleteRule):
3317         (WebCore::WebKitCSSKeyframesRule::reattach):
3318         (WebCore):
3319         * css/WebKitCSSKeyframesRule.h:
3320         (WebKitCSSKeyframesRule):
3321         * css/WebKitCSSRegionRule.cpp:
3322         (WebCore::WebKitCSSRegionRule::reattach):
3323         * css/WebKitCSSRegionRule.h:
3324         (WebKitCSSRegionRule):
3325         * inspector/InspectorStyleSheet.cpp:
3326         (WebCore::InspectorStyleSheet::reparseStyleSheet):
3327         * loader/cache/CachedCSSStyleSheet.cpp:
3328         (WebCore::CachedCSSStyleSheet::~CachedCSSStyleSheet):
3329         (WebCore::CachedCSSStyleSheet::destroyDecodedData):
3330         (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
3331         
3332             Don't copy when restoring. It is no longer necessary.
3333             Set the cache bit on the stylesheet.
3334
3335         (WebCore::CachedCSSStyleSheet::saveParsedStyleSheet):
3336
3337 2012-05-05  Sheriff Bot  <webkit.review.bot@gmail.com>
3338
3339         Unreviewed, rolling out r116221.
3340         http://trac.webkit.org/changeset/116221
3341         https://bugs.webkit.org/show_bug.cgi?id=85722
3342
3343         broke builds that use -Wshorten-64-to-32 (Requested by pizlo
3344         on #webkit).
3345
3346         * html/canvas/WebGLRenderingContext.cpp:
3347         (WebCore):
3348         (WebCore::WebGLRenderingContext::bufferData):
3349         (WebCore::WebGLRenderingContext::bufferSubData):
3350         (WebCore::WebGLRenderingContext::drawElements):
3351         (WebCore::WebGLRenderingContext::getVertexAttribOffset):
3352         (WebCore::WebGLRenderingContext::vertexAttribPointer):
3353         * html/canvas/WebGLRenderingContext.h:
3354         (WebGLRenderingContext):
3355         * html/canvas/WebGLRenderingContext.idl:
3356
3357 2012-05-05  Martin Robinson  <mrobinson@igalia.com>
3358
3359         [GTK] WebKit should properly set the input method context window location
3360         https://bugs.webkit.org/show_bug.cgi?id=84981
3361
3362         Reviewed by Gustavo Noronha Silva.
3363
3364         * platform/gtk/GtkInputMethodFilter.cpp:
3365         (WebCore::GtkInputMethodFilter::setCursorRect): Add this method to plumb the
3366         cursor rect through to the input method.
3367         * platform/gtk/GtkInputMethodFilter.h: Add the new method declaration.
3368
3369 2012-05-05  Dean Jackson  <dino@apple.com>
3370
3371         Add new Setting/Preference to disable requestAnimationFrame
3372         https://bugs.webkit.org/show_bug.cgi?id=85693
3373
3374         Reviewed by Simon Fraser.
3375
3376         Hook up the new WebPreference for disabling requestAnimationFrame
3377         to Settings. This isn't disabling the feature in the typical
3378         WebKit ENABLE() way - it's still available in the DOM, it's
3379         just that the animations will never be serviced. This allows a client
3380         to disable the machinery without breaking content (other than the
3381         animations).
3382
3383         The new test is currently skipped on all platforms because toggling
3384         the preference interferes with the other tests that are running
3385         at the same time (and expect a working requestAnimationFrame).
3386         https://bugs.webkit.org/show_bug.cgi?id=85689
3387
3388         Test: fast/animation/request-animation-frame-disabled.html
3389
3390         * dom/ScriptedAnimationController.cpp:
3391         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
3392         (WebCore::ScriptedAnimationController::windowScreenDidChange):
3393         (WebCore::ScriptedAnimationController::scheduleAnimation):
3394         Check the setting before deciding to act.
3395         * page/Settings.cpp:
3396         (WebCore::Settings::Settings):
3397         * page/Settings.h:
3398         (WebCore::Settings::setRequestAnimationFrameEnabled):
3399         (WebCore::Settings::requestAnimationFrameEnabled):
3400         (Settings):
3401
3402 2012-05-05  Gustavo Noronha Silva  <gns@gnome.org>
3403
3404         Unreviewed, make distcheck fix.
3405
3406         * GNUmakefile.list.am: Add missing headers to the sources list.
3407
3408 2012-05-05  Ilya Tikhonovsky  <loislo@chromium.org>
3409
3410         Web Inspector: convert standalone functions save/append/savedURL/appendedToURL into WebInspector.FileManager object.
3411         https://bugs.webkit.org/show_bug.cgi?id=85710
3412
3413         The idea is to have an object and be able to add/remove event listeners from it.
3414
3415         Reviewed by Yury Semikhatsky.
3416
3417         * English.lproj/localizedStrings.js:
3418         * WebCore.gypi:
3419         * WebCore.vcproj/WebCore.vcproj:
3420         * inspector/compile-front-end.py:
3421         * inspector/front-end/FileManager.js: Copied from Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js.
3422         (WebInspector.FileManager):
3423         (WebInspector.FileManager.prototype.canSave):
3424         (WebInspector.FileManager.prototype.canAppend):
3425         (WebInspector.FileManager.prototype.append):
3426         (WebInspector.FileManager.prototype.appendedToURL):
3427         * inspector/front-end/HeapSnapshotView.js:
3428         (WebInspector.HeapProfileHeader.prototype.canSave):
3429         (WebInspector.HeapProfileHeader.prototype.save):
3430         * inspector/front-end/InspectorFrontendHostStub.js:
3431         * inspector/front-end/WebKit.qrc:
3432         * inspector/front-end/inspector.html:
3433
3434 2012-05-05  Zhenyao Mo  <zmo@google.com>
3435
3436         vertexAttribPointer needs to reject large negative offsets
3437         https://bugs.webkit.org/show_bug.cgi?id=85117
3438
3439         Reviewed by Kenneth Russell.
3440
3441         * html/canvas/WebGLRenderingContext.cpp: Use long long for GLsizeiptr and GLintptr
3442         (WebCore):
3443         (WebCore::WebGLRenderingContext::bufferData):
3444         (WebCore::WebGLRenderingContext::bufferSubData):
3445         (WebCore::WebGLRenderingContext::drawElements):
3446         (WebCore::WebGLRenderingContext::getVertexAttribOffset):
3447         (WebCore::WebGLRenderingContext::vertexAttribPointer):
3448         * html/canvas/WebGLRenderingContext.h: Ditto
3449         (WebGLRenderingContext):
3450         * html/canvas/WebGLRenderingContext.idl: Ditto
3451
3452 2012-05-05  Andrey Kosyakov  <caseq@chromium.org>
3453
3454         Web Inspector: add separate timeline overview item for the frame mode
3455         https://bugs.webkit.org/show_bug.cgi?id=85706
3456
3457         - remove two-buttons horizontal/vertical mode switch from Timelines item of the timeline overview menu;
3458         - rename "Timeline" into "Events";
3459         - add "Frames" item;
3460         - replace overview sidebar icons with smaller, monochrome ones.
3461
3462         * English.lproj/localizedStrings.js: Added "Frames" and "Events".
3463         * inspector/front-end/Images/statusbarButtonGlyphs.png: Added icon for "Memory".
3464         * inspector/front-end/TimelineOverviewPane.js:
3465         (WebInspector.TimelineOverviewPane):
3466         (WebInspector.TimelineOverviewPane.prototype._showEvents):
3467         (WebInspector.TimelineOverviewPane.prototype._showFrames):
3468         (WebInspector.TimelineOverviewPane.prototype._showMemoryGraph):
3469         (WebInspector.TimelineOverviewPane.prototype._setMode):
3470         * inspector/front-end/timelinePanel.css:
3471         (#timeline-overview-sidebar .sidebar-tree-item):
3472         (#timeline-overview-sidebar .sidebar-tree-item .titles.no-subtitle):
3473         (#timeline-overview-sidebar .icon):
3474         (.timeline-overview-sidebar-events .icon):
3475         (.timeline-overview-sidebar-frames .icon):
3476         (.timeline-overview-sidebar-memory .icon):
3477
3478 2012-05-05  Ilya Tikhonovsky  <loislo@chromium.org>
3479
3480         Web Inspector: save HeapSnapshot implementation.
3481         https://bugs.webkit.org/show_bug.cgi?id=85595
3482
3483         HeapSnapshot specific implementation for loading was moved
3484         from ProfilesPanel to HeapProfileHeader class.
3485
3486         Reviewed by Yury Semikhatsky.
3487
3488         * inspector/front-end/HeapSnapshotView.js:
3489         (WebInspector.HeapSnapshotView.prototype.get profileWrapper):
3490         (WebInspector.HeapSnapshotView.prototype.get baseProfileWrapper):
3491         (WebInspector.HeapProfileHeader):
3492         (WebInspector.HeapProfileHeader.prototype.load.setProfileWait):
3493         (WebInspector.HeapProfileHeader.prototype.load.done):
3494         (WebInspector.HeapProfileHeader.prototype.load):
3495         (WebInspector.HeapProfileHeader.prototype._saveStatusUpdate):
3496         (WebInspector.HeapProfileHeader.prototype.pushJSONChunk):
3497         (WebInspector.HeapProfileHeader.prototype.finishHeapSnapshot):
3498         (WebInspector.HeapProfileHeader.prototype.canSave):
3499         (WebInspector.HeapProfileHeader.prototype.save):
3500         * inspector/front-end/InspectorFrontendAPI.js:
3501         (InspectorFrontendAPI.appendedToURL):
3502         * inspector/front-end/ProfilesPanel.js:
3503         (WebInspector.ProfilesPanel.prototype._registerProfileType):
3504         (WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
3505         (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot):
3506         (WebInspector.ProfilesPanel.prototype._addHeapSnapshotChunk):
3507         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
3508         (WebInspector.ProfileSidebarTreeElement.prototype.set searchMatches):
3509         (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
3510         * inspector/front-end/inspector.js:
3511         (WebInspector.append):
3512         (WebInspector.appendedToURL):
3513
3514 2012-05-05  Pavel Feldman  <pfeldman@chromium.org>
3515
3516         Web Inspector: allow overriding the script mapping on the UI level
3517         https://bugs.webkit.org/show_bug.cgi?id=85702
3518
3519         Reviewed by Yury Semikhatsky.
3520
3521         This allows formatting update live locations all over the place automatically.
3522
3523         * inspector/front-end/Script.js:
3524         (WebInspector.Script.prototype.rawLocationToUILocation):
3525         (WebInspector.Script.Location):
3526         (WebInspector.Script.Location.prototype.update):
3527         (WebInspector.Script.Location.prototype.dispose):
3528         * inspector/front-end/UISourceCode.js:
3529         (WebInspector.UISourceCode):
3530         (WebInspector.UISourceCode.prototype.addLiveLocation):
3531         (WebInspector.UISourceCode.prototype.removeLiveLocation):
3532         (WebInspector.UISourceCode.prototype.updateLiveLocations):
3533         (WebInspector.UISourceCode.prototype.overrideLocation):
3534
3535 2012-05-05  Pavel Feldman  <pfeldman@chromium.org>
3536
3537         Web Inspector: simplify the JavaScriptOutline dialog interaction.
3538         https://bugs.webkit.org/show_bug.cgi?id=85701
3539
3540         Reviewed by Yury Semikhatsky.
3541
3542         Removed bidirectional dependency between scripts panel and outline dialog.
3543
3544         * inspector/front-end/FilteredItemSelectionDialog.js:
3545         (WebInspector.JavaScriptOutlineDialog):
3546         (WebInspector.JavaScriptOutlineDialog.show):
3547         (WebInspector.JavaScriptOutlineDialog.prototype.requestItems):
3548         (WebInspector.JavaScriptOutlineDialog.prototype._didBuildOutlineChunk):
3549         (WebInspector.JavaScriptOutlineDialog.prototype.selectItem):
3550         * inspector/front-end/ScriptFormatterWorker.js:
3551         * inspector/front-end/ScriptsPanel.js:
3552         (WebInspector.ScriptsPanel.prototype.addToWatch):
3553         (WebInspector.ScriptsPanel.prototype._showJavaScriptOutlineDialog):
3554
3555 2012-05-04  Ilya Tikhonovsky  <loislo@chromium.org>
3556
3557         Web Inspector: annotate ProfilerAgent.
3558         https://bugs.webkit.org/show_bug.cgi?id=85630
3559
3560         Reviewed by Pavel Feldman.
3561
3562         * inspector/Inspector.json:
3563         * inspector/InspectorProfilerAgent.cpp:
3564         (WebCore::InspectorProfilerAgent::createProfileHeader):
3565         (WebCore::InspectorProfilerAgent::createSnapshotHeader):
3566         (WebCore::InspectorProfilerAgent::getProfileHeaders):
3567         (WebCore):
3568         (WebCore::InspectorProfilerAgent::getProfile):
3569         * inspector/InspectorProfilerAgent.h:
3570         (InspectorProfilerAgent):
3571         * inspector/front-end/CSSSelectorProfileView.js:
3572         * inspector/front-end/HeapSnapshotView.js:
3573         (WebInspector.HeapSnapshotProfileType.prototype.createProfile):
3574         * inspector/front-end/ProfileView.js:
3575         * inspector/front-end/ProfilesPanel.js:
3576         (WebInspector.ProfilesPanel.prototype.addProfileHeader):
3577         (WebInspector.ProfilesPanel.prototype._addHeapSnapshotChunk):
3578         (WebInspector.ProfilerDispatcher.prototype.resetProfiles):
3579
3580 2012-05-04  Gustavo Noronha Silva  <gns@gnome.org>
3581
3582         [GTK] Simplify how libWebCoreModules is linked in, and fix WebKit2 build
3583         https://bugs.webkit.org/show_bug.cgi?id=85691
3584
3585         * GNUmakefile.am: link libWebCoreModules into libWebCore.
3586
3587 2012-05-04  Kent Tamura  <tkent@chromium.org>
3588
3589         Rename ICULocale to LocaleICU, part 1
3590         https://bugs.webkit.org/show_bug.cgi?id=85688
3591
3592         Reviewed by Kentaro Hara.
3593
3594         Rename it for consistency. Our convention is Foo<Platform>.{cpp,h}.
3595         This patch changes only file names. We'll rename ICULocale class
3596         by a following patch.
3597
3598         No behavior changes.
3599
3600         * WebCore.gypi:
3601         * platform/text/LocaleICU.cpp: Renamed from Source/WebCore/platform/text/ICULocale.cpp.
3602         * platform/text/LocaleICU.h: Renamed from Source/WebCore/platform/text/ICULocale.h.
3603         * platform/text/LocalizedDateICU.cpp: Rename ICULocale.h to LocaleICU.h.
3604         * platform/text/LocalizedNumberICU.cpp: ditto.
3605
3606 2012-05-04  Julien Chaffraix  <jchaffraix@webkit.org>
3607
3608         Leaf non self-painting layers should bail out early in RenderLayer::paintLayer
3609         https://bugs.webkit.org/show_bug.cgi?id=85678
3610
3611         Reviewed by Darin Adler.
3612
3613         Performance optimization, no expected change in behavior.
3614
3615         The gist of the change is that leaf non self-painting layers don't need to be painted as their
3616         associated RenderBoxModelObject should properly paint itself without any help.
3617
3618         For RenderLayer trees that have a large number of leafs nodes (like a table with a leaf RenderLayer for
3619         each cells), not bailing out is a big overhead as it ends up doing a lot of computation for no real
3620         painting. See http://dglazkov.github.com/performance-tests/biggrid.html for a benchmark for that. On
3621         my machine, it reduces the paint time when scrolling to 70ms from 120ms (45% speedup).
3622
3623         * rendering/RenderLayer.cpp:
3624         (WebCore::RenderLayer::paintLayer):
3625
3626 2012-05-04  Rob Buis  <rbuis@rim.com>
3627
3628         Remove InlineBox::next()
3629         https://bugs.webkit.org/show_bug.cgi?id=85668
3630
3631         Reviewed by Nikolas Zimmermann.
3632
3633         InlineBox::next() not needed since nextOnLine() does the same.
3634
3635         * rendering/InlineBox.h:
3636         (InlineBox):
3637         * rendering/InlineFlowBox.h:
3638         (WebCore::InlineFlowBox::setConstructed):
3639
3640 2012-05-04  Chris Rogers  <crogers@google.com>
3641
3642         Oscillator must implement noteOn() and noteOff()
3643         https://bugs.webkit.org/show_bug.cgi?id=85236
3644
3645         Reviewed by Kenneth Russell.
3646
3647         Test: webaudio/oscillator-scheduling.html
3648         to be landed separately to get proper platform baselines
3649
3650         * Modules/webaudio/AudioBufferSourceNode.cpp:
3651         (WebCore::AudioBufferSourceNode::process):
3652         Simplify/remove zeroing-out silence at end of buffer, since it's now handled in the base-class AudioScheduledSourceNode::updateSchedulingInfo().
3653
3654         * Modules/webaudio/AudioContext.cpp:
3655         (WebCore::AudioContext::createBufferSource):
3656         Improve comment about ownership and dynamic-lifetime of AudioBufferSourceNode.
3657
3658         (WebCore::AudioContext::createOscillator):
3659         AudioContext keeps a reference to the Oscillator and that reference is released in AudioScheduledSourceNode,
3660         when it has finished playing.
3661
3662         * Modules/webaudio/AudioScheduledSourceNode.h:
3663         * Modules/webaudio/AudioScheduledSourceNode.cpp:
3664         (WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
3665         updateSchedulingInfo() is now responsible for zeroing out the very start (before a note starts)
3666         and the very end (after note ends) of the output AudioBus.  We've also simplified the number
3667         of arguments passed to this method, because of this. It now handles playbackState transition to FINISHED_STATE.
3668
3669         * Modules/webaudio/Oscillator.cpp:
3670         (WebCore::Oscillator::Oscillator):
3671         (WebCore::Oscillator::calculateSampleAccuratePhaseIncrements):
3672         The frequency value needs to snap immediately to its correct value the very first time.
3673         This bug needs to be fixed here so that the Oscillator layout scheduling test works correctly.
3674
3675         (WebCore::Oscillator::process):
3676         Since Oscillator in now changing to be a AudioScheduledSourceNode, we need to call AudioScheduledSourceNode::updateSchedulingInfo()
3677         to handle playbackState for us.
3678
3679         (WebCore::Oscillator::propagatesSilence):
3680         Add scheduling logic for propagatesSilence().
3681
3682         (Oscillator):
3683         * Modules/webaudio/Oscillator.idl:
3684         Add noteOn(), noteOff() methods and playbackState according to specification.
3685
3686 2012-05-04  Andy Estes  <aestes@apple.com>
3687
3688         Remove uses of ASSERT(false)
3689         https://bugs.webkit.org/show_bug.cgi?id=85686
3690
3691         Reviewed by Dean Jackson.
3692
3693         Replace uses of ASSERT(false) with ASSERT_NOT_REACHED(). Also, in two places, there was code structured like:
3694
3695         if (expr) {
3696             // do something
3697         } else {
3698             ASSERT(false);
3699         }
3700
3701         Replace this with:
3702
3703         ASSERT(expr);
3704         if (!expr)
3705             return;
3706
3707         // do something
3708
3709         * Modules/webdatabase/DatabaseTracker.cpp:
3710         (WebCore::DatabaseTracker::deleteOrigin):
3711         (WebCore::DatabaseTracker::doneCreatingDatabase):
3712         (WebCore::DatabaseTracker::doneDeletingDatabase):
3713         (WebCore::DatabaseTracker::deleteDatabase):
3714         * bridge/objc/objc_instance.mm:
3715         (ObjcInstance::invokeObjcMethod):
3716         * bridge/objc/objc_utility.mm:
3717         (JSC::Bindings::convertObjcValueToValue):
3718         (JSC::Bindings::objcValueTypeForType):
3719         * dom/Node.cpp:
3720         (WebCore::Node::createRenderer):
3721         * loader/icon/IconDatabase.cpp:
3722         (WebCore::IconDatabase::setIconURLForPageURLInSQLDatabase):
3723         (WebCore::IconDatabase::setIconIDForPageURLInSQLDatabase):
3724         * platform/graphics/GraphicsContext3D.cpp:
3725         (WebCore::doPacking):
3726         * platform/text/BidiResolver.h:
3727         (WebCore::::createBidiRunsForLine):
3728
3729 2012-05-04  Noel Gordon  <noel.gordon@gmail.com>
3730
3731         [CG] Minor refactor of ImageBuffer::CGImageToDataURL and its callers
3732         https://bugs.webkit.org/show_bug.cgi?id=85280
3733
3734         Reviewed by Kenneth Russell.
3735
3736         This patch means to simplify the diff of an upcoming patch. Refactoring
3737         here in preparation for that patch.
3738
3739         No new tests. No behavioral change. Covered by canvas 2d and 3d tests:
3740           canvas/philip/tests/*toDataURL*.html
3741           fast/canvas/webgl/premultiplyalpha-test.html
3742
3743         * platform/graphics/cg/ImageBufferCG.cpp:
3744         (WebCore::CGImageToDataURL): Move the invalid image (!image) test here.
3745         The comments are about JPEG images; say that. Rename out to base64Data.
3746         (WebCore::ImageBuffer::toDataURL): Remove the !image test.
3747         (WebCore::ImageDataToDataURL): Move and define variables where used and
3748         make the code flow read similarly to toDataURL. Remove the !image test.
3749
3750 2012-05-04  Shawn Singh  <shawnsingh@chromium.org>
3751
3752         [chromium] Changes to layer tree structure need to be tracked properly
3753         https://bugs.webkit.org/show_bug.cgi?id=85421
3754
3755         Reviewed by Adrienne Walker.
3756
3757         Unit test added: TreeSynchronizerTest.syncSimpleTreeAndTrackStackingOrderChange
3758
3759         Earlier, we were relying on WebCore behavior that always called
3760         setNeedsDisplay whenever the layer tree structure changed.
3761         However, in general it is more correct to consider layer tree
3762         changes even when things don't need repainting; for example Aura
3763         code is encountring this bug now. This patch corrects the
3764         compositor so that layer tree structural changes are considered
3765         property changes, without requiring that layers needed to be
3766         repainted.
3767
3768         * platform/graphics/chromium/LayerChromium.cpp:
3769         (WebCore::LayerChromium::LayerChromium):
3770         (WebCore::LayerChromium::insertChild):
3771         (WebCore::LayerChromium::pushPropertiesTo):
3772         * platform/graphics/chromium/LayerChromium.h:
3773         (LayerChromium):
3774         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3775         (WebCore::CCLayerImpl::setStackingOrderChanged):
3776         (WebCore):
3777         * platform/graphics/chromium/cc/CCLayerImpl.h:
3778         (CCLayerImpl):
3779
3780 2012-05-04  Jeffrey Pfau  <jpfau@apple.com>
3781
3782         Unreviewed; build fix after r116191.
3783
3784         * bindings/js/JSEventListener.h:
3785
3786 2012-05-04  Enrica Casucci  <enrica@apple.com>
3787
3788         REGRESSION: Cursor jumps to the first line after deleting the last word.
3789         https://bugs.webkit.org/show_bug.cgi?id=85334
3790         <rdar://problem/11210059>
3791
3792         Reviewed by Ryosuke Niwa.
3793
3794         This regression was introduced with the work to remove redundant divs.
3795         When we decide to remove a DIV, we need to adjust the selection, if it is
3796         expressed in terms of the node being removed. The new position was computed
3797         using updatePositionForNodeRemoval that was not designed for the case where we
3798         remove preserving children.
3799         This patch adds a new method to CompositeEditCommand to do this properly.
3800         
3801         Test: editing/deleting/delete-word-from-unstyled-div.html
3802
3803         * editing/CompositeEditCommand.cpp:
3804         (WebCore::CompositeEditCommand::isRemovableBlock): Code clenup.
3805         (WebCore::CompositeEditCommand::updatePositionForNodeRemovalPreservingChildren): Added.
3806          * editing/CompositeEditCommand.h:
3807         * editing/DeleteSelectionCommand.cpp:
3808         (WebCore::DeleteSelectionCommand::removeRedundantBlocks): Uses updatePositionForNodeRemovalPreservingChildren.
3809
3810 2012-05-04  Jeffrey Pfau  <jpfau@apple.com>
3811
3812         Prevent early EventListener deletion
3813         https://bugs.webkit.org/show_bug.cgi?id=73970
3814
3815         Reviewed by Oliver Hunt.
3816
3817         Test: fast/events/attribute-listener-deletion-crash.html
3818
3819         * bindings/js/JSEventListener.h:
3820         (WebCore::JSEventListener::jsFunction):
3821
3822 2012-05-04  Yongjun Zhang  <yongjun_zhang@apple.com>
3823
3824         Add "combining short stroke overlay character (u0335)" to lookalike characters blacklist.
3825         https://bugs.webkit.org/show_bug.cgi?id=85440
3826
3827         Reviewed by David Kilzer.
3828
3829         We should add u0335 to the characters blacklist.
3830
3831         * platform/mac/WebCoreNSURLExtras.mm:
3832         (WebCore::isLookalikeCharacter):
3833
3834 2012-05-04  Satoru Takabayashi  <satorux@chromium.org>
3835
3836         [chromium] Add plumbing for file display names for drag and drop
3837         https://bugs.webkit.org/show_bug.cgi?id=85673
3838
3839         Reviewed by Darin Fisher.
3840
3841         No new tests: this change itself shouldn't change existing behavior.
3842
3843         * platform/chromium/ChromiumDataObject.cpp:
3844         (WebCore::ChromiumDataObject::addFilename):
3845         * platform/chromium/ChromiumDataObject.h:
3846         (ChromiumDataObject):
3847
3848 2012-05-04  Levi Weintraub  <leviw@chromium.org>
3849
3850         Correct pixel snapping in RenderSVGRoot::paintReplaced
3851         https://bugs.webkit.org/show_bug.cgi?id=85671
3852
3853         Reviewed by Eric Seidel.
3854
3855         SVG root elements are still painted on pixel boundaries, so their children should
3856         apply transforms based on their actual painted location, not their sub-pixel
3857         one. This corrects a clipping and painting issue where these sub-pixel units are
3858         incorrectly applied to the graphics context.
3859
3860         Covered by existing tests when sub-pixel layout is enabled.
3861
3862         * rendering/svg/RenderSVGRoot.cpp:
3863         (WebCore::RenderSVGRoot::paintReplaced):
3864
3865 2012-05-04  Adam Barth  <abarth@webkit.org>
3866
3867         Refactor CSP state to prepare for having both a ReportOnly and an Enforced policy
3868         https://bugs.webkit.org/show_bug.cgi?id=85662
3869
3870         Reviewed by Eric Seidel.
3871
3872         This patch refactors the ContentSecurityPolicy state into a separate
3873         DirectiveList class to prepare for
3874         https://bugs.webkit.org/show_bug.cgi?id=85561, which will cause us to
3875         need two directive lists: one for enforcement and one for monitoring.
3876
3877         This patch shouldn't cause any change in behavior.
3878
3879         * page/ContentSecurityPolicy.cpp:
3880         (CSPDirectiveList):
3881         (WebCore::CSPDirectiveList::header):
3882         (WebCore::CSPDirectiveList::headerType):
3883         (WebCore::CSPDirectiveList::denyIfEnforcingPolicy):
3884         (WebCore):
3885         (WebCore::CSPDirectiveList::CSPDirectiveList):
3886         (WebCore::CSPDirectiveList::create):
3887         (WebCore::CSPDirectiveList::reportViolation):
3888         (WebCore::CSPDirectiveList::logUnrecognizedDirective):
3889         (WebCore::CSPDirectiveList::checkEval):
3890         (WebCore::CSPDirectiveList::operativeDirective):
3891         (WebCore::CSPDirectiveList::checkInlineAndReportViolation):
3892         (WebCore::CSPDirectiveList::checkEvalAndReportViolation):
3893         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
3894         (WebCore::CSPDirectiveList::allowJavaScriptURLs):
3895         (WebCore::CSPDirectiveList::allowInlineEventHandlers):
3896         (WebCore::CSPDirectiveList::allowInlineScript):
3897         (WebCore::CSPDirectiveList::allowInlineStyle):
3898         (WebCore::CSPDirectiveList::allowEval):
3899         (WebCore::CSPDirectiveList::allowScriptFromSource):
3900         (WebCore::CSPDirectiveList::allowObjectFromSource):
3901         (WebCore::CSPDirectiveList::allowChildFrameFromSource):
3902         (WebCore::CSPDirectiveList::allowImageFromSource):
3903         (WebCore::CSPDirectiveList::allowStyleFromSource):
3904         (WebCore::CSPDirectiveList::allowFontFromSource):
3905         (WebCore::CSPDirectiveList::allowMediaFromSource):
3906         (WebCore::CSPDirectiveList::allowConnectFromSource):
3907         (WebCore::CSPDirectiveList::parse):
3908         (WebCore::CSPDirectiveList::parseDirective):
3909         (WebCore::CSPDirectiveList::parseReportURI):
3910         (WebCore::CSPDirectiveList::createCSPDirective):
3911         (WebCore::CSPDirectiveList::applySandboxPolicy):
3912         (WebCore::CSPDirectiveList::addDirective):
3913         (WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
3914         (WebCore::ContentSecurityPolicy::~ContentSecurityPolicy):
3915         (WebCore::ContentSecurityPolicy::copyStateFrom):
3916         (WebCore::ContentSecurityPolicy::didReceiveHeader):
3917         (WebCore::ContentSecurityPolicy::setOverrideAllowInlineStyle):
3918         (WebCore::ContentSecurityPolicy::header):
3919         (WebCore::ContentSecurityPolicy::headerType):
3920         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
3921         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
3922         (WebCore::ContentSecurityPolicy::allowInlineScript):
3923         (WebCore::ContentSecurityPolicy::allowInlineStyle):
3924         (WebCore::ContentSecurityPolicy::allowEval):
3925         (WebCore::ContentSecurityPolicy::allowScriptFromSource):
3926         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
3927         (WebCore::ContentSecurityPolicy::allowChildFrameFromSource):
3928         (WebCore::ContentSecurityPolicy::allowImageFromSource):
3929         (WebCore::ContentSecurityPolicy::allowStyleFromSource):
3930         (WebCore::ContentSecurityPolicy::allowFontFromSource):
3931         (WebCore::ContentSecurityPolicy::allowMediaFromSource):
3932         (WebCore::ContentSecurityPolicy::allowConnectFromSource):
3933         * page/ContentSecurityPolicy.h:
3934         (WebCore):
3935         * workers/WorkerMessagingProxy.cpp:
3936         (WebCore::WorkerMessagingProxy::startWorkerContext):
3937
3938 2012-05-04  Abhishek Arya  <inferno@chromium.org>
3939
3940         ASSERT(beforeChildAnonymousContainer->isTable()); fails in RenderBlock::addChildIgnoringAnonymousColumnBlocks.
3941         https://bugs.webkit.org/show_bug.cgi?id=84606
3942
3943         Reviewed by Julien Chaffraix.
3944
3945         RenderBlock::removeChild forgot to set display on the anonymous block, causing it
3946         to display as INLINE. To prevent this kind of failure in future, we replace
3947         createAnonymousStyle with createAnonymousStyleWithDisplay to make everyone explictly
3948         pass display as the argument.
3949
3950         Test: fast/block/block-add-child-crash.html
3951
3952         * rendering/RenderBlock.cpp:
3953         (WebCore::RenderBlock::removeChild): 
3954         (WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
3955         (WebCore::RenderBlock::createAnonymousColumnsWithParentRenderer):
3956         (WebCore::RenderBlock::createAnonymousColumnSpanWithParentRenderer):
3957         * rendering/RenderInline.cpp:
3958         (WebCore::updateStyleOfAnonymousBlockContinuations):
3959         (WebCore::RenderInline::addChildIgnoringContinuation):
3960         * rendering/RenderObject.cpp:
3961         (WebCore::RenderObject::propagateStyleToAnonymousChildren):
3962         * rendering/RenderRuby.cpp:
3963         (WebCore::createAnonymousRubyInlineBlock):
3964         * rendering/RenderRubyRun.cpp:
3965         (WebCore::RenderRubyRun::createRubyBase):
3966         (WebCore::RenderRubyRun::staticCreateRubyRun):
3967         * rendering/RenderTable.cpp:
3968         (WebCore::RenderTable::createAnonymousWithParentRenderer):
3969         * rendering/RenderTableCell.cpp:
3970         (WebCore::RenderTableCell::createAnonymousWithParentRenderer):
3971         * rendering/RenderTableRow.cpp:
3972         (WebCore::RenderTableRow::createAnonymousWithParentRenderer):
3973         * rendering/RenderTableSection.cpp:
3974         (WebCore::RenderTableSection::createAnonymousWithParentRenderer):
3975         * rendering/mathml/RenderMathMLBlock.cpp:
3976         (WebCore::RenderMathMLBlock::createAlmostAnonymousBlock):
3977         * rendering/mathml/RenderMathMLRow.cpp:
3978         (WebCore::RenderMathMLRow::createAnonymousWithParentRenderer):
3979         * rendering/mathml/RenderMathMLSubSup.cpp:
3980         (WebCore::RenderMathMLSubSup::addChild):
3981         * rendering/style/RenderStyle.cpp:
3982         (WebCore::RenderStyle::createAnonymousStyleWithDisplay):
3983         * rendering/style/RenderStyle.h:
3984
3985 2012-04-27  Erik Arvidsson  <arv@chromium.org>
3986
3987         WebKit IDL does not use exception syntax
3988         https://bugs.webkit.org/show_bug.cgi?id=85100
3989
3990         Reviewed by Dimitri Glazkov.
3991
3992         This adds support for exception ExceptionName { ... } which currently sets a flag
3993         on the domClass.
3994
3995         Binding tests updated.
3996
3997         * Modules/indexeddb/IDBDatabaseException.idl:
3998         * Modules/webdatabase/SQLException.idl:
3999         * bindings/scripts/IDLParser.pm:
4000         (ParseInterface):
4001         (DetermineParseMode):
4002         (ProcessSection):
4003         * bindings/scripts/IDLStructure.pm:
4004         * bindings/scripts/test/CPP/WebDOMTestException.cpp: Added.
4005         (WebDOMTestException::WebDOMTestExceptionPrivate::WebDOMTestExceptionPrivate):
4006         (WebDOMTestException::WebDOMTestExceptionPrivate):
4007         (WebDOMTestException::WebDOMTestException):
4008         (WebDOMTestException::operator=):
4009         (WebDOMTestException::impl):
4010         (WebDOMTestException::~WebDOMTestException):
4011         (WebDOMTestException::name):
4012         (toWebCore):
4013         (toWebKit):
4014         * bindings/scripts/test/CPP/WebDOMTestException.h: Added.
4015         (WebCore):
4016         (WebDOMTestException):
4017         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp: Added.
4018         (WebKit):
4019         (WebKit::kit):
4020         (WebKit::core):
4021         (WebKit::wrapTestException):
4022         (webkit_dom_test_exception_finalize):
4023         (webkit_dom_test_exception_set_property):
4024         (webkit_dom_test_exception_get_property):
4025         (webkit_dom_test_exception_constructed):
4026         (webkit_dom_test_exception_class_init):
4027         (webkit_dom_test_exception_init):
4028         (webkit_dom_test_exception_get_name):
4029         * bindings/scripts/test/GObject/WebKitDOMTestException.h: Added.
4030         (_WebKitDOMTestException):
4031         (_WebKitDOMTestExceptionClass):
4032         * bindings/scripts/test/GObject/WebKitDOMTestExceptionPrivate.h: Added.
4033         (WebKit):
4034         * bindings/scripts/test/JS/JSTestException.cpp: Added.
4035         (WebCore):
4036         (WebCore::JSTestExceptionConstructor::JSTestExceptionConstructor):
4037         (WebCore::JSTestExceptionConstructor::finishCreation):
4038         (WebCore::JSTestExceptionConstructor::getOwnPropertySlot):
4039         (WebCore::JSTestExceptionConstructor::getOwnPropertyDescriptor):
4040         (WebCore::JSTestExceptionPrototype::self):
4041         (WebCore::JSTestException::JSTestException):
4042         (WebCore::JSTestException::finishCreation):
4043         (WebCore::JSTestException::createPrototype):
4044         (WebCore::JSTestException::destroy):
4045         (WebCore::JSTestException::~JSTestException):
4046         (WebCore::JSTestException::getOwnPropertySlot):
4047         (WebCore::JSTestException::getOwnPropertyDescriptor):
4048         (WebCore::jsTestExceptionName):
4049         (WebCore::jsTestExceptionConstructor):
4050         (WebCore::JSTestException::getConstructor):
4051         (WebCore::isObservable):
4052         (WebCore::JSTestExceptionOwner::isReachableFromOpaqueRoots):
4053         (WebCore::JSTestExceptionOwner::finalize):
4054         (WebCore::toJS):
4055         (WebCore::toTestException):
4056         * bindings/scripts/test/JS/JSTestException.h: Added.
4057         (WebCore):
4058         (JSTestException):
4059         (WebCore::JSTestException::create):
4060         (WebCore::JSTestException::createStructure):
4061         (WebCore::JSTestException::impl):
4062         (WebCore::JSTestException::releaseImpl):
4063         (WebCore::JSTestException::releaseImplIfNotNull):
4064         (JSTestExceptionOwner):
4065         (WebCore::wrapperOwner):
4066         (WebCore::wrapperContext):
4067         (JSTestExceptionPrototype):
4068         (WebCore::JSTestExceptionPrototype::create):
4069         (WebCore::JSTestExceptionPrototype::createStructure):
4070         (WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype):
4071         (JSTestExceptionConstructor):
4072         (WebCore::JSTestExceptionConstructor::create):
4073         (WebCore::JSTestExceptionConstructor::createStructure):
4074         * bindings/scripts/test/ObjC/DOMTestException.h: Added.
4075         * bindings/scripts/test/ObjC/DOMTestException.mm: Added.
4076         (-[DOMTestException dealloc]):
4077         (-[DOMTestException finalize]):
4078         (-[DOMTestException name]):
4079         (core):
4080         (kit):
4081         * bindings/scripts/test/ObjC/DOMTestExceptionInternal.h: Added.
4082         (WebCore):
4083         * bindings/scripts/test/TestException.idl: Copied from Source/WebCore/xml/XPathException.idl.
4084         * bindings/scripts/test/V8/V8TestException.cpp: Added.
4085         (WebCore):
4086         (TestExceptionV8Internal):
4087         (WebCore::TestExceptionV8Internal::V8_USE):
4088         (WebCore::TestExceptionV8Internal::nameAttrGetter):
4089         (WebCore::ConfigureV8TestExceptionTemplate):
4090         (WebCore::V8TestException::GetRawTemplate):
4091         (WebCore::V8TestException::GetTemplate):
4092         (WebCore::V8TestException::HasInstance):
4093         (WebCore::V8TestException::wrapSlow):
4094         (WebCore::V8TestException::derefObject):
4095         * bindings/scripts/test/V8/V8TestException.h: Added.
4096         (WebCore):
4097         (V8TestException):
4098         (WebCore::V8TestException::toNative):
4099         (WebCore::V8TestException::wrap):
4100         (WebCore::toV8):
4101         * dom/DOMCoreException.idl:
4102         * dom/EventException.idl:
4103         * dom/RangeException.idl:
4104         * fileapi/FileException.idl:
4105         * fileapi/OperationNotAllowedException.idl:
4106         * svg/SVGException.idl:
4107         * xml/XMLHttpRequestException.idl:
4108         * xml/XPathException.idl:
4109
4110 2012-05-04  Rafael Weinstein  <rafaelw@chromium.org>
4111
4112         V8RecursionScope not declared in V8Proxy::newInstance which causes ASSERT() failure from NPAPI
4113         https://bugs.webkit.org/show_bug.cgi?id=85659
4114
4115         Reviewed by Ojan Vafai.
4116
4117         Added a stack-allocted V8RecursionScope to the newInstance call.
4118
4119         No new tests. No change in observable behavior.
4120
4121         * bindings/v8/V8Proxy.cpp:
4122         (WebCore::V8Proxy::newInstance):
4123
4124 2012-05-04  Joshua Bell  <jsbell@chromium.org>
4125
4126         IndexedDB: Remove all index metadata records when deleting an index
4127         https://bugs.webkit.org/show_bug.cgi?id=85557
4128
4129         Reviewed by Tony Chang.
4130
4131         An assert is hit when re-loading database from backing store due to stale index
4132         metadata entry. Do a range delete to clear all metadata entries when deleting an
4133         index. Define metadata entries as enum and limits as consts instead of hardcoded ints.
4134
4135         No new tests - issue does not repro as layout test. Will land test in Chromium.
4136
4137         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
4138         (WebCore::getBool): Helper functions; replaces pattern of putInt()/read only lead byte.
4139         (WebCore):
4140         (WebCore::putBool):
4141         (WebCore::IDBLevelDBBackingStore::getObjectStores): Skip stale data. Use enums, helpers.
4142         (WebCore::IDBLevelDBBackingStore::createObjectStore): Use enums.
4143         (WebCore::IDBLevelDBBackingStore::deleteObjectStore): Use enums.
4144         (WebCore::getNewVersionNumber): Use enums.
4145         (WebCore::IDBLevelDBBackingStore::getIndexes): Skip stale data. Use enums, helpers.
4146         (WebCore::getNewIndexId): Use enums.
4147         (WebCore::IDBLevelDBBackingStore::createIndex): Use enums.
4148         (WebCore::IDBLevelDBBackingStore::deleteIndex): Delete metadata by range.
4149         * Modules/indexeddb/IDBLevelDBCoding.cpp:
4150         (IDBLevelDBCoding): Add constants for metadata maximum values.
4151         (WebCore::IDBLevelDBCoding::encodeBool):
4152         (WebCore::IDBLevelDBCoding::decodeBool):
4153         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encodeMaxKey): Use consts.
4154         (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encodeMaxKey): Use consts.