Unreviewed, rolling out r112201.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2
3         Unreviewed, rolling out r112201.
4         http://trac.webkit.org/changeset/112201
5         https://bugs.webkit.org/show_bug.cgi?id=82302
6
7         Breaks chromium's WebPageSerializerTest.HTMLNodes test
8         (Requested by pfeldman on #webkit).
9
10         * loader/cache/CachedCSSStyleSheet.cpp:
11         (WebCore::CachedCSSStyleSheet::error):
12         (WebCore):
13         * loader/cache/CachedCSSStyleSheet.h:
14         (CachedCSSStyleSheet):
15         * loader/cache/CachedFont.cpp:
16         (WebCore):
17         (WebCore::CachedFont::error):
18         * loader/cache/CachedFont.h:
19         (CachedFont):
20         * loader/cache/CachedImage.cpp:
21         (WebCore::CachedImage::error):
22         * loader/cache/CachedResource.h:
23         (CachedResource):
24         * loader/cache/CachedScript.cpp:
25         (WebCore::CachedScript::error):
26         (WebCore):
27         * loader/cache/CachedScript.h:
28         (CachedScript):
29         * loader/cache/CachedXSLStyleSheet.cpp:
30         (WebCore::CachedXSLStyleSheet::error):
31         (WebCore):
32         * loader/cache/CachedXSLStyleSheet.h:
33         (CachedXSLStyleSheet):
34
35 2012-03-27  Levi Weintraub  <leviw@chromium.org>
36
37         LayoutRepainter: Remove unused constructor parameter and update to LayoutUnits
38         https://bugs.webkit.org/show_bug.cgi?id=82185
39
40         Reviewed by Eric Seidel.
41
42         Removing an optional parameter for old bounds in LayoutRepainter's constructor that
43         is no longer used. The old bounds are instead always gleaned from the renderer's
44         clippedOverflowRectForRepaint.
45
46         The renderer's bounds and outline rect also are stored in LayoutUnits to properly
47         detect sub-pixel changes during layout. Eventually, we'll pixel snap these values
48         when telling the embedder to invalidate. Adding a comment to that effect.
49
50         No new tests. No change in behavior.
51
52         * rendering/LayoutRepainter.cpp:
53         (WebCore::LayoutRepainter::LayoutRepainter):
54         * rendering/LayoutRepainter.h:
55         (LayoutRepainter):
56
57 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
58
59         Enable animVal support for SVGAnimatedString
60         https://bugs.webkit.org/show_bug.cgi?id=82316
61
62         Reviewed by Zoltan Herczeg.
63
64         Enable animVal support for SVGAnimatedString. Very simple now that everything is prepared.
65         All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedStringAnimator.
66
67         Test: svg/animations/svgstring-animation-1.html
68
69         * svg/SVGAnimatedString.cpp:
70         (WebCore::SVGAnimatedStringAnimator::startAnimValAnimation):
71         (WebCore::SVGAnimatedStringAnimator::stopAnimValAnimation):
72         (WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal):
73         (WebCore::SVGAnimatedStringAnimator::animValWillChange):
74         (WebCore::SVGAnimatedStringAnimator::animValDidChange):
75         * svg/SVGAnimatedString.h:
76         (SVGAnimatedStringAnimator):
77         * svg/SVGAnimatedType.cpp:
78         (WebCore::SVGAnimatedType::supportsAnimVal):
79
80 2012-03-27  Levi Weintraub  <leviw@chromium.org>
81
82         Update usage of LayoutUnits in RenderListMarker
83         https://bugs.webkit.org/show_bug.cgi?id=81921
84
85         Reviewed by Eric Seidel.
86
87         Implementing proper pixel snapping in list marker painting, and correcting usage of integers
88         for local coordinates/margins that should be sub-pixel.
89
90         No new tests. No change in behavior.
91
92         * rendering/RenderListMarker.cpp:
93         (WebCore::RenderListMarker::localSelectionRect): Changed to LayoutUnits since this represents
94         a rect in local coordinates.
95         (WebCore::RenderListMarker::paint): Doing proper pixel snapping, and using integers for
96         results from text measurement.
97         (WebCore::RenderListMarker::computePreferredLogicalWidths): Using integers for results
98         from text measurement.
99         (WebCore::RenderListMarker::updateMargins): Fixing to be LayoutUnits.
100         * rendering/RenderListMarker.h:
101         (RenderListMarker):
102
103 2012-03-27  Levi Weintraub  <leviw@chromium.org>
104
105         Revert linesBoundingBox to integers
106         https://bugs.webkit.org/show_bug.cgi?id=82182
107
108         Reviewed by Eric Seidel.
109
110         LayoutRects are intended to be pixel snapped to determine the ultimate screen
111         coordinates, but the Inline Box tree is laid out using floats, and pixel snapping
112         the resulting box from linesBoundingBox would produce a potentially incorrect
113         rectangle. Keeping this using enclosingIntRect retains the previous accuracy and
114         prevents misuse.
115
116         No new tests. No change in behavior.
117
118         * rendering/RenderInline.cpp:
119         (WebCore::RenderInline::linesBoundingBox):
120         * rendering/RenderInline.h:
121         (RenderInline):
122         * rendering/RenderLayer.cpp:
123         (WebCore::RenderLayer::updateLayerPosition):
124         * rendering/RenderText.cpp:
125         (WebCore::RenderText::linesBoundingBox):
126         * rendering/svg/RenderSVGInlineText.cpp:
127         (WebCore::RenderSVGInlineText::linesBoundingBox):
128         * rendering/svg/RenderSVGInlineText.h:
129         (RenderSVGInlineText):
130
131 2012-03-26  Pavel Podivilov  <podivilov@chromium.org>
132
133         Web Inspector: store UIBreakpoints on UISourceCode.
134         https://bugs.webkit.org/show_bug.cgi?id=82214
135
136         This change will allow us to make breakpoint-added and breakpoint-removed events a part of UISourceCode interface.
137         See bug 82224 for more details.
138
139         Reviewed by Vsevolod Vlasov.
140
141         * inspector/front-end/BreakpointManager.js:
142         (WebInspector.BreakpointManager.prototype.uiSourceCodeRemoved):
143         (WebInspector.BreakpointManager.prototype.setBreakpoint):
144         (WebInspector.BreakpointManager.prototype.removeBreakpoint):
145         (WebInspector.BreakpointManager.prototype._addBreakpointToUI):
146         (WebInspector.BreakpointManager.prototype._removeBreakpointFromUI):
147         (WebInspector.BreakpointManager.prototype.debuggerReset):
148         * inspector/front-end/CompilerScriptMapping.js:
149         (WebInspector.CompilerScriptMapping.prototype.addScript):
150         * inspector/front-end/DebuggerPresentationModel.js:
151         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
152         (WebInspector.DebuggerPresentationModel.prototype.breakpointsForUISourceCode):
153         (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint):
154         (WebInspector.UISourceCodeImpl):
155         (WebInspector.UISourceCodeImpl.prototype.breakpoints):
156         (WebInspector.UISourceCodeImpl.prototype.breakpointAdded):
157         (WebInspector.UISourceCodeImpl.prototype.breakpointRemoved):
158         * inspector/front-end/RawSourceCode.js:
159         (WebInspector.RawSourceCode.prototype._createUISourceCode):
160         * inspector/front-end/SnippetsModel.js:
161         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
162         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
163         * inspector/front-end/UISourceCode.js:
164         (WebInspector.UISourceCode.prototype.get domain):
165         (WebInspector.UISourceCode.prototype.get folderName):
166         (WebInspector.UISourceCode.prototype.get fileName):
167         (WebInspector.UISourceCode.prototype.get displayName):
168         (WebInspector.UISourceCode.prototype._parseURL):
169         (WebInspector.UISourceCode.prototype._didRequestContent):
170         (WebInspector.UISourceCode.prototype.breakpoints):
171         * inspector/front-end/inspector.html:
172
173 2012-03-27  Nat Duca  <nduca@chromium.org>
174
175         [chromium] Fix crash with fling with tracing enabled
176         https://bugs.webkit.org/show_bug.cgi?id=82306
177
178         The TRACE_EVENT_START instrumentation was deferencing a PassOwnPtr
179         after it had been passed into another OwnPtr. This caused frequent
180         crashes when tracing was enabled.
181
182         Reviewed by Adam Barth.
183
184         * platform/ActivePlatformGestureAnimation.cpp:
185         (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
186         * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp:
187         (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):
188
189 2012-03-27  Carlos Garcia Campos  <cgarcia@igalia.com>
190
191         [SOUP] Implement missing methods in CookieJarSoup
192         https://bugs.webkit.org/show_bug.cgi?id=82082
193
194         Reviewed by Martin Robinson.
195
196         * platform/network/soup/CookieJarSoup.cpp:
197         (WebCore::defaultCookieJar): Return a global GRefPtr to store the
198         default cookie jar.
199         (WebCore::soupCookieJar): Return the current cookie jar or create
200         a new one.
201         (WebCore::setSoupCookieJar): Set the current cookie jar.
202         (WebCore::setCookies): Fix coding style.
203         (WebCore::cookiesForDocument): Helper function to get the list of
204         cookies as a string.
205         (WebCore::cookies): Use cookiesForDocument().
206         (WebCore::cookieRequestHeaderFieldValue): Ditto.
207         (WebCore::getRawCookies): Get the list of cookies for the given
208         document and url.
209         (WebCore::deleteCookie): Delete the given cookie.
210         (WebCore::getHostnamesWithCookies): Use GOwnPtr.
211         (WebCore::deleteCookiesForHostname): Use GOwnPtr and
212         soup_cookie_domain_matches() instead of comparing the domain
213         directly with the given hostname.
214         (WebCore::deleteAllCookies): Use GOwnPtr.
215         * platform/network/soup/CookieJarSoup.h:
216         * platform/network/soup/GOwnPtrSoup.cpp:
217         (WTF::SoupCookie): Add GOwnPtr template for SoupCookie.
218         * platform/network/soup/GOwnPtrSoup.h:
219         * platform/network/soup/ResourceHandleSoup.cpp:
220         (WebCore::ensureSessionIsInitialized): Use soupCookieJar() instead
221         of defaultCookieJar().
222
223 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
224
225         Enable animVal support for SVGAnimatedBoolean
226         https://bugs.webkit.org/show_bug.cgi?id=82311
227
228         Reviewed by Antti Koivisto.
229
230         Enable animVal support for SVGAnimatedBoolean. Very simple now that everything is prepared.
231         All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedBooleanAnimator.
232
233         Extended existing tests to cover this.
234
235         * svg/SVGAnimatedBoolean.cpp:
236         (WebCore::SVGAnimatedBooleanAnimator::startAnimValAnimation):
237         (WebCore::SVGAnimatedBooleanAnimator::stopAnimValAnimation):
238         (WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal):
239         (WebCore::SVGAnimatedBooleanAnimator::animValWillChange):
240         (WebCore::SVGAnimatedBooleanAnimator::animValDidChange):
241         * svg/SVGAnimatedBoolean.h:
242         (SVGAnimatedBooleanAnimator):
243         * svg/SVGAnimatedType.cpp:
244         (WebCore::SVGAnimatedType::setValueAsString):
245         (WebCore::SVGAnimatedType::supportsAnimVal):
246
247 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
248
249         <img style='width: 100%' src='foo.svg'> gets pixellated when stretched
250         https://bugs.webkit.org/show_bug.cgi?id=81631
251
252         Reviewed by Antti Koivisto.
253
254         Final cleanup of RenderReplaced after the intrinsic size negotiation patch series from some weeks/months ago.
255         Stop tracking whether a RenderReplaced has an intrinsic size or not with an extra-bool, instead assume each
256         RenderReplaced derived class has an intrinsic size. If not, the class should override
257         computeIntrinsicRatioInformation() for any custom logic - currently only done by RenderImage.
258
259         Remove all logic depending on m_hasIntrinsicSize from computeReplacedLogicalWidth/Height, which was used
260         to support different sizing models depending on if the replaced element is a RenderImage or a RenderPart.
261         Unify all of this in computeIntrinsicRatioInformation right in RenderReplaced. This allows to remove
262         a hack from RenderImage::computeReplacedLogicalWidth(), which forced the synchroniziation of the intrinsicSize()
263         before calling the base classes RenderReplaced::computeReplacedLogicalWidth().
264         Now RenderImage just overrides the layout() method, calls RenderReplaced::layout() and then sets the container
265         size of the image resources to [contentWidth(), contentHeight()] - reflecting the actual result of the layout.
266         Furthermore this now allows us to unify CachedImage::imageSizeForRenderer() again for both SVG and non-SVG images.
267
268         Propagating the right container size to the image resource fixes the actual bug, that the SVGImage got pixellated.
269         Adding new tests covering percentage width or height set on an <img> embedding an external SVG, no more pixelation.
270
271         Tests: svg/as-image/img-relative-height-expected.html
272                svg/as-image/img-relative-height.html
273                svg/as-image/img-relative-width-expected.html
274                svg/as-image/img-relative-width.html
275
276         * loader/cache/CachedImage.cpp:
277         (WebCore::CachedImage::imageSizeForRenderer):
278         * rendering/RenderEmbeddedObject.cpp:
279         (WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
280         * rendering/RenderImage.cpp:
281         (WebCore::RenderImage::layout):
282         (WebCore::RenderImage::computeIntrinsicRatioInformation):
283         * rendering/RenderImage.h:
284         (RenderImage):
285         * rendering/RenderReplaced.cpp:
286         (WebCore::RenderReplaced::RenderReplaced):
287         (WebCore::rendererHasAspectRatio):
288         (WebCore):
289         (WebCore::RenderReplaced::computeIntrinsicRatioInformationForRenderBox):
290         (WebCore::RenderReplaced::computeIntrinsicRatioInformation):
291         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
292         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
293         * rendering/RenderReplaced.h:
294         (WebCore::RenderReplaced::intrinsicSize):
295         (RenderReplaced):
296         (WebCore::RenderReplaced::setIntrinsicSize):
297         * svg/graphics/SVGImage.cpp:
298         (WebCore::SVGImage::setContainerSize):
299         * svg/graphics/SVGImage.h:
300         (WebCore::SVGImage::usesContainerSize):
301
302 2012-03-27  Ilya Tikhonovsky  <loislo@chromium.org>
303
304         Web Inspector: HeapSnapshot: speed-up distanceToWindow calculation.
305         https://bugs.webkit.org/show_bug.cgi?id=82305
306
307         Reviewed by Yury Semikhatsky.
308
309         * inspector/front-end/HeapSnapshot.js:
310         (WebInspector.HeapSnapshot.prototype._bfs):
311
312 2012-03-27  Nikolas Zimmermann  <nzimmermann@rim.com>
313
314         SVGAnimatedType should support SVGAnimatedIntegerOptionalInteger animation
315         https://bugs.webkit.org/show_bug.cgi?id=67563
316
317         Reviewed by Dirk Schulze.
318
319         Add SVGAnimatedIntegerOptionalInteger type handling animation of pair<int, int> objects
320         as used for the SVG properties 'filterRes' and 'order'. They're currently animated as
321         SVGAnimatedNumberOptionalNumber - but that won't work for animVal support. Fix that
322         and enable animVal support for SVGAnimatedInteger(OptionalInteger).
323
324         Use 'int' as datatype for SVGAnimatedInteger instead of 'long' for consistency, and
325         move SVGAnimatedEnumeration from 'int' to 'unsigned short', to make them distinguishable.
326
327         Test: svg/animations/svginteger-animation-2.html
328
329         * CMakeLists.txt:
330         * GNUmakefile.list.am:
331         * Target.pri:
332         * WebCore.gypi:
333         * WebCore.vcproj/WebCore.vcproj:
334         * WebCore.xcodeproj/project.pbxproj:
335         * svg/SVGAllInOne.cpp:
336         * svg/SVGAnimatedEnumeration.h:
337         (WebCore):
338         * svg/SVGAnimatedInteger.cpp:
339         (WebCore::SVGAnimatedIntegerAnimator::startAnimValAnimation):
340         (WebCore):
341         (WebCore::SVGAnimatedIntegerAnimator::stopAnimValAnimation):
342         (WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal):
343         (WebCore::SVGAnimatedIntegerAnimator::animValWillChange):
344         (WebCore::SVGAnimatedIntegerAnimator::animValDidChange):
345         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedInteger):
346         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue):
347         * svg/SVGAnimatedInteger.h:
348         (WebCore):
349         (SVGAnimatedIntegerAnimator):
350         * svg/SVGAnimatedIntegerOptionalInteger.cpp: Added.
351         (WebCore):
352         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::SVGAnimatedIntegerOptionalIntegerAnimator):
353         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString):
354         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::startAnimValAnimation):
355         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::stopAnimValAnimation):
356         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal):
357         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValWillChange):
358         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValDidChange):
359         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateFromAndToValues):
360         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateFromAndByValues):
361         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue):
362         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateDistance):
363         * svg/SVGAnimatedIntegerOptionalInteger.h: Copied from Source/WebCore/svg/SVGAnimatedInteger.h.
364         (WebCore):
365         (SVGAnimatedIntegerOptionalIntegerAnimator):
366         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::~SVGAnimatedIntegerOptionalIntegerAnimator):
367         * svg/SVGAnimatedNumberOptionalNumber.cpp:
368         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
369         * svg/SVGAnimatedType.cpp:
370         (WebCore::SVGAnimatedType::~SVGAnimatedType):
371         (WebCore::SVGAnimatedType::createIntegerOptionalInteger):
372         (WebCore):
373         (WebCore::SVGAnimatedType::integerOptionalInteger):
374         (WebCore::SVGAnimatedType::valueAsString):
375         (WebCore::SVGAnimatedType::setValueAsString):
376         (WebCore::SVGAnimatedType::supportsAnimVal):
377         * svg/SVGAnimatedType.h:
378         (SVGAnimatedType):
379         * svg/SVGAnimatorFactory.h:
380         (WebCore::SVGAnimatorFactory::create):
381         * svg/SVGFilterElement.cpp:
382         (WebCore::SVGFilterElement::setFilterRes):
383         * svg/SVGFilterElement.h:
384         (SVGFilterElement):
385         * svg/SVGPathElement.cpp:
386         (WebCore::SVGPathElement::getPathSegAtLength):
387         * svg/SVGPathElement.h:
388         (SVGPathElement):
389         * svg/SVGPathParserFactory.cpp:
390         (WebCore::SVGPathParserFactory::getSVGPathSegAtLengthFromSVGPathByteStream):
391         * svg/SVGPathParserFactory.h:
392         (SVGPathParserFactory):
393         * svg/SVGPathTraversalStateBuilder.cpp:
394         (WebCore::SVGPathTraversalStateBuilder::pathSegmentIndex):
395         * svg/SVGPathTraversalStateBuilder.h:
396         (SVGPathTraversalStateBuilder):
397         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
398         (WebCore::SVGAnimatedEnumerationPropertyTearOff::setBaseVal):
399         (WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
400         (WebCore::SVGAnimatedEnumerationPropertyTearOff::currentAnimatedValue):
401         (WebCore::SVGAnimatedEnumerationPropertyTearOff::SVGAnimatedEnumerationPropertyTearOff):
402         * svg/properties/SVGPropertyInfo.h:
403         * svg/properties/SVGPropertyTraits.h:
404
405 2012-03-25  Nikolas Zimmermann  <nzimmermann@rim.com>
406
407         Enable animVal support for SVGAngle
408         https://bugs.webkit.org/show_bug.cgi?id=82144
409
410         Reviewed by Rob Buis.
411
412         Enable animVal support for SVGAnimatedAngle. Very simple now that everything is prepared.
413         All we have to do is add startAnimValAnimation/etc. methods to SVGAnimatedAngleAnimator.
414
415         Extended existing tests to cover this.
416
417         * svg/SVGAnimatedAngle.cpp:
418         (WebCore::sharedSVGAngle):
419         (WebCore::SVGAnimatedAngleAnimator::constructFromString):
420         (WebCore::SVGAnimatedAngleAnimator::startAnimValAnimation):
421         (WebCore::SVGAnimatedAngleAnimator::stopAnimValAnimation):
422         (WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal):
423         (WebCore::SVGAnimatedAngleAnimator::animValWillChange):
424         (WebCore::SVGAnimatedAngleAnimator::animValDidChange):
425         (WebCore::SVGAnimatedAngleAnimator::calculateDistance):
426         * svg/SVGAnimatedAngle.h:
427         (SVGAnimatedAngleAnimator):
428         * svg/SVGAnimatedType.cpp:
429         (WebCore::SVGAnimatedType::supportsAnimVal):
430
431 2012-03-27  Yury Semikhatsky  <yurys@chromium.org>
432
433         Web Inspector: remove remains of path finder in heap profiler front-end
434         https://bugs.webkit.org/show_bug.cgi?id=82304
435
436         Removed remainders of heap path finder as this code is not used anymore.
437
438         Reviewed by Pavel Feldman.
439
440         * inspector/front-end/HeapSnapshot.js:
441         * inspector/front-end/HeapSnapshotProxy.js:
442
443 2012-03-27  Dan Bernstein  <mitz@apple.com>
444
445         Reverted r112214, since it was not the right fix for the build.
446
447         * css/StylePropertySet.cpp:
448         (WebCore::StylePropertySet::asText):
449
450 2012-03-27  Kentaro Hara  <haraken@chromium.org>
451
452         [V8][Performance] Optimize createTextNode(), createElement(), cloneNode(), etc
453         https://bugs.webkit.org/show_bug.cgi?id=82201
454
455         Reviewed by Adam Barth.
456
457         This patch improves performance of createTextNode() by 13%, createElement() by 14%,
458         and cloneNode() by 16%. Similar performance improvement will be observed in
459         DOM methods that create a new object every time.
460
461         Performance test: https://bugs.webkit.org/attachment.cgi?id=133799
462
463         The performance test results are as follows. Since the performance of V8's GC is
464         really unstable, the average of measured times makes no sense in Chromium.
465         Instead, let us focus on the median. I believe that this performance
466         improvement has impact on Dromaeo, but we cannot observe the improvement
467         due to the unsteadiness of V8's GC, as shown below.
468
469         Chromium/V8/Linux (without the patch):
470         createTextNode : median=277ms (mean=460.88ms, min=270ms, max=3381ms)
471         createElement : median=379ms (mean=637.52ms, min=372ms, max=3022ms)
472         cloneNode : median=369ms (mean=581.72ms, min=363ms, max=3050ms)
473         Dromaeo/dom-modify/createElement: 439.17runs/s +-31.60% (<--- pretty noisy)
474         Dromaeo/dom-modify/createTextNode: 287.71runs/s +-28.39% (<--- pretty noisy)
475         Dromaeo/dom-modify/cloneNode: 174.62runs/s +-25.68% (<--- pretty noisy)
476
477         Chromium/V8/Linux (with the patch):
478         createTextNode : median=240ms (mean=411.12ms, min=237ms, max=2965ms)
479         createElement : median=325ms (mean=585.30ms, min=317ms, max=2984ms)
480         cloneNode : median=310ms (mean=522.48ms, min=302ms, max=2988ms)
481         Dromaeo/dom-modify/createElement: 507.15runs/s +-36.00% (<--- pretty noisy)
482         Dromaeo/dom-modify/createTextNode: 251.01runs/s +-6.57%
483         Dromaeo/dom-modify/cloneNode: 177.85runs/s +-28.74% (<--- pretty noisy)
484
485         Chromium/V8/Mac (without the patch):
486         createTextNode : median=317ms (mean=439.08ms, min=303ms, max=3126ms)
487         createElement : median=403ms (mean=695.70ms, min=398ms, max=5615ms)
488         cloneNode : median=384ms (mean=577.96ms, min=372ms, max=5313ms)
489         Dromaeo/dom-modify/createElement: 493.89runs/s +-28.32% (<--- pretty noisy)
490         Dromaeo/dom-modify/createTextNode: 279.66runs/s +-1.91%
491         Dromaeo/dom-modify/cloneNode: 173.06runs/s +-24.41% (<--- pretty noisy)
492
493         Chromium/V8/Mac (with the patch):
494         createTextNode : median=277ms (mean=460.88ms, min=270ms, max=3381ms)
495         createElement : median=379ms (mean=637.52ms, min=372ms, max=3022ms)
496         cloneNode : median=369ms (mean=581.72ms, min=363ms, max=3050ms)
497         Dromaeo/dom-modify/createElement: 510.47runs/s +-28.13% (<--- pretty noisy)
498         Dromaeo/dom-modify/createTextNode: 215.80runs/s +-20.99% (<--- pretty noisy)
499         Dromaeo/dom-modify/cloneNode: 174.41runs/s +-24.85% (<--- pretty noisy)
500
501         Safari/JavaScriptCore/Mac:
502         createTextNode : median=142ms (mean=141.04ms, min=110ms, max=168ms)
503         createElement : median=234ms (mean=245.74ms, min=219ms, max=305ms)
504         cloneNode : median=210ms (mean=213.36ms, min=204ms, max=284ms)
505         Dromaeo/dom-modify/createElement: 822.49runs/s +-1.69%
506         Dromaeo/dom-modify/createTextNode: 735.57runs/s +-0.91%
507         Dromaeo/dom-modify/cloneNode: 135.20runs/s +-4.13%
508
509         This patch makes the following two optimizations:
510
511         [1] If the currently running context is equal to the context that we are about to enter,
512         we do not call context->Enter().
513         [2] We do not create a Local handle of the context until we really need to enter the context.
514
515         * bindings/scripts/CodeGeneratorV8.pm:
516         (GenerateToV8Converters):
517         * bindings/v8/V8Proxy.cpp:
518         (WebCore::V8Proxy::persistentContext):
519         (WebCore):
520         * bindings/v8/V8Proxy.h:
521         (V8Proxy):
522
523         * WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: Updated run-bindings-tests results.
524
525 2012-03-27  Bill Budge  <bbudge@chromium.org>
526
527         cross-origin XMLHttpRequest doesn't work with redirect
528         https://bugs.webkit.org/show_bug.cgi?id=57600
529
530         Reviewed by Adam Barth.
531
532         Changes DocumentThreadableLoader to follow the CORS redirect steps when
533         asynchronously loading a cross origin request with access control. Synchronous
534         loads should not be affected. Also adds methods to ResourceRequestBase to
535         clear special request headers that aren't allowed when using access control.
536         Follows the CORS spec as described in the Latest Editor Draft at:
537         http://www.w3.org/TR/cors/
538
539         Test: http/tests/xmlhttprequest/access-control-and-redirects-async.html
540
541         * loader/DocumentThreadableLoader.cpp:
542         * loader/DocumentThreadableLoader.h:
543         * platform/network/ResourceRequestBase.cpp:
544         * platform/network/ResourceRequestBase.h:
545
546 2012-03-27  Adam Barth  <abarth@webkit.org>
547
548         ImageLoader::m_firedLoadEvent is a confusing name
549         https://bugs.webkit.org/show_bug.cgi?id=82283
550
551         Reviewed by Kentaro Hara.
552
553         This patch renames m_firedLoadEvent (and friends) to
554         m_hasPendingLoadEvent (and negates the value).  That name more
555         accurately reflects the semantics of this piece of state.  For example,
556         we now initialize m_hasPendingLoadEvent to false, which makes sense as
557         there is no pending load event, whereas before we initialized
558         m_firedLoadEvent to true, which made less sense since we hadn't yet
559         actually fired the load event.
560
561         * bindings/v8/V8GCController.cpp:
562         (WebCore::calculateGroupId):
563         * html/HTMLImageElement.cpp:
564         (WebCore::HTMLImageElement::attach):
565         * html/HTMLImageElement.h:
566         (HTMLImageElement):
567         (WebCore::HTMLImageElement::hasPendingLoadEvent):
568         (WebCore::HTMLImageElement::hasPendingActivity):
569         * html/ImageInputType.cpp:
570         (WebCore::ImageInputType::attach):
571         * loader/ImageLoader.cpp:
572         (WebCore::ImageLoader::ImageLoader):
573         (WebCore::ImageLoader::~ImageLoader):
574         (WebCore::ImageLoader::setImage):
575         (WebCore::ImageLoader::updateFromElement):
576         (WebCore::ImageLoader::notifyFinished):
577         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
578         (WebCore::ImageLoader::dispatchPendingLoadEvent):
579         (WebCore::ImageLoader::dispatchPendingErrorEvent):
580         * loader/ImageLoader.h:
581         (WebCore::ImageLoader::hasPendingBeforeLoadEvent):
582         (WebCore::ImageLoader::hasPendingLoadEvent):
583         (ImageLoader):
584         * svg/SVGImageElement.cpp:
585         (WebCore::SVGImageElement::haveLoadedRequiredResources):
586
587 2012-03-27  Dan Bernstein  <mitz@apple.com>
588
589         Tried to fix 32-bit builds.
590
591         * css/StylePropertySet.cpp:
592         (WebCore::StylePropertySet::asText):
593
594 2012-03-26  Sheriff Bot  <webkit.review.bot@gmail.com>
595
596         Unreviewed, rolling out r112199.
597         http://trac.webkit.org/changeset/112199
598         https://bugs.webkit.org/show_bug.cgi?id=82295
599
600         Breaks Chromium Win compilation (Requested by pfeldman on
601         #webkit).
602
603         * bindings/scripts/CodeGeneratorV8.pm:
604         (GenerateConstructorCallback):
605         (GenerateNamedConstructorCallback):
606         (GenerateToV8Converters):
607         (GetDomMapFunction):
608         * bindings/scripts/test/V8/V8Float64Array.cpp:
609         (WebCore::V8Float64Array::wrapSlow):
610         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
611         (WebCore::V8TestActiveDOMObject::wrapSlow):
612         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
613         (WebCore::V8TestCustomNamedGetter::wrapSlow):
614         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
615         (WebCore::V8TestEventConstructor::wrapSlow):
616         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
617         (WebCore::V8TestEventTarget::wrapSlow):
618         * bindings/scripts/test/V8/V8TestInterface.cpp:
619         (WebCore::V8TestInterface::wrapSlow):
620         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
621         (WebCore::V8TestMediaQueryListListener::wrapSlow):
622         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
623         (WebCore::V8TestNamedConstructor::wrapSlow):
624         * bindings/scripts/test/V8/V8TestObj.cpp:
625         (WebCore::V8TestObj::wrapSlow):
626         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
627         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
628         * bindings/v8/V8DOMWrapper.cpp:
629         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
630         (WebCore):
631         * bindings/v8/V8DOMWrapper.h:
632         (WebCore):
633         (V8DOMWrapper):
634         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
635         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
636
637 2012-03-26  David Kilzer  <ddkilzer@apple.com>
638
639         Build system prep work for upstreaming iOS changes
640         <http://webkit.org/b/82267>
641
642         Reviewed by Mark Rowe.
643
644         * DerivedSources.make: Move 'bison' into a variable and use
645         xcrun to find it on Mac OS X.
646         * bindings/scripts/preprocessor.pm:
647         (applyPreprocessor): Add local @args variable.  On iOS, the
648         compiler needs additional "-isysroot $(SDKROOT)" arguments when
649         invoked, so it's easier to add them to an array, especially if
650         $SDKROOT contains a space in the path.  Remove now-redundant
651         $gccLocation variable.
652
653 2012-03-26  Nate Chapin  <japhet@chromium.org>
654
655         Remove duplicate error() impls in CachedResource subclasses
656         https://bugs.webkit.org/show_bug.cgi?id=81161
657
658         Reviewed by Alexey Proskuryakov.
659
660         No new tests, refactor only.
661
662         * loader/cache/CachedCSSStyleSheet.cpp:
663         * loader/cache/CachedCSSStyleSheet.h:
664         * loader/cache/CachedFont.cpp:
665         * loader/cache/CachedFont.h:
666         * loader/cache/CachedImage.cpp:
667         * loader/cache/CachedResource.h: Make checkNotify()
668              virtual, so the right checkNotify() gets called in error().
669         * loader/cache/CachedScript.cpp:
670         * loader/cache/CachedScript.h:
671         * loader/cache/CachedXSLStyleSheet.cpp:
672         * loader/cache/CachedXSLStyleSheet.h:
673
674 2012-03-26  Ken Buchanan  <kenrb@chromium.org>
675
676         Assert failure from capitalized RenderTextFragment
677         https://bugs.webkit.org/show_bug.cgi?id=82096
678
679         Reviewed by Ryosuke Niwa.
680
681         The cause of this bug was the call to RenderTextFragment::setTextInternal
682         resulting from a style change from RenderObject::addChild. The idea here
683         is to better separate the code path for transforming existing text from
684         the code path for replacing the underlying text of a node. For
685         RenderTextFragment this has to be clear because only in the latter case
686         does the first-letter get reset.
687
688         * rendering/RenderObject.cpp:
689         (WebCore::RenderObject::addChild): Added call to transformText
690         * rendering/RenderText.cpp:
691         (WebCore::RenderText::styleDidChange): Added call to transformText
692         (WebCore::RenderText::transformText): Added
693         * rendering/RenderText.h:
694         (WebCore::RenderText::setText): Changed to virtual so RenderTextFragment can override
695         (WebCore::RenderText::transformText): Added
696         * rendering/RenderTextFragment.cpp:
697         (WebCore::RenderTextFragment::styleDidChange): Removed references to
698         m_allowFragmentReset which was the previous approach to separating the
699         code paths
700         (WebCore::RenderTextFragment::setTextInternal): Deleted
701         (WebCore::RenderTextFragment::setText): Added with most of logic that was
702         previously in setTextInternal
703         (WebCore::RenderTextFragment::transformText): Added
704         * rendering/RenderTextFragment.h:
705         (WebCore::RenderTextFragment::setText): Added
706         (WebCore::RenderTextFragment::transformText): Added
707         (WebCore::RenderTextFragment::setTextInternal): Deleted
708
709 2012-03-26  Adam Klein  <adamk@chromium.org>
710
711         Always set V8 wrappers via V8DOMWrapper::setJSWrapperFor* instead of WeakReferenceMap::set()
712         https://bugs.webkit.org/show_bug.cgi?id=82256
713
714         Reviewed by Adam Barth.
715
716         This moves leakRef() calls out of generated code, centralizing them in
717         V8DOMWrapper implementation. Ideally, WeakReferenceMap::set would take
718         PassRefPtrs, but that's tricky given that some WeakReferenceMap's KeyType is 'void'
719         (which clearly can't be wrapped in a PassRefPtr).
720
721         Updated binding tests to reflect changes in CodeGeneratorV8.pm, no change in behavior.
722
723         * bindings/scripts/CodeGeneratorV8.pm:
724         (GenerateConstructorCallback): Use GetDomMapFunction instead of custom logic.
725         (GenerateNamedConstructorCallback): ditto.
726         (GenerateToV8Converters): Call V8DOMWrapper::setJSWrapper* method
727         instead of directly accessing the wrapper maps and calling set.
728         (GetDomMapFunction): Refactored to call new GetDomWrapperMapName function.
729         (GetDomWrapperMapName): Helper pulled out of GetDomMapFunction.
730         * bindings/scripts/test/V8/V8Float64Array.cpp:
731         (WebCore::V8Float64Array::wrapSlow):
732         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
733         (WebCore::V8TestActiveDOMObject::wrapSlow):
734         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
735         (WebCore::V8TestCustomNamedGetter::wrapSlow):
736         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
737         (WebCore::V8TestEventConstructor::wrapSlow):
738         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
739         (WebCore::V8TestEventTarget::wrapSlow):
740         * bindings/scripts/test/V8/V8TestInterface.cpp:
741         (WebCore::V8TestInterface::wrapSlow):
742         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
743         (WebCore::V8TestMediaQueryListListener::wrapSlow):
744         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
745         (WebCore::V8TestNamedConstructor::wrapSlow):
746         * bindings/scripts/test/V8/V8TestObj.cpp:
747         (WebCore::V8TestObj::wrapSlow):
748         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
749         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
750         * bindings/v8/V8DOMWrapper.cpp: Moved setJSWrapperForDOMNode method to header to inline it.
751         * bindings/v8/V8DOMWrapper.h:
752         (WebCore): Forward decls.
753         (V8DOMWrapper):
754         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Made inline.
755         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): ditto.
756         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Refactored into two methods;
757         this one handles non-active Nodes.
758         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode): Pulled out of previouse
759         DOMNode method, now handles only active Nodes.
760         (WebCore::V8DOMWrapper::setJSWrapperForDOMSVGElementInstance): New helper method for SVGElementInstances.
761
762 2012-03-26  Pratik Solanki  <psolanki@apple.com>
763
764         Fix typo in method name - WebCore::miminumValueForLength should be WebCore::minimumValueForLength
765         https://bugs.webkit.org/show_bug.cgi?id=82254
766
767         Reviewed by Benjamin Poulain.
768
769         No new tests because no functional changes.
770
771         * css/CSSComputedStyleDeclaration.cpp:
772         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
773         * css/LengthFunctions.cpp:
774         (WebCore::minimumValueForLength):
775         (WebCore::valueForLength):
776         * css/LengthFunctions.h:
777         (WebCore):
778         * html/HTMLAreaElement.cpp:
779         (WebCore::HTMLAreaElement::getRegion):
780         * platform/win/PopupMenuWin.cpp:
781         (WebCore::PopupMenuWin::paint):
782         * rendering/AutoTableLayout.cpp:
783         (WebCore::AutoTableLayout::layout):
784         * rendering/RenderBlock.cpp:
785         (WebCore::RenderBlock::textIndentOffset):
786         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
787         * rendering/RenderBox.cpp:
788         (WebCore::RenderBox::computeLogicalWidthInRegion):
789         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
790         (WebCore::RenderBox::computeInlineDirectionMargins):
791         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
792         (WebCore::RenderBox::computeBlockDirectionMargins):
793         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
794         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
795         * rendering/RenderBoxModelObject.cpp:
796         (WebCore::RenderBoxModelObject::paddingTop):
797         (WebCore::RenderBoxModelObject::paddingBottom):
798         (WebCore::RenderBoxModelObject::paddingLeft):
799         (WebCore::RenderBoxModelObject::paddingRight):
800         (WebCore::RenderBoxModelObject::paddingBefore):
801         (WebCore::RenderBoxModelObject::paddingAfter):
802         (WebCore::RenderBoxModelObject::paddingStart):
803         (WebCore::RenderBoxModelObject::paddingEnd):
804         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
805         * rendering/RenderFlexibleBox.cpp:
806         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
807         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
808         * rendering/RenderInline.cpp:
809         (WebCore::computeMargin):
810         * rendering/RenderMenuList.cpp:
811         (WebCore::RenderMenuList::updateOptionsWidth):
812         * rendering/RenderReplaced.cpp:
813         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
814         * rendering/RenderScrollbarPart.cpp:
815         (WebCore::calcScrollbarThicknessUsing):
816         (WebCore::RenderScrollbarPart::computeScrollbarWidth):
817         (WebCore::RenderScrollbarPart::computeScrollbarHeight):
818         * rendering/RenderTable.cpp:
819         (WebCore::RenderTable::computeLogicalWidth):
820         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
821         * rendering/RenderTableSection.cpp:
822         (WebCore::RenderTableSection::calcRowLogicalHeight):
823         * rendering/RenderText.h:
824         (WebCore::RenderText::marginLeft):
825         (WebCore::RenderText::marginRight):
826         * rendering/style/RenderStyle.h:
827
828 2012-03-26  Shinya Kawanaka  <shinyak@chromium.org>
829
830         Triggers assertion if dragging from outside of <meter> in a shadow tree to inside of it.
831         https://bugs.webkit.org/show_bug.cgi?id=82177
832
833         Reviewed by Dimitri Glazkov.
834
835         VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries has moved the start position or
836         the end position to the invalid position, i.e. position after (before) the non-existing node.
837
838         This patch fixes the problem, and adds assertion that the selection does not cross shadow boundaries.
839
840         Test: fast/dom/shadow/drag-to-meter-in-shadow-crash.html
841
842         * editing/VisibleSelection.cpp:
843         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries):
844
845 2012-03-26  Scott Byer  <scottbyer@chromium.org>
846
847         Enable layout testing of the scroll animator.
848         https://bugs.webkit.org/show_bug.cgi?id=81858
849         Add a call to the InternalSettings that layout tests can use to
850         turn on scroll animation. Enable animation updates for the
851         Chromium platform DRT when scroll animation has been turned on in
852         a test. This should be a no-op for all current layout tests.
853
854         Reviewed by James Robinson.
855
856         No new tests. Layout test results should be unchanged.
857
858         * testing/InternalSettings.cpp:
859         (WebCore::InternalSettings::setEnableScrollAnimator):
860         (WebCore):
861         (WebCore::InternalSettings::scrollAnimatorEnabled):
862         * testing/InternalSettings.h:
863         (InternalSettings):
864         * testing/InternalSettings.idl:
865
866 2012-03-26  Charles Wei  <charles.wei@torchmobile.com.cn>
867
868         Fix minor spell error in DocumentLoader.h
869         https://bugs.webkit.org/show_bug.cgi?id=82141
870
871         Reviewed by Nate Chapin.
872
873         Just fix spell error, no new tests.
874
875         * loader/DocumentLoader.h:
876         (WebCore::DocumentLoader::setClientRedirectSourceForHistory):
877
878 2012-03-26  Brian Salomon  <bsalomon@google.com>
879
880         [Skia] Remove use of deprecated Skia constant and struct field names
881         https://bugs.webkit.org/show_bug.cgi?id=81034
882
883         Reviewed by James Robinson.
884
885         No behavior change, so no tests. The modified code is executed by many existing tests.
886
887         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
888         (WebCore::createAcceleratedCanvas):
889         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
890         (WebCore::CCRenderSurfaceFilters::apply):
891         * platform/graphics/skia/ImageBufferSkia.cpp:
892         (WebCore::createAcceleratedCanvas):
893
894 2012-03-26  Nat Duca  <nduca@chromium.org>
895
896         [chromium] Add isInputThrottled/didBecomeReadyForAdditionalInput to WebWidget
897         https://bugs.webkit.org/show_bug.cgi?id=82265
898
899         In threaded compositing mode, the WebWidget is self-scheduled,
900         receiving damage and processing it without forwarding that damage
901         up to the embedding WebWidgetClient. In Chromium's case, the
902         client uses the presence of damage to perform input flow
903         control. This patch exposes the need for input flow control to the
904         embedder, while keeping the actual logic about what exactly
905         warrants input flow control inside the implementation.
906
907         Reviewed by James Robinson.
908
909         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
910         (WebCore::CCLayerTreeHost::commitComplete):
911         (WebCore::CCLayerTreeHost::commitRequested):
912         (WebCore):
913         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
914         (CCLayerTreeHostClient):
915         (CCLayerTreeHost):
916         * platform/graphics/chromium/cc/CCProxy.h:
917         (CCProxy):
918         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
919         (WebCore::CCSingleThreadProxy::commitRequested):
920         (WebCore):
921         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
922         (CCSingleThreadProxy):
923         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
924         (WebCore::CCThreadProxy::commitRequested):
925         (WebCore):
926         * platform/graphics/chromium/cc/CCThreadProxy.h:
927         (CCThreadProxy):
928
929 2012-03-26  Adam Barth  <abarth@webkit.org>
930
931         When <img crossorigin> fails the CORS check, we should fire the error event
932         https://bugs.webkit.org/show_bug.cgi?id=81998
933
934         Reviewed by Nate Chapin.
935
936         The spec says we're supposed to fire the error event when the CORS
937         check fails, but we haven't been.  This patch is larger than it might
938         otherwise be because we're firing the event asynchronously, but that
939         seems like the right thing to do.
940
941         Tests: http/tests/security/img-with-failed-cors-check-fails-to-load.html
942
943         * dom/Document.cpp:
944         (WebCore::Document::implicitClose):
945         * loader/ImageLoader.cpp:
946         (WebCore::errorEventSender):
947         (WebCore):
948         (WebCore::ImageLoader::ImageLoader):
949         (WebCore::ImageLoader::~ImageLoader):
950         (WebCore::ImageLoader::setImage):
951         (WebCore::ImageLoader::updateFromElement):
952         (WebCore::ImageLoader::notifyFinished):
953         (WebCore::ImageLoader::dispatchPendingEvent):
954         (WebCore::ImageLoader::dispatchPendingErrorEvent):
955         (WebCore::ImageLoader::dispatchPendingErrorEvents):
956         * loader/ImageLoader.h:
957         (ImageLoader):
958
959 2012-03-26  Stephen White  <senorblanco@chromium.org>
960
961         Make filters and the threaded compositor play well together.
962         https://bugs.webkit.org/show_bug.cgi?id=78139
963         
964         Use a dedicated GraphicsContext3D instance for all filters calls in
965         the threaded case.  Clone all FilterOperations for thread safety
966         in the threaded case.
967
968         Reviewed by James Robinson.
969         
970         Covered by tests in LayoutTests/css3/filters.
971
972         * platform/graphics/chromium/LayerChromium.cpp:
973         (WebCore::LayerChromium::setFilters):
974         Set a global flag if we've seen content with filters, so we know
975         we need to create the filter context.
976         (WebCore::LayerChromium::pushPropertiesTo):
977         Clone all filter operations if we're in the threaded case.
978         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
979         (WebCore):
980         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
981         (WebCore::CCLayerTreeHost::needsFilterContext):
982         (WebCore::CCLayerTreeHost::setNeedsFilterContext):
983         (CCLayerTreeHost):
984         Add flag and accessors for needsFilterContext.
985         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
986         (WebCore::CCRenderSurface::applyFilters):
987         Pick up the appropriate context from SharedGraphicsContext3D,
988         depending if we're in the threaded case or not.
989         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
990         (WebCore::CCThreadProxy::recreateContext):
991         For the threaded compositor re-create the filter context
992         alongside the main compositor context on lost context, if requested.
993         (WebCore::CCThreadProxy::beginFrame):
994         Create the filter context in beginFrame, if it was resquested and is
995         NULL.  This handles the first-use case.
996         * platform/graphics/filters/CustomFilterOperation.h:
997         (WebCore::CustomFilterOperation::clone):
998         Assert if trying to clone the custom filter operation (it has
999         non-threadsafe members).
1000         * platform/graphics/filters/FilterOperation.h:
1001         (WebCore::DefaultFilterOperation::clone):
1002         (WebCore::PassthroughFilterOperation::clone):
1003         (WebCore::ReferenceFilterOperation::clone):
1004         (WebCore::BasicColorMatrixFilterOperation::clone):
1005         (WebCore::BasicComponentTransferFilterOperation::clone):
1006         (WebCore::GammaFilterOperation::clone):
1007         (WebCore::BlurFilterOperation::clone):
1008         (WebCore::DropShadowFilterOperation::clone):
1009         Add clone methods for all FilterOperations.
1010         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
1011         (WebCore::SharedGraphicsContext3DImpl::getOrCreateContext):
1012         (WebCore::SharedGraphicsContext3DImpl::getContext):
1013         (WebCore::SharedGraphicsContext3DImpl::createContext):
1014         (WebCore::SharedGraphicsContext3D::get):
1015         (WebCore::getOrCreateContextForImplThread):
1016         (WebCore::SharedGraphicsContext3D::getForImplThread):
1017         (WebCore::SharedGraphicsContext3D::haveForImplThread):
1018         (WebCore::SharedGraphicsContext3D::createForImplThread):
1019         Split out context creation, lost context recovery, and retrieval
1020         into separate functions, so the impl thread can use only the parts
1021         it wants on the threads it wants (create and have on main, get on impl).
1022         Add asserts to ensure that's how they're called.
1023         * platform/graphics/gpu/SharedGraphicsContext3D.h:
1024         (SharedGraphicsContext3D):
1025         Reuse the SharedGraphicsContext infrastructure to create a new
1026         context singleton for filter use in the threaded compositor.
1027
1028 2012-03-26  Adam Barth  <abarth@webkit.org>
1029
1030         FrameLoader::shouldAllowNavigation uses Frame for context rather than Document
1031         https://bugs.webkit.org/show_bug.cgi?id=81020
1032
1033         Reviewed by Eric Seidel.
1034
1035         The vast majority of security checks in the browser should use a
1036         ScriptExecutionContext (aka a Document) to designate "who" is
1037         attempting to perform a given action.  Unfortunately,
1038         shouldAllowNavigation was using a Frame to designate "who" is
1039         attempting the navigation.
1040
1041         In cases when the executing script is "inactive" (i.e., belongs to a
1042         document that is not currently displayed in a Frame), using the Frame
1043         can cause us to grant the script the privileges of the document that's
1044         currently displayed in the Frame rather than the one that contains the
1045         script.
1046
1047         This patch moves shouldAllowNavigation from FrameLoader to Document
1048         (and renames it to canNavigate), effectively change the context object
1049         from a Frame to a Document.
1050
1051         Test: http/tests/security/frameNavigation/inactive-function-in-popup-navigate-child.html
1052
1053         * bindings/generic/BindingSecurity.h:
1054         (BindingSecurity):
1055         (WebCore):
1056         * bindings/v8/V8Utilities.cpp:
1057         (WebCore):
1058         * bindings/v8/V8Utilities.h:
1059         (WebCore):
1060             - Deletes unused code.
1061         * dom/Document.cpp:
1062         (WebCore::canAccessAncestor):
1063         (WebCore):
1064         (WebCore::Document::canNavigate):
1065             - canNavigate is copied from FrameLoader::shouldAllowNavigation.
1066               I've added a null-check bailout if the document is inactive.
1067         * dom/Document.h:
1068         (Document):
1069         * loader/FormState.cpp:
1070         (WebCore::FormState::FormState):
1071         (WebCore::FormState::create):
1072         * loader/FormState.h:
1073         (WebCore):
1074         (FormState):
1075         (WebCore::FormState::sourceDocument):
1076         * loader/FormSubmission.cpp:
1077         (WebCore::FormSubmission::create):
1078             - Changes the context object from Frame to Document.
1079         * loader/FrameLoader.cpp:
1080         (WebCore::FrameLoader::submitForm):
1081         (WebCore::FrameLoader::loadFrameRequest):
1082         (WebCore):
1083         (WebCore::FrameLoader::findFrameForNavigation):
1084             - FrameLoader::findFrameForNavigation still incorrectly uses Frame
1085               as the context object, but that's a bug for another patch.
1086         (WebCore::createWindow):
1087         * loader/FrameLoader.h:
1088         (FrameLoader):
1089         * loader/NavigationScheduler.cpp:
1090         (WebCore::ScheduledFormSubmission::fire):
1091         * page/DOMWindow.cpp:
1092         (WebCore::DOMWindow::close):
1093         (WebCore::DOMWindow::setLocation):
1094         (WebCore::DOMWindow::open):
1095         * page/History.cpp:
1096         (WebCore::History::go):
1097
1098 2012-03-26  Vangelis Kokkevis  <vangelis@chromium.org>
1099
1100         [chromium] Simplify and fix CCLayerSorter
1101         https://bugs.webkit.org/show_bug.cgi?id=82114
1102
1103         A significant cleanup, simplification and improvement of the CCLayerSorter code.
1104         Simplified the LayerShape structure to use WebCore's FloatQuad for all overlap tests.
1105         By treating every layer as two triangles, the old overlap code did a lot of redundant work
1106         including testing two of the vertices of the layer and its diagonal twice. The new overlap
1107         tests check:
1108         1. The four corners of each of the two layers against the other layer.
1109         2. The four edges of each layer against the edges of the other layer.
1110         Unlike the old code, the new code has no early-outs in the overlap tests as those where causing
1111         us to miss legitimate overlaps.
1112         A new technique for breaking dependency cycles introduced by intersecting layers is implemented.
1113         Instead of arbitrarily breaking cycles by choosing the node in the graph with the smallest number of
1114         incoming edges (i.e. layers that need to be drawn before it) we chose the one with the smallest sum
1115         of graph edge weights (defined as the max depth difference between two layers). Layers that intersect
1116         have their respective graph edge weight set to zero, making them more likely to be picked for breaking
1117         the cycles (it's not a perfect solution but it seems to perform much better than the previous one).
1118
1119         In addition to being overly complex and doing reduntant work, the old code was missing a
1120         perspective divide when computing the coordinates of the layer's corners in the projected plane
1121         which was the source of a lot of mis-sorted results.
1122
1123         In all, these improvements, fix a lot of outstanding issues with layer sorting, on pages such as:
1124         http://www.keithclark.co.uk/labs/3dcss/demo/
1125         http://2012.beercamp.com
1126         https://developer.mozilla.org/fr/demos/detail/the-box/launch
1127
1128         Tests: CCLayerSorter unit tests.
1129
1130         Reviewed by Kenneth Russell.
1131
1132         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
1133         (WebCore):
1134         (WebCore::perpProduct):
1135         (WebCore::edgeEdgeTest):
1136         (WebCore::CCLayerSorter::checkOverlap):
1137         (WebCore::CCLayerSorter::LayerShape::LayerShape):
1138         (WebCore::CCLayerSorter::LayerShape::layerZFromProjectedPoint):
1139         (WebCore::CCLayerSorter::createGraphNodes):
1140         (WebCore::CCLayerSorter::createGraphEdges):
1141         (WebCore::CCLayerSorter::sort):
1142         * platform/graphics/chromium/cc/CCLayerSorter.h:
1143         (WebCore::CCLayerSorter::CCLayerSorter):
1144         (CCLayerSorter):
1145         (LayerShape):
1146         (WebCore::CCLayerSorter::GraphNode::GraphNode):
1147         (GraphNode):
1148         (WebCore::CCLayerSorter::GraphEdge::GraphEdge):
1149         (GraphEdge):
1150
1151 2012-03-26  Fady Samuel  <fsamuel@chromium.org>
1152
1153         [Chromium] Using WebViewPlugins with --force-compositing-mode causes an ASSERT to fail
1154         https://bugs.webkit.org/show_bug.cgi?id=81954
1155
1156         Reviewed by James Robinson.
1157
1158         A static variable s_inPaintContents is set when painting, and it ensures
1159         that we don't delete GraphicsLayers or create GraphicsLayers while painting.
1160
1161         However, because this variable is static, it does not permit the existence
1162         of multiple WebViews in different stages (one laying out and one painting).
1163
1164         This manifests itself if one attempts to use the --force-compositing-mode
1165         in Chromium and attempts to navigate to a page with a missing or old plugin
1166         or a browser plugin (which uses a WebViewPlugin as a placeholder until it's
1167         done loading).
1168
1169         The solution to simplify debugging is to make this flag per-Page.
1170         We can access Page from RenderLayerBacking which is a GraphicsLayerClient.
1171         We add a new method GraphicsLayerClient::verifyNotPainting with a default
1172         (do nothing) implementation and override it in RenderLayerBacking to
1173         test the flag set in Page.
1174
1175         * page/Page.cpp:
1176         (WebCore::Page::Page):
1177         * page/Page.h:
1178         (Page):
1179         (WebCore::Page::setIsPainting):
1180         (WebCore::Page::isPainting):
1181         * platform/graphics/GraphicsLayer.cpp:
1182         (WebCore::GraphicsLayer::GraphicsLayer):
1183         (WebCore::GraphicsLayer::~GraphicsLayer):
1184         (WebCore::GraphicsLayer::paintGraphicsLayerContents):
1185         * platform/graphics/GraphicsLayerClient.h:
1186         (GraphicsLayerClient):
1187         (WebCore::GraphicsLayerClient::verifyNotPainting):
1188         * rendering/RenderLayerBacking.cpp:
1189         (WebCore::RenderLayerBacking::paintContents):
1190         (WebCore):
1191         (WebCore::RenderLayerBacking::verifyNotPainting):
1192         * rendering/RenderLayerBacking.h:
1193         (RenderLayerBacking):
1194
1195 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
1196
1197         cssText should use shorthand notations
1198         https://bugs.webkit.org/show_bug.cgi?id=81737
1199
1200         Reviewed by Enrica Casucci.
1201
1202         Use shorthand properties to serialize style properties for cssText.
1203
1204         The overall algorithm is to look for any property that has a shorthand, and then check if
1205         the shorthand value could be obtained (the condition is quite complicated for border properties).
1206         If it could, then append that value to the string builder, and set the corresponding entries in
1207         shorthandPropertyAppeared and shorthandPropertyUsed. If not, only turn on the bit in
1208         shorthandPropertyAppeared on to avoid calling getPropertyValue again for longhand properties
1209         that use the same shorthand property when we cannot use the shorthand.
1210
1211         Test: fast/css/cssText-shorthand.html
1212
1213         * css/StylePropertySet.cpp:
1214         (WebCore::StylePropertySet::asText):
1215
1216 2012-03-26  Bolin Hsu  <bhsu@google.com>
1217
1218         [Chromium] Add Android keycodes
1219         https://bugs.webkit.org/show_bug.cgi?id=81950
1220
1221         Add the missing Android keycodes listed in the bug.
1222
1223         Reviewed by Adam Barth.
1224
1225         * platform/chromium/KeyCodeConversionAndroid.cpp:
1226         (WebCore::windowsKeyCodeForKeyEvent):
1227         * platform/chromium/KeyboardCodes.h:
1228
1229 2012-03-26  Levi Weintraub  <leviw@chromium.org>
1230
1231         Switch ColumnInfo::addForcedBreak to LayoutUnits
1232         https://bugs.webkit.org/show_bug.cgi?id=82210
1233
1234         Reviewed by Eric Seidel.
1235
1236         Forced breaks are added by local offsets, which should be in LayoutUnits.
1237
1238         No new tests. No change in behavior.
1239
1240         * rendering/ColumnInfo.h:
1241         (WebCore::ColumnInfo::addForcedBreak):
1242
1243 2012-03-26  Levi Weintraub  <leviw@chromium.org>
1244
1245         Update LayoutUnit usage in ContainerNode, Element, and ElementRareData
1246         https://bugs.webkit.org/show_bug.cgi?id=82219
1247
1248         Reviewed by Eric Seidel.
1249
1250         No new tests. No change in behavior.
1251
1252         * dom/ContainerNode.cpp:
1253         (WebCore::ContainerNode::getLowerRightCorner): linesBoundingBox returns the enclosing IntRect
1254         of the contained lines. Inline's aren't bounded in LayoutUnits nor pixel snapped.
1255         * dom/Element.cpp:
1256         (WebCore::Element::boundsInRootViewSpace): Coordinates in root view space are akin to absolute
1257         coordinates, which are always expressed in integers.
1258         * dom/Element.h:
1259         (Element):
1260         * dom/ElementRareData.h:
1261         (WebCore::defaultMinimumSizeForResizing): Using numeric_limits<LayoutUnit>::max instead of
1262         INT_MAX to avoid overflowing when LayoutUnits are sub-pixel.
1263
1264 2012-03-26  Adam Klein  <adamk@chromium.org>
1265
1266         Update binding test output for V8 after r112163.
1267
1268         * bindings/scripts/test/V8/V8TestInterface.cpp:
1269         (WebCore::V8TestInterface::constructorCallback):
1270         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1271         (WebCore::V8TestNamedConstructorConstructorCallback):
1272         * bindings/scripts/test/V8/V8TestObj.cpp:
1273         (WebCore::V8TestObj::constructorCallback):
1274         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1275         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
1276
1277 2012-03-26  Levi Weintraub  <leviw@chromium.org>
1278
1279         Update localSelectionRect to return a LayoutRect
1280         https://bugs.webkit.org/show_bug.cgi?id=82183
1281
1282         Reviewed by Eric Seidel.
1283
1284         localSelectionRect returns a rectangle in the coordinate space of its renderer,
1285         and therefor should remain LayoutUnits until being promoted to absolute
1286         coordinates or painted. Also fixing an incorrect conversion of startPos and
1287         endPos in selectionRectForRepaint.
1288
1289         No new tests. No change in behavior.
1290
1291         * rendering/InlineTextBox.cpp:
1292         (WebCore::InlineTextBox::localSelectionRect): Continuing to use enclosingIntRect
1293         for the value being returned from the font engine since these floating point
1294         values should not be pixel snapped.
1295         * rendering/InlineTextBox.h:
1296         (InlineTextBox):
1297         * rendering/RenderReplaced.cpp:
1298         (WebCore::RenderReplaced::localSelectionRect):
1299         * rendering/RenderReplaced.h:
1300         (RenderReplaced):
1301         * rendering/RenderText.cpp:
1302         (WebCore::localQuadForTextBox):
1303         (WebCore::RenderText::absoluteRectsForRange):
1304         (WebCore::RenderText::absoluteQuadsForRange):
1305         (WebCore::RenderText::selectionRectForRepaint): Fixing an incorrect conversion of
1306         start/endPos to LayoutUnits. These values represent a range of selected characters,
1307         not layout values!
1308         * rendering/svg/RenderSVGInlineText.cpp:
1309         (WebCore::RenderSVGInlineText::localCaretRect):
1310         * rendering/svg/SVGInlineTextBox.cpp:
1311         (WebCore::SVGInlineTextBox::localSelectionRect):
1312         * rendering/svg/SVGInlineTextBox.h:
1313         (SVGInlineTextBox):
1314
1315 2012-03-26  Justin Novosad  <junov@chromium.org>
1316
1317         [Chromium] Crash in Canvas2DLayerChromium::pushPropertiesTo
1318         https://bugs.webkit.org/show_bug.cgi?id=82243
1319
1320         Reviewed by James Robinson.
1321
1322         Adding null pointer check to prevent crash and texture object
1323         validity check to prevent potential graphics glitch
1324
1325         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1326         (WebCore::Canvas2DLayerChromium::pushPropertiesTo):
1327
1328 2012-03-26  Adam Klein  <adamk@chromium.org>
1329
1330         Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls
1331         https://bugs.webkit.org/show_bug.cgi?id=82238
1332
1333         Reviewed by Adam Barth.
1334
1335         The setJSWrapper* methods previously featured a comment that asked
1336         callers to ref the objects before passing them in. This change makes
1337         that contract explicit (and allows the removal of the comment).
1338
1339         In addition, for ConstructorCallbacks, this change slightly reduces
1340         refcount churn by passing on the initial ref via RefPtr::release().
1341
1342         No new tests, no change in behavior.
1343
1344         * bindings/scripts/CodeGeneratorV8.pm:
1345         (GenerateConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref() call.
1346         (GenerateNamedConstructorCallback): ditto.
1347         * bindings/v8/V8DOMWindowShell.cpp:
1348         (WebCore::V8DOMWindowShell::installDOMWindow): Cast to a PassRefPtr and remove explicit ref call.
1349         * bindings/v8/V8DOMWrapper.cpp:
1350         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Pass leaked refs into the DOMNodeMaps.
1351         * bindings/v8/V8DOMWrapper.h:
1352         (V8DOMWrapper): Make the setJSWrapperFor* methods take PassRefPtr<T>.
1353         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Pass leaked ref into the DOMObjectMap.
1354         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): Pass leaked ref into the ActiveDOMObjectMap.
1355         * bindings/v8/V8Proxy.h:
1356         (WebCore::toV8): Remove explicit ref.
1357         * bindings/v8/WorkerContextExecutionProxy.cpp:
1358         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): Cast to a PassRefPTr and remove explicit ref call.
1359         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1360         (WebCore::v8HTMLImageElementConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref.
1361         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
1362         (WebCore::V8WebKitMutationObserver::constructorCallback): ditto.
1363         * bindings/v8/custom/V8WebSocketCustom.cpp:
1364         (WebCore::V8WebSocket::constructorCallback): ditto.
1365         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
1366         (WebCore::V8XMLHttpRequest::constructorCallback): ditto.
1367
1368 2012-03-26  Alexey Proskuryakov  <ap@apple.com>
1369
1370         Remove obsolete FormDataStreamMac code
1371         https://bugs.webkit.org/show_bug.cgi?id=82244
1372
1373         Reviewed by Brady Eidson.
1374
1375         * platform/network/ResourceHandle.h:
1376         Removed ResourceHandle::didSendBodyDataDelegateExists().
1377
1378         * platform/network/mac/FormDataStreamMac.h:
1379         * platform/network/mac/FormDataStreamMac.mm:
1380         Removed code that was needed to call ResourceLoaderClient::didSendData() before Foundation
1381         added support for it.
1382
1383         * platform/network/mac/ResourceHandleMac.mm:
1384         (WebCore::ResourceHandle::start):
1385         (WebCore::ResourceHandle::cancel):
1386         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
1387         (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
1388         (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
1389         We no longer need to associate streams with ResourceHandles!
1390
1391 2012-03-26  Adam Klein  <adamk@chromium.org>
1392
1393         V8RecursionScope should not hold a raw pointer to ScriptExecutionContext
1394         https://bugs.webkit.org/show_bug.cgi?id=82222
1395
1396         Reviewed by Eric Seidel.
1397
1398         Instead of holding onto ScriptExecutionContext, cache the boolean value we
1399         care about (context->isDocument()). This avoids problems if the
1400         context goes away as a result of the script we just ran.
1401
1402         Test: fast/frames/subframe-load-js-url-crash.html
1403
1404         * bindings/v8/V8RecursionScope.cpp:
1405         (WebCore::V8RecursionScope::didLeaveScriptContext): Check the cached
1406         bool instead of calling into the context.
1407         * bindings/v8/V8RecursionScope.h:
1408         (WebCore::V8RecursionScope::V8RecursionScope): Call isDocument from
1409         the constructor and cache the result.
1410         (WebCore::V8RecursionScope::~V8RecursionScope): No longer need to pass
1411         anything to didLeaveScriptContext since it's now a member.
1412         (V8RecursionScope): Make didLeaveScriptContext a member function and
1413         remove its argument. Add member bool to hold the value of isDocument.
1414
1415 2012-03-26  Dana Jansens  <danakj@chromium.org>
1416
1417         [chromium] assertion being hit in CCLayerTreeHost::updateCompositorResources
1418         https://bugs.webkit.org/show_bug.cgi?id=82239
1419
1420         Reviewed by Adrienne Walker.
1421
1422         The assert is incorrect and should check the animation state on
1423         the surface, not the owning layer.
1424
1425         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1426         (WebCore::CCLayerTreeHost::updateCompositorResources):
1427
1428 2012-03-26  Levi Weintraub  <leviw@chromium.org>
1429
1430         Correct LayoutUnit usage in RenderFieldSet and RenderMenuItem
1431         https://bugs.webkit.org/show_bug.cgi?id=82179
1432
1433         Reviewed by Julien Chaffraix.
1434
1435         Correcting small misuses of ints vs LayoutUnits in RenderFieldSet and RenderMenuItem. Also
1436         adding zeroLayoutUnit where necessary to fix the sub-pixel build. See below for details.
1437
1438         No new tests. No change in behavior.
1439
1440         * rendering/RenderFieldset.cpp:
1441         (WebCore::RenderFieldset::paintBoxDecorations): Clip rects need to be pixel snapped to mirror
1442         the actual coordinates we paint.
1443         (WebCore::RenderFieldset::paintMask): Using zeroLayoutUnit for ternary operation to fix the
1444         sub-pixel build.
1445         * rendering/RenderMenuList.cpp:
1446         (WebCore::RenderMenuList::showPopup): Correctly using an IntRect for absoluteBoundingBoxRect.
1447         (WebCore::RenderMenuList::clientPaddingLeft): Correcting mismatched return type with header.
1448         (WebCore::RenderMenuList::clientPaddingRight): Ditto.
1449
1450 2012-03-26  Dan Bernstein  <mitz@apple.com>
1451
1452         Tried to fix an unused parameter warning after r112154.
1453
1454         * rendering/RenderFlexibleBox.cpp:
1455         (WebCore::RenderFlexibleBox::layoutBlock): Changed to not pass relayoutChildren to
1456         layoutFlexItems.
1457         (WebCore::RenderFlexibleBox::layoutFlexItems): Removed the unused relayoutChildren parameter.
1458         * rendering/RenderFlexibleBox.h:
1459
1460 2012-03-26  Rob Arnold  <robarnold@fb.com>
1461
1462         SyntheticStyleCalc on an element should not force recalculation on its children
1463         https://bugs.webkit.org/show_bug.cgi?id=79389
1464
1465         Reviewed by Simon Fraser.
1466
1467         No new tests. Existing tests cover correctness, not sure how to test for performance.
1468
1469         * dom/Element.cpp:
1470         (WebCore::Element::recalcStyle):
1471
1472 2012-03-26  Tony Chang  <tony@chromium.org>
1473
1474         apply cross axis constraints before aligning children in flexbox
1475         https://bugs.webkit.org/show_bug.cgi?id=82240
1476
1477         Reviewed by Ojan Vafai.
1478
1479         We weren't applying max-height constraints before aligning children.
1480         This would cause center, end, stretch alignment to be wrong if we hit
1481         a max-height on a flexbox.
1482
1483         This patch also moves the repositioning logic to happen after
1484         computeLogicalHeight, which will be useful for flex-line-pack.
1485
1486         New test case in css3/flexbox/flex-align.html
1487
1488         * rendering/RenderFlexibleBox.cpp:
1489         (WebCore::RenderFlexibleBox::layoutBlock):
1490         (WebCore::RenderFlexibleBox::layoutFlexItems):
1491         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
1492         * rendering/RenderFlexibleBox.h:
1493
1494 2012-03-26  Anders Carlsson  <andersca@apple.com>
1495
1496         Find in page overlay and bouncy are not always positioned correctly
1497         https://bugs.webkit.org/show_bug.cgi?id=82247
1498         <rdar://problem/10866139>
1499
1500         Reviewed by Sam Weinig.
1501
1502         In WebCore, a lot of code depends on scroll position updates to happen synchronously, so
1503         update the frame view scroll position before asking the scrolling thread to scroll.
1504
1505         * page/scrolling/ScrollingCoordinator.cpp:
1506         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
1507
1508 2012-03-26  Nate Chapin  <japhet@chromium.org>
1509
1510         Simplify setting loading state in DocumentLoader
1511         https://bugs.webkit.org/show_bug.cgi?id=82099
1512
1513         Reviewed by Adam Barth.
1514
1515         The logic for deciding what to return for DocumentLoader::isLoading()
1516         is crazy. It's indirectly based on the ResourceLoaders that have
1517         registered themselves with the DocumentLoader, but we can make that
1518         relationship more direct.
1519
1520         * loader/DocumentLoader.cpp:
1521         (WebCore::DocumentLoader::checkLoadComplete): Renamed from updateLoading, since it's not actually
1522             updating anything anymore. It now calls DOMWindow::finishedLoading() if loading is in fact done.
1523         (WebCore::DocumentLoader::startLoadingMainResource): The only reason this had a return value was to call
1524             updateLoading() if loading failed. Just call checkLoadComplete() directly (this allows it to
1525             be private, whereas updateLoading() was public).
1526         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
1527         * loader/DocumentLoader.h:
1528         (WebCore::DocumentLoader::isLoading): Rather than holding a separate bool, return based on the presence
1529             of non-multipart ResourceLoaders directly.
1530         * loader/FrameLoader.cpp:
1531         (WebCore::FrameLoader::isLoading): Depend on DocumentLoader::isLoading() for the activeDocumentLoader(),
1532             rather than indirectly the other way around.
1533         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Remove several assertions that should now be
1534             absolutely identical to the remaining !pdl->isLoading().
1535         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
1536
1537 2012-03-26  James Robinson  <jamesr@chromium.org>
1538
1539         Scrollable plugins not registered properly in ScrollingCoordinator
1540         https://bugs.webkit.org/show_bug.cgi?id=82163
1541
1542         Reviewed by Anders Carlsson.
1543
1544         Plugins may be scrollable, so we have to add them in the non-fast scrollable region. Tested manually.
1545
1546         * page/scrolling/ScrollingCoordinator.cpp:
1547         (WebCore::computeNonFastScrollableRegion):
1548         (WebCore::ScrollingCoordinator::nonFastScrollableRegion):
1549         (WebCore):
1550         * page/scrolling/ScrollingCoordinator.h:
1551         (ScrollingCoordinator):
1552         * plugins/PluginViewBase.h:
1553         (WebCore::PluginViewBase::scrollable):
1554         (PluginViewBase):
1555
1556 2012-03-26  Joone Hur  <joone.hur@collabora.co.uk>
1557
1558         [GTK] Build fix for Accelerated Compositing with Clutter
1559         https://bugs.webkit.org/show_bug.cgi?id=81785
1560
1561         Reviewed by Martin Robinson.
1562
1563         AcceleratedCompositingContext was introduced to isolate different accelerated 
1564         compositing implementations(r104194), but the Clutter implementation doesn't 
1565         build with it. This includes an initial implementation of GraphicsContext3D 
1566         and fixes the build error.
1567
1568         * GNUmakefile.list.am:
1569         * platform/graphics/clutter/DrawingBufferClutter.cpp: Added.
1570         (WebCore):
1571         (WebCore::DrawingBuffer::DrawingBuffer):
1572         (WebCore::DrawingBuffer::~DrawingBuffer):
1573         (WebCore::DrawingBuffer::platformColorBuffer):
1574         (WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
1575         * platform/graphics/clutter/GraphicsContext3DClutter.cpp: Added.
1576         (WebCore):
1577         (WebCore::GraphicsContext3D::create):
1578         (WebCore::GraphicsContext3D::GraphicsContext3D):
1579         (WebCore::GraphicsContext3D::~GraphicsContext3D):
1580         (WebCore::GraphicsContext3D::getImageData):
1581         (WebCore::GraphicsContext3D::paintToCanvas):
1582         (WebCore::GraphicsContext3D::setContextLostCallback):
1583         (WebCore::GraphicsContext3D::setErrorMessageCallback):
1584         (WebCore::GraphicsContext3D::makeContextCurrent):
1585         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
1586         (WebCore::GraphicsContext3D::isGLES2Compliant):
1587         (WebCore::GraphicsContext3D::platformLayer):
1588         * platform/graphics/clutter/GraphicsContext3DPrivate.cpp: Added.
1589         (WebCore):
1590         (WebCore::GraphicsContext3DPrivate::create):
1591         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1592         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
1593         (WebCore::GraphicsContext3DPrivate::makeContextCurrent):
1594         (WebCore::GraphicsContext3DPrivate::platformContext):
1595         (WebCore::GraphicsContext3DPrivate::paintToGraphicsLayerActor):
1596         * platform/graphics/clutter/GraphicsContext3DPrivate.h: Added.
1597         (WebCore):
1598         (GraphicsContext3DPrivate):
1599         (WebCore::GraphicsContext3DPrivate::platformLayer):
1600
1601 2012-03-26  Peter Rybin  <prybin@chromium.org>
1602
1603         Web Inspector: Expose InspectorTypeBuilder.h to other components
1604         https://bugs.webkit.org/show_bug.cgi?id=82226
1605
1606         Reviewed by Vsevolod Vlasov.
1607
1608         This is a provisional commit that simplifies passing ealy warning system
1609         for the main patch https://bugs.webkit.org/show_bug.cgi?id=81558
1610
1611         * WebCore.xcodeproj/project.pbxproj: config file is changed in Xcode UI.
1612
1613 2012-03-26  Antaryami Pandia  <antaryami.pandia@motorola.com>
1614
1615         An <area> element remains focusable even though its associated <img> is not rendered.
1616         https://bugs.webkit.org/show_bug.cgi?id=71788
1617
1618         Reviewed by Andy Estes.
1619
1620         HTMLAreaElement::isFocusable() needs to consider the display and
1621         visibility state.
1622
1623         Test: fast/events/tab-test-not-visible-imagemap.html
1624
1625         * html/HTMLAreaElement.cpp:
1626         (WebCore::HTMLAreaElement::imageElement):
1627         (WebCore::HTMLAreaElement::isFocusable):
1628         * html/HTMLAreaElement.h: Make imageElement() const.
1629         (HTMLAreaElement):
1630
1631 2012-03-26  Anton Muhin  <antonm@chromium.org>
1632
1633         Fix a typo in IDL
1634         https://bugs.webkit.org/show_bug.cgi?id=82215
1635
1636         Reviewed by Adam Barth.
1637
1638         No new tests, just a typo fix.
1639
1640         * notifications/WorkerContextNotifications.idl:
1641
1642 2012-03-26  W. James MacLean  <wjmaclean@chromium.org>
1643
1644         [chromium] Change handleGestureFling() to use CCInputHandlerClient::Wheel.
1645         https://bugs.webkit.org/show_bug.cgi?id=82133
1646
1647         Reviewed by James Robinson.
1648
1649         Covered by existing unit tests.
1650
1651         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1652         (WebCore::CCLayerTreeHostImpl::scrollBegin):
1653
1654 2012-03-26  Mike Lawther  <mikelawther@chromium.org>
1655
1656         CSS3 calc: mixed percent/absolute for box-reflect
1657         https://bugs.webkit.org/show_bug.cgi?id=82161
1658
1659         Reviewed by Ojan Vafai.
1660
1661         Tests: css3/calc/box-reflect-expected.html
1662                css3/calc/box-reflect.html
1663
1664         * css/CSSStyleSelector.cpp:
1665         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1666
1667 2012-03-26  Mike Lawther  <mikelawther@chromium.org>
1668
1669         CSS3 calc: mixed percent/absolute support for vertical-align
1670         https://bugs.webkit.org/show_bug.cgi?id=82152
1671
1672         Reviewed by Ojan Vafai.
1673
1674         Tests: css3/calc/vertical-align-expected.html
1675                css3/calc/vertical-align.html
1676
1677         * css/CSSStyleApplyProperty.cpp:
1678         (WebCore::ApplyPropertyVerticalAlign::applyValue):
1679
1680 2012-03-26  Filip Spacek  <fspacek@rim.com>
1681
1682         [BlackBerry] Accelerated compositing updates
1683         https://bugs.webkit.org/show_bug.cgi?id=82058
1684
1685         Reviewed by Rob Buis.
1686
1687         * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
1688         (WebCore::CanvasLayerWebKitThread::CanvasLayerWebKitThread):
1689         (WebCore::CanvasLayerWebKitThread::~CanvasLayerWebKitThread):
1690         (WebCore::CanvasLayerWebKitThread::setDevice):
1691         (WebCore::CanvasLayerWebKitThread::updateTextureContentsIfNeeded):
1692         * platform/graphics/blackberry/CanvasLayerWebKitThread.h:
1693         (WebCore::CanvasLayerWebKitThread::create):
1694         (CanvasLayerWebKitThread):
1695         * platform/graphics/blackberry/InstrumentedPlatformCanvas.h:
1696         (WebCore::InstrumentedPlatformCanvas::InstrumentedPlatformCanvas):
1697         (WebCore::InstrumentedPlatformCanvas::save):
1698         (WebCore::InstrumentedPlatformCanvas::saveLayer):
1699         (WebCore::InstrumentedPlatformCanvas::restore):
1700         (WebCore::InstrumentedPlatformCanvas::translate):
1701         (WebCore::InstrumentedPlatformCanvas::scale):
1702         (WebCore::InstrumentedPlatformCanvas::rotate):
1703         (WebCore::InstrumentedPlatformCanvas::skew):
1704         (WebCore::InstrumentedPlatformCanvas::concat):
1705         (WebCore::InstrumentedPlatformCanvas::setMatrix):
1706         (WebCore::InstrumentedPlatformCanvas::clipRect):
1707         (WebCore::InstrumentedPlatformCanvas::clipPath):
1708         (WebCore::InstrumentedPlatformCanvas::clipRegion):
1709         (WebCore::InstrumentedPlatformCanvas::clear):
1710         (WebCore::InstrumentedPlatformCanvas::drawPaint):
1711         (WebCore::InstrumentedPlatformCanvas::drawPoints):
1712         (WebCore::InstrumentedPlatformCanvas::drawRect):
1713         (WebCore::InstrumentedPlatformCanvas::drawPath):
1714         (WebCore::InstrumentedPlatformCanvas::drawBitmap):
1715         (WebCore::InstrumentedPlatformCanvas::drawBitmapRect):
1716         (WebCore::InstrumentedPlatformCanvas::drawBitmapMatrix):
1717         (WebCore::InstrumentedPlatformCanvas::drawSprite):
1718         (WebCore::InstrumentedPlatformCanvas::drawText):
1719         (WebCore::InstrumentedPlatformCanvas::drawPosText):
1720         (WebCore::InstrumentedPlatformCanvas::drawPosTextH):
1721         (WebCore::InstrumentedPlatformCanvas::drawTextOnPath):
1722         (WebCore::InstrumentedPlatformCanvas::drawPicture):
1723         (WebCore::InstrumentedPlatformCanvas::drawVertices):
1724         (WebCore::InstrumentedPlatformCanvas::drawData):
1725         * platform/graphics/blackberry/LayerData.h:
1726         (WebCore::LayerData::LayerData):
1727         (WebCore::LayerData::needsTexture):
1728         (LayerData):
1729         * platform/graphics/blackberry/LayerTiler.cpp:
1730         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
1731         * platform/graphics/blackberry/LayerWebKitThread.cpp:
1732         (WebCore::LayerWebKitThread::paintContents):
1733         (WebCore::LayerWebKitThread::setDrawable):
1734         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1735         (WebCore::loadBufferingImageData):
1736         * platform/graphics/blackberry/skia/ImageBufferDataSkia.h: Renamed from Source/WebCore/platform/graphics/blackberry/skia/ImageBufferData.h.
1737         (WebCore):
1738         (ImageBufferData):
1739
1740 2012-03-26  Stephen Chenney  <schenney@chromium.org>
1741
1742         Failure to invalidate text position attributes when DOM changes
1743         https://bugs.webkit.org/show_bug.cgi?id=81464
1744
1745         Reviewed by Nikolas Zimmermann.
1746
1747         The text positioning elements data structure in RenderSVGText must be
1748         updated when either the children of the corresponding element are
1749         modified, or the length of the text inside the elements changes.
1750         Previously, the call to clear the text positioning elements (to force
1751         recomputation) was guarded by a flag. If code tried to invalidate when
1752         the flag was not set, then something set the flag, the elements would
1753         be invalid at use time.
1754
1755         This patch modifies the method that invalidates the positining
1756         attributes so that the action always happens. It also renames the
1757         method to more accurately reflect its function.
1758
1759         Test: svg/custom/delete-modified-text-in-defs-crash.svg
1760
1761         * rendering/svg/RenderSVGInlineText.cpp:
1762         (WebCore::RenderSVGInlineText::setTextInternal): Rename textDOMChanged to invalidateTextPositioningElements
1763         * rendering/svg/RenderSVGText.cpp:
1764         (WebCore::RenderSVGText::invalidateTextPositioningElements): Rename
1765         textDOMChanged to invalidateTextPositioningElements and remove the check against the needsPosition... flag.
1766         * rendering/svg/RenderSVGText.h:
1767         (RenderSVGText): Rename textDOMChanged to invalidateTextPositioningElements
1768         * svg/SVGAElement.cpp:
1769         (WebCore::SVGAElement::childrenChanged): Rename textDOMChanged to invalidateTextPositioningElements
1770         * svg/SVGTextContentElement.cpp:
1771         (WebCore::SVGTextContentElement::childrenChanged): Rename textDOMChanged to invalidateTextPositioningElements
1772
1773 2012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
1774
1775         REGRESSION (r110065-r110080): fast/forms/placeholder-set-attribute.html is failing intermittently because WebKit fails to repaint after setting the placeholder attribute
1776         https://bugs.webkit.org/show_bug.cgi?id=81802
1777
1778         Reviewed by Dan Bernstein.
1779
1780         Covered by fast/forms/placeholder-set-attribute.html which should be less flaky.
1781
1782         Unfortunately no new test case as this bug requires a very specific set of conditions that I couldn't reproduce deterministically.
1783
1784         This is a regression from r110072: RenderTextControlSingleLine would rely on the placeholder's RenderLayer to properly repaint during
1785         the first layout as the placeholder has overflow: hidden set. r110072 removed the layer in this case and thus we miss a repaint.
1786
1787         * rendering/RenderTextControlSingleLine.cpp:
1788         (WebCore::RenderTextControlSingleLine::layout):
1789         For our first layout, we need to make sure our placeholder is painted. layoutBlockChild has a very similar logic to force repaint
1790         on a first layout. We don't hit this logic as the placeholder is explicitly skipped in RenderTextControl::layoutSpecialExcludedChild.
1791
1792 2012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
1793
1794         REGRESSION(r110072): fast/forms/textfield-overflow.html is failing
1795         https://bugs.webkit.org/show_bug.cgi?id=80531
1796
1797         Reviewed by Ojan Vafai.
1798
1799         Tested by fast/forms/textfield-overflow.html (re-enabled after this change).
1800
1801         The existing code would happily query layout information before calling layout (FTW!).
1802         The solution is to properly layout our object, then modify some dimensions as needed while
1803         marking ourself as needing layout and then layouting again.
1804
1805         * rendering/RenderTextControlSingleLine.cpp:
1806         (WebCore::RenderTextControlSingleLine::layout):
1807         Implemented a proper 2 pass layout algorithm. Removed the |relayoutChildren| logic as:
1808         - layoutBlock handles automatically logical height changes.
1809         - we were not modifying the logical width between layouts so we don't need to force a
1810         child relayout in this case.
1811
1812 2012-03-26  Robin Cao  <robin.cao@torchmobile.com.cn>
1813
1814         [BlackBerry] Upstream LayerCompositingThread.{h, cpp}
1815         https://bugs.webkit.org/show_bug.cgi?id=79873
1816
1817         Reviewed by Rob Buis.
1818
1819         Initial upstream, no new tests.
1820
1821         * platform/graphics/blackberry/LayerCompositingThread.cpp: Added.
1822         (WebCore):
1823         (WebCore::LayerCompositingThread::create):
1824         (WebCore::LayerCompositingThread::LayerCompositingThread):
1825         (WebCore::LayerCompositingThread::~LayerCompositingThread):
1826         (WebCore::LayerCompositingThread::destroyOnCompositingThread):
1827         (WebCore::LayerCompositingThread::setLayerRenderer):
1828         (WebCore::LayerCompositingThread::deleteTextures):
1829         (WebCore::LayerCompositingThread::setDrawTransform):
1830         (WebCore::getTransformedRect):
1831         (WebCore::LayerCompositingThread::getTransformedHolePunchRect):
1832         (WebCore::LayerCompositingThread::drawTextures):
1833         (WebCore::LayerCompositingThread::drawSurface):
1834         (WebCore::LayerCompositingThread::drawMissingTextures):
1835         (WebCore::LayerCompositingThread::releaseTextureResources):
1836         (WebCore::LayerCompositingThread::setPluginView):
1837         (WebCore::LayerCompositingThread::setMediaPlayer):
1838         (WebCore::LayerCompositingThread::clearAnimations):
1839         (WebCore::LayerCompositingThread::removeSublayer):
1840         (WebCore::LayerCompositingThread::indexOfSublayer):
1841         (WebCore::LayerCompositingThread::rootLayer):
1842         (WebCore::LayerCompositingThread::removeFromSuperlayer):
1843         (WebCore::LayerCompositingThread::setSublayers):
1844         (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
1845         (WebCore::LayerCompositingThread::setVisible):
1846         (WebCore::LayerCompositingThread::setNeedsCommit):
1847         (WebCore::LayerCompositingThread::scheduleCommit):
1848         (WebCore::LayerCompositingThread::updateAnimations):
1849         (WebCore::LayerCompositingThread::hasVisibleHolePunchRect):
1850         (WebCore::LayerCompositingThread::createLayerRendererSurface):
1851         * platform/graphics/blackberry/LayerCompositingThread.h: Added.
1852         (Graphics):
1853         (WebCore):
1854         (LayerCompositingThread):
1855         (WebCore::LayerCompositingThread::bindContentsTexture):
1856         (WebCore::LayerCompositingThread::getSublayers):
1857         (WebCore::LayerCompositingThread::setSuperlayer):
1858         (WebCore::LayerCompositingThread::superlayer):
1859         (WebCore::LayerCompositingThread::drawTransform):
1860         (WebCore::LayerCompositingThread::setDrawOpacity):
1861         (WebCore::LayerCompositingThread::drawOpacity):
1862         (WebCore::LayerCompositingThread::layerRendererSurface):
1863         (WebCore::LayerCompositingThread::clearLayerRendererSurface):
1864         (WebCore::LayerCompositingThread::setMaskLayer):
1865         (WebCore::LayerCompositingThread::maskLayer):
1866         (WebCore::LayerCompositingThread::setReplicaLayer):
1867         (WebCore::LayerCompositingThread::replicaLayer):
1868         (WebCore::LayerCompositingThread::getDrawRect):
1869         (WebCore::LayerCompositingThread::getTransformedBounds):
1870         (WebCore::LayerCompositingThread::hasMissingTextures):
1871         (WebCore::LayerCompositingThread::isDirty):
1872         (WebCore::LayerCompositingThread::isVisible):
1873         (WebCore::LayerCompositingThread::setOpacity):
1874         (WebCore::LayerCompositingThread::setTransform):
1875         (WebCore::LayerCompositingThread::hasRunningAnimations):
1876         (WebCore::LayerCompositingThread::numSublayers):
1877
1878 2012-03-26  Kent Tamura  <tkent@chromium.org>
1879
1880         Add a notification function for detaching to TextFieldDecorator
1881         https://bugs.webkit.org/show_bug.cgi?id=82142
1882
1883         Reviewed by Dimitri Glazkov.
1884
1885         Add willDetach() functio to TextFieldDecorator. This will be
1886         needed if a decorator opens a popup UI on handleClick(), and the
1887         popup UI should be closed when the attaching text field is
1888         detached.
1889
1890         No new tests because of no behavior changes in any platforms.
1891
1892         * html/shadow/TextFieldDecorationElement.cpp:
1893         (WebCore::TextFieldDecorationElement::hostInput):
1894         Added. A utilify function to get an HTMLInputElement*.
1895         (WebCore::TextFieldDecorationElement::updateImage): Use hostInput().
1896         (WebCore::TextFieldDecorationElement::customStyleForRenderer): ditto.
1897         (WebCore::TextFieldDecorationElement::detach): Added. Calls TextFieldDecorator::willDetach().
1898         (WebCore::TextFieldDecorationElement::defaultEventHandler): Use hostInput().
1899         * html/shadow/TextFieldDecorationElement.h:
1900         (TextFieldDecorator):
1901         (TextFieldDecorationElement):
1902
1903 2012-03-26  Dan Bernstein  <mitz@apple.com>
1904
1905         Tried to fix the 32-bit build after r112021.
1906
1907         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
1908         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
1909
1910 2012-03-26  Leo Yang  <leo.yang@torchmobile.com.cn>
1911
1912         [BlackBerry] Skeleton code of AsyncFileSystemBlackBerry.cpp
1913         https://bugs.webkit.org/show_bug.cgi?id=82157
1914
1915         Reviewed by Rob Buis.
1916
1917         AsyncFileSystemBlackBerry is responsible for asynchronous operating
1918         on file system for the blackberry porting. It's just skeleton code
1919         containing no implementation yet.
1920
1921         No new tests because of skeleton code.
1922
1923         * PlatformBlackBerry.cmake: Add AsyncFileSystemBlackBerry.cpp if ENABLE_FILE_SYSTEM is on.
1924         * platform/AsyncFileSystem.cpp:
1925         (WebCore):
1926         * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Added.
1927         (WebCore):
1928         (WebCore::AsyncFileSystem::isAvailable):
1929         (WebCore::AsyncFileSystem::isValidType):
1930         (WebCore::AsyncFileSystem::create):
1931         (WebCore::AsyncFileSystem::openFileSystem):
1932         (WebCore::AsyncFileSystem::crackFileSystemURL):
1933         (WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry):
1934         (WebCore::AsyncFileSystemBlackBerry::~AsyncFileSystemBlackBerry):
1935         (WebCore::AsyncFileSystemBlackBerry::toURL):
1936         (WebCore::AsyncFileSystemBlackBerry::move):
1937         (WebCore::AsyncFileSystemBlackBerry::copy):
1938         (WebCore::AsyncFileSystemBlackBerry::remove):
1939         (WebCore::AsyncFileSystemBlackBerry::removeRecursively):
1940         (WebCore::AsyncFileSystemBlackBerry::readMetadata):
1941         (WebCore::AsyncFileSystemBlackBerry::createFile):
1942         (WebCore::AsyncFileSystemBlackBerry::createDirectory):
1943         (WebCore::AsyncFileSystemBlackBerry::fileExists):
1944         (WebCore::AsyncFileSystemBlackBerry::directoryExists):
1945         (WebCore::AsyncFileSystemBlackBerry::readDirectory):
1946         (WebCore::AsyncFileSystemBlackBerry::createWriter):
1947         (WebCore::AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
1948         * platform/blackberry/AsyncFileSystemBlackBerry.h: Added.
1949         (WebCore):
1950         (AsyncFileSystemBlackBerry):
1951
1952 2012-03-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1953
1954         [BlackBerry] CredentialBackingStore implement encryptString() and decryptString()
1955         https://bugs.webkit.org/show_bug.cgi?id=82204
1956
1957         Reviewed by Rob Buis.
1958
1959         Implemented encryptedString() and decryptedString() in class CredentialBackingStore
1960         by calling BlackBerry::Platform::Encryptor::encryptString() and
1961         BlackBerry::Platform::Encryptor::encryptString() respectively.
1962
1963         No new tests.
1964
1965         * platform/network/blackberry/CredentialBackingStore.cpp:
1966         (WebCore::CredentialBackingStore::encryptedString):
1967         (WebCore::CredentialBackingStore::decryptedString):
1968
1969 2012-03-26  Pavel Feldman  <pfeldman@chromium.org>
1970
1971         Web Inspector: 'use strict' exceptions stop in inspector code
1972         https://bugs.webkit.org/show_bug.cgi?id=82199
1973
1974         Reviewed by Yury Semikhatsky.
1975
1976         Accessing callee from within InjectedScript made inspector stop on handled exceptions.
1977         I replaced it with Object.prototype.toString.call(obj) === "[object Arguments]".
1978
1979         * inspector/InjectedScriptSource.js:
1980
1981 2012-03-26  Mihai Balan  <mibalan@adobe.com>
1982
1983         [CSS Regions] In region styling (@-webkit-region) the position for CSS rules is incorrectly computed
1984         https://bugs.webkit.org/show_bug.cgi?id=81901
1985
1986         Reviewed by Antti Koivisto.
1987
1988         Right now CSS rules position does not take into account rules that are inside a @-webkit-region
1989         declaration, leading to buggy behavior where rules that appear later in the document are superseded
1990         by rules that appear earlier in the document (opposite as how things should be). The fix updates
1991         the "global" rules counter once the rules in a @-webkit-region declaration have been added.
1992
1993         Tests: fast/regions/region-style-rule-position-expected.html
1994                fast/regions/region-style-rule-position.html
1995
1996         * css/CSSStyleSelector.cpp:
1997         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1998
1999 2012-03-26  Pierre Rossi  <pierre.rossi@nokia.com>
2000
2001         [Qt] Disable focus ring in the mobile theme.
2002         https://bugs.webkit.org/show_bug.cgi?id=81934
2003
2004         For mobile devices intended to be used only through
2005         touch, the focus rings makes little sense and feels
2006         awkward.
2007
2008         Reviewed by Kenneth Rohde Christiansen.
2009
2010         No new tests. This is merely a cosmetic touch.
2011
2012         * platform/qt/RenderThemeQtMobile.h:
2013         (RenderThemeQtMobile):
2014         (WebCore::RenderThemeQtMobile::platformFocusRingColor):
2015
2016 2012-03-26  Charles Wei  <charles.wei@torchmobile.com.cn>
2017
2018         [BlackBerry] Clean up networking code and remove WML support.
2019         https://bugs.webkit.org/show_bug.cgi?id=82170
2020
2021         Reviewed by Rob Buis.
2022
2023         This just removes the WML support of BlackBerry porting, which is already 
2024         removed from WebCore. No new tests needed.
2025
2026         * platform/blackberry/MIMETypeRegistryBlackBerry.cpp:
2027         (WebCore):
2028         * platform/network/blackberry/DeferredData.cpp:
2029         (WebCore::DeferredData::DeferredData):
2030         (WebCore::DeferredData::processDeferredData):
2031         * platform/network/blackberry/DeferredData.h:
2032         (DeferredData):
2033         (WebCore::DeferredData::hasDeferredData):
2034         * platform/network/blackberry/NetworkJob.cpp:
2035         * platform/network/blackberry/NetworkJob.h:
2036         (NetworkJob):
2037         * platform/network/blackberry/ResourceResponse.h:
2038         (WebCore::ResourceResponse::ResourceResponse):
2039         (ResourceResponse):
2040         * platform/network/blackberry/ResourceResponseBlackBerry.cpp:
2041         (WebCore::ResourceResponse::doPlatformCopyData):
2042         (WebCore::ResourceResponse::doPlatformAdopt):
2043
2044 2012-03-26  Philip Rogers  <pdr@google.com>
2045
2046         Add invalid bounding box concept to SVG containers
2047         https://bugs.webkit.org/show_bug.cgi?id=81104
2048
2049         Reviewed by Nikolas Zimmermann.
2050
2051         An empty <g> element needs to use an invalid bounding box because
2052         an empty bounding box isn't the default state. This change
2053         introduces the concept of an invalid object bounding box for
2054         both RenderSVGContainer and RenderSVGRoot. Code that
2055         does not explicitly check that the bounding box is valid
2056         should be unaffected by this change. We use this new invalid
2057         flag in computeContainerBoundingBoxes so that we do not
2058         include invalid bounding boxes.
2059
2060         This change also contains a small fix in
2061         RenderSVGContainer::toRenderSVGContainer which depended on
2062         RenderSVGViewportContainer not inheriting from RenderSVGContainer,
2063         which it now does.
2064
2065         Test: svg/custom/getBBox-empty-container.html
2066
2067         * rendering/svg/RenderSVGContainer.cpp:
2068         (WebCore::RenderSVGContainer::RenderSVGContainer):
2069         (WebCore::RenderSVGContainer::updateCachedBoundaries):
2070         * rendering/svg/RenderSVGContainer.h:
2071         (WebCore::RenderSVGContainer::isObjectBoundingBoxValid):
2072         (RenderSVGContainer):
2073         (WebCore::toRenderSVGContainer):
2074         * rendering/svg/RenderSVGRoot.cpp:
2075         (WebCore::RenderSVGRoot::RenderSVGRoot):
2076         (WebCore::RenderSVGRoot::updateCachedBoundaries):
2077         * rendering/svg/RenderSVGRoot.h:
2078         (RenderSVGRoot):
2079         * rendering/svg/SVGRenderSupport.cpp:
2080         (WebCore):
2081         (WebCore::updateObjectBoundingBox):
2082         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
2083         * rendering/svg/SVGRenderSupport.h:
2084         (SVGRenderSupport):
2085
2086 2012-03-26  Alexei Filippov  <alexeif@chromium.org>
2087
2088         Web Inspector: Speed up the retainers build phase.
2089         https://bugs.webkit.org/show_bug.cgi?id=81763
2090
2091         Replacing the edge iterator in retainers building phase
2092         makes it run 10 times faster (400 ms vs. 4 sec).
2093
2094         Reviewed by Yury Semikhatsky.
2095
2096         * inspector/front-end/HeapSnapshot.js:
2097         (WebInspector.HeapSnapshot.prototype._buildRetainers):
2098
2099 2012-03-22  Alexander Pavlov  <apavlov@chromium.org>
2100
2101         Web Inspector: Migrate InspectorCSSAgent to strict protocol types
2102         https://bugs.webkit.org/show_bug.cgi?id=81923
2103
2104         Reviewed by Pavel Feldman.
2105
2106         No new tests, as this is a refactoring.
2107
2108         * inspector/CodeGeneratorInspector.py:
2109         * inspector/InspectorCSSAgent.cpp:
2110         (SelectorProfile):
2111         (WebCore::SelectorProfile::toInspectorObject):
2112         (WebCore::InspectorCSSAgent::clearFrontend):
2113         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
2114         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
2115         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
2116         (WebCore::InspectorCSSAgent::getAllStyleSheets):
2117         (WebCore::InspectorCSSAgent::getStyleSheet):
2118         (WebCore::InspectorCSSAgent::setPropertyText):
2119         (WebCore::InspectorCSSAgent::toggleProperty):
2120         (WebCore::InspectorCSSAgent::setRuleSelector):
2121         (WebCore::InspectorCSSAgent::addRule):
2122         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
2123         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
2124         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
2125         (WebCore::InspectorCSSAgent::collectStyleSheets):
2126         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
2127         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
2128         * inspector/InspectorCSSAgent.h:
2129         (InspectorCSSAgent):
2130         * inspector/InspectorStyleSheet.cpp:
2131         (WebCore::buildSourceRangeObject):
2132         (WebCore::buildMediaObject):
2133         (WebCore::fillMediaListChain):
2134         (WebCore::InspectorStyle::buildObjectForStyle):
2135         (WebCore::InspectorStyle::buildArrayForComputedStyle):
2136         (WebCore::InspectorStyle::styleWithProperties):
2137         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2138         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
2139         (WebCore::InspectorStyleSheet::buildObjectForRule):
2140         (WebCore::InspectorStyleSheet::buildObjectForStyle):
2141         * inspector/InspectorStyleSheet.h:
2142         (WebCore::InspectorCSSId::asProtocolValue):
2143         (InspectorStyle):
2144         (InspectorStyleSheet):
2145
2146 2012-03-26  Alexander Pavlov  <apavlov@chromium.org>
2147
2148         Web Inspector: [REGRESSION] Workarounds for security checks when retrieving stylesheet rule lists are broken
2149         https://bugs.webkit.org/show_bug.cgi?id=82191
2150
2151         Reviewed by Vsevolod Vlasov.
2152
2153         Test: http/tests/inspector/modify-cross-domain-rule.html
2154
2155         * inspector/InspectorStyleSheet.cpp:
2156         (WebCore::asCSSRuleList):
2157         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2158
2159 2012-03-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2160
2161         Unreviewed. Fix make distcheck.
2162
2163         * GNUmakefile.list.am: Add missing files.
2164
2165 2012-03-26  Jason Liu  <jason.liu@torchmobile.com.cn>
2166
2167         [BlackBerry] Cookies mismatch when login to gmail.
2168         https://bugs.webkit.org/show_bug.cgi?id=82165
2169
2170         Redirection's response can add or update cookies. The cookies of ResourceRequest is dirty
2171         in this case. We shouldn't copy the dirty cookie header from ResourceRequest to PlatformRequest
2172         for redirection loading.
2173
2174         This issue didn't happen before because we used m_cookieData not the cookie header.
2175         Now we use the cookie header to avoid storing double cookie's data, and m_cookieData is removed.
2176
2177         Reviewed by George Staikos.
2178
2179         No new tests. It is a refactoring issue.
2180
2181         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
2182         (WebCore::ResourceRequest::initializePlatformRequest):
2183
2184 2012-03-26  Alexis Menard  <alexis.menard@openbossa.org>
2185
2186         Increase code sharing between StylePropertySet and CSSPropertyLonghand.
2187         https://bugs.webkit.org/show_bug.cgi?id=81960
2188
2189         Reviewed by Antti Koivisto.
2190
2191         Use longhands declaration from CSSPropertyLonghand in StylePropertySet in order
2192         to avoid code duplication.
2193
2194         No new tests : refactoring only, we shouldn't have any behavior difference.
2195
2196         * css/CSSPropertyLonghand.cpp:
2197         (WebCore::backgroundLonghand):
2198         Re-order the array to match the spec default order.
2199         (WebCore::webkitMaskLonghand):
2200         Re-order to match the original order.
2201         (WebCore::webkitTransformOriginLonghand):
2202         A LayoutTest shows that a property was missing.
2203         * css/StylePropertySet.cpp:
2204         (WebCore::StylePropertySet::getPropertyValue):
2205         (WebCore::StylePropertySet::borderSpacingValue):
2206         (WebCore::StylePropertySet::get4Values):
2207         (WebCore::StylePropertySet::getLayeredShorthandValue):
2208         (WebCore::StylePropertySet::getShorthandValue):
2209         (WebCore::StylePropertySet::getCommonValue):
2210         (WebCore::StylePropertySet::asText):
2211         * css/StylePropertySet.h:
2212         (WebCore):
2213         (StylePropertySet):
2214
2215 2012-03-26  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2216
2217         [Qt] Assert in GestureTapHighlighter.
2218         https://bugs.webkit.org/show_bug.cgi?id=82187
2219
2220         Reviewed by Kenneth Rohde Christiansen.
2221
2222         Adjust the boundaries of the center-rect before performing the intersection test,
2223         since adjusting the boundary may cause a new intersection.
2224
2225         * page/GestureTapHighlighter.cpp:
2226
2227 2012-03-26  Antti Koivisto  <antti@apple.com>
2228
2229         Split MediaList into internal and CSSOM types
2230         https://bugs.webkit.org/show_bug.cgi?id=82149
2231
2232         Reviewed by Andread Kling.
2233
2234         MediaList is a CSSOM type and should not be used internally.
2235         
2236         - Use new type MediaQuerySet internally to represent a collection of media queries.
2237         - Create MediaList wrapper on-demand for CSSOM purposes only.
2238         
2239         This moves us forward in separating CSSOM from the internal stylesheet implementation.
2240         
2241         MediaQuerySet really belongs to a file of its own but that is not part of this patch.
2242         
2243         * css/CSSGrammar.y:
2244         * css/CSSImportRule.cpp:
2245         (WebCore::CSSImportRule::create):
2246         (WebCore):
2247         (WebCore::CSSImportRule::CSSImportRule):
2248         (WebCore::CSSImportRule::~CSSImportRule):
2249         (WebCore::CSSImportRule::media):
2250         (WebCore::CSSImportRule::cssText):
2251         * css/CSSImportRule.h:
2252         (WebCore):
2253         (CSSImportRule):
2254         (WebCore::CSSImportRule::mediaQueries):
2255         * css/CSSMediaRule.cpp:
2256         (WebCore::CSSMediaRule::CSSMediaRule):
2257         (WebCore::CSSMediaRule::~CSSMediaRule):
2258         (WebCore::CSSMediaRule::cssText):
2259         * css/CSSMediaRule.h:
2260         (WebCore::CSSMediaRule::create):
2261         (WebCore::CSSMediaRule::media):
2262         (WebCore::CSSMediaRule::mediaQueries):
2263         (CSSMediaRule):
2264         * css/CSSParser.cpp:
2265         (WebCore::CSSParser::parseMediaQuery):
2266         (WebCore::CSSParser::createMediaQuerySet):
2267         (WebCore::CSSParser::createImportRule):
2268         (WebCore::CSSParser::createMediaRule):
2269         (WebCore::CSSParser::updateLastMediaLine):
2270         * css/CSSParser.h:
2271         (WebCore):
2272         (CSSParser):
2273         * css/CSSStyleSelector.cpp:
2274         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2275         * css/CSSStyleSheet.cpp:
2276         (WebCore):
2277         (WebCore::CSSStyleSheet::media):
2278         (WebCore::CSSStyleSheet::setMediaQueries):
2279         * css/CSSStyleSheet.h:
2280         (WebCore):
2281         (CSSStyleSheet):
2282         (WebCore::CSSStyleSheet::mediaQueries):
2283         * css/MediaList.cpp:
2284         (WebCore):
2285         (WebCore::MediaQuerySet::MediaQuerySet):
2286         (WebCore::MediaQuerySet::~MediaQuerySet):
2287         (WebCore::parseMediaDescriptor):
2288         (WebCore::MediaQuerySet::parse):
2289         (WebCore::MediaQuerySet::add):
2290         (WebCore::MediaQuerySet::remove):
2291         (WebCore::MediaQuerySet::addMediaQuery):
2292         (WebCore::MediaQuerySet::mediaText):
2293         (WebCore::MediaQuerySet::ensureMediaList):
2294         
2295             - Use OwnPtr<> for MediaQuery ownership.
2296             - Move the appropriate functions to MediaQuerySet.
2297             - Clean up a bit to make this more readable and better aligned to WebKit style.
2298         
2299         (WebCore::MediaList::MediaList):
2300         (WebCore::MediaList::~MediaList):
2301         (WebCore::MediaList::setMediaText):
2302         (WebCore::MediaList::item):
2303         (WebCore::MediaList::deleteMedium):
2304         (WebCore::MediaList::appendMedium):
2305         * css/MediaList.h:
2306         (WebCore):
2307         (WebCore::MediaQuerySet::create):
2308         (WebCore::MediaQuerySet::createAllowingDescriptionSyntax):
2309         (MediaQuerySet):
2310         (WebCore::MediaQuerySet::queryVector):
2311         (WebCore::MediaQuerySet::lastLine):
2312         (WebCore::MediaQuerySet::setLastLine):
2313         (MediaList):
2314         (WebCore::MediaList::ref):
2315         (WebCore::MediaList::deref):
2316         (WebCore::MediaList::length):
2317         (WebCore::MediaList::mediaText):
2318         (WebCore::MediaList::queries):
2319         * css/MediaQueryEvaluator.cpp:
2320         (WebCore::MediaQueryEvaluator::eval):
2321         * css/MediaQueryEvaluator.h:
2322         (WebCore):
2323         (MediaQueryEvaluator):
2324         * css/MediaQueryList.cpp:
2325         (WebCore::MediaQueryList::create):
2326         (WebCore::MediaQueryList::MediaQueryList):
2327         * css/MediaQueryList.h:
2328         (WebCore):
2329         (MediaQueryList):
2330         * css/MediaQueryMatcher.cpp:
2331         (WebCore::MediaQueryMatcher::evaluate):
2332         (WebCore::MediaQueryMatcher::matchMedia):
2333         * css/MediaQueryMatcher.h:
2334         (WebCore):
2335         (MediaQueryMatcher):
2336         * css/StyleMedia.cpp:
2337         (WebCore::StyleMedia::matchMedium):
2338         * css/StyleSheet.cpp:
2339         (WebCore::StyleSheet::~StyleSheet):
2340         
2341             Move the media query ownership to CSSStyleSheet where it belongs.
2342         
2343         (WebCore):
2344         * css/StyleSheet.h:
2345         (WebCore::StyleSheet::media):
2346         (StyleSheet):
2347         * dom/DOMImplementation.cpp:
2348         (WebCore::DOMImplementation::createCSSStyleSheet):
2349         * dom/ProcessingInstruction.cpp:
2350         (WebCore::ProcessingInstruction::setCSSStyleSheet):
2351         * dom/StyleElement.cpp:
2352         (WebCore::StyleElement::createSheet):
2353         * html/HTMLLinkElement.cpp:
2354         (WebCore::HTMLLinkElement::process):
2355         (WebCore::HTMLLinkElement::setCSSStyleSheet):
2356         * html/HTMLMediaElement.cpp:
2357         (WebCore::HTMLMediaElement::selectNextSourceChild):
2358         * html/parser/HTMLPreloadScanner.cpp:
2359         (WebCore::HTMLNames::PreloadTask::linkMediaAttributeIsScreen):
2360         * inspector/InspectorStyleSheet.cpp:
2361         (WebCore::buildMediaObject):
2362
2363 2012-03-26  Zeno Albisser  <zeno@webkit.org>
2364
2365         [Qt]WK2] TextureMapperShaderManager should query the program map before creating new shader program instances.
2366         https://bugs.webkit.org/show_bug.cgi?id=82178
2367
2368         If TextureMapperShaderManager already has a reference to an instance of the
2369         requested shader program type, this instance should be reused instead of
2370         creating a new one.
2371
2372         Reviewed by Noam Rosenthal.
2373
2374         * platform/graphics/texmap/TextureMapperShaderManager.h:
2375         (WebCore::TextureMapperShaderManager::getShaderProgram):
2376
2377 2012-03-26  Yury Semikhatsky  <yurys@chromium.org>
2378
2379         [Chromium] Web Inspector: dedicated worker inspector is empty
2380         https://bugs.webkit.org/show_bug.cgi?id=82181
2381
2382         "beforeunload" event for worker inspector front-end is ingnored if the
2383         window url is "about:blank" as it is just unload of the default content
2384         before the front-end page load.
2385
2386         Reviewed by Pavel Feldman.
2387
2388         * inspector/front-end/WorkerManager.js:
2389         (WebInspector.WorkerManager.prototype._workerInspectorClosing):
2390
2391 2012-03-22  Yury Semikhatsky  <yurys@chromium.org>
2392
2393         Web Inspector: split nodes and containment edges into two different arrays
2394         https://bugs.webkit.org/show_bug.cgi?id=81930
2395
2396         Extract heap profile nodes and edges into two separate arrays. This
2397         way we will have a continuous array of the heap graph nodes and can
2398         aviod additional mapping between node index and its position in the
2399         heap snapshot.
2400
2401         Reviewed by Pavel Feldman.
2402
2403         * inspector/front-end/HeapSnapshot.js:
2404         (WebInspector.HeapSnapshot.prototype._init):
2405         (WebInspector.HeapSnapshot.prototype._buildContinuousNodeArray):
2406         (WebInspector.HeapSnapshot.prototype._createOnlyNodesArray):
2407         (WebInspector.HeapSnapshot.prototype._restoreNodeTypes):
2408         (WebInspector.HeapSnapshot.prototype._createRetainmentEdgesArray):
2409         (WebInspector.HeapSnapshot.prototype._createContainmentEdgesArray):
2410         * inspector/front-end/HeapSnapshotProxy.js:
2411         (WebInspector.HeapSnapshotWorker):
2412
2413 2012-03-22  Pavel Podivilov  <podivilov@chromium.org>
2414
2415         Web Inspector: move resource loading logic from SourceMapParser to CompilerScriptMapping.
2416         https://bugs.webkit.org/show_bug.cgi?id=81897
2417
2418         Reviewed by Vsevolod Vlasov.
2419
2420         SourceMapParser should only deal with payload parsing.
2421
2422         * inspector/front-end/CompilerScriptMapping.js:
2423         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
2424         (WebInspector.CompilerScriptMapping.prototype.addScript):
2425         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
2426         (WebInspector.SourceMapPayload):
2427         (WebInspector.SourceMapParser):
2428         (WebInspector.SourceMapParser.prototype.sourceContent):
2429         (WebInspector.SourceMapParser.prototype.findEntry):
2430         (WebInspector.SourceMapParser.prototype.findEntryReversed):
2431         * inspector/front-end/ContentProviders.js:
2432         (WebInspector.CompilerSourceMappingContentProvider):
2433         (WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent):
2434
2435 2012-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
2436
2437         Web Inspector: replace indexOf('a text') === 0 with RegExp because it is much faster.
2438         https://bugs.webkit.org/show_bug.cgi?id=82175
2439
2440         We were using aString.indexOf("Window") but it is not effective from performance point of view.
2441         I'm replaced it with RegExp.
2442
2443         Reviewed by Yury Semikhatsky.
2444
2445         * inspector/front-end/HeapSnapshot.js:
2446         (WebInspector.HeapSnapshotNode.prototype.get isWindow):
2447         (WebInspector.HeapSnapshotNode.prototype.get isDetachedDOMTree):
2448
2449 2012-03-26  Pavel Feldman  <pfeldman@chromium.org>
2450
2451         Web Inspector: breakpoints should be disabled while live editing JavaScript.
2452         https://bugs.webkit.org/show_bug.cgi?id=81947
2453
2454         Reviewed by Yury Semikhatsky.
2455
2456         This change disables (removes from the backend) the breakpoints while editing script.
2457         Undoing or committing the change restores the breakpoints. Main logic is implemented within
2458         JavaScriptSourceFrame, but it required minor tweaking of the text editor: more correct
2459         undo/redo wrapper and better detection of the noop opterations.
2460
2461         * inspector/front-end/JavaScriptSourceFrame.js:
2462         (WebInspector.JavaScriptSourceFrame):
2463         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
2464         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
2465         (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
2466         (WebInspector.JavaScriptSourceFrame.prototype.addBreakpoint):
2467         (WebInspector.JavaScriptSourceFrame.prototype.removeBreakpoint):
2468         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
2469         * inspector/front-end/TextEditorModel.js:
2470         (WebInspector.TextEditorModel.endsWithBracketRegex.):
2471         * inspector/front-end/TextViewer.js:
2472         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.before):
2473         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.after):
2474         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo):
2475         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
2476
2477 2012-03-25  Nat Duca  <nduca@chromium.org>
2478
2479         [chromium] Route willBeginFrame from compositor to WebWidget
2480         https://bugs.webkit.org/show_bug.cgi?id=82171
2481
2482         Reviewed by Darin Fisher.
2483
2484         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2485         (CCLayerTreeHostClient):
2486         (WebCore::CCLayerTreeHost::willBeginFrame):
2487         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2488         (WebCore::CCThreadProxy::beginFrame):
2489
2490 2012-03-25  Hayato Ito  <hayato@chromium.org>
2491
2492         [Shadow DOM] Add Reified DOM Tree traversal internal APIs.
2493         https://bugs.webkit.org/show_bug.cgi?id=79197
2494
2495         Reviewed by Dimitri Glazkov.
2496
2497         Add internal APIs which can be used to traverse Reified DOM tree, which is
2498         a result of node distribution algorithm explained in Shadow DOM spec.
2499         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
2500
2501         Every public functions defined in ReifiedTreeTraversal are static
2502         functions and are named in a similar way to ones defined in WebCore::Node class.
2503         The only difference is that ReifiedTreeTraversal APIs consider shadow
2504         hosts and also traverse nodes is Shadow DOM subtrees, crossing shadow's upper and lower boundary
2505         transparently.
2506
2507         There is no actual client which uses these APIs. Follow-up patches for FocusNavigation
2508         and EventDispatcher will use the APIs so that they can traverse node in reified tree order.
2509
2510         Test: fast/dom/shadow/reified-tree-traversal.html
2511
2512         * CMakeLists.txt:
2513         * GNUmakefile.list.am:
2514         * Target.pri:
2515         * WebCore.exp.in:
2516         * WebCore.gypi:
2517         * WebCore.vcproj/WebCore.vcproj:
2518         * WebCore.xcodeproj/project.pbxproj:
2519         * dom/ReifiedTreeTraversal.cpp: Added.
2520         (WebCore):
2521         (WebCore::isShadowHost):
2522         (WebCore::shadowTreeFor):
2523         (WebCore::shadowTreeOfParent):
2524         (WebCore::ReifiedTreeTraversal::firstChild):
2525         (WebCore::ReifiedTreeTraversal::lastChild):
2526         (WebCore::ReifiedTreeTraversal::lastChildWithoutCrossingUpperBoundary):
2527         (WebCore::ReifiedTreeTraversal::traverseChild):
2528         (WebCore::ReifiedTreeTraversal::traverseLightChildren):
2529         (WebCore::ReifiedTreeTraversal::traverseNode):
2530         (WebCore::ReifiedTreeTraversal::nextSibling):
2531         (WebCore::ReifiedTreeTraversal::previousSibling):
2532         (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToInsertionPoint):
2533         (WebCore::ReifiedTreeTraversal::traverseSiblingInCurrentTree):
2534         (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToYoungerShadowRoot):
2535         (WebCore::ReifiedTreeTraversal::escapeFallbackContentElement):
2536         (WebCore::ReifiedTreeTraversal::traverseNodeEscapingFallbackContents):
2537         (WebCore::ReifiedTreeTraversal::parentNode):
2538         (WebCore::ReifiedTreeTraversal::parentNodeWithoutCrossingUpperBoundary):
2539         (WebCore::ReifiedTreeTraversal::parentNodeOrBackToInsertionPoint):
2540         (WebCore::ReifiedTreeTraversal::parentNodeInCurrentTree):
2541         (WebCore::ReifiedTreeTraversal::parentNodeBackToYoungerShadowRootOrHost):
2542         (WebCore::ReifiedTreeTraversal::adjustedParentNode):
2543         (WebCore::ReifiedTreeTraversal::traverseNextNode):
2544         (WebCore::ReifiedTreeTraversal::traverseNextNodeWithoutCrossingUpperBoundary):
2545         (WebCore::ReifiedTreeTraversal::traversePreviousNode):
2546         (WebCore::ReifiedTreeTraversal::traversePreviousNodeWithoutCrossingUpperBoundary):
2547         * dom/ReifiedTreeTraversal.h: Added.
2548         (WebCore):
2549         (ReifiedTreeTraversal):
2550         * dom/ShadowTree.cpp:
2551         (WebCore::ShadowTree::insertionPointFor):
2552         (WebCore::ShadowTree::selectionFor):
2553         (WebCore):
2554         * dom/ShadowTree.h:
2555         (WebCore):
2556         (ShadowTree):
2557         * html/shadow/HTMLContentSelector.cpp:
2558         (WebCore::HTMLContentSelector::findFor):
2559         * html/shadow/HTMLContentSelector.h:
2560         (HTMLContentSelectionSet):
2561         (WebCore::HTMLContentSelectionSet::find):
2562         (HTMLContentSelector):
2563         * html/shadow/InsertionPoint.h:
2564         (WebCore::isInsertionPoint):
2565         (WebCore::toInsertionPoint):
2566         (WebCore):
2567         * testing/Internals.cpp:
2568         (WebCore::Internals::nextSiblingInReifiedTree):
2569         (WebCore):
2570         (WebCore::Internals::firstChildInReifiedTree):
2571         (WebCore::Internals::lastChildInReifiedTree):
2572         (WebCore::Internals::traverseNextNodeInReifiedTree):
2573         (WebCore::Internals::traversePreviousNodeInReifiedTree):
2574         * testing/Internals.h:
2575         (Internals):
2576         * testing/Internals.idl:
2577
2578 2012-03-25  Nikita Vasilyev  <me@elv1s.ru>
2579
2580         Web Inspector: Indenting fully selected line should not indent the line next to it
2581         https://bugs.webkit.org/show_bug.cgi?id=81758
2582
2583         In the editor, you can select a whole line by moving caret at 0 column
2584         position and pressing Shift + Arrow Down/Up. After that, pressing Tab
2585         indents 2 lines: fully selected one and the line next to it. The patch
2586         changes this behaviour to indent only fully selected line since that is
2587         what pretty-match all the other code editors do.
2588
2589         Reviewed by Pavel Feldman.
2590
2591         Test: inspector/editor/indentation.html
2592
2593         * inspector/front-end/TextViewer.js:
2594         (WebInspector.TextEditorMainPanel.prototype._indentLines):
2595             Do not insert indent at the begging of the last line if a selection
2596             ends on its 0 column.
2597         (WebInspector.TextEditorMainPanel.prototype._unindentLines):
2598             Do not remove indent at the begging of the last line if a selection
2599             ends on its 0 column.
2600
2601 2012-03-25  Abhishek Arya  <inferno@chromium.org>
2602
2603         Crash in ContainerNode::resumePostAttachCallbacks.
2604         https://bugs.webkit.org/show_bug.cgi?id=82159
2605
2606         Reviewed by Hajime Morita.
2607
2608         Test: plugins/object-onfocus-mutation-crash.html
2609
2610         * dom/ContainerNode.cpp:
2611         (WebCore::ContainerNode::resumePostAttachCallbacks): dispatching post attach
2612         callbacks when our attach depth is 1 can fire mutation events such as onfocus
2613         which can blow away |this|. Need to protect it with a RefPtr.
2614         * html/HTMLPlugInImageElement.cpp:
2615         (WebCore::HTMLPlugInImageElement::attach): add calls to suspend attach callbacks
2616         until the function completes.
2617
2618 2012-03-25  Dana Jansens  <danakj@chromium.org>
2619
2620         [chromium] Layers with animating transforms should prepaint even if they are not visible yet
2621         https://bugs.webkit.org/show_bug.cgi?id=82117
2622
2623         Reviewed by Adrienne Walker.
2624
2625         For animating transforms, instead of early-outing when the layer's
2626         visible rect is empty, let it prepaint regardless.
2627
2628         For now, we just only paint the outermost tiles, and only for small
2629         layers, with at most 9 tiles.
2630
2631         This changes the behaviour of ContentLayerChromium's
2632         idlePaintContentsIfDirty() so I've guarded the behaviour of the two
2633         prepainting functions that it calls to ensure the old behaviour holds
2634         without animations, and the new behaviour works with them.
2635
2636         Unit test: TiledLayerChromiumTest.idlePaintZeroSizedLayer
2637                    TiledLayerChromiumTest.idlePaintZeroSizedAnimatingLayer
2638                    TiledLayerChromiumTest.idlePaintNonVisibleLayers
2639                    TiledLayerChromiumTest.idlePaintNonVisibleAnimatingLayers
2640
2641         * platform/graphics/chromium/ContentLayerChromium.cpp:
2642         (WebCore::ContentLayerChromium::idlePaintContentsIfDirty):
2643         * platform/graphics/chromium/TiledLayerChromium.cpp:
2644         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
2645         (WebCore::TiledLayerChromium::needsIdlePaint):
2646         (WebCore::TiledLayerChromium::idlePaintRect):
2647         * platform/graphics/chromium/TiledLayerChromium.h:
2648         (WebCore::TiledLayerChromium::numPaintedTiles):
2649         (TiledLayerChromium):
2650
2651 2012-03-25  Antti Koivisto  <antti@apple.com>
2652
2653         Don't use CSSRuleList for child rule ownership
2654         https://bugs.webkit.org/show_bug.cgi?id=82127
2655
2656         Reviewed by Andreas Kling.
2657
2658         CSSMediaRule, WebKitCSSKeyframesRule and WebKitRegionRule use CSSRuleList for storing children. 
2659         They should use a simple rule vector instead. CSSRuleList is a CSSOM type that should be 
2660         instantiated on-demand for API purposes only.
2661         
2662         - Use Vector<RefPtr<CSSRule>> for storing the rule children of CSSMediaRule, WebKitCSSKeyframesRule 
2663           and WebKitRegionRule.
2664         - Add direct accessors, use internally instead of CSSRuleList.
2665         - Make CSSRuleList an abstract base. Add concrete subclasses for dealing with the underlying storage.
2666         - Instantiate CSSRuleLists on-demand.
2667         - Make CSSStyleSheet.cssRules always return the same object instance. This matches Firefox and the rest
2668           of our CSSOM implementation. Tested by fast/dom/gc-9.html.
2669           
2670         The patch decouples internals from the external API. It simplifies the child rule ownership and reduces 
2671         indirection. Memory use of css rules with children is reduced (by a ptr, refcount and heap allocation overhead).
2672
2673         * css/CSSGrammar.y:
2674         * css/CSSMediaRule.cpp:
2675         (WebCore::CSSMediaRule::CSSMediaRule):
2676         (WebCore::CSSMediaRule::~CSSMediaRule):
2677         (WebCore::CSSMediaRule::append):
2678         (WebCore::CSSMediaRule::insertRule):
2679         (WebCore::CSSMediaRule::deleteRule):
2680         (WebCore::CSSMediaRule::cssText):
2681         (WebCore::CSSMediaRule::cssRules):
2682         * css/CSSMediaRule.h:
2683         (WebCore::CSSMediaRule::create):
2684         (CSSMediaRule):
2685         (WebCore::CSSMediaRule::ruleCount):
2686         (WebCore::CSSMediaRule::ruleAt):
2687         * css/CSSParser.cpp:
2688         (WebCore::CSSParser::createMediaRule):
2689         (WebCore::CSSParser::createRuleList):
2690         (WebCore::CSSParser::createRegionRule):
2691         * css/CSSParser.h:
2692         (WebCore):
2693         * css/CSSRuleList.cpp:
2694         (WebCore):
2695         (WebCore::StaticCSSRuleList::StaticCSSRuleList):
2696         (WebCore::StaticCSSRuleList::~StaticCSSRuleList):
2697         (WebCore::StaticCSSRuleList::deref):
2698         (WebCore::StaticCSSRuleList::item):        
2699         * css/CSSRuleList.h:
2700         (CSSRuleList):
2701
2702             Turn CSSRuleList into abstract interface.
2703                     
2704         (StaticCSSRuleList):
2705         (WebCore::StaticCSSRuleList::create):
2706         (WebCore::StaticCSSRuleList::ref):
2707         (WebCore::StaticCSSRuleList::rules):
2708         (WebCore::StaticCSSRuleList::styleSheet):
2709         (WebCore::StaticCSSRuleList::length):
2710         
2711             Concrete implementation for fixed list of rules.
2712     
2713         (WebCore):
2714         (LiveCSSRuleList):
2715         (WebCore::LiveCSSRuleList::LiveCSSRuleList):
2716         (WebCore::LiveCSSRuleList::ref):
2717         (WebCore::LiveCSSRuleList::deref):
2718         (WebCore::LiveCSSRuleList::length):
2719         (WebCore::LiveCSSRuleList::item):
2720         (WebCore::LiveCSSRuleList::styleSheet):
2721         
2722             Concrete implemenation for live list backed by the underlying container rule.
2723             LiveCSSRuleList is owned by the underlying rule. Refcount is forwarded. 
2724         
2725         * css/CSSStyleSelector.cpp:
2726         (WebCore::CSSStyleSelector::sortAndTransferMatchedRules):
2727         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2728         * css/CSSStyleSelector.h:
2729         (CSSStyleSelector):
2730         * css/CSSStyleSheet.cpp:
2731         
2732             The same scheme for CSSStyleSheet.cssRule as with container rules.
2733         
2734         (StyleSheetCSSRuleList):
2735         (WebCore::StyleSheetCSSRuleList::StyleSheetCSSRuleList):
2736         (WebCore::StyleSheetCSSRuleList::ref):
2737         (WebCore::StyleSheetCSSRuleList::deref):
2738         (WebCore::StyleSheetCSSRuleList::length):
2739         (WebCore::StyleSheetCSSRuleList::item):
2740         (WebCore::StyleSheetCSSRuleList::styleSheet):
2741         (WebCore):
2742         (WebCore::CSSStyleSheet::rules):
2743         (WebCore::CSSStyleSheet::cssRules):
2744         * css/CSSStyleSheet.h:
2745         (CSSStyleSheet):
2746         * css/WebKitCSSKeyframesRule.cpp:
2747         (WebCore::WebKitCSSKeyframesRule::WebKitCSSKeyframesRule):
2748         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
2749         (WebCore):
2750         (WebCore::WebKitCSSKeyframesRule::append):
2751         (WebCore::WebKitCSSKeyframesRule::deleteRule):
2752         (WebCore::WebKitCSSKeyframesRule::findRule):
2753         (WebCore::WebKitCSSKeyframesRule::findRuleIndex):
2754         (WebCore::WebKitCSSKeyframesRule::cssText):
2755         (WebCore::WebKitCSSKeyframesRule::cssRules):
2756         * css/WebKitCSSKeyframesRule.h:
2757         (WebKitCSSKeyframesRule):
2758         (WebCore::WebKitCSSKeyframesRule::ruleCount):
2759         (WebCore::WebKitCSSKeyframesRule::ruleAt):
2760         (WebCore::WebKitCSSKeyframesRule::length):
2761         (WebCore::WebKitCSSKeyframesRule::item):
2762         * css/WebKitCSSRegionRule.cpp:
2763         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
2764         (WebCore::WebKitCSSRegionRule::~WebKitCSSRegionRule):
2765         (WebCore::WebKitCSSRegionRule::cssText):
2766         (WebCore::WebKitCSSRegionRule::cssRules):
2767         * css/WebKitCSSRegionRule.h:
2768         * inspector/InspectorStyleSheet.cpp:
2769         (WebCore::asCSSRuleList):
2770         (WebCore::InspectorStyleSheet::addRule):
2771         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2772
2773 2012-03-25  Kentaro Hara  <haraken@chromium.org>
2774
2775         Remove duplicated GenerateConditionalString() from code generators
2776         https://bugs.webkit.org/show_bug.cgi?id=82148
2777
2778         Reviewed by Adam Barth.
2779
2780         Previously GenerateConditionalString()s were defined in each code generator,
2781         and they were doing the same thing. This patch puts GenerateConditionalString()
2782         in CodeGenerator.pm and removes duplicated GenerateConditionalString()s.
2783
2784         No tests. No change in the generated code.
2785
2786         * bindings/scripts/CodeGenerator.pm:
2787         (GenerateConditionalString):
2788         * bindings/scripts/CodeGeneratorCPP.pm:
2789         (GenerateHeader):
2790         (GenerateImplementation):
2791         * bindings/scripts/CodeGeneratorGObject.pm:
2792         (GenerateProperty):
2793         (GenerateProperties):
2794         (GenerateFunction):
2795         (WriteData):
2796         * bindings/scripts/CodeGeneratorJS.pm:
2797         (GenerateHeaderContentHeader):
2798         (GenerateImplementationContentHeader):
2799         (GenerateHeader):
2800         (GenerateImplementation):
2801         (GenerateCallbackHeader):
2802         (GenerateCallbackImplementation):
2803         * bindings/scripts/CodeGeneratorObjC.pm:
2804         (GenerateHeader):
2805         (GenerateImplementation):
2806         * bindings/scripts/CodeGeneratorV8.pm:
2807         (GenerateHeader):
2808         (GenerateNormalAttrGetter):
2809         (GenerateNormalAttrSetter):
2810         (GenerateOverloadedFunctionCallback):
2811         (GenerateFunctionCallback):
2812         (GenerateBatchedAttributeData):
2813         (GenerateImplementation):
2814         (GenerateHeaderContentHeader):
2815         (GenerateImplementationContentHeader):
2816         (GenerateCallbackHeader):
2817         (GenerateCallbackImplementation):
2818
2819 2012-03-25  Kentaro Hara  <haraken@chromium.org>
2820
2821         Move DOMWindowSQLDatabase.* to DOMWindowWebDatabase.*, and move WorkerContextSQLDatabase.* to WorkerContextWebDatabase.*
2822         https://bugs.webkit.org/show_bug.cgi?id=82146
2823
2824         Reviewed by Adam Barth.
2825
2826         Now SQLDatabase is renamed to WebDatabase (See Modules/webdatabase/).
2827         We should move DOMWindowSQLDatabase.* to DOMWindowWebDatabase.*,
2828         and move WorkerContextSQLDatabase.* to WorkerContextWebDatabase.*.
2829         We'll rename the SQL_DATABASE flag to the WEB_DATABASE flag in a follow-up patch.
2830
2831         No tests. No change in behavior.
2832
2833         * Modules/webdatabase/DOMWindowWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.cpp.
2834         (WebCore):
2835         (WebCore::DOMWindowWebDatabase::openDatabase):
2836         * Modules/webdatabase/DOMWindowWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.h.
2837         (WebCore):
2838         (DOMWindowWebDatabase):
2839         (WebCore::DOMWindowWebDatabase::DOMWindowWebDatabase):
2840         (WebCore::DOMWindowWebDatabase::~DOMWindowWebDatabase):
2841         * Modules/webdatabase/DOMWindowWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.idl.
2842         * Modules/webdatabase/WorkerContextWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.cpp.
2843         (WebCore):
2844         (WebCore::WorkerContextWebDatabase::openDatabase):
2845         (WebCore::WorkerContextWebDatabase::openDatabaseSync):
2846         * Modules/webdatabase/WorkerContextWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.h.
2847         (WebCore):
2848         (WorkerContextWebDatabase):
2849         (WebCore::WorkerContextWebDatabase::WorkerContextWebDatabase):
2850         (WebCore::WorkerContextWebDatabase::~WorkerContextWebDatabase):
2851         * Modules/webdatabase/WorkerContextWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.idl.
2852
2853         * DerivedSources.make:
2854         * DerivedSources.pri:
2855         * GNUmakefile.list.am:
2856         * Target.pri:
2857         * WebCore.gypi:
2858         * WebCore.vcproj/WebCore.vcproj:
2859         * WebCore.xcodeproj/project.pbxproj:
2860
2861 2012-03-25  Philip Rogers  <pdr@google.com>
2862
2863         Avoid race condition when iterating over pending resources
2864         https://bugs.webkit.org/show_bug.cgi?id=82115
2865
2866         Reviewed by Nikolas Zimmermann.
2867
2868         We can hit a race condition in SVGStyledElement::buildPendingResourcesIfNeeded
2869         where pending elements can become non-pending while we iterate over them.
2870
2871         This patch cleans up buildPendingResourcesIfNeeded and re-works how pending
2872         resources are removed. Because pending resources can be modified while
2873         iterating over them, we introduce m_pendingResourcesForRemoval that
2874         holds pending resources that are marked for removal. Instead of iterating
2875         over this list we simply remove each pending resource from
2876         m_pendingResourcesForRemoval; if a pending resource is modified or removed
2877         during the processing of another pending resource this list is updated before
2878         the next element can be accessed.
2879
2880         This change also removes removePendingResourceForElement which is no longer
2881         referenced.
2882
2883         Test: http/tests/svg/change-id-with-pending-resources.html
2884
2885         * svg/SVGDocumentExtensions.cpp:
2886         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
2887         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
2888         (WebCore::SVGDocumentExtensions::removePendingResourceForRemoval):
2889         (WebCore):
2890         (WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval):
2891         (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
2892         * svg/SVGDocumentExtensions.h:
2893         (SVGDocumentExtensions):
2894         * svg/SVGStyledElement.cpp:
2895         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
2896
2897 2012-03-25  Arvid Nilsson  <anilsson@rim.com>
2898
2899         [BlackBerry] Accelerated compositing layers fail to render when using WebPageCompositor
2900         https://bugs.webkit.org/show_bug.cgi?id=82104
2901         RIM PR: 145963
2902
2903         Reviewed by Rob Buis.
2904
2905         The embedder may use vertex buffers, which affected the interpretation
2906         our vertex array pointers from memory pointers to offsets into a vertex
2907         buffer. The resulting geometry often resulted in no visible layers on
2908         screen.
2909
2910         Fixed by getting rid of any bound buffer when we enter
2911         LayerRenderer::drawLayers().
2912
2913         * platform/graphics/blackberry/LayerRenderer.cpp:
2914         (WebCore::LayerRenderer::drawLayers):
2915
2916 2012-03-24  Nat Duca  <nduca@chromium.org>
2917
2918         [chromium] Instrument gesture animations with async traces
2919         https://bugs.webkit.org/show_bug.cgi?id=82076
2920
2921         Reviewed by Adrienne Walker.
2922
2923         * platform/ActivePlatformGestureAnimation.cpp:
2924         (WebCore::ActivePlatformGestureAnimation::~ActivePlatformGestureAnimation):
2925         (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
2926         * platform/PlatformGestureCurve.h:
2927         (PlatformGestureCurve):
2928         * platform/TouchpadFlingPlatformGestureCurve.h:
2929         (WebCore::TouchpadFlingPlatformGestureCurve::debugName):
2930         * platform/WheelFlingPlatformGestureCurve.h:
2931         (WebCore::WheelFlingPlatformGestureCurve::debugName):
2932         * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp:
2933         (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):
2934         (WebCore::CCActiveGestureAnimation::~CCActiveGestureAnimation):
2935         * platform/graphics/chromium/cc/CCGestureCurve.h:
2936         (CCGestureCurve):
2937
2938 2012-03-24  Jeffrey Pfau  <jpfau@apple.com>
2939
2940         XML error document creation should not fire mutation events
2941         https://bugs.webkit.org/show_bug.cgi?id=80765
2942
2943         Reviewed by Adam Barth.
2944
2945         Broke two tests that expected the old behavior, which have now been updated.
2946
2947         * xml/XMLErrors.cpp:
2948         (WebCore::createXHTMLParserErrorHeader):
2949         (WebCore::XMLErrors::insertErrorMessageBlock):
2950
2951 2012-03-24  Florin Malita  <fmalita@google.com>
2952
2953         ForeignObject content is zoomed two times
2954         https://bugs.webkit.org/show_bug.cgi?id=76282
2955
2956         Reviewed by Nikolas Zimmermann.
2957
2958         Test: svg/zoom/page/zoom-foreign-content.svg
2959
2960         Reset the effective zoom property for FO-nested content to avoid
2961         having the zoom factor applied multiple times (zooming is handled by
2962         the top level SVG root element).
2963
2964         * css/CSSStyleSelector.cpp:
2965         (WebCore::CSSStyleSelector::adjustRenderStyle):
2966
2967 2012-03-24  Chris Fleizach  <cfleizach@apple.com>
2968
2969         AX: Support solution to handle invalid ax text marker
2970         https://bugs.webkit.org/show_bug.cgi?id=82023
2971
2972         Reviewed by Oliver Hunt.
2973
2974         This provides methods to better use text markers so that assistive technologies
2975         can know when they are valid, and can convert them to and from absolute positions.
2976
2977         Test: platform/mac/accessibility/textmarker-routines.html
2978
2979         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
2980         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
2981         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
2982         (-[WebAccessibilityObjectWrapper _indexForTextMarker:]):
2983         (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
2984         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2985
2986 2012-03-24  Victor Carbune  <vcarbune@adobe.com>
2987
2988         Quick fix for rendering controls regression.
2989         https://bugs.webkit.org/show_bug.cgi?id=82125
2990
2991         Reviewed by Eric Carlson.
2992
2993         Only temporary fix. Tests to cover the problem should be added
2994
2995         * html/shadow/MediaControlElements.cpp:
2996         (WebCore::MediaControlPanelElement::makeOpaque): The display:none
2997         property should be toggled only by the media element now.
2998         (WebCore::MediaControlPanelElement::makeTransparent): The timer
2999         that toggles the dispalay:none shouldn't be used now.
3000
3001 2012-03-24  Kevin Ollivier  <kevino@theolliviers.com>
3002
3003         [wx] Unreviewed. Add header needed for compilation.
3004
3005         * html/shadow/TextFieldDecorationElement.cpp:
3006
3007 2012-03-24  Abhishek Arya  <inferno@chromium.org>
3008
3009         Crash in ApplyStyleCommand::applyInlineStyleToNodeRange.
3010         https://bugs.webkit.org/show_bug.cgi?id=81959
3011
3012         Reviewed by Ryosuke Niwa.
3013
3014         Test: editing/execCommand/apply-style-command-crash.html
3015
3016         * editing/ApplyStyleCommand.cpp:
3017         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): RefPtr the weak
3018         node iterator |node|.
3019         * editing/ApplyStyleCommand.h:
3020         (ApplyStyleCommand): convert |startNode| and |pastEndNode| into PassRefPtr.
3021
3022 2012-03-24  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3023
3024         Unreviewed, build fix since we use "-Werror=unused-but-set-variable".
3025
3026         The variable 'it' was set at TextureMapperShaderManager.h:110 but never used.
3027
3028         * platform/graphics/texmap/TextureMapperShaderManager.h:
3029         (WebCore::TextureMapperShaderManager::getShaderProgram):
3030
3031 2012-03-24  Zeno Albisser  <zeno@webkit.org>
3032
3033         [Qt][WK2] Make TextureMapperShaderManager::getShaderProgram() not be a template.
3034         https://bugs.webkit.org/show_bug.cgi?id=82049
3035
3036         Change the getShaderProgram() function to not be a template.
3037         This is a workaround for a compiler bug that leads to an assert
3038         when compiling in debug mode on mac.
3039
3040         Reviewed by Noam Rosenthal.
3041
3042         * platform/graphics/texmap/TextureMapperGL.cpp:
3043         (WebCore::TextureMapperGL::drawTexture):
3044         (WebCore::TextureMapperGL::beginClip):
3045         * platform/graphics/texmap/TextureMapperShaderManager.h:
3046         (TextureMapperShaderProgram):
3047         (WebCore::TextureMapperShaderManager::getShaderProgram):
3048         (TextureMapperShaderManager):
3049
3050 2012-03-23  Shawn Singh  <shawnsingh@chromium.org>
3051
3052         [chromium] Incorrect replica originTransform used in CCDamageTracker
3053         https://bugs.webkit.org/show_bug.cgi?id=82118
3054
3055         Reviewed by Adrienne Walker.
3056
3057         Unit test added to CCDamageTrackerTest.cpp
3058
3059         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
3060         (WebCore::CCDamageTracker::extendDamageForRenderSurface):
3061
3062 2012-03-23  Dana Jansens  <danakj@chromium.org>
3063
3064         [chromium] When prepainting fails, tiles dirty rects may be cleared
3065         https://bugs.webkit.org/show_bug.cgi?id=82107
3066
3067         Reviewed by Adrienne Walker.
3068
3069         When prepainting, if a tile is unable to be reserved due to memory
3070         limits, we bail out of prepareToUpdateTiles. But we would have
3071         cleared the dirty rect of any previous tiles. This leaves them
3072         in a bad state where their textures are reserved, but their textureIds
3073         are set to 0, and they are not marked dirty. This means that they will
3074         not be updated and displayed if they become visible, since it is
3075         assumed that valid textures with zero textureId must have a dirty
3076         region.
3077
3078         We fix this by not clearing the dirty rects until we know we are
3079         going to update the layer.
3080
3081         Unit test: TiledLayerChromiumTest.pushTilesAfterIdlePaintFailed
3082
3083         * platform/graphics/chromium/TiledLayerChromium.cpp:
3084         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
3085         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3086         (WebCore::CCTiledLayerImpl::hasTextureIdForTileAt):
3087         (WebCore):
3088         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3089         (CCTiledLayerImpl):
3090
3091 2012-03-23  Stephanie Lewis  <slewis@apple.com>
3092
3093         https://bugs.webkit.org/show_bug.cgi?id=81963 WebProcess can get stuck in GC during many low memory signals.
3094         <rdar://problem/11094830> WebProcess appears to get stuck in its GC handler (81963).
3095         Remove the call to garbage collect  in low memory signal handler.  Did some testing with hitting the low memory handler
3096         during Membuster and we would get back at most 100k - 200k.  That isn't enough to help the system, and in 
3097         that state the GC collection can take a substantial amount of time.
3098
3099         Reviewed by Geoff Garen.
3100
3101         Performance Change, no change in behavior.
3102
3103         * platform/mac/MemoryPressureHandlerMac.mm:
3104         (WebCore::MemoryPressureHandler::releaseMemory):
3105
3106 2012-03-23  W. James MacLean  <wjmaclean@chromium.org>
3107
3108         [chromium] CCLayerTreeHostImpl::scrollBegin() should return ScrollFailed for CCInputHandlerClient::Gesture type when wheel handlers found.
3109         https://bugs.webkit.org/show_bug.cgi?id=82106
3110
3111         Reviewed by Adrienne Walker.
3112
3113         Existing unit tests updated.
3114
3115         With gesture scroll events now being handled as mouse wheel events, we should not start a gesture scroll when
3116         wheel handlers are present.
3117
3118         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3119         (WebCore::CCLayerTreeHostImpl::scrollBegin):
3120
3121 2012-03-23  Adam Barth  <abarth@webkit.org>
3122
3123         Move Notifications APIs from WorkerContext.idl to WorkerContextNotifications.idl
3124         https://bugs.webkit.org/show_bug.cgi?id=79635
3125
3126         Reviewed by Kentaro Hara.
3127
3128         This patch moves the NotificationCenter from WorkerContext to
3129         WorkerContextNotificiations, reducing clutter in WorkerContext.  After
3130         this patch, Notifications are almost entirely contained in the
3131         notifications directory.
3132
3133         * CMakeLists.txt:
3134         * DerivedSources.make:
3135         * DerivedSources.pri:
3136         * GNUmakefile.list.am:
3137         * Target.pri:
3138         * WebCore.gypi:
3139         * WebCore.vcproj/WebCore.vcproj:
3140         * WebCore.xcodeproj/project.pbxproj:
3141         * workers/WorkerContext.cpp:
3142         (WebCore::WorkerContext::~WorkerContext):
3143         * workers/WorkerContext.h:
3144         (WebCore):
3145         (WorkerContext):
3146         * workers/WorkerContext.idl:
3147
3148 2012-03-23  Michal Mocny  <mmocny@google.com>
3149
3150         [chromium] RootLayer was not being checked for null causing segfaults very rarely.
3151         https://bugs.webkit.org/show_bug.cgi?id=82111
3152
3153         Reviewed by Adrienne Walker.
3154
3155         * platform/graphics/chromium/LayerRendererChromium.cpp:
3156         (WebCore::LayerRendererChromium::beginDrawingFrame):
3157         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3158         (WebCore::CCLayerTreeHostImpl::drawLayers):
3159
3160 2012-03-23  Shawn Singh  <shawnsingh@chromium.org>
3161
3162         [chromium] Fix race bug that clobbers CCLayerImpl updateRect
3163         https://bugs.webkit.org/show_bug.cgi?id=82109
3164
3165         Reviewed by Dirk Pranke.
3166
3167         If the main thread commits twice before the impl thread actually
3168         draws, then the updateRect of the first frame gets lost forever,
3169         and not propagated to the damage tracker.
3170
3171         The solution is to accumulate the updateRect. The CCLayerImpl
3172         updateRect is already being correctly cleared at the appropriate
3173         time after drawing.
3174
3175         Unit test added to LayerChromiumTest.cpp.
3176
3177         * platform/graphics/chromium/LayerChromium.cpp:
3178         (WebCore::LayerChromium::pushPropertiesTo):
3179
3180 2012-03-23  Rafael Weinstein  <rafaelw@chromium.org>
3181
3182         [MutationObservers] attributeFilter should be case sensitive at all times
3183         https://bugs.webkit.org/show_bug.cgi?id=81822
3184
3185         Reviewed by Ryosuke Niwa.
3186
3187         This removes the behavior in MutationObserverRegistration which treats
3188         attributeFilter as case insensitive for HTML elements in HTML documents.
3189
3190         Relevant tests have been updated.
3191
3192         * dom/MutationObserverRegistration.cpp:
3193         (WebCore::MutationObserverRegistration::resetObservation):
3194         (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom):
3195         * dom/MutationObserverRegistration.h:
3196         (MutationObserverRegistration):
3197
3198 2012-03-23  Kentaro Hara  <haraken@chromium.org>
3199
3200         Move WebSocket APIs from WorkerContext.idl to WorkerContextWebSocket.idl
3201         https://bugs.webkit.org/show_bug.cgi?id=79663
3202
3203         Reviewed by Adam Barth.
3204
3205         For WebKit modularization, this patch moves WebSocket APIs from WorkerContext.idl
3206         to WorkerContextWebSocket.idl.
3207
3208         Tests: http/tests/websocket/tests/hybi/workers/* (No change in test results)
3209
3210         * CMakeLists.txt:
3211         * DerivedSources.make:
3212         * DerivedSources.pri:
3213         * GNUmakefile.list.am:
3214         * Modules/websockets/WorkerContextWebSocket.idl: Added.
3215         * WebCore.gypi:
3216         * WebCore.xcodeproj/project.xcodeproj:
3217         * workers/WorkerContext.idl:
3218
3219 2012-03-23  Parag Radke  <parag@motorola.com>
3220
3221         REGRESSION: can select text of an input button
3222         https://bugs.webkit.org/show_bug.cgi?id=13624
3223
3224         Reviewed by Ryosuke Niwa.
3225
3226         Text in a button should never have a selection background of its own painted
3227         but if the button is inside an editable area, then the whole button should
3228         have it's selection background painted.
3229
3230         Test: editing/selection/selection-button-text.html
3231
3232         * rendering/RenderButton.h:
3233         Added implementation for the virtual function canBeSelectionLeaf()
3234         which returns true if the button renderer is editable, false other wise.
3235         * rendering/RenderTextFragment.h:
3236         Added implementation for the virtual function canBeSelectionLeaf()
3237         which returns true if the text fragment renderer is editable, false other wise.
3238
3239 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
3240
3241         Remove unnecessary ASSERT from LoadableTextTrack::trackElementIndex
3242         https://bugs.webkit.org/show_bug.cgi?id=82095
3243
3244         Reviewed by Dan Bernstein.
3245
3246         No new tests, removed a bogus ASSERT that was sometimes triggered by tests.
3247
3248         * html/track/LoadableTextTrack.cpp:
3249         (WebCore::LoadableTextTrack::trackElementIndex): Remove ASSERT.
3250
3251 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
3252
3253         Layout Test media/video-source-load.html is failing
3254         https://bugs.webkit.org/show_bug.cgi?id=82094
3255
3256         Reviewed by Alexey Proskuryakov.
3257
3258         No new tests, tested by media/video-source-load.html.
3259
3260         * html/HTMLMediaElement.cpp:
3261         (WebCore::HTMLMediaElement::sourceWasAdded): Set m_nextChildNodeToConsider when called 
3262             with networkState == NETWORK_EMPTY because the resource selection algorithm has
3263             not started yet.
3264
3265 2012-03-23  Alexey Proskuryakov  <ap@apple.com>
3266
3267         [Mac] No need for platform-specific ENABLE_BLOB values
3268         https://bugs.webkit.org/show_bug.cgi?id=82102
3269
3270         Reviewed by David Kilzer.
3271
3272         * Configurations/FeatureDefines.xcconfig:
3273
3274 2012-03-23  Kent Tamura  <tkent@chromium.org>
3275
3276         Add TextFieldDecorator and TextFieldDecorationElement
3277         https://bugs.webkit.org/show_bug.cgi?id=80580
3278
3279         Reviewed by Dimitri Glazkov.
3280
3281         These classes will be used to add a decoration icon to a text field
3282         <input> from outside of WebCore. We have a plan to use them in Chromium
3283         port. So this patch doesn't add TextFieldDecorationElement.{cpp,h} to
3284         non-Chromium build files.
3285
3286         How it works:
3287         When a shadow subtree for a text field is created, we ask ChromeClient
3288         to decorate it. ChromeClient appends a TextFieldDecorationElement to the
3289         existing shadow subtree or another shadow tree. A TextFieldDecorator is
3290         associated to a TextFieldDecorationElement, and it provides decoration
3291         icon images and a click handler.
3292
3293         No new tests. This patch won't make any behavior change for now.
3294
3295         * WebCore.gypi: Add TextFieldDecorationElement.cpp and TextFieldDecorationElement.h
3296         * dom/Element.h:
3297         (WebCore::Element::isTextFieldDecoration):
3298         * html/TextFieldInputType.cpp:
3299         (WebCore::TextFieldInputType::createShadowSubtree):
3300         Calls ChromeClient::willAddTextFieldDecorationsTo() and addTextFieldDecorationsTo().
3301         * html/shadow/TextFieldDecorationElement.cpp: Added.
3302         (WebCore::TextFieldDecorator::~TextFieldDecorator):
3303         (WebCore::TextFieldDecorationElement::TextFieldDecorationElement):
3304         (WebCore::TextFieldDecorationElement::create):
3305         (WebCore::TextFieldDecorationElement::isTextFieldDecoration):
3306         (WebCore::TextFieldDecorationElement::updateImage):
3307         (WebCore::TextFieldDecorationElement::customStyleForRenderer):
3308         Sets the size to a square of the font-size.
3309         (WebCore::TextFieldDecorationElement::createRenderer):
3310         Always creates a RenderImage.
3311         (WebCore::TextFieldDecorationElement::attach):
3312         Sets an image for appropriate state.
3313         (WebCore::TextFieldDecorationElement::isMouseFocusable):
3314         (WebCore::TextFieldDecorationElement::defaultEventHandler):
3315         Delegate a click event to the corresponding function of TextFieldDecorator.
3316         * html/shadow/TextFieldDecorationElement.h: Added.
3317         (TextFieldDecorator): Added.
3318         (TextFieldDecorationElement): Added.
3319         (WebCore::toTextFieldDecorationElement): Added.
3320         * page/ChromeClient.h:
3321         (WebCore::ChromeClient::willAddTextFieldDecorationsTo): Add an empty implementation.
3322         (WebCore::ChromeClient::addTextFieldDecorationsTo): ditto.
3323
3324 2012-03-23  Adam Klein  <adamk@chromium.org>
3325
3326         Match DOM4 spec with respect to DocumentFragment insertion
3327         https://bugs.webkit.org/show_bug.cgi?id=82089
3328
3329         Reviewed by Ryosuke Niwa.
3330
3331         DOM4 specifies the behavior of appendChild, insertBefore, and replaceChild
3332         in terms of "mutation algorithms":
3333
3334         http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#mutation-algorithms
3335
3336         This change updates WebKit to match, in particular with regard to DocumentFragments.
3337         Previously, ContainerNode would remove nodes one at a time, then add them to the new parent.
3338         When combined with MutationObservers, this results in overly-verbose mutation records.
3339         Now we create as few records as possible, matching the spec as well as Gecko's implementation
3340         of MutationObservers.
3341
3342         Note that we still need to check validity each time through the loop,
3343         since inserting a node may dispatch events. In a future change, I hope
3344         to move these events so that they fire only after all nodes are inserted,
3345         but that's too much to tackle all in one.
3346
3347         Tests: fast/mutation/document-fragment-insertion.html
3348
3349         * dom/ContainerNode.cpp:
3350         (WebCore::collectChildrenAndRemoveFromOldParent): New helper method
3351         combining collectTargetNodes() with the removal of the collected nodes from
3352         their old parent, if any.
3353         (WebCore::ContainerNode::insertBefore): Use new helper method instead
3354         of removing nodes one at a time from the fragment.
3355         (WebCore::ContainerNode::replaceChild): ditto. Also removed some redundant asserts
3356         and moved the "do nothing" check out of the loop.
3357         (WebCore::ContainerNode::appendChild): Use new helper method.
3358
3359 2012-03-23  Stephen White  <senorblanco@chromium.org>
3360
3361         [skia] Switch to Skia's implementation of the feMorphology filter.
3362         https://bugs.webkit.org/show_bug.cgi?id=82085
3363
3364         Reviewed by Dirk Schulze.
3365
3366         Covered by existing tests in svg/filters/.
3367
3368         * WebCore.gypi:
3369         * platform/graphics/filters/FEMorphology.h:
3370         (FEMorphology):
3371         * platform/graphics/filters/skia/FEMorphologySkia.cpp: Added.
3372         (WebCore):
3373         (WebCore::FEMorphology::platformApplySkia):
3374
3375 2012-03-23  Adam Barth  <abarth@webkit.org>
3376
3377         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 3)
3378         https://bugs.webkit.org/show_bug.cgi?id=82027
3379
3380         Reviewed by Kentaro Hara.
3381
3382         Rather than watching for willDetachPage, NotificationCenter can just
3383         override ActiveDOMObject::stop directly to be notified when it needs to
3384         stop.
3385
3386         Switching NotificationCenter over to using ActiveDOMObject callbacks
3387         frees DOMWindowNotification to implement reconnectFrame.  However, this
3388         is only really a victory in princple because NotificationCenter always
3389         returns false for canSuspend(), which means we'll never actually use
3390         the reconnectFrame functionality.  However, this patch does move us
3391         closer to the time when NotificationCenter can implement
3392         ActiveDOMObject::suspend/resume to play nice with the PageCache.
3393
3394         * notifications/DOMWindowNotifications.cpp:
3395         (WebCore::DOMWindowNotifications::disconnectFrame):
3396         (WebCore::DOMWindowNotifications::reconnectFrame):
3397         * notifications/DOMWindowNotifications.h:
3398         (DOMWindowNotifications):
3399         * notifications/NotificationCenter.cpp:
3400         (WebCore::NotificationCenter::NotificationCenter):
3401         (WebCore::NotificationCenter::stop):
3402         * notifications/NotificationCenter.h:
3403         (NotificationCenter):
3404
3405 2012-03-23  Daniel Cheng  <dcheng@chromium.org>
3406
3407         [chromium] Support file drag out using DataTransferItemList::add(File)
3408         https://bugs.webkit.org/show_bug.cgi?id=81261
3409
3410         Reviewed by Tony Chang.
3411
3412         Original patch by Varun Jain <varunjain@chromium.org>.
3413         I've updated the original patch to remove 'downloadurl' handling since it's not tested, nor
3414         is it necessary for File objects, since File objects correspond to a native filesystem path.
3415
3416         Test: fast/events/drag-dataTransferItemList-file-handling.html
3417
3418         * platform/chromium/DataTransferItemListChromium.cpp:
3419         (WebCore::DataTransferItemListChromium::add):
3420
3421 2012-03-23  Zan Dobersek  <zandobersek@gmail.com>
3422
3423         [GObject bindings] Supplemental interfaces are not disabled with the "Conditional" attribute
3424         https://bugs.webkit.org/show_bug.cgi?id=80030
3425
3426         Reviewed by Martin Robinson.
3427
3428         Changes in CodeGeneratorGObject.pm:
3429         - group implementation of private helpers and guard them inside
3430         an ifdef if a root conditional attribute is present.
3431         - always define the type of a GObject binding, even if the root
3432         conditional feature is not enabled
3433         - the methods are generated as well, but are simply stubs if the
3434         feature is not enabled, throwing a warning upon interaction.
3435         - if the method itself is guarded by a conditional attribute,
3436         the stub implementation gains one more level of depth, throwing
3437         a warning if the method's conditional feature is not enabled
3438         but the root conditional feature is.
3439         - small style fixes in random places.
3440
3441         Also changed are GObject baselines for binding tests.
3442
3443         No new tests - no new testable functionality.
3444
3445         * bindings/gobject/GNUmakefile.am:
3446         * bindings/scripts/CodeGeneratorGObject.pm:
3447         (HumanReadableConditional):