Crash due to floats not cleared before starting SVG <text> layout.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-04-09  Abhishek Arya  <inferno@chromium.org>
2
3         Crash due to floats not cleared before starting SVG <text> layout.
4         https://bugs.webkit.org/show_bug.cgi?id=83021
5
6         Reviewed by Dirk Schulze.
7
8         Manual Test - ManualTests/svg-text-float-not-removed-crash.html.
9         Can't reproduce the failure in DRT.
10
11         forceLayoutInlineChildren is used in SVG <text> layout and overrides
12         RenderBlock::layoutBlock. However, it missed the 'clearFloats' step,
13         which will cause a crash when trying to access removed renderers.
14
15         * rendering/RenderBlock.h:
16         (WebCore::RenderBlock::forceLayoutInlineChildren):
17
18 2012-04-09  Jeffrey Pfau  <jpfau@apple.com>
19
20         Filter files from dataTransfer.getData on Mac
21         https://bugs.webkit.org/show_bug.cgi?id=38876
22
23         Reviewed by Enrica Casucci.
24
25         The ClipboardMac class now keeps track of whether it was created for copy and paste, dragging and dropping
26         files or dragging and dropping generic data. This enables the class to block calls to set-/getData when the
27         clipboard is not operating on generic data, and vice-versa.
28
29         Test: fast/events/drop-with-file-paths.html
30
31         * editing/mac/EditorMac.mm:
32         (WebCore::Editor::newGeneralClipboard):
33         * page/mac/EventHandlerMac.mm:
34         (WebCore::EventHandler::createDraggingClipboard):
35         * platform/mac/ClipboardMac.h:
36         (WebCore::ClipboardMac::create):
37         (ClipboardMac):
38         * platform/mac/ClipboardMac.mm:
39         (WebCore::Clipboard::create):
40         (WebCore::ClipboardMac::ClipboardMac):
41         (WebCore::ClipboardMac::getData):
42         (WebCore::ClipboardMac::setData):
43         (WebCore::ClipboardMac::files):
44
45 2012-04-09  Sheriff Bot  <webkit.review.bot@gmail.com>
46
47         Unreviewed, rolling out r113561.
48         http://trac.webkit.org/changeset/113561
49         https://bugs.webkit.org/show_bug.cgi?id=83487
50
51         broke webkit_unit_tests (Requested by simonjam on #webkit).
52
53         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
54         (WebCore::transformSurfaceOpaqueRegion):
55         (WebCore::computeOcclusionBehindLayer):
56         (WebCore::::markOccludedBehindLayer):
57         (WebCore::testContentRectOccluded):
58         (WebCore::computeUnoccludedContentRect):
59
60 2012-04-09  Levi Weintraub  <leviw@chromium.org>
61
62         Correct LayoutUnit usage in style functions getRoundedBorderFor
63         https://bugs.webkit.org/show_bug.cgi?id=83154
64
65         Reviewed by Julien Chaffraix.
66
67         Correcting LayoutUnit usage in getRoundedBorderFor and the calcRadiiFor helper function.
68
69         No new tests. No change in behavior.
70
71         * rendering/style/RenderStyle.cpp:
72         (WebCore::calcRadiiFor): This is a static internal function that returns the radii based on a size.
73         It's only called from getRoundedBorderFor, so we're now pixel snapping the size before handing it
74         to this function.
75         (WebCore::RenderStyle::getRoundedBorderFor): Takes a LayoutRect and returns the pixel-snapped
76         resulting RoundedRect. Using a local IntRect to avoid snapping twice.
77
78 2012-04-06  Andrey Kosyakov  <caseq@chromium.org>
79
80         Web Inspector: zoom on vertical mousewheel in Timeline overview
81         https://bugs.webkit.org/show_bug.cgi?id=83379
82
83         Reviewed by Pavel Feldman.
84
85         - added support for zooming around mouse cursor upon mousewheel event;
86         - handle mousewheel event by _onMouseWheel, not scrollWindow, so we only zoom on events internal to overview.
87
88         * inspector/front-end/TimelineOverviewPane.js:
89         (WebInspector.TimelineOverviewWindow):
90         (WebInspector.TimelineOverviewWindow.prototype._endWindowSelectorDragging):
91         (WebInspector.TimelineOverviewWindow.prototype._onMouseWheel):
92         (WebInspector.TimelineOverviewWindow.prototype._zoom):
93
94 2012-04-09  Bill Budge  <bbudge@chromium.org>
95
96         Cross-origin preflight request should not include credentials.
97         https://bugs.webkit.org/show_bug.cgi?id=37676
98
99         Modifies createAccessControlPreflightRequest so it never allows credentials.
100
101         Reviewed by Adam Barth.
102
103         http/tests/xmlhttprequest/access-control-preflight-credential-sync.html
104         http/tests/xmlhttprequest/access-control-preflight-credential-async.html 
105
106         * loader/CrossOriginAccessControl.cpp:
107         (WebCore::createAccessControlPreflightRequest):
108         * loader/CrossOriginAccessControl.h:
109         (WebCore):
110         * loader/DocumentThreadableLoader.cpp:
111         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
112
113 2012-04-09  Antti Koivisto  <antti@apple.com>
114
115         Don't expose internal CSSValues in API
116         https://bugs.webkit.org/show_bug.cgi?id=83426
117         
118         Reviewed by Andreas Kling.
119
120         The CSSValues returned from functions like CSSStyleDeclaration.getPropertyCSSValue() are currently
121         the same instances we use internally. This creates various problems. The values can't be shared between 
122         documents as the wrappers would be shared too. Having to maintain per-document CSSValuePools complicate 
123         the architecture and increase memory usage. This also blocks sharing style sheet data structures 
124         between documents.
125         
126         This patch adds a concept of CSSOM-safe CSSValue. Only the safe values can be wrapped for JS access. 
127         Values are unsafe by default. The CSSOM functions that return CSSValues create safe instances by
128         cloning the internal values.
129         
130         The use of APIs that return CSSValues is very rare (the currect CSSOM draft deprecates them) and
131         cloning is cheap in any case. Future patches will eliminate the per-document value pool in favor
132         of a global one for a memory win.
133         
134         In the future we want to replace internally used CSSValues with true internal types (StyleValues) and
135         use CSSValues exclusively as wrappers (similar to how CSSStyleRule wraps internal StyleRule).
136
137         * bindings/js/JSCSSValueCustom.cpp:
138         (WebCore::toJS):
139         * css/CSSComputedStyleDeclaration.cpp:
140         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
141         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValueInternal):
142         * css/CSSImageSetValue.cpp:
143         (WebCore::CSSImageSetValue::CSSImageSetValue):
144         (WebCore):
145         (WebCore::CSSImageSetValue::cloneForCSSOM):
146         * css/CSSImageSetValue.h:
147         (CSSImageSetValue):
148         * css/CSSPrimitiveValue.cpp:
149         (WebCore::CSSPrimitiveValue::cleanup):
150         
151             Opportunistically fix a string leak for CSS_COUNTER_NAME values.
152             Add all cases, remove default.
153         
154         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
155         (WebCore):
156         * css/CSSPrimitiveValue.h:
157         (CSSPrimitiveValue):
158         (WebCore::CSSPrimitiveValue::setCSSOMSafe):
159         * css/CSSValue.cpp:
160         (WebCore):
161         (TextCloneCSSValue):
162         (WebCore::TextCloneCSSValue::create):
163         (WebCore::TextCloneCSSValue::cssText):
164         (WebCore::TextCloneCSSValue::TextCloneCSSValue):
165         
166             Most non-primitive value types are not exposed in CSSOM. For those we create a dummy value
167             that contains only the data that is accessible though the base CSSValue interface.
168         
169         (WebCore::CSSValue::addSubresourceStyleURLs):
170         (WebCore::CSSValue::cssText):
171         (WebCore::CSSValue::destroy):
172         (WebCore::CSSValue::cloneForCSSOM):
173         * css/CSSValue.h:
174         (WebCore):
175         (CSSValue):
176         (WebCore::CSSValue::isCSSOMSafe):
177         (WebCore::CSSValue::isSubtypeExposedToCSSOM):
178         (WebCore::CSSValue::CSSValue):
179         * css/CSSValueList.cpp:
180         (WebCore::CSSValueList::CSSValueList):
181         (WebCore):
182         (WebCore::CSSValueList::cloneForCSSOM):
183         * css/CSSValueList.h:
184         (CSSValueList):
185         * css/Counter.h:
186         (Counter):
187         (WebCore::Counter::cloneForCSSOM):
188         * css/PropertySetCSSStyleDeclaration.cpp:
189         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
190         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
191         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
192         (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
193         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
194         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
195         (WebCore::PropertySetCSSStyleDeclaration::didMutate):
196         (WebCore):
197         (WebCore::PropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM):
198         
199             Maintain a map of safe CSSValues so we can maintain object identity.
200         
201         * css/PropertySetCSSStyleDeclaration.h:
202         (WebCore::PropertySetCSSStyleDeclaration::setNeedsStyleRecalc):
203         (PropertySetCSSStyleDeclaration):
204         * css/RGBColor.cpp:
205         (WebCore::RGBColor::red):
206         (WebCore::RGBColor::green):
207         (WebCore::RGBColor::blue):
208         (WebCore::RGBColor::alpha):
209         * css/Rect.h:
210         (WebCore::RectBase::RectBase):
211         (RectBase):
212         (Rect):
213         (WebCore::Rect::cloneForCSSOM):
214         (WebCore::Rect::Rect):
215         (Quad):
216         (WebCore::Quad::cloneForCSSOM):
217         (WebCore::Quad::Quad):
218         * css/WebKitCSSFilterValue.cpp:
219         (WebCore::WebKitCSSFilterValue::WebKitCSSFilterValue):
220         (WebCore):
221         (WebCore::WebKitCSSFilterValue::cloneForCSSOM):
222         * css/WebKitCSSFilterValue.h:
223         (WebKitCSSFilterValue):
224         * css/WebKitCSSTransformValue.cpp:
225         (WebCore::WebKitCSSTransformValue::WebKitCSSTransformValue):
226         (WebCore):
227         (WebCore::WebKitCSSTransformValue::cloneForCSSOM):
228         * css/WebKitCSSTransformValue.h:
229         (WebKitCSSTransformValue):
230         * svg/SVGColor.cpp:
231         (WebCore::SVGColor::SVGColor):
232         (WebCore):
233         (WebCore::SVGColor::cloneForCSSOM):
234         * svg/SVGColor.h:
235         (SVGColor):
236         * svg/SVGPaint.cpp:
237         (WebCore::SVGPaint::SVGPaint):
238         (WebCore):
239         (WebCore::SVGPaint::cloneForCSSOM):
240         * svg/SVGPaint.h:
241         (SVGPaint):
242         * svg/SVGStyledElement.cpp:
243         (WebCore::SVGStyledElement::getPresentationAttribute):
244
245 2012-04-09  Pavel Feldman  <pfeldman@chromium.org>
246
247         Web Inspector: get rid of WebInspector.Resource.category, use  WebInspector.Resource.type instead.
248         https://bugs.webkit.org/show_bug.cgi?id=83467
249
250         Reviewed by Yury Semikhatsky.
251
252         WebInspector.Resource.category is derived from the  WebInspector.Resource.type and there is no real need it maintaining both.
253
254         * WebCore.gypi:
255         * WebCore.vcproj/WebCore.vcproj:
256         * inspector/compile-front-end.py:
257         * inspector/front-end/AuditLauncherView.js:
258         (WebInspector.AuditLauncherView.prototype._onResourceStarted):
259         (WebInspector.AuditLauncherView.prototype._onResourceFinished):
260         * inspector/front-end/AuditRules.js:
261         (WebInspector.AuditRules.GzipRule.prototype._shouldCompress):
262         (WebInspector.AuditRules.CombineJsResourcesRule):
263         (WebInspector.AuditRules.CombineCssResourcesRule):
264         (WebInspector.AuditRules.ParallelizeDownloadRule.prototype.doRun):
265         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback):
266         (WebInspector.AuditRules.CacheControlRule.prototype.isCompressible):
267         (WebInspector.AuditRules.StaticCookielessRule.prototype.processCookies):
268         * inspector/front-end/CSSStyleModel.js:
269         (WebInspector.CSSStyleModelResourceBinding):
270         (WebInspector.CSSStyleModelResourceBinding.prototype.setContent):
271         (WebInspector.CSSStyleModelResourceBinding.prototype._innerStyleSheetChanged):
272         * inspector/front-end/ContentProviders.js:
273         (WebInspector.ResourceContentProvider):
274         * inspector/front-end/DebuggerPresentationModel.js:
275         (WebInspector.DebuggerPresentationModelResourceBinding):
276         * inspector/front-end/ElementsPanel.js:
277         (WebInspector.ElementsPanel.prototype._getPopoverAnchor):
278         * inspector/front-end/ExtensionServer.js:
279         (WebInspector.ExtensionServer.prototype._makeResource):
280         * inspector/front-end/NetworkManager.js:
281         (WebInspector.NetworkManager.get this):
282         (WebInspector.NetworkManager.get NetworkAgent):
283         (WebInspector.NetworkManager):
284         (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
285         (WebInspector.NetworkDispatcher.prototype._mimeTypeIsConsistentWithType):
286         (WebInspector.NetworkDispatcher.prototype._updateResourceWithCachedResource):
287         (WebInspector.NetworkDispatcher.prototype.responseReceived):
288         (WebInspector.NetworkDispatcher.prototype.webSocketCreated):
289         * inspector/front-end/NetworkPanel.js:
290         (WebInspector.NetworkLogView.prototype._createFilterStatusBarItems):
291         (WebInspector.NetworkLogView.prototype._updateSummaryBar):
292         (WebInspector.NetworkDataGridNode.prototype.isFilteredOut):
293         (WebInspector.NetworkDataGridNode.prototype.refreshResource):
294         (WebInspector.NetworkDataGridNode.prototype._refreshNameCell):
295         (WebInspector.NetworkDataGridNode.prototype.refreshGraph):
296         * inspector/front-end/Resource.js:
297         (WebInspector.Resource):
298         (WebInspector.Resource.registerDomainModelBinding):
299         (WebInspector.Resource.prototype.set type):
300         (WebInspector.Resource.prototype.isEditable):
301         (WebInspector.Resource.prototype.setContent):
302         (WebInspector.Resource.prototype.requestContent):
303         * inspector/front-end/ResourceCategory.js: Removed.
304         * inspector/front-end/ResourcePreviewView.js:
305         (WebInspector.ResourcePreviewView.prototype._createPreviewView):
306         * inspector/front-end/ResourceScriptMapping.js:
307         (WebInspector.ResourceScriptMapping.prototype.addScript):
308         * inspector/front-end/ResourceTreeModel.js:
309         (WebInspector.ResourceTreeModel.prototype._onResourceUpdated):
310         (WebInspector.ResourceTreeModel.prototype._onResourceUpdateDropped):
311         (WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
312         * inspector/front-end/ResourceType.js: Added.
313         (WebInspector.ResourceType):
314         (WebInspector.ResourceType.prototype.name):
315         (WebInspector.ResourceType.prototype.title):
316         (WebInspector.ResourceType.prototype.categoryTitle):
317         (WebInspector.ResourceType.prototype.color):
318         (WebInspector.ResourceType.prototype.isTextType):
319         (WebInspector.ResourceType.prototype.toString):
320         * inspector/front-end/ResourceView.js:
321         (WebInspector.ResourceView.hasTextContent):
322         (WebInspector.ResourceView.nonSourceViewForResource):
323         (WebInspector.EditableResourceSourceFrame.prototype.canEditSource):
324         * inspector/front-end/ResourcesPanel.js:
325         (WebInspector.FrameTreeElement.prototype.appendResource):
326         (WebInspector.FrameResourceTreeElement):
327         (WebInspector.FrameResourceTreeElement.prototype.onattach):
328         (WebInspector.ResourceRevisionTreeElement):
329         * inspector/front-end/WebKit.qrc:
330         * inspector/front-end/inspector.html:
331
332 2012-04-09  Alexis Menard  <alexis.menard@openbossa.org>
333
334         Unreviewed, adding a missing header for the Qt port.
335
336         * Target.pri:
337
338 2012-04-09  Pavel Feldman  <pfeldman@chromium.org>
339
340         Web Inspector: [network panel] type column shows "undefined" instead of "(Pending)" upon load.
341         https://bugs.webkit.org/show_bug.cgi?id=83470
342
343         Reviewed by Yury Semikhatsky.
344
345         isPingRequest is tested for as a field, not a function return value.
346         
347         * inspector/front-end/NetworkPanel.js:
348         (WebInspector.NetworkDataGridNode.prototype._refreshTypeCell):
349
350 2012-03-30  Robert Hogan  <robert@webkit.org>
351
352         REGRESSION (r94492): Incorrect initial layout of absolutely positioned <input> inside centering div
353         https://bugs.webkit.org/show_bug.cgi?id=77754
354
355         Reviewed by David Hyatt.
356
357         The correct static position of an center-aligned, inline, absolutely positioned object with a block child can't be known
358         until the width of the child has been computed. This means that setStaticPositions() in RenderBlockLineLayout is setting
359         the position too early, before the width of the child has been finalised. To fix, adjust the static position of the inline
360         positioned object once its child's width has been calculated.
361
362         Test: fast/css/align-positioned-object-on-resize.html
363
364         * rendering/RenderBlock.cpp:
365         (WebCore::RenderBlock::layoutPositionedObjects):
366
367 2012-04-09  Eric Carlson  <eric.carlson@apple.com>
368
369         WebVTT parser unnecessarily limits the value of a timestamp
370         https://bugs.webkit.org/show_bug.cgi?id=83422
371
372         Reviewed by Dan Bernstein.
373
374         Test: media/track/track-large-timestamp.html
375
376         * html/track/WebVTTParser.cpp:
377         (WebCore::WebVTTParser::collectTimeStamp): Make all constants double instead of int so 
378             the maximum number of hours is increased and so we don't need any casts.
379
380 2012-04-09  Abhishek Arya  <inferno@chromium.org>
381
382         Incorrect placement of new child to table when before child parent is not |this|.
383         https://bugs.webkit.org/show_bug.cgi?id=82630
384
385         Reviewed by Julien Chaffraix.
386
387         Tests: fast/table/table-row-split2.html
388                fast/table/table-section-split2.html
389                fast/table/table-split.html
390                fast/table/table-split2.html
391         and tested by layouttests in commits r97180, r108127, and a few others.
392
393         * rendering/RenderBlock.cpp:
394         (WebCore::RenderBlock::addChildToAnonymousColumnBlocks): function rename, block->box.
395         (WebCore::RenderBlock::makeChildrenAnonymousColumnBlocks): ditto.
396         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): ditto.
397         * rendering/RenderBlock.h:
398         (RenderBlock):
399         * rendering/RenderBox.cpp:
400         (WebCore::RenderBox::moveChildTo): move these functions from RenderBlock, needs to be
401         used in RenderBox::splitAnonymousBoxesAroundChild.
402         (WebCore):
403         (WebCore::RenderBox::moveChildrenTo): ditto.
404         (WebCore::markBoxForRelayoutAfterSplit): helper to mark a block or table part for complete relayout
405         after anonymous boxes are split around child.
406         (WebCore::RenderBox::splitAnonymousBoxesAroundChild): moved from RenderBlock to be able
407         to work with table parts.
408         * rendering/RenderBox.h:
409         (RenderBox):
410         (WebCore::RenderBox::moveChildTo):
411         (WebCore::RenderBox::moveAllChildrenTo):
412         (WebCore::RenderBox::moveChildrenTo):
413         * rendering/RenderObject.cpp:
414         (WebCore::RenderObject::addChild): no longer need the hack added in r95461.
415         * rendering/RenderRubyBase.cpp:
416         (WebCore::RenderRubyBase::moveChildren): function rename, block->box.
417         * rendering/RenderTable.cpp:
418         (WebCore::RenderTable::addChild): Use splitAnonymousBoxesAroundChild function when |beforeChild| != |this|.
419         * rendering/RenderTableRow.cpp:
420         (WebCore::RenderTableRow::addChild): ditto. 
421         * rendering/RenderTableSection.cpp:
422         (WebCore::RenderTableSection::addChild): ditto.
423
424 2012-04-03  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
425
426         WebSocketServer: Honour WebSocketFrame::masked in makeFrameData
427         https://bugs.webkit.org/show_bug.cgi?id=83042
428
429         Reviewed by Kent Tamura.
430
431         Frames from the server should not be masked.
432         Currently, the flag is set to false, but the frames were masked anyway.
433         This causes clients with recent builds of WebKit to abort the connection to the
434         inspector server, refusing masked frames from the server as per the spec.
435         This doesn't change the behavior of WebSocket clients, which set the masked flag to true.
436
437         * Modules/websockets/WebSocketFrame.cpp:
438         (WebCore::appendFramePayload):
439         (WebCore::WebSocketFrame::makeFrameData):
440
441 2012-04-09  Alexis Menard  <alexis.menard@openbossa.org>
442
443         [Part 5] We should use CSSPropertyID rather than integers when manipulating CSS property ids.
444         https://bugs.webkit.org/show_bug.cgi?id=83466
445
446         Reviewed by Kentaro Hara.
447
448         CSSPropertyID enum holds all the CSS property ids but many parts of WebKit treat the ids
449         as integers, this patch should adress the last remaining occurences of ints rather than CSSPropertyIDs.
450     
451         No new tests : There should be no behavior change in this patch.
452
453         * css/CSSStyleSelector.cpp:
454         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
455         * css/CSSStyleSelector.h:
456         (CSSStyleSelector):
457         * css/StylePropertySet.cpp:
458         (WebCore::StylePropertySet::removePropertiesInSet):
459         * page/animation/AnimationBase.cpp:
460         (WebCore::gatherEnclosingShorthandProperties):
461         (WebCore::AnimationBase::animatableShorthandsAffectingProperty):
462         * page/animation/AnimationBase.h:
463         (AnimationBase):
464         * page/animation/CompositeAnimation.cpp:
465         (WebCore::CompositeAnimation::pauseTransitionAtTime):
466         * page/animation/KeyframeAnimation.cpp:
467         (WebCore::KeyframeAnimation::animate):
468         (WebCore::KeyframeAnimation::getAnimatedStyle):
469         (WebCore::KeyframeAnimation::overrideAnimations):
470         (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
471         (WebCore::KeyframeAnimation::timeToNextService):
472         * rendering/style/KeyframeList.cpp:
473         (WebCore::KeyframeList::insert):
474         * rendering/style/KeyframeList.h:
475         (WebCore::KeyframeValue::addProperty):
476         (WebCore::KeyframeValue::containsProperty):
477         (WebCore::KeyframeValue::properties):
478         (KeyframeValue):
479         (WebCore::KeyframeList::addProperty):
480         (WebCore::KeyframeList::containsProperty):
481         (WebCore::KeyframeList::beginProperties):
482         (WebCore::KeyframeList::endProperties):
483         (KeyframeList):
484
485 2012-04-09  Kentaro Hara  <haraken@chromium.org>
486
487         Unreviewed, rebaselined run-bindings-tests results.
488
489         * bindings/scripts/test/JS/JSFloat64Array.cpp:
490         (WebCore::JSFloat64ArrayConstructor::getOwnPropertySlot):
491         (WebCore::JSFloat64ArrayConstructor::getOwnPropertyDescriptor):
492         (WebCore::jsFloat64ArrayConstructor):
493         (WebCore::JSFloat64Array::getConstructor):
494         (WebCore::jsFloat64ArrayPrototypeFunctionFoo):
495         (WebCore::toFloat64Array):
496         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
497         (WebCore::JSTestActiveDOMObjectConstructor::getOwnPropertySlot):
498         (WebCore::JSTestActiveDOMObjectConstructor::getOwnPropertyDescriptor):
499         (WebCore::jsTestActiveDOMObjectExcitingAttr):
500         (WebCore::jsTestActiveDOMObjectConstructor):
501         (WebCore::JSTestActiveDOMObject::getConstructor):
502         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
503         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
504         (WebCore::JSTestActiveDOMObjectOwner::isReachableFromOpaqueRoots):
505         (WebCore::JSTestActiveDOMObjectOwner::finalize):
506         (WebCore::toTestActiveDOMObject):
507         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
508         (WebCore::JSTestCustomNamedGetterConstructor::getOwnPropertySlot):
509         (WebCore::JSTestCustomNamedGetterConstructor::getOwnPropertyDescriptor):
510         (WebCore::jsTestCustomNamedGetterConstructor):
511         (WebCore::JSTestCustomNamedGetter::getConstructor):
512         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
513         (WebCore::JSTestCustomNamedGetterOwner::isReachableFromOpaqueRoots):
514         (WebCore::JSTestCustomNamedGetterOwner::finalize):
515         (WebCore::toTestCustomNamedGetter):
516         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
517         (WebCore::JSTestEventConstructorConstructor::getOwnPropertySlot):
518         (WebCore::JSTestEventConstructorConstructor::getOwnPropertyDescriptor):
519         (WebCore::JSTestEventConstructorConstructor::constructJSTestEventConstructor):
520         (WebCore::jsTestEventConstructorAttr1):
521         (WebCore::jsTestEventConstructorAttr2):
522         (WebCore::jsTestEventConstructorConstructor):
523         (WebCore::JSTestEventConstructor::getConstructor):
524         (WebCore::JSTestEventConstructorOwner::isReachableFromOpaqueRoots):
525         (WebCore::JSTestEventConstructorOwner::finalize):
526         (WebCore::toTestEventConstructor):
527         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
528         (WebCore::JSTestEventTargetConstructor::getOwnPropertySlot):
529         (WebCore::JSTestEventTargetConstructor::getOwnPropertyDescriptor):
530         (WebCore::jsTestEventTargetConstructor):
531         (WebCore::JSTestEventTarget::getConstructor):
532         (WebCore::jsTestEventTargetPrototypeFunctionItem):
533         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
534         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
535         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
536         (WebCore::JSTestEventTarget::indexGetter):
537         (WebCore::JSTestEventTargetOwner::isReachableFromOpaqueRoots):
538         (WebCore::JSTestEventTargetOwner::finalize):
539         (WebCore::toTestEventTarget):
540         * bindings/scripts/test/JS/JSTestInterface.cpp:
541         (WebCore::JSTestInterfaceConstructor::getOwnPropertySlot):
542         (WebCore::JSTestInterfaceConstructor::getOwnPropertyDescriptor):
543         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
544         (WebCore::jsTestInterfaceSupplementalStr1):
545         (WebCore::jsTestInterfaceSupplementalStr2):
546         (WebCore::jsTestInterfaceSupplementalStr3):
547         (WebCore::jsTestInterfaceSupplementalNode):
548         (WebCore::jsTestInterfaceConstructor):
549         (WebCore::setJSTestInterfaceSupplementalStr2):
550         (WebCore::setJSTestInterfaceSupplementalStr3):
551         (WebCore::setJSTestInterfaceSupplementalNode):
552         (WebCore::JSTestInterface::getConstructor):
553         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
554         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
555         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod3):
556         (WebCore::JSTestInterfaceOwner::isReachableFromOpaqueRoots):
557         (WebCore::JSTestInterfaceOwner::finalize):
558         (WebCore::toTestInterface):
559         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
560         (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertySlot):
561         (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertyDescriptor):
562         (WebCore::jsTestMediaQueryListListenerConstructor):
563         (WebCore::JSTestMediaQueryListListener::getConstructor):
564         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
565         (WebCore::JSTestMediaQueryListListenerOwner::isReachableFromOpaqueRoots):
566         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
567         (WebCore::toTestMediaQueryListListener):
568         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
569         (WebCore::JSTestNamedConstructorConstructor::getOwnPropertySlot):
570         (WebCore::JSTestNamedConstructorConstructor::getOwnPropertyDescriptor):
571         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
572         (WebCore::jsTestNamedConstructorConstructor):
573         (WebCore::JSTestNamedConstructor::getConstructor):
574         (WebCore::JSTestNamedConstructorOwner::isReachableFromOpaqueRoots):
575         (WebCore::JSTestNamedConstructorOwner::finalize):
576         (WebCore::toTestNamedConstructor):
577         * bindings/scripts/test/JS/JSTestObj.cpp:
578         (WebCore::JSTestObjConstructor::getOwnPropertySlot):
579         (WebCore::JSTestObjConstructor::getOwnPropertyDescriptor):
580         (WebCore::JSTestObjConstructor::constructJSTestObj):
581         (WebCore::jsTestObjReadOnlyIntAttr):
582         (WebCore::jsTestObjReadOnlyStringAttr):
583         (WebCore::jsTestObjReadOnlyTestObjAttr):
584         (WebCore::jsTestObjShortAttr):
585         (WebCore::jsTestObjUnsignedShortAttr):
586         (WebCore::jsTestObjIntAttr):
587         (WebCore::jsTestObjLongLongAttr):
588         (WebCore::jsTestObjUnsignedLongLongAttr):
589         (WebCore::jsTestObjStringAttr):
590         (WebCore::jsTestObjTestObjAttr):
591         (WebCore::jsTestObjSequenceAttr):
592         (WebCore::jsTestObjXMLObjAttr):
593         (WebCore::jsTestObjCreate):
594         (WebCore::jsTestObjReflectedStringAttr):
595         (WebCore::jsTestObjReflectedIntegralAttr):
596         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
597         (WebCore::jsTestObjReflectedBooleanAttr):
598         (WebCore::jsTestObjReflectedURLAttr):
599         (WebCore::jsTestObjReflectedCustomIntegralAttr):
600         (WebCore::jsTestObjReflectedCustomBooleanAttr):
601         (WebCore::jsTestObjReflectedCustomURLAttr):
602         (WebCore::jsTestObjAttrWithGetterException):
603         (WebCore::jsTestObjAttrWithSetterException):
604         (WebCore::jsTestObjStringAttrWithGetterException):
605         (WebCore::jsTestObjStringAttrWithSetterException):
606         (WebCore::jsTestObjCustomAttr):
607         (WebCore::jsTestObjWithScriptStateAttribute):
608         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
609         (WebCore::jsTestObjWithScriptStateAttributeRaises):
610         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
611         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
612         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
613         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
614         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
615         (WebCore::jsTestObjConditionalAttr1):
616         (WebCore::jsTestObjConditionalAttr2):
617         (WebCore::jsTestObjConditionalAttr3):
618         (WebCore::jsTestObjConditionalAttr4Constructor):
619         (WebCore::jsTestObjConditionalAttr5Constructor):
620         (WebCore::jsTestObjConditionalAttr6Constructor):
621         (WebCore::jsTestObjCachedAttribute1):
622         (WebCore::jsTestObjCachedAttribute2):
623         (WebCore::jsTestObjContentDocument):
624         (WebCore::jsTestObjMutablePoint):
625         (WebCore::jsTestObjImmutablePoint):
626         (WebCore::jsTestObjStrawberry):
627         (WebCore::jsTestObjStrictFloat):
628         (WebCore::jsTestObjDescription):
629         (WebCore::jsTestObjId):
630         (WebCore::jsTestObjHash):
631         (WebCore::jsTestObjConstructor):
632         (WebCore::setJSTestObjShortAttr):
633         (WebCore::setJSTestObjUnsignedShortAttr):
634         (WebCore::setJSTestObjIntAttr):
635         (WebCore::setJSTestObjLongLongAttr):
636         (WebCore::setJSTestObjUnsignedLongLongAttr):
637         (WebCore::setJSTestObjStringAttr):
638         (WebCore::setJSTestObjTestObjAttr):
639         (WebCore::setJSTestObjSequenceAttr):
640         (WebCore::setJSTestObjXMLObjAttr):
641         (WebCore::setJSTestObjCreate):
642         (WebCore::setJSTestObjReflectedStringAttr):
643         (WebCore::setJSTestObjReflectedIntegralAttr):
644         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
645         (WebCore::setJSTestObjReflectedBooleanAttr):
646         (WebCore::setJSTestObjReflectedURLAttr):
647         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
648         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
649         (WebCore::setJSTestObjReflectedCustomURLAttr):
650         (WebCore::setJSTestObjAttrWithGetterException):
651         (WebCore::setJSTestObjAttrWithSetterException):
652         (WebCore::setJSTestObjStringAttrWithGetterException):
653         (WebCore::setJSTestObjStringAttrWithSetterException):
654         (WebCore::setJSTestObjCustomAttr):
655         (WebCore::setJSTestObjWithScriptStateAttribute):
656         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
657         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
658         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
659         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
660         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
661         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
662         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
663         (WebCore::setJSTestObjConditionalAttr1):
664         (WebCore::setJSTestObjConditionalAttr2):
665         (WebCore::setJSTestObjConditionalAttr3):
666         (WebCore::setJSTestObjConditionalAttr4Constructor):
667         (WebCore::setJSTestObjConditionalAttr5Constructor):
668         (WebCore::setJSTestObjConditionalAttr6Constructor):
669         (WebCore::setJSTestObjMutablePoint):
670         (WebCore::setJSTestObjImmutablePoint):
671         (WebCore::setJSTestObjStrawberry):
672         (WebCore::setJSTestObjStrictFloat):
673         (WebCore::setJSTestObjId):
674         (WebCore::JSTestObj::getConstructor):
675         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
676         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
677         (WebCore::jsTestObjPrototypeFunctionIntMethod):
678         (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
679         (WebCore::jsTestObjPrototypeFunctionObjMethod):
680         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
681         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
682         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
683         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
684         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
685         (WebCore::jsTestObjPrototypeFunctionIdbKey):
686         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
687         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
688         (WebCore::jsTestObjPrototypeFunctionCustomMethod):
689         (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
690         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
691         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
692         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
693         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
694         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
695         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
696         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
697         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
698         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
699         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
700         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
701         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
702         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
703         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
704         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
705         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
706         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
707         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
708         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
709         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
710         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
711         (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
712         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
713         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
714         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
715         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
716         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
717         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
718         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
719         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
720         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongArray):
721         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
722         (WebCore::jsTestObjPrototypeFunctionConvert1):
723         (WebCore::jsTestObjPrototypeFunctionConvert2):
724         (WebCore::jsTestObjPrototypeFunctionConvert3):
725         (WebCore::jsTestObjPrototypeFunctionConvert4):
726         (WebCore::jsTestObjPrototypeFunctionConvert5):
727         (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
728         (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
729         (WebCore::jsTestObjPrototypeFunctionOrange):
730         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
731         (WebCore::JSTestObjOwner::isReachableFromOpaqueRoots):
732         (WebCore::JSTestObjOwner::finalize):
733         (WebCore::toTestObj):
734         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
735         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertySlot):
736         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertyDescriptor):
737         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
738         (WebCore::jsTestSerializedScriptValueInterfaceValue):
739         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
740         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
741         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
742         (WebCore::jsTestSerializedScriptValueInterfaceConstructor):
743         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
744         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
745         (WebCore::JSTestSerializedScriptValueInterface::getConstructor):
746         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
747         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionMultiTransferList):
748         (WebCore::JSTestSerializedScriptValueInterfaceOwner::isReachableFromOpaqueRoots):
749         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
750         (WebCore::toTestSerializedScriptValueInterface):
751
752 2012-04-09  Charles Wei  <charles.wei@torchmobile.com.cn>
753
754         [BlackBerry] Upstream BlackBerry change to WebCore::TouchEvent
755         https://bugs.webkit.org/show_bug.cgi?id=83454
756
757         Reviewed by Rob Buis.
758
759         BlackBerry-port enhances the TouchEvent by adding member variables
760         to indicate if the event is double-tap or touch-hold.
761
762         * dom/TouchEvent.cpp:
763         (WebCore::TouchEvent::TouchEvent):
764         (WebCore::TouchEvent::initTouchEvent):
765         * dom/TouchEvent.h:
766         (TouchEvent):
767         (WebCore::TouchEvent::setDoubleTap):
768         (WebCore::TouchEvent::isDoubleTap):
769         (WebCore::TouchEvent::setTouchHold):
770         (WebCore::TouchEvent::isTouchHold):
771
772 2012-04-09  James Robinson  <jamesr@chromium.org>
773
774         Remove partially implemented per-Element visibility checks from requestAnimationFrame logic
775         https://bugs.webkit.org/show_bug.cgi?id=74232
776
777         Reviewed by Dean Jackson.
778
779         The initial requestAnimationFrame implementation had an Element parameter as the second argument to the
780         function. This element was intended to convey the element associated with the animation so that when the element
781         was not visible the animation callback would not be run. The checked in implementation does a very limited check
782         - testing for display:none and being detached from the tree - but does it in a way that does not work correctly
783         if an element's visibility is manipulated by a callback running from a different document. It also adds
784         significant complexity to the code, making it less hackable and easy to introduce subtle security bugs or
785         infinite loops.
786
787         This patch removes the parameter. Since it has always been marked optional, there is no web compat risk.
788
789         If this functionality is added back in the future it needs to be implemented in a way that considers all
790         callbacks within a Page and not only those within a single Document.
791
792         * dom/Document.cpp:
793         (WebCore::Document::webkitRequestAnimationFrame):
794         * dom/Document.h:
795         * dom/RequestAnimationFrameCallback.h:
796         * dom/ScriptedAnimationController.cpp:
797         (WebCore::ScriptedAnimationController::registerCallback):
798         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
799         * dom/ScriptedAnimationController.h:
800         * page/DOMWindow.cpp:
801         (WebCore::DOMWindow::webkitRequestAnimationFrame):
802         * page/DOMWindow.h:
803         * page/DOMWindow.idl:
804
805 2012-04-09  Chris Guan  <chris.guan@torchmobile.com.cn>
806
807         [Blackberry] m_isRequestedByPlugin should be copied in ResourceRequest
808         https://bugs.webkit.org/show_bug.cgi?id=83447
809
810         Reviewed by George Staikos.
811
812         It is an obvious error, We should copy m_isRequestedByPlugin in ResourceReuest.
813
814         No new tests, because those existing plugin test cases are enough.
815
816         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
817         (WebCore::ResourceRequest::doPlatformCopyData):
818         (WebCore::ResourceRequest::doPlatformAdopt):
819
820 2012-04-09  'Pavel Feldman'  <pfeldman@chromium.org>
821
822         Not reviewed: fixing inspector front-end compilation that has been broken by the
823         recent SaveAs and DOMStorage changes.
824
825         * inspector/front-end/DOMStorage.js:
826         * inspector/front-end/externs.js:
827         (WebInspector.isURLSaved):
828
829 2012-04-09  Pavel Feldman  <pfeldman@chromium.org>
830
831         Web Inspector: remove ComboBoxFileSelector and SingleFileEditorContainer.
832         https://bugs.webkit.org/show_bug.cgi?id=83460
833
834         Reviewed by Yury Semikhatsky.
835
836         We are now using scripts navigator and tabbed editor container, removing the old components.
837         This change removes the corresponding classes and the abstractions used during the
838         transition period.
839
840         * English.lproj/localizedStrings.js:
841         * inspector/front-end/ScriptsNavigator.js:
842         (WebInspector.ScriptsNavigator.prototype._scriptSelected):
843         * inspector/front-end/ScriptsPanel.js:
844         (WebInspector.ScriptsPanel.get this):
845         (WebInspector.ScriptsPanel.prototype.get defaultFocusedElement):
846         (WebInspector.ScriptsPanel.prototype._addUISourceCode):
847         (WebInspector.ScriptsPanel.prototype.setScriptSourceIsDirty):
848         (WebInspector.ScriptsPanel.prototype._reset):
849         (WebInspector.ScriptsPanel.prototype._showFile):
850         (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
851         (WebInspector.ScriptsPanel.prototype._editorClosed):
852         (WebInspector.ScriptsPanel.prototype._scriptSelected):
853         (WebInspector.ScriptsPanel.prototype._hidePinnedNavigator):
854         (WebInspector.ScriptsPanel.prototype.set _pinNavigator):
855         * inspector/front-end/SettingsScreen.js:
856         (WebInspector.SettingsScreen):
857         * inspector/front-end/TabbedEditorContainer.js:
858         (WebInspector.TabbedEditorContainerDelegate):
859         (WebInspector.TabbedEditorContainerDelegate.prototype.viewForFile):
860         (get WebInspector):
861         (WebInspector.TabbedEditorContainer.prototype._tabClosed):
862         * inspector/front-end/scriptsPanel.css:
863
864 2012-04-09  Dana Jansens  <danakj@chromium.org>
865
866         [chromium] Make culling work with clipped rects
867         https://bugs.webkit.org/show_bug.cgi?id=83217
868
869         Reviewed by Adrienne Walker.
870
871         Use new CCMathUtil transformation methods to deal with rects that clip
872         the camera plane. This fixes three things:
873
874         1. A layer completely behind the camera is not visible and should not
875         occlude.
876         2. A layer that is clipped by the camera is treated like a
877         non-axis-aligned transform, as the result of a mapClippedRect() is a
878         bounding box and may contain pixels not in the original rect. This guards
879         our use of mapRect() when transforming occluded regions.
880         3. A layer's occlusion must be clipped by its scissor rect. This scissor
881         rect exists in its target space, so occlusion in screen space is only
882         possible if its target also is axis aligned in the screen, such that
883         the layer's scissor rect remains a rect in screen space.
884
885         Unit tests: CCOcclusionTrackerTestLayerBehindCameraDoesNotOcclude
886                     CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect
887
888         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
889         (WebCore::transformSurfaceOpaqueRegion):
890         (WebCore::computeOcclusionBehindLayer):
891         (WebCore::::markOccludedBehindLayer):
892         (WebCore::testContentRectOccluded):
893         (WebCore::computeUnoccludedContentRect):
894
895 2012-04-09  Zan Dobersek  <zandobersek@gmail.com>
896
897         [Gtk] Web Inspector noinst_DATA images are copied into innacurately named directory
898         https://bugs.webkit.org/show_bug.cgi?id=83423
899
900         Reviewed by Martin Robinson.
901
902         Copy Web Inspector images that are a part of the data not meant
903         for installation into a directory named 'Images' rather than
904         a lower-case version of that. This is required as until now,
905         when using these inspector resources (for example during layout
906         tests or manually pointing WEBKIT_INSPECTOR_PATH env to that
907         location), the images were not displayed as they were not loadable.
908
909         No new tests - no new functionality.
910
911         * GNUmakefile.am:
912
913 2012-04-06  Pavel Feldman  <pfeldman@chromium.org>
914
915         Web Inspector: move breakpoints active state from scripts panel to debugger presentation model.
916         https://bugs.webkit.org/show_bug.cgi?id=83374
917
918         Reviewed by Yury Semikhatsky.
919
920         Just moves the state and adds event to propagate it. This is needed to abstract
921         JavaScriptSourceFrame from the ScriptsPanel.
922
923         * inspector/front-end/DebuggerPresentationModel.js:
924         (WebInspector.DebuggerPresentationModel):
925         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
926         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
927         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointsActive):
928         (WebInspector.DebuggerPresentationModel.prototype.breakpointsActive):
929         * inspector/front-end/JavaScriptSourceFrame.js:
930         (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint):
931         * inspector/front-end/ScriptsPanel.js:
932         (WebInspector.ScriptsPanel.prototype._toggleBreakpointsClicked):
933         (WebInspector.ScriptsPanel.prototype._breakpointsActiveStateChanged):
934         (WebInspector.ScriptsPanel.prototype._createDebugToolbar):
935
936 2012-04-08  Takashi Sakamoto  <tasak@google.com>
937
938         <content> in <meter> is not rendered correctly.
939         https://bugs.webkit.org/show_bug.cgi?id=81311
940
941         This code changes a code location where MeterValueElement's value
942         attribute is initialized. In the old code, HTMLMeterElement's attach
943         did. It is better to initialize the attribute just after creating
944         meter's shadow subtree.
945
946         Reviewed by Hajime Morita.
947
948         No new tests, because an existing test,
949         content-element-in-meter-element.html covers.
950         However test_expectations.txt is changed. Now the test passes.
951
952         * html/HTMLMeterElement.cpp:
953         * html/HTMLMeterElement.h:
954         (HTMLMeterElement):
955         (HTMLMeterElement::attach):
956         Removed attach method, because attach method is just calling
957         LabelableElement::attach after removing didElementStateChange.
958         (HTMLMeterElement::createShadowSubTree):
959         Added setWidthPercentage to initialize MeterValueElement's value
960         attribute.
961         * LayoutTests/platform/chromium/test_expectations.txt:
962         Removed BUGWK81311 fast/dom/shadow/content-element-in-meter.html,
963         because now contentElementInMeterElement passes.
964
965 2012-04-08  Patrick Gansterer  <paroga@webkit.org>
966
967         Build fix for !ENABLE(CSS_FILTERS) && ASSERT_DISABLED after r109953.
968
969         * platform/graphics/ca/GraphicsLayerCA.cpp:
970
971 2012-04-07  Patrick Gansterer  <paroga@webkit.org>
972
973         [CMake] Cleanup WTF include directories
974         https://bugs.webkit.org/show_bug.cgi?id=82716
975
976         Reviewed by Eric Seidel.
977
978         * CMakeLists.txt:
979
980 2012-04-07  Rob Buis  <rbuis@rim.com>
981
982         Remove dead code in SVGCSSParser
983         https://bugs.webkit.org/show_bug.cgi?id=83404
984
985         Reviewed by Nikolas Zimmermann.
986
987         Remove code that was there to create a SVGColor representation for color, but was never reached. Since
988         SVGColor is deprecated now (also see bug 15012), this code has lost any potential. Should SVGColor come
989         back in SVG2 we can revisit this.
990
991         Add a test to confirm for SVG we follow the CSS3 handling of color="currentColor". This is something the
992         removed code never dealt with, but the existing code in CSSParser.cpp handles, make sure we stick to this
993         behaviour in the future using this test.
994
995         Test: svg/custom/currentColor-on-color.html
996
997         * css/SVGCSSParser.cpp:
998         (WebCore::CSSParser::parseSVGValue):
999
1000 2012-04-07  Nikolas Zimmermann  <nzimmermann@rim.com>
1001
1002         FrameData constructor zeroes all fields, causing ImageOrientation to be 0
1003         https://bugs.webkit.org/show_bug.cgi?id=83416
1004
1005         Inofficially rubber-stamped by Tim Horton.
1006
1007         Lots of svg/as-image/ crash on debug builds. FrameData is used in a Vector and currently
1008         special VectorTraits force it to be initialized with memset(), nulling all members, instead
1009         of properly initializing them causing the ImageOrientation bug. To be able to remove the
1010         SimpleClassVectorTraits specialization, we have to allow FrameData to be copied.
1011
1012         * platform/graphics/BitmapImage.h:
1013
1014 2012-04-07  Nikolas Zimmermann  <nzimmermann@rim.com>
1015
1016         Work around an entity parsing bug in libxml2 2.7.3 (supplied with Lion) and unskip tests
1017         https://bugs.webkit.org/show_bug.cgi?id=82577
1018
1019         Reviewed by Filip Pizlo.
1020
1021         Work-around entity expansion bug that affects several SVG tests on Lion.
1022
1023         Sample test document which is currently broken:
1024         <?xml version="1.0" encoding="UTF-8"?>
1025         <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd" [
1026         <!ENTITY Smile "<rect x='.5' y='.5' width='29' height='39' fill='black' stroke='red'/>">
1027         ]>
1028
1029         <svg xmlns="http://www.w3.org/2000/svg">&Smile;</svg>
1030
1031         The expanded rect carries no namespace, thus an Element will be created for it, instead of a SVGRectElement.
1032         libxml2 2.7.4 fixed this bug (https://bugzilla.gnome.org/show_bug.cgi?id=502960) in 2009 already, but Lion
1033         still ships with 2.7.3, so we need to find a work-around for the problem. It works like this:
1034         - When an entity is requested (getEntityHandler) determine whether the entity is being declared (while the <!ENTITY.. parses)
1035           or wheter its references (when the &Smile; is parsed). If its referenced, record the current depth of the libxml2 parser.
1036         - When startElementNs is called while we're expanding entities, be sure to transfer the namespace of the parent node
1037           to the new node, but only do this if the current depth() is greater than the depth() at the time where entity expansion started.
1038           This way we only apply our workaround for elements inside entities, that get expanded at the insertion point.
1039         - When endElementNs is called, and our current depth() is less than our equal to the depth() where entity expansion started,
1040           clear the recorded detph(), and stop executing the workaround.
1041
1042         It requires storing an extra integer & boolean in XMLDocumentParser, which is only used for this work-around.
1043
1044         * xml/parser/XMLDocumentParser.h:
1045         (XMLDocumentParser):
1046         (WebCore::XMLDocumentParser::isParsingEntityDeclaration):
1047         (WebCore::XMLDocumentParser::setIsParsingEntityDeclaration):
1048         (WebCore::XMLDocumentParser::depthTriggeringEntityExpansion):
1049         (WebCore::XMLDocumentParser::setDepthTriggeringEntityExpansion):
1050         * xml/parser/XMLDocumentParserLibxml2.cpp:
1051         (WebCore::XMLDocumentParser::XMLDocumentParser):
1052         (WebCore::hackAroundLibXMLEntityParsingBug):
1053         (WebCore::XMLDocumentParser::startElementNs):
1054         (WebCore::XMLDocumentParser::endElementNs):
1055         (WebCore::entityDeclarationHandler):
1056         (WebCore::getEntityHandler):
1057         (WebCore::XMLDocumentParser::initializeParserContext):
1058
1059 2012-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1060
1061         Unreviewed, rolling out r113526.
1062         http://trac.webkit.org/changeset/113526
1063         https://bugs.webkit.org/show_bug.cgi?id=83417
1064
1065         speculative rollout for broken chrome browser_test (Requested
1066         by simonjam on #webkit).
1067
1068         * loader/DocumentLoader.cpp:
1069         (WebCore::DocumentLoader::stopLoading):
1070         (WebCore::DocumentLoader::finishedLoading):
1071         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
1072         (WebCore):
1073         (WebCore::DocumentLoader::setParsedArchiveData):
1074         (WebCore::DocumentLoader::scheduleArchiveLoad):
1075         (WebCore::DocumentLoader::documentURL):
1076         * loader/DocumentLoader.h:
1077         (DocumentLoader):
1078         * loader/FrameLoader.cpp:
1079         (WebCore::FrameLoader::receivedFirstData):
1080         (WebCore::FrameLoader::loadArchive):
1081         (WebCore::FrameLoader::stopAllLoaders):
1082         (WebCore::FrameLoader::finishedLoadingDocument):
1083         (WebCore):
1084         * loader/FrameLoader.h:
1085         (FrameLoader):
1086         (WebCore::FrameLoader::archive):
1087
1088 2012-04-06  James Robinson  <jamesr@chromium.org>
1089
1090         [chromium] Avoid deleting impl tree when becoming invisible
1091         https://bugs.webkit.org/show_bug.cgi?id=83396
1092
1093         Reviewed by Adrienne Walker.
1094
1095         This bit of code in CCLayerTreeHost::didBecomeInvisible..() was an attempt to drop resources when becoming
1096         invisible. However, it's fairly confused - we drop textures via TextureManagers when going invisible and
1097         CCLayerImpl destructors can't delete non-managed resources since they do not have access to a context - so this
1098         code was never actually freeing up GPU resources. Having a sometimes-null CCLayerImpl tree when we still have a
1099         valid LayerChromium tree has lead to various tricky bugs.
1100
1101         No new tests since this code wasn't doing anything useful in the first place.
1102
1103         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1104         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
1105
1106 2012-04-06  Leo Yang  <leo.yang@torchmobile.com.cn>
1107
1108         LocalFileSystem::initializeLocalFileSystem should be static
1109         https://bugs.webkit.org/show_bug.cgi?id=83356
1110
1111         Reviewed by Rob Buis.
1112
1113         LocalFileSystem::initializeLocalFileSystem should be static because
1114         static LocalFileSystem::localFileSystem() requires initializeLocalFileSystem()
1115         is called before it gets called.
1116
1117         No functionalities changed, no new tests.
1118
1119         * Modules/filesystem/LocalFileSystem.h:
1120         (LocalFileSystem):
1121
1122 2012-04-06  Martin Robinson  <mrobinson@igalia.com>
1123
1124         [GTK] Accelerated compositing is broken after recent TextureMapper reorganizations
1125         https://bugs.webkit.org/show_bug.cgi?id=83393
1126
1127         Reviewed by Noam Rosenthal.
1128
1129         No new tests. This will be covered by existing accelerated compositing tests
1130         once the implementation is complete.
1131
1132         The GTK+ implementation doesn't clip currently, so hold off enabling the
1133         scissor test until necessary.
1134
1135         * platform/graphics/texmap/TextureMapperGL.cpp:
1136         (WebCore::TextureMapperGL::beginPainting): Do not enable the scissor test.
1137         (WebCore::TextureMapperGL::beginScissorClip): Enable the scissor test once
1138         we know for sure we will be using scissored clipping.
1139
1140 2012-04-06  Keishi Hattori  <keishi@webkit.org>
1141
1142         Remove obsolete parts of <datalist> support code
1143         https://bugs.webkit.org/show_bug.cgi?id=83117
1144
1145         Removing HTMLInputElement::selectedOption because it was removed from the specification.
1146         Removing -webkit-appearance:list-button and -webkit-input-list-button pseudo selector
1147         related code because we decided not to use it.
1148
1149         Reviewed by Kent Tamura.
1150
1151         * WebCore.order:
1152         * css/CSSPrimitiveValueMappings.h:
1153         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1154         * css/CSSSelector.cpp:
1155         (WebCore::CSSSelector::pseudoId):
1156         (WebCore::nameToPseudoTypeMap):
1157         (WebCore::CSSSelector::extractPseudoType):
1158         * css/CSSSelector.h:
1159         * css/CSSValueKeywords.in:
1160         * css/html.css:
1161         (datalist):
1162         * html/HTMLInputElement.cpp:
1163         * html/HTMLInputElement.h:
1164         (HTMLInputElement):
1165         * html/HTMLInputElement.idl:
1166         * inspector/front-end/SourceCSSTokenizer.js:
1167         (WebInspector.SourceCSSTokenizer):
1168         * inspector/front-end/SourceCSSTokenizer.re2js:
1169         * inspector/front-end/StylesSidebarPane.js:
1170         * platform/ThemeTypes.h:
1171         * platform/chromium/ThemeChromiumMac.mm:
1172         (WebCore::setupButtonCell):
1173         (WebCore::paintButton):
1174         (WebCore::ThemeChromiumMac::controlSize):
1175         (WebCore::ThemeChromiumMac::minimumControlSize):
1176         (WebCore::ThemeChromiumMac::controlBorder):
1177         (WebCore::ThemeChromiumMac::paint):
1178         * platform/mac/ThemeMac.mm:
1179         (WebCore::setUpButtonCell):
1180         (WebCore::paintButton):
1181         (WebCore::ThemeMac::controlSize):
1182         (WebCore::ThemeMac::minimumControlSize):
1183         (WebCore::ThemeMac::controlBorder):
1184         (WebCore::ThemeMac::paint):
1185         * platform/qt/RenderThemeQtMobile.cpp:
1186         (WebCore::RenderThemeQtMobile::computeSizeBasedOnStyle):
1187         * rendering/RenderTheme.cpp:
1188         (WebCore::RenderTheme::adjustStyle):
1189         (WebCore::RenderTheme::paint):
1190         (WebCore::RenderTheme::paintBorderOnly):
1191         (WebCore::RenderTheme::paintDecorations):
1192         * rendering/RenderThemeMac.mm:
1193         (WebCore::RenderThemeMac::adjustRepaintRect):
1194
1195 2012-04-06  Oliver Hunt  <oliver@apple.com>
1196
1197         Accessing the returnValue of a modal dialog should be performed directly on the global object.
1198         https://bugs.webkit.org/show_bug.cgi?id=83414
1199
1200         Reviewed by Gavin Barraclough.
1201
1202         Presumably during the mass-devirtualising of JSObject, this deliberate use of
1203         the GlobalObject's property lookup logic directly was replaced with a dynamic
1204         call.  That results in the DOMWindow filtering out the lookup.  This regression
1205         was masked by r93567.
1206
1207         * bindings/js/JSDOMWindowCustom.cpp:
1208         (WebCore::DialogHandler::returnValue):
1209
1210 2012-04-06  Nate Chapin  <japhet@chromium.org>
1211
1212         Move Archive processing to DocumentLoader, instead of FrameLoader.
1213         https://bugs.webkit.org/show_bug.cgi?id=83055
1214
1215         Reviewed by Adam Barth.
1216
1217         No new tests, no functionality change intended.
1218
1219         * loader/DocumentLoader.cpp:
1220         (WebCore::DocumentLoader::finishedLoading):
1221         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
1222         (WebCore::DocumentLoader::maybeCreateArchive): Renamed from
1223             FrameLoader::finishedLoadingDocument(). Returns true if an archive
1224             was created.
1225         (WebCore::DocumentLoader::setArchive):
1226         (WebCore::DocumentLoader::scheduleArchiveLoad):
1227         (WebCore::DocumentLoader::documentURL): Add a check for whether an archive url
1228             should be returned, so that we don't need special handling in Document and
1229             FrameLoader for overriding the document url later.
1230         * loader/DocumentLoader.h:
1231         * loader/FrameLoader.cpp:
1232         (WebCore::FrameLoader::receivedFirstData): Remove archive special cases, since
1233             DocumentLoader::documentURL() will return the right thing for legacy archives
1234             and maybeCreateArchive() will override the base url for mhtml.
1235         (WebCore::FrameLoader::loadArchive):
1236         * loader/FrameLoader.h:
1237
1238 2012-04-06  Charles Wei  <charles.wei@torchmobile.com.cn>
1239
1240         [BlackBerry] Build fix to match the latest WebCore change
1241         https://bugs.webkit.org/show_bug.cgi?id=83358
1242
1243         Reviewed by Rob Buis.
1244
1245         Update the BlackBerry cmake file to reflect the fact that:
1246         1.VDMXParser.cpp moved from graphics/skia to graphics/chromium.
1247         2.geolocation moved to Modules/geolocation
1248         3.websockets moved to Modules/websockets
1249
1250         * PlatformBlackBerry.cmake:
1251
1252 2012-04-06  Charles Wei  <charles.wei@torchmobile.com.cn>
1253
1254         [BlackBerry] Restore some code which was deleted by accident.
1255         https://bugs.webkit.org/show_bug.cgi?id=83357
1256
1257         Reviewed by Rob Buis.
1258
1259         No new tests, just BlackBerry build fix.
1260
1261         * platform/network/blackberry/ResourceRequest.h:
1262         (ResourceRequest):
1263         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
1264         (WebCore):
1265         (WebCore::mimeTypeRequestTypeMap):
1266         (WebCore::ResourceRequest::targetTypeFromMimeType):
1267
1268 2012-04-06  Alexandre Elias  <aelias@google.com>
1269
1270         Fix bug in ContainerNode::getRect with scale transforms
1271         https://bugs.webkit.org/show_bug.cgi?id=83385
1272
1273         Reviewed by Simon Fraser.
1274
1275         The bottom-right corner calculation for non-inline and replaced
1276         elements in ContainerNode::getRect was incorrect in the presence of
1277         scaling, because the untransformed element size was added after the
1278         transformation is applied.  The rest of the calculations are careful
1279         to always apply the transformation as the last step, but this had been
1280         forgotten in this codepath.  The fix is just to make sure the size is
1281         included in the localToAbsolute call.
1282
1283         One bug caused by this was that a scaled element would be cut off
1284         when scrollIntoView(false) is called to scroll its parent container
1285         to make it bottom-visible.
1286
1287         New layout test case in fast/transforms/scrollIntoView-transformed.html
1288
1289         * dom/ContainerNode.cpp:
1290         (WebCore::ContainerNode::getLowerRightCorner):
1291
1292 2012-04-06  Tim Horton  <timothy_horton@apple.com>
1293
1294         m_shouldRespectImageOrientation is used uninitialized
1295         https://bugs.webkit.org/show_bug.cgi?id=83410
1296
1297         Reviewed by Simon Fraser.
1298
1299         Initialize Settings's m_shouldRespectImageOrientation to false.
1300
1301         * page/Settings.cpp:
1302         (WebCore::Settings::Settings):
1303
1304 2012-04-06  James Robinson  <jamesr@chromium.org>
1305
1306         [chromium] Clear values in combinedClear path not respected in WebGLRenderingContext::clearIfComposited()
1307         https://bugs.webkit.org/show_bug.cgi?id=83407
1308
1309         Reviewed by Kenneth Russell.
1310
1311         When doing a combined clear in the drawing buffer path, we have to use the user specified values for the clear
1312         color / mask / depth and not all 0s.
1313
1314         Covered by slight modification to fast/canvas/webgl/canvas-test.html
1315
1316         * html/canvas/WebGLRenderingContext.cpp:
1317         (WebCore):
1318         (WebCore::WebGLRenderingContext::clearIfComposited):
1319         * platform/graphics/gpu/DrawingBuffer.cpp:
1320         (WebCore::DrawingBuffer::clearFramebuffers):
1321         (WebCore::DrawingBuffer::reset):
1322         * platform/graphics/gpu/DrawingBuffer.h:
1323
1324 2012-04-06  Tony Chang  <tony@chromium.org>
1325
1326         [chromium] merge redundant conditions in WebCore.gyp
1327         https://bugs.webkit.org/show_bug.cgi?id=83319
1328
1329         Reviewed by Adam Barth.
1330
1331         There were duplicate conditions in some of the targets (e.g., 2
1332         OS=="win" sections) so I merged them and if possible, used an else
1333         block of an existing condition.
1334
1335         No new tests, just refactoring the build file.
1336
1337         * WebCore.gyp/WebCore.gyp:
1338
1339 2012-04-06  Simon Fraser  <simon.fraser@apple.com>
1340
1341         Rename paintingGoesToWindow() to paintsIntoWindow()
1342         https://bugs.webkit.org/show_bug.cgi?id=83406
1343
1344         Reviewed by Dirk Schulze.
1345         
1346         Rename paintingGoesToWindow() to paintsIntoWindow() to be consistent
1347         with some future refactoring.
1348
1349         * rendering/RenderLayer.cpp:
1350         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
1351         (WebCore::RenderLayer::paintLayer):
1352         (WebCore::RenderLayer::paintsWithTransform):
1353         (WebCore::RenderLayer::setBackingNeedsRepaint):
1354         (WebCore::RenderLayer::setBackingNeedsRepaintInRect):
1355         * rendering/RenderLayerBacking.cpp:
1356         (WebCore::RenderLayerBacking::containsPaintedContent):
1357         (WebCore::RenderLayerBacking::paintsIntoWindow):
1358         (WebCore::RenderLayerBacking::paintIntoLayer):
1359         * rendering/RenderLayerBacking.h:
1360         (RenderLayerBacking):
1361         * rendering/RenderLayerCompositor.cpp:
1362         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
1363         * rendering/RenderObject.cpp:
1364         (WebCore::RenderObject::repaintUsingContainer):
1365         * rendering/RenderView.cpp:
1366         (WebCore::RenderView::paintBoxDecorations):
1367
1368 2012-04-06  James Simonsen  <simonjam@chromium.org>
1369
1370         Roll out change to HTMLParserIdioms.cpp from 82857
1371         https://bugs.webkit.org/show_bug.cgi?id=83402
1372
1373         Change 82857 causes a DCHECK on fast/forms/number/ValidityState-typeMismatch-number.html
1374
1375         Darin suggested we roll out this file here: https://bugs.webkit.org/show_bug.cgi?id=82857#c20
1376
1377         Unreviewed, rolling out change that broke tests.
1378
1379         * html/parser/HTMLParserIdioms.cpp:
1380         (WebCore::parseToDoubleForNumberType):
1381
1382 2012-04-06  Ilya Sherman  <isherman@chromium.org>
1383
1384         Allow site authors to override autofilled fields' colors.
1385         https://bugs.webkit.org/show_bug.cgi?id=66032
1386         http://code.google.com/p/chromium/issues/detail?id=46543
1387
1388         Reviewed by Simon Fraser.
1389
1390         * css/html.css:
1391         (input:-webkit-autofill): Remove !important declarations.
1392
1393 2012-04-05  Enrica Casucci  <enrica@apple.com>
1394
1395         Provide Obj-C private API to simplify markup.
1396         https://bugs.webkit.org/show_bug.cgi?id=83334
1397         <rdar://problem/11033861>
1398
1399         Reviewed by Sam Weinig.
1400
1401         Added test in TestWebKitAPI
1402
1403         * WebCore.exp.in:
1404         * editing/Editor.cpp:
1405         (WebCore::Editor::simplifyMarkup): Exposing the new command through the editor.
1406         * editing/Editor.h:
1407
1408 2012-04-06  Benjamin Poulain  <bpoulain@apple.com>
1409
1410         Get rid of the useless flag PREEMPT_GEOLOCATION_PERMISSION
1411         https://bugs.webkit.org/show_bug.cgi?id=83325
1412
1413         Reviewed by Ryosuke Niwa.
1414
1415         The flag WTF_USE_PREEMPT_GEOLOCATION_PERMISSION was added in r63742 but
1416         was never disabled by anyone. Supporting this feature added complexity by
1417         introducing two authorization scheme.
1418
1419         This patch removes WTF_USE_PREEMPT_GEOLOCATION_PERMISSION and the code supporting
1420         granting the authorization after startUpdating().
1421
1422         * Modules/geolocation/Geolocation.cpp:
1423         (WebCore::Geolocation::GeoNotifier::runSuccessCallback): With the simplified
1424         authorization code, we ensure stronger constraint on GeoNotifier::runSuccessCallback().
1425         (WebCore::Geolocation::stop):
1426         (WebCore::Geolocation::startRequest):
1427         (WebCore::Geolocation::clearWatch):
1428         (WebCore::Geolocation::setIsAllowed):
1429         (WebCore::Geolocation::positionChanged): The case (!isAllowed()) was there
1430         to support granting the authorization for WTF_USE_PREEMPT_GEOLOCATION_PERMISSION.
1431         (WebCore::Geolocation::handlePendingPermissionNotifiers):
1432         * Modules/geolocation/Geolocation.h:
1433         (Geolocation):
1434
1435 2012-04-06  Tom Sepez  <tsepez@chromium.org>
1436
1437         Block cross-origin iframe scroll to fragment.
1438         https://bugs.webkit.org/show_bug.cgi?id=73083
1439
1440         Reviewed by Adam Barth.
1441
1442         Add a restriction similar to what FF has done for all iframes for over a
1443         year now. Our change is less disruptive in that it only does this in the
1444         cross-orgin case, which is where the fragment scrolling is problematic.
1445
1446         Test: http/tests/navigation/anchor-frames-cross-origin.html
1447
1448         * dom/Document.cpp:
1449         (WebCore::Document::canBeAccessedByEveryAncestorFrame):
1450         (WebCore):
1451         * dom/Document.h:
1452         (Document):
1453         * loader/FrameLoader.cpp:
1454         (WebCore::FrameLoader::finishedParsing):
1455         (WebCore::FrameLoader::loadInSameDocument):
1456         (WebCore::FrameLoader::loadURL):
1457         (WebCore::FrameLoader::loadWithDocumentLoader):
1458         (WebCore::FrameLoader::shouldPerformFragmentNavigation):
1459         (WebCore::FrameLoader::scrollToFragmentIfAllowed):
1460         (WebCore):
1461         * loader/FrameLoader.h:
1462         (FrameLoader):
1463
1464 2012-04-03  Jer Noble  <jer.noble@apple.com>
1465
1466         Foreground of apple.com/iphone video page visible during full screen animation.
1467         https://bugs.webkit.org/show_bug.cgi?id=83080
1468
1469         Reviewed by Simon Fraser.
1470
1471         No new tests; updated fullscreen/full-screen-stacking-context.html
1472
1473         The apple.com/iphone video page uses a -webkit-mask: CSS style, which creates a stacking
1474         context and causes the page to pop in front of the full screen renderer.  Add all the
1475         styles suggested by the W3C full screen spec to the -webkit-full-screen-ancestor rule
1476         to keep these stacking contexts from being created.
1477
1478         * css/fullscreen.css:
1479         (:-webkit-full-screen-ancestor:not(iframe)):
1480
1481 2012-04-06  Abhishek Arya  <inferno@chromium.org>
1482
1483         Virtualize createAnonymousBoxWithSameTypeAs.
1484         https://bugs.webkit.org/show_bug.cgi?id=83229
1485
1486         Reviewed by Julien Chaffraix.
1487
1488         This helps to use the same function to create anonymous
1489         table parts and in the future extend to more classes
1490         derived from RenderBox.
1491
1492         The current switch case situation was going to be messy as
1493         we will need to mix cases that were very dependent on the
1494         class, so it made sense to add a virtual function.
1495
1496         * rendering/RenderBlock.cpp:
1497         (WebCore::RenderBlock::splitAnonymousBlocksAroundChild):
1498         (WebCore::RenderBlock::createAnonymousBoxWithSameTypeAs):
1499         * rendering/RenderBlock.h:
1500         (RenderBlock):
1501         * rendering/RenderBox.h:
1502         (WebCore::RenderBox::createAnonymousBoxWithSameTypeAs):
1503         (RenderBox):
1504         * rendering/RenderInline.cpp:
1505         (WebCore::RenderInline::splitFlow):
1506         * rendering/RenderTable.h:
1507         (WebCore::RenderTable::createAnonymousBoxWithSameTypeAs):
1508         * rendering/RenderTableCell.h:
1509         (WebCore::RenderTableCell::createAnonymousBoxWithSameTypeAs):
1510         * rendering/RenderTableRow.h:
1511         (WebCore::RenderTableRow::createAnonymousBoxWithSameTypeAs):
1512         * rendering/RenderTableSection.h:
1513         (WebCore::RenderTableSection::createAnonymousBoxWithSameTypeAs):
1514
1515 2012-04-06  Tim Horton  <timothy_horton@apple.com>
1516
1517         [cg] REGRESSION (r101517): Animating the transform of a <rect> with shape-rendering: crispEdges leaves behind garbage
1518         https://bugs.webkit.org/show_bug.cgi?id=82963
1519         <rdar://problem/11170476>
1520
1521         Reviewed by Simon Fraser.
1522
1523         CoreGraphics can inflate the stroke by 1px when drawing a rectangle
1524         with antialiasing disabled at non-integer coordinates, we need to
1525         compensate by inflating the RenderSVGRect repaint bounds by 1px.
1526
1527         No new tests, as this is not reproducible in DRT or WKTR.
1528
1529         * rendering/svg/RenderSVGRect.cpp:
1530         (WebCore::RenderSVGRect::createShape):
1531         (WebCore::RenderSVGRect::strokeBoundingBox):
1532         * rendering/svg/RenderSVGRect.h:
1533         (RenderSVGRect):
1534
1535 2012-04-05  Simon Fraser  <simon.fraser@apple.com>
1536
1537         Avoid trying to set filters on transform layers
1538         https://bugs.webkit.org/show_bug.cgi?id=83344
1539
1540         Reviewed by Dean Jackson.
1541
1542         Return early from GraphicsLayerCA::setFilters() when the filters
1543         haven't changed. This avoids trying to clear filters on CALayers
1544         which never had them, which should both help performance, and avoids
1545         console spew related to setting shadow properties on transform layers.
1546         
1547         * platform/graphics/ca/GraphicsLayerCA.cpp:
1548         (WebCore::GraphicsLayerCA::setFilters):
1549
1550 2012-04-06  James Robinson  <jamesr@chromium.org>
1551
1552         WebGL content swapped at wrong time in threaded compositing mode
1553         https://bugs.webkit.org/show_bug.cgi?id=82275
1554
1555         Reviewed by Kenneth Russell.
1556
1557         When using threaded compositing, we need to defer touching the texture ID being used by the compositor until the
1558         appropriate point in the synchronization routine and not before. Specifically, there is no time at which it is
1559         safe to manipulate the texture the compositor may be using from the main thread. This breaks up the presentation
1560         path into a few pieces (depending on the context attributes) in order to maintain these invariants.
1561
1562         Depending on the context attributes and if we're in threaded mode, there are a few different possible back/front
1563         buffer combinations:
1564
1565         - When the context is antialiased, we have a multisampled renderbuffer and associated framebuffer.
1566         - In all cases, we have a color texture back buffer.
1567         - When preserveDrawingBuffer is set or threaded compositing is enabled, we have a separate color texture as a
1568         front buffer.
1569
1570         The resource update is in two phases. First, on the main thread, we prepare the back buffer. This resolves from
1571         the multisampled FBO into the back color buffer if multisampled and swaps the front / back color buffer textures
1572         if preserveDrawingBuffer is false and we're using separate front / back color buffers. Second, on the compositor
1573         thread, we do a texture copy from the back to the front color buffer if preserveDrawingBuffer is true. After
1574         these steps are complete the main thread is free to manipulate the back buffer color texture without affecting
1575         any resources the compositor is using.
1576
1577         One incidental cleanup this patch also does is remove all state queries from DrawingBuffer::clearFramebuffer().
1578
1579         Tests: fast/canvas/webgl/webgl-composite-modes-repaint.html
1580                fast/canvas/webgl/webgl-composite-modes.html
1581
1582         * html/canvas/WebGLRenderingContext.cpp:
1583         (WebCore):
1584         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
1585         (WebCore::WebGLRenderingContext::clearIfComposited):
1586         (WebCore::WebGLRenderingContext::restoreStateAfterClear):
1587         (WebCore::WebGLRenderingContext::reshape):
1588         (WebCore::WebGLRenderingContext::maybeRestoreContext):
1589         * html/canvas/WebGLRenderingContext.h:
1590         (WebGLRenderingContext):
1591         * platform/graphics/blackberry/DrawingBufferBlackBerry.cpp:
1592         (WebCore::DrawingBuffer::DrawingBuffer):
1593         (WebCore):
1594         (WebCore::DrawingBuffer::prepareBackBuffer):
1595         (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer):
1596         (WebCore::DrawingBuffer::frontColorBuffer):
1597         * platform/graphics/cairo/DrawingBufferCairo.cpp:
1598         (WebCore::DrawingBuffer::DrawingBuffer):
1599         (WebCore):
1600         (WebCore::DrawingBuffer::prepareBackBuffer):
1601         (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer):
1602         (WebCore::DrawingBuffer::frontColorBuffer):
1603         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1604         (WebCore::generateColorTexture):
1605         (WebCore::DrawingBuffer::DrawingBuffer):
1606         (WebCore::DrawingBuffer::initialize):
1607         (WebCore::DrawingBuffer::prepareBackBuffer):
1608         (WebCore):
1609         (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer):
1610         (WebCore::DrawingBuffer::frontColorBuffer):
1611         (WebCore::DrawingBuffer::platformLayer):
1612         * platform/graphics/chromium/WebGLLayerChromium.cpp:
1613         (WebCore::WebGLLayerChromium::WebGLLayerChromium):
1614         (WebCore::WebGLLayerChromium::paintContentsIfDirty):
1615         (WebCore::WebGLLayerChromium::updateCompositorResources):
1616         (WebCore::WebGLLayerChromium::paintRenderedResultsToCanvas):
1617         (WebCore::WebGLLayerChromium::setNeedsDisplayRect):
1618         (WebCore::WebGLLayerChromium::setDrawingBuffer):
1619         * platform/graphics/chromium/WebGLLayerChromium.h:
1620         (WebGLLayerChromium):
1621         * platform/graphics/clutter/DrawingBufferClutter.cpp:
1622         (WebCore::DrawingBuffer::DrawingBuffer):
1623         (WebCore):
1624         (WebCore::DrawingBuffer::prepareBackBuffer):
1625         (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer):
1626         (WebCore::DrawingBuffer::frontColorBuffer):
1627         * platform/graphics/filters/FECustomFilter.cpp:
1628         (WebCore::FECustomFilter::initializeContext):
1629         * platform/graphics/gpu/DrawingBuffer.cpp:
1630         (WebCore::DrawingBuffer::create):
1631         (WebCore::DrawingBuffer::clear):
1632         (WebCore::DrawingBuffer::clearFramebuffer):
1633         (WebCore::DrawingBuffer::reset):
1634         (WebCore::DrawingBuffer::discardResources):
1635         * platform/graphics/gpu/DrawingBuffer.h:
1636         (DrawingBuffer):
1637         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
1638         (WebCore::DrawingBuffer::DrawingBuffer):
1639         (WebCore):
1640         (WebCore::DrawingBuffer::prepareBackBuffer):
1641         (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer):
1642         (WebCore::DrawingBuffer::frontColorBuffer):
1643         * platform/graphics/gpu/qt/DrawingBufferQt.cpp:
1644         (WebCore::DrawingBuffer::DrawingBuffer):
1645         (WebCore::DrawingBuffer::platformLayer):
1646         (WebCore::DrawingBuffer::prepareBackBuffer):
1647         (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer):
1648         (WebCore):
1649         (WebCore::DrawingBuffer::frontColorBuffer):
1650
1651 2012-04-06  Julien Chaffraix  <jchaffraix@webkit.org>
1652
1653         Unreviewed build fix after r113486 and r113487.
1654
1655         * rendering/RenderObject.cpp:
1656         Added missing #include.
1657
1658         * rendering/RenderView.h:
1659         Removed bad OVERRIDE.
1660
1661 2012-04-06  Beth Dakin  <bdakin@apple.com>
1662
1663         https://bugs.webkit.org/show_bug.cgi?id=81939
1664         -webkit-image-set should update dynamically when the device scale factor 
1665         changes
1666         -and corresponding-
1667         <rdar://problem/11101108> 
1668
1669         Reviewed by Darin Adler.
1670
1671         New member variable to keep track of the scale factor.
1672         * css/CSSImageSetValue.cpp:
1673         (WebCore::CSSImageSetValue::CSSImageSetValue):
1674         (WebCore::CSSImageSetValue::bestImageForScaleFactor):
1675
1676          Merge the two cachedImageSet functions. There was no need for two functions here.
1677         (WebCore::CSSImageSetValue::cachedImageSet):
1678
1679         cachedOrPendingImageSet() now takes a Document as a parameter so that it can 
1680         access the deviceScaleFactor. If there is a cached image already and the 
1681         Document's deviceScaleFactor doesn't match m_scaleFactor, then m_imageSet is set 
1682         to a pending image so that the best fit image will be reassessed and then 
1683         loaded.
1684         (WebCore::CSSImageSetValue::cachedOrPendingImageSet):
1685         * css/CSSImageSetValue.h:
1686         (WebCore):
1687         (CSSImageSetValue):
1688
1689         cachedOrPendingImageSet() now takes a Document.
1690         * css/CSSStyleSelector.cpp:
1691         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1692
1693         StyleCachedImageSet should inherit from CachedImageClient just like 
1694         StyleCachedImage. It should add and remove itself as a client upon creation 
1695         and destruction, respectively.
1696         * rendering/style/StyleCachedImageSet.cpp:
1697         (WebCore::StyleCachedImageSet::StyleCachedImageSet):
1698         (WebCore):
1699         (WebCore::StyleCachedImageSet::~StyleCachedImageSet):
1700         * rendering/style/StyleCachedImageSet.h:
1701         (StyleCachedImageSet):
1702
1703 2012-04-06  Levi Weintraub  <leviw@chromium.org>
1704
1705         Update LayoutUnit usage in RenderView
1706         https://bugs.webkit.org/show_bug.cgi?id=83147
1707
1708         Reviewed by Julien Chaffraix.
1709
1710         Updating the usage of LayoutUnits in RenderView in preparation for sub-pixel layout. This mostly
1711         affects paint and repaint functions, which take LayoutRects up to the RenderView level. This is
1712         necessary as we continue to accumulate sub-pixel offsets up to this level.
1713
1714         No new tests. No change in behavior.
1715
1716         * rendering/RenderView.cpp:
1717         (WebCore::RenderView::paint): Adding an assert that we're being called to paint on pixel
1718         boundaries. We don't currently ever position RenderViews at sub-pixel offsets.
1719         (WebCore::RenderView::shouldRepaint):
1720         (WebCore::RenderView::repaintViewRectangle): Switching to a LayoutRect and cleaning up a fixme
1721         that used decomposed offsets. Pixel snapping is applied before handing the rect up to the
1722         FrameView.
1723         (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers): Pixel snapping before handing
1724         the rect up to the Compositor.
1725         (WebCore::RenderView::computeRectForRepaint):
1726         (WebCore::RenderView::selectionBounds):
1727         (WebCore::RenderView::viewRect):
1728         (WebCore::RenderView::unscaledDocumentRect):
1729         * rendering/RenderView.h:
1730         (RenderView):
1731
1732 2012-04-06  Tim Horton  <timothy_horton@apple.com>
1733
1734         Add autodetection of image orientation from EXIF information
1735         https://bugs.webkit.org/show_bug.cgi?id=19688
1736         <rdar://problem/4126979> and <rdar://problem/11091578>
1737
1738         Original patch by David Carson and Eric Seidel.
1739
1740         Reviewed by Simon Fraser.
1741
1742         Add support for respecting EXIF image orientation, enabled by default for ImageDocuments.
1743         The setting shouldRespectImageOrientation causes orientation to take effect for any image included via <img>.
1744
1745         Test: fast/images/exif-orientation.html, fast/images/exif-orientation-css.html
1746
1747         * WebCore.xcodeproj/project.pbxproj: Add ImageOrientation.{cpp, h}
1748         * loader/cache/CachedImage.cpp:
1749         (WebCore::CachedImage::imageForRenderer): Plumb setting down from RenderObject into Image.
1750         (WebCore::CachedImage::imageSizeForRenderer):
1751         * page/Settings.h:
1752         (WebCore::Settings::setShouldRespectImageOrientation):
1753         (WebCore::Settings::shouldRespectImageOrientation):
1754         (Settings):
1755         * platform/graphics/BitmapImage.cpp:
1756         (WebCore::BitmapImage::cacheFrame):
1757         (WebCore::BitmapImage::size):
1758         (WebCore::BitmapImage::sizeRespectingOrientation):
1759         (WebCore):
1760         (WebCore::BitmapImage::ensureFrameIsCached):
1761         (WebCore::BitmapImage::frameAtIndex):
1762         (WebCore::BitmapImage::frameIsCompleteAtIndex):
1763         (WebCore::BitmapImage::frameDurationAtIndex):
1764         (WebCore::BitmapImage::frameHasAlphaAtIndex):
1765         (WebCore::BitmapImage::frameOrientationAtIndex):
1766         * platform/graphics/BitmapImage.h:
1767         (WebCore::FrameData::FrameData):
1768         (FrameData):
1769         (BitmapImage):
1770         * platform/graphics/GraphicsContext.h:
1771         (GraphicsContext):
1772         * platform/graphics/ImageOrientation.cpp: Added.
1773         (WebCore):
1774         (WebCore::ImageOrientation::transformFromDefault):
1775         * platform/graphics/ImageOrientation.h: Added.
1776         (WebCore):
1777         (ImageOrientation):
1778         (WebCore::ImageOrientation::ImageOrientation):
1779         (WebCore::ImageOrientation::usesWidthAsHeight):
1780         (WebCore::ImageOrientation::fromEXIFValue):
1781         (WebCore::ImageOrientation::operator==):
1782         (WebCore::ImageOrientation::operator!=):
1783         * platform/graphics/ImageSource.cpp:
1784         (WebCore::ImageSource::orientationAtIndex):
1785         (WebCore):
1786         * platform/graphics/ImageSource.h:
1787         (WebCore):
1788         * platform/graphics/cg/GraphicsContextCG.cpp:
1789         (WebCore::GraphicsContext::drawNativeImage): Transform the image while drawing if its orientation requires it.
1790         * platform/graphics/cg/ImageBufferCG.cpp:
1791         (WebCore::ImageBuffer::draw):
1792         * platform/graphics/cg/ImageCG.cpp:
1793         (WebCore::FrameData::clear):
1794         (WebCore::BitmapImage::BitmapImage):
1795         (WebCore::BitmapImage::draw):
1796         * platform/graphics/cg/ImageSourceCG.cpp:
1797         (WebCore::imageSourceOptions): Don't use SkipMetaData on Lion/Snow Leopard, as it prevents us from retrieving orientation data.
1798         (WebCore::ImageSource::frameSizeAtIndex): Adjust the image's size based on its orientation.
1799         (WebCore):
1800         (WebCore::ImageSource::orientationAtIndex):
1801         (WebCore::ImageSource::size):
1802         * platform/graphics/mac/DragImageMac.mm:
1803         (createDragImageFromImage): Create scaled copy of image for drag image if we're respecting orientation and it is non-default.
1804         * rendering/RenderObject.h:
1805         (RenderObject):
1806         (WebCore::RenderObject::shouldRespectImageOrientation):
1807
1808 2012-04-06  Levi Weintraub  <leviw@chromium.org>
1809
1810         Correct LayoutUnit usgae in RenderThemeQt and RenderThemeQStyle
1811         https://bugs.webkit.org/show_bug.cgi?id=83376
1812
1813         Reviewed by Eric Seidel.
1814
1815         Correcting LayoutUnit usage in QT RenderTheme code.
1816
1817         No new tests. No change in behavior.
1818
1819         * platform/qt/RenderThemeQt.cpp:
1820         (WebCore::RenderThemeQt::convertToPaintingRect): Rounding the ancestor offset before
1821         applying it to the pixel snapped partRect.
1822         (WebCore::RenderThemeQt::paintSearchFieldCancelButton): Also rounding the ancestor
1823         offset, and also pixel snapping the content rect before painting.
1824
1825 2012-04-06  Kenneth Russell  <kbr@google.com>
1826
1827         context-lost.html is failing
1828         https://bugs.webkit.org/show_bug.cgi?id=81325
1829
1830         Reviewed by James Robinson.
1831
1832         Ensure that the DrawingBuffer does not attempt to restore the
1833         TEXTURE_2D binding to an already-deleted texture.
1834
1835         Tested with layout test fast/canvas/webgl/context-lost.html as
1836         well as WebGL conformance tests.
1837
1838         * html/canvas/WebGLRenderingContext.cpp:
1839         (WebCore):
1840         (WebCore::WebGLRenderingContext::loseContextImpl):
1841
1842 2012-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1843
1844         Unreviewed, rolling out r113267.
1845         http://trac.webkit.org/changeset/113267
1846         https://bugs.webkit.org/show_bug.cgi?id=83384
1847
1848         causes dhtml perf regression (Requested by simonjam on
1849         #webkit).
1850
1851         * dom/ChildListMutationScope.cpp:
1852         (ChildListMutationScope::MutationAccumulator):
1853         (WebCore::ChildListMutationScope::MutationAccumulator::isAddedNodeInOrder):
1854         (WebCore::ChildListMutationScope::MutationAccumulator::childAdded):
1855         (WebCore::ChildListMutationScope::MutationAccumulationRouter::childAdded):
1856         * dom/ChildListMutationScope.h:
1857         (WebCore::ChildListMutationScope::childAdded):
1858         (MutationAccumulationRouter):
1859         * dom/ContainerNode.cpp:
1860         (WebCore):
1861         (WebCore::ContainerNode::insertBefore):
1862         (WebCore::ContainerNode::replaceChild):
1863         (WebCore::ContainerNode::appendChild):
1864         (WebCore::dispatchChildInsertionEvents):
1865         (WebCore::updateTreeAfterInsertion):
1866
1867 2012-04-06  Joshua Bell  <jsbell@chromium.org>
1868
1869         IndexedDB: ObjectStore/Index shouldn't hold reference to backing store
1870         https://bugs.webkit.org/show_bug.cgi?id=83074
1871
1872         We should be able to collect and close the leveldb backing store as soon as the database
1873         connection is closed, but the IDBObjectStoreBackendImpl and IDBIndexBackendImpl were
1874         holding RefPtrs, and those objects are kept alive by script references.
1875
1876         Replaced RefPtrs to the IDBBackingStore with pointers to the IDBDatabase. On the back end,
1877         IDBDatabaseBackendImpl maintains a RefPtr to the IDBObjectStoreBackendImpl object, so 
1878         a raw pointer back is safe. On the front end, the IDBObjectStore maintains a RefPtr to
1879         the IDBDatabase so script can navigate upwards. Ditto on both ends for the ObjectStore/Index
1880         relationship. The frontend objects maintain RefPtrs to the backend objects, so the backend
1881         objects and their owners are maintained as long as there's a script reference.
1882
1883         Also made IDBDatabaseBackendImpl handle a null IDBFactoryBackendImpl pointer, for testing.
1884
1885         Reviewed by Tony Chang.
1886
1887         Tests: webkit_unit_tests --gtest_filter="IDBDatabaseBackendTest.*"
1888
1889         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1890         (WebCore::IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl):
1891         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1892         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
1893         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
1894         (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
1895         (WebCore::IDBIndexBackendImpl::openCursorInternal):
1896         (WebCore::IDBIndexBackendImpl::countInternal):
1897         (WebCore::IDBIndexBackendImpl::getInternal):
1898         (WebCore::IDBIndexBackendImpl::addingKeyAllowed):
1899         * Modules/indexeddb/IDBIndexBackendImpl.h:
1900         (WebCore::IDBIndexBackendImpl::create):
1901         (IDBIndexBackendImpl):
1902         (WebCore::IDBIndexBackendImpl::backingStore):
1903         (WebCore::IDBIndexBackendImpl::databaseId):
1904         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1905         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
1906         (WebCore::IDBObjectStoreBackendImpl::getInternal):
1907         (WebCore::IDBObjectStoreBackendImpl::putInternal):
1908         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
1909         (WebCore::IDBObjectStoreBackendImpl::clearInternal):
1910         (WebCore):
1911         (WebCore::IDBObjectStoreBackendImpl::createIndex):
1912         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
1913         (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal):
1914         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
1915         (WebCore::IDBObjectStoreBackendImpl::countInternal):
1916         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
1917         (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey):
1918         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
1919         (WebCore::IDBObjectStoreBackendImpl::create):
1920         (IDBObjectStoreBackendImpl):
1921         (WebCore::IDBObjectStoreBackendImpl::backingStore):
1922         (WebCore::IDBObjectStoreBackendImpl::databaseId):
1923
1924 2012-04-06  Jon Lee  <jonlee@apple.com>
1925
1926         Fix build warning on const long long to int implicit conversion.
1927
1928         * inspector/InspectorApplicationCacheAgent.cpp:
1929         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
1930
1931 2012-04-06  Emil A Eklund  <eae@chromium.org>
1932
1933         Fix LayoutUnit usage and rounding in RenderBlock and RenderEmbeddedObject
1934         https://bugs.webkit.org/show_bug.cgi?id=83343
1935
1936         Reviewed by Eric Seidel.
1937
1938         Fix usage of LayoutUnits and rounding/pixel snapping in RenderBlock and
1939         RenderEmbeddedObject in preparation for turing on subpixel support.
1940
1941         No new tests, no change in functionality.
1942
1943         * rendering/RenderBlock.cpp:
1944         (WebCore::RenderBlock::baselinePosition):
1945         * rendering/RenderEmbeddedObject.cpp:
1946         (WebCore::RenderEmbeddedObject::nodeAtPoint):
1947
1948 2012-04-06  Dan Bernstein  <mitz@apple.com>
1949
1950         <rdar://problem/10912476> HiDPI: Have canvas use a hidpi backing store, but downsample upon access
1951
1952         Reviewed by Sam Weinig.
1953
1954         * Configurations/FeatureDefines.xcconfig: Added ENABLE_HIGH_DPI_CANVAS.
1955
1956 2012-04-06  Levi Weintraub  <leviw@chromium.org>
1957
1958         Update LayoutUnit usage in Editor and Frame
1959         https://bugs.webkit.org/show_bug.cgi?id=83278
1960
1961         Reviewed by Eric Seidel.
1962
1963         Frame and Editor both take input from the embedder, which passes along coordinates in screen
1964         coordinates, which aren't fractional. Updating a few remaining functions to show this, and correcting
1965         some inconsistencies in LayoutUnit usage.
1966
1967         No new tests. No change in behavior.
1968
1969         * editing/Editor.cpp:
1970         (WebCore::Editor::rangeForPoint): windowToContents returns an IntPoint.
1971         (WebCore::Editor::countMatchesForText): Using enclosingIntRect since we're (fake) repainting the entire
1972         view rect.
1973         * editing/Editor.h:
1974         (Editor): Correcting mismatched function signature.
1975         * page/Frame.cpp:
1976         (WebCore::Frame::visiblePositionForPoint): Frame takes points in screen coordinates, usually from the
1977         embedder. Changing these functions to be in IntPoints.
1978         (WebCore::Frame::documentAtPoint): Ditto.
1979         (WebCore::Frame::rangeForPoint): Ditto.
1980         * page/Frame.h:
1981         (Frame):
1982         * platform/graphics/IntRect.h:
1983         (enclosingIntRect): Adding an inline no-op copy of the FractionalLayoutRect method enclosingIntRect.
1984
1985 2012-04-06  Tommy Widenflycht  <tommyw@google.com>
1986
1987         MediaStream API: Deleting the chromium bridge class MediaStreamCenterInternal
1988         https://bugs.webkit.org/show_bug.cgi?id=83167
1989
1990         Reviewed by Adam Barth.
1991
1992         The situation before this patch is that we had a MediaStreamCenter.h with #ifdefs for the chromium specific
1993         private class MediaStreamCenterInternal. This bridge class only shuffled calls between MediaStreamCenter and
1994         WebMediaStreamCenter and was needed before the introduction of Platform.
1995         To get rid of this now unnecessary class I had two alternatives:
1996         1) Sprinkle platform/MediaStreamCenter.h with more #ifdefs, including around the class declaration.
1997         2) Create an abstract base class that the chromium and gstreamer implementations overrides.
1998         My personal preference is 2) since I strongly dislike #ifdefs. The drawback is that MediaStreamCenter now
1999         has a vtable. However since all methods in this class are extremely low-usage it doesn't affect anything
2000         in practice.
2001
2002         No code behaviour changes.
2003
2004         * GNUmakefile.am:
2005         * GNUmakefile.list.am:
2006         * Modules/mediastream/MediaStreamTrack.cpp:
2007         (WebCore::MediaStreamTrack::setEnabled):
2008         * Modules/mediastream/UserMediaRequest.cpp:
2009         * Modules/mediastream/UserMediaRequest.h:
2010         * WebCore.gyp/WebCore.gyp:
2011         * WebCore.gypi:
2012         * platform/chromium/support/WebMediaStreamSourcesRequest.cpp:
2013         * platform/mediastream/MediaStreamCenter.cpp:
2014         (WebCore::MediaStreamCenter::MediaStreamCenter):
2015         (WebCore):
2016         (WebCore::MediaStreamCenter::~MediaStreamCenter):
2017         * platform/mediastream/MediaStreamCenter.h:
2018         (WebCore):
2019         (MediaStreamCenter):
2020         * platform/mediastream/MediaStreamSourcesQueryClient.h: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.h.
2021         (WebCore):
2022         (MediaStreamSourcesQueryClient):
2023         (WebCore::MediaStreamSourcesQueryClient::~MediaStreamSourcesQueryClient):
2024         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
2025         (WebCore::MediaStreamCenter::instance):
2026         (WebCore::MediaStreamCenterChromium::MediaStreamCenterChromium):
2027         (WebCore::MediaStreamCenterChromium::~MediaStreamCenterChromium):
2028         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
2029         (WebCore::MediaStreamCenterChromium::didSetMediaStreamTrackEnabled):
2030         (WebCore::MediaStreamCenterChromium::didStopLocalMediaStream):
2031         (WebCore::MediaStreamCenterChromium::didConstructMediaStream):
2032         (WebCore::MediaStreamCenterChromium::constructSDP):
2033         (WebCore):
2034         (WebCore::MediaStreamCenterChromium::stopLocalMediaStream):
2035         * platform/mediastream/chromium/MediaStreamCenterChromium.h: Renamed from Source/WebCore/platform/mediastream/chromium/MediaStreamCenterInternal.h.
2036         (WebKit):
2037         (WebCore):
2038         (MediaStreamCenterChromium):
2039         * platform/mediastream/chromium/MediaStreamCenterInternal.cpp: Removed.
2040         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.cpp.
2041         (WebCore):
2042         (WebCore::MediaStreamCenter::instance):
2043         (WebCore::MediaStreamCenterGStreamer::MediaStreamCenterGStreamer):
2044         (WebCore::MediaStreamCenterGStreamer::~MediaStreamCenterGStreamer):
2045         (WebCore::MediaStreamCenterGStreamer::queryMediaStreamSources):
2046         (WebCore::MediaStreamCenterGStreamer::didSetMediaStreamTrackEnabled):
2047         (WebCore::MediaStreamCenterGStreamer::didStopLocalMediaStream):
2048         (WebCore::MediaStreamCenterGStreamer::didConstructMediaStream):
2049         (WebCore::MediaStreamCenterGStreamer::constructSDP):
2050         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.h.
2051         (WebCore):
2052         (MediaStreamCenterGStreamer):
2053
2054 2012-04-05  Simon Fraser  <simon.fraser@apple.com>
2055
2056         Should disable preserves3D() for things that enforce flattening, like overflow and filters
2057         https://bugs.webkit.org/show_bug.cgi?id=83337
2058
2059         Reviewed by Dean Jackson.
2060         
2061         The CSS3 Transforms spec says that some properties should cause flattening
2062         of things with transform-style: preserve-3d. We currently do this as a side
2063         effect of the GraphicsLayer structure, but we should really do it at the
2064         RenderStyle level, as we do for other things like stacking context creation.
2065
2066         Test: compositing/overflow-trumps-transform-style.html
2067
2068         * css/CSSStyleSelector.cpp:
2069         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2070
2071 2012-04-06  Tommy Widenflycht  <tommyw@google.com>
2072
2073         MediaStream API: MediaStreams stops proper cleanup to take place during a page reload.
2074         https://bugs.webkit.org/show_bug.cgi?id=83143
2075
2076         Reviewed by Adam Barth.
2077
2078         To fix this I have converted MediaStream and LocalMediaStream to be ActiveDOMObjects.
2079
2080         Have no idea how to write a test that succesfully verifies this. I have done manual testing
2081         to verify that proper tear-down now takes place.
2082
2083         * Modules/mediastream/LocalMediaStream.cpp:
2084         (WebCore::LocalMediaStream::create):
2085         (WebCore::LocalMediaStream::stopFunction):
2086         (WebCore):
2087         * Modules/mediastream/LocalMediaStream.h:
2088         (LocalMediaStream):
2089         * Modules/mediastream/LocalMediaStream.idl:
2090         * Modules/mediastream/MediaStream.cpp:
2091         (WebCore::MediaStream::create):
2092         (WebCore::MediaStream::MediaStream):
2093         (WebCore::MediaStream::scriptExecutionContext):
2094         * Modules/mediastream/MediaStream.h:
2095         (MediaStream):
2096
2097 2012-04-06  Dan Bernstein  <mitz@apple.com>
2098
2099         <rdar://problem/10912476> Pixel access canvas APIs do not work transparently with high-DPI backing store
2100         https://bugs.webkit.org/show_bug.cgi?id=83072
2101
2102         Reviewed by Simon Fraser.
2103
2104         Made getImageData, putImageData, and toDataURL downsample/upsample when pixels in the canvas
2105         backing store are not in a 1:1 ratio to CSS pixels. This makes clients of these APIs
2106         indifferent to the backing store resolution, up to sampling artifacts.
2107
2108         In order for this to work, ImageBuffer has to know and respect the resolutionScale
2109         parameter. This change makes the Core Graphics-based implementation of ImageBuffer do this,
2110         but on other platforms, resolutionScale values other than 1 will not work. Such platforms
2111         should not enable the HIGH_DPI_CANVAS feature.
2112
2113         * html/HTMLCanvasElement.cpp:
2114         (WebCore::HTMLCanvasElement::HTMLCanvasElement): Updated a comment.
2115         (WebCore::HTMLCanvasElement::createImageBuffer): Changed to create an ImageBuffer with
2116         the desired resolution instead of 1.
2117         * html/canvas/CanvasRenderingContext2D.cpp:
2118         (WebCore::CanvasRenderingContext2D::drawImage): Removed code that scaled the source rect,
2119         since this is now handled at the ImageBuffer level.
2120         (WebCore::CanvasRenderingContext2D::createImageData): Now returns ImageData of the requested
2121         size regardless of the backing store resolution.
2122         (WebCore::CanvasRenderingContext2D::getImageData): Ditto.
2123         * platform/graphics/ImageBuffer.h:
2124         (WebCore::ImageBuffer::create): Removed some code that tried to apply the resolution scale
2125         to the buffer after creating it, and changed to pass the resolution scale down to the
2126         (platform-specific) constructor, which can apply it correctly.
2127         * platform/graphics/cairo/ImageBufferCairo.cpp:
2128         (WebCore::ImageBuffer::ImageBuffer):
2129         * platform/graphics/cg/ImageBufferCG.cpp:
2130         (WebCore::ImageBuffer::ImageBuffer): Added a resolutionScale parameter, which is used to
2131         compute the backing buffer size, and to apply a device scale factor to the context.
2132         (WebCore::ImageBuffer::copyImage): Changed to return an image scaled down to the logical
2133         size of the buffer.
2134         (WebCore::ImageBuffer::getUnmultipliedImageData): Changed to pass the resolution scale to
2135         ImageData::getData().
2136         (WebCore::ImageBuffer::getPremultipliedImageData): Ditto.
2137         (WebCore::ImageBuffer::putByteArray): Changed to pass the resolution scale to
2138         ImageData::putData(). When drawing the byte array as an image, changed to preserve the base
2139         CTM in the destination context (thus mapping from image data pixels to backing store pixels).
2140         (WebCore::ImageBuffer::toDataURL): Fixed a CGColorSpace leak. Made the returned image have
2141         the buffer’s logical size instead of the backing buffer’s size.
2142         (WebCore::ImageDataToDataURL): Fixed a CGColorSpace leak.
2143         * platform/graphics/cg/ImageBufferDataCG.cpp:
2144         (WebCore::ImageBufferData::getData): Added a resolutionScale parameter. The source
2145         coordinates are scaled by the value of that parameter, and a reverse scaling transform
2146         is applied when copying from the backing store into the destination (either explicitly
2147         using Accelerate or implicitly by drawing as an image). Since after scaling,
2148         unpremultiplication and component permutation are done in-place, made the
2149         non-Accelerate code that does these things safe in this case.
2150         (WebCore::ImageBufferData::putData): Added a resolutionScale parameter. The destination
2151         coordinates are scaled by the value of that parameter, and a scaling transform is applied
2152         when copying from the source into the backing store (either explicitly using Accelerate or
2153         implicitly by drawing as an image). Since after scaling, premultiplication and component
2154         permutation are done in-place, made the non-Accelerate code that does these things safe in
2155         this case.
2156         * platform/graphics/cg/ImageBufferDataCG.h:
2157         * platform/graphics/qt/ImageBufferQt.cpp:
2158         (WebCore::ImageBuffer::ImageBuffer):
2159         * platform/graphics/skia/ImageBufferSkia.cpp:
2160         (WebCore::ImageBuffer::ImageBuffer):
2161         * platform/graphics/wince/ImageBufferWinCE.cpp:
2162         (WebCore::ImageBuffer::ImageBuffer):
2163         * platform/graphics/wx/ImageBufferWx.cpp:
2164         (WebCore::ImageBuffer::ImageBuffer):
2165
2166 2012-04-06  Dana Jansens  <danakj@chromium.org>
2167
2168         [chromium] Draw debug borders for tiles on layers with skipsDraw
2169         https://bugs.webkit.org/show_bug.cgi?id=83352
2170
2171         Reviewed by Adrienne Walker.
2172
2173         The tiles are given the same color as other missing tiles.
2174
2175         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2176         (WebCore::CCTiledLayerImpl::appendQuads):
2177
2178 2012-04-06  Rob Buis  <rbuis@rim.com>
2179
2180         Fix cast-align warnings in JSC
2181         https://bugs.webkit.org/show_bug.cgi?id=80790
2182
2183         Reviewed by George Staikos.
2184
2185         * platform/graphics/WOFFFileFormat.cpp:
2186         (WebCore::readUInt32):
2187         (WebCore::readUInt16):
2188         * platform/image-encoders/skia/JPEGImageEncoder.cpp:
2189         (WebCore::preMultipliedBGRAtoRGB):
2190         * platform/network/MIMESniffing.cpp:
2191
2192 2012-04-06  Darin Adler  <darin@apple.com>
2193
2194         Streamline strtod and fix some related problems
2195         https://bugs.webkit.org/show_bug.cgi?id=82857
2196
2197         Reviewed by Geoffrey Garen.
2198
2199         Refactoring of code covered by existing tests.
2200
2201         * dom/ViewportArguments.cpp:
2202         (WebCore::numericPrefix): Removed a confusing comment that just said
2203         "we tolerate extra characters" in a roundabout way. Made the "ok"
2204         argument optional. Changed to call the new version of charactersToFloat
2205         that returns the number of characters parsed rather than using the
2206         charactersToFloatIgnoringJunk/didReadNumber solution from before.
2207         (WebCore::findSizeValue): Since numericPrefix is guaranteed to return 0
2208         when it can't parse, removed the "ok" code. Also changed the unusual
2209         syntax "float(1.0)" to just "1", which works just as well.
2210         (WebCore::findScaleValue): Ditto.
2211         (WebCore::findUserScalableValue): Ditto.
2212
2213         * html/parser/HTMLParserIdioms.cpp:
2214         (WebCore::parseToDoubleForNumberType): Removed an unneeded code path
2215         and replaced it with an assertion; toDouble no longer will return infinity
2216         or not-a-number values.
2217
2218 2012-04-06  Dana Jansens  <danakj@chromium.org>
2219
2220         [chromium] Surface replica should have a separate quad in the render pass
2221         https://bugs.webkit.org/show_bug.cgi?id=83287
2222
2223         Reviewed by Adrienne Walker.
2224
2225         Generate separate quads for a RenderSurface and its replica. The replica
2226         quad is drawn independently of the surface itself. This allows us to
2227         cull each one independently.
2228
2229         Covered by existing tests.
2230
2231         * platform/graphics/chromium/LayerRendererChromium.cpp:
2232         (WebCore::LayerRendererChromium::drawRenderSurfaceQuad):
2233         (WebCore::LayerRendererChromium::copyOffscreenTextureToDisplay):
2234         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2235         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
2236         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2237         (WebCore::CCRenderSurface::setScissorRect):
2238         (WebCore):
2239         (WebCore::CCRenderSurface::drawContents):
2240         (WebCore::CCRenderSurface::drawReplica):
2241         (WebCore::CCRenderSurface::hasReplica):
2242         * platform/graphics/chromium/cc/CCRenderSurface.h:
2243         (CCRenderSurface):
2244         * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp:
2245         (WebCore::CCRenderSurfaceDrawQuad::create):
2246         (WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad):
2247         * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h:
2248         (CCRenderSurfaceDrawQuad):
2249         (WebCore::CCRenderSurfaceDrawQuad::isReplica):
2250
2251 2012-04-05  Martin Robinson  <mrobinson@igalia.com>
2252
2253         [GObject bindings] Fix the coding style issues in the generated bindings
2254         https://bugs.webkit.org/show_bug.cgi?id=82080
2255
2256         Reviewed by Kentaro Hara.
2257
2258         No new tests. This is covered by the binding tests.
2259
2260         * bindings/scripts/CodeGeneratorGObject.pm: Fix most style errors in the generated
2261           GObject code.
2262         * bindings/scripts/test/GObject: Updated the expected results.
2263
2264
2265 2012-04-06  Adam Klein  <adamk@chromium.org>
2266
2267         Remove bogus assert from ChildListMutationScope
2268         https://bugs.webkit.org/show_bug.cgi?id=83336
2269
2270         Reviewed by Ryosuke Niwa.
2271
2272         This assert can trivially be triggered from script, but luckily the
2273         code already behaves correctly without it.
2274
2275         * dom/ChildListMutationScope.cpp:
2276         (WebCore::ChildListMutationScope::MutationAccumulator::enqueueMutationRecord):
2277
2278 2012-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2279
2280         Unreviewed, rolling out r113442.
2281         http://trac.webkit.org/changeset/113442
2282         https://bugs.webkit.org/show_bug.cgi?id=83373
2283
2284         for breaking JSC bindings compilation (Requested by pfeldman
2285         on #webkit).
2286
2287         * GNUmakefile.list.am:
2288         * Target.pri:
2289         * UseJSC.cmake:
2290         * UseV8.cmake:
2291         * WebCore.gypi:
2292         * WebCore.vcproj/WebCore.vcproj:
2293         * WebCore.xcodeproj/project.pbxproj:
2294         * bindings/js/JSMutationCallbackCustom.cpp: Added.
2295         (WebCore):
2296         (WebCore::JSMutationCallback::handleEvent):
2297         * bindings/scripts/CodeGenerator.pm:
2298         * bindings/scripts/CodeGeneratorJS.pm:
2299         (AddIncludesForTypeInImpl):
2300         (GenerateCallbackHeader):
2301         (GenerateCallbackImplementation):
2302         * bindings/scripts/CodeGeneratorV8.pm:
2303         (GenerateCallbackHeader):
2304         (GenerateCallbackImplementation):
2305         * bindings/scripts/test/JS/JSTestCallback.cpp:
2306         (WebCore::JSTestCallback::callbackWithBoolean):
2307         * bindings/scripts/test/JS/JSTestCallback.h:
2308         (JSTestCallback):
2309         * bindings/scripts/test/TestCallback.idl:
2310         * bindings/scripts/test/V8/V8TestCallback.cpp:
2311         (WebCore::V8TestCallback::callbackWithBoolean):
2312         * bindings/scripts/test/V8/V8TestCallback.h:
2313         (V8TestCallback):
2314         * bindings/v8/custom/V8MutationCallbackCustom.cpp: Added.
2315         (WebCore):
2316         (WebCore::V8MutationCallback::handleEvent):
2317         * dom/MutationCallback.idl:
2318
2319 2012-04-06  Zan Dobersek  <zandobersek@gmail.com>
2320
2321         [Gtk] Unskip the video track tests
2322         https://bugs.webkit.org/show_bug.cgi?id=82590
2323
2324         Reviewed by Martin Robinson.
2325
2326         Enable the video track runtime feature for the Gtk port as well.
2327
2328         No new tests - existing ones will be unskipped.
2329
2330         * bindings/generic/RuntimeEnabledFeatures.cpp:
2331         (WebCore):
2332
2333 2012-04-06  Michael Saboff  <msaboff@apple.com>
2334
2335         Call Heap::discardAllCompiledCode() in low memory situations
2336         https://bugs.webkit.org/show_bug.cgi?id=83335
2337
2338         Reviewed by Geoffrey Garen.
2339
2340         Added call to discardAllCompiledCode() when under memory pressure.
2341         We can re-JIT as needed.  This is similar to what we used to do when we did
2342         a full GC which also cleaned up JIT code.  Doing a full GC typically didn't
2343         help our memory situation, in fact it made things worse in the really low
2344         memory situation as it caused more paging.
2345
2346         Added pass through discardAllCompiledCode() method to GCController.
2347
2348         * bindings/js/GCController.cpp:
2349         (WebCore::GCController::discardAllCompiledCode):
2350         (WebCore):
2351         * bindings/js/GCController.h:
2352         (GCController):
2353         * platform/mac/MemoryPressureHandlerMac.mm:
2354         (WebCore::MemoryPressureHandler::releaseMemory):
2355
2356 2012-04-06  Andrey Kosyakov  <caseq@chromium.org>
2357
2358         Web Inspector: on a single click in Timeline overview, make a minimal selection centered around cursor
2359         https://bugs.webkit.org/show_bug.cgi?id=82616
2360
2361         Reviewed by Pavel Feldman.
2362
2363         - center minimal selection on mouse cursor if the mouse hasn't moved (i.e. we had a click, not drag)
2364
2365         * inspector/front-end/TimelineOverviewPane.js:
2366         (WebInspector.TimelineOverviewWindow.prototype._endWindowSelectorDragging):
2367
2368 2012-04-06  Vineet Chaudhary  <rgf748@motorola.com>
2369
2370         Add CodeGenerator support for sequence<> in callbacks.
2371         https://bugs.webkit.org/show_bug.cgi?id=83233
2372
2373         Reviewed by Kentaro Hara.
2374
2375         Tests: TestCallback.idl and fast/mutation/callback-arguments.html should pass even after
2376         the changes.
2377
2378         * GNUmakefile.list.am: Removed unsued custom files V8MutationCallbackCustom.cpp 
2379           and JSMutationCallbackCustom.cpp from builds.
2380         * Target.pri: Ditto.
2381         * UseJSC.cmake: Ditto.
2382         * UseV8.cmake: Ditto.
2383         * WebCore.gypi: Ditto.
2384         * WebCore.vcproj/WebCore.vcproj: Ditto.
2385         * WebCore.xcodeproj/project.pbxproj: Ditto.
2386         * bindings/js/JSMutationCallbackCustom.cpp: Removed.
2387         * bindings/scripts/CodeGeneratorJS.pm:
2388         (AddIncludesForTypeInImpl): Add proper header type.
2389         (GenerateCallbackHeader): Generate declaration for the callback with sequence<T> argument.
2390         (GenerateCallbackImplementation): Generate implementation for the callback with sequence<T> argument.
2391         * bindings/scripts/CodeGeneratorV8.pm:
2392         (GenerateCallbackHeader): Generate declaration for the callback with sequence<T> argument.
2393         (GenerateCallbackImplementation): Generate implementation for the callback with sequence<T> argument.
2394         * bindings/scripts/test/JS/JSTestCallback.cpp: Modified test results of run-bindings-tests.
2395         (WebCore):
2396         (WebCore::JSTestCallback::handleEvent):
2397         * bindings/scripts/test/JS/JSTestCallback.h: Modified test results of run-bindings-tests.
2398         (JSTestCallback):
2399         * bindings/scripts/test/TestCallback.idl: Added test callback with sequence<> argument.
2400         * bindings/scripts/test/V8/V8TestCallback.cpp: Modified test results of run-bindings-tests.
2401         (WebCore):
2402         (WebCore::V8TestCallback::handleEvent):
2403         * bindings/scripts/test/V8/V8TestCallback.h: Modified test results of run-bindings-tests.
2404         (V8TestCallback):
2405         * bindings/v8/custom/V8MutationCallbackCustom.cpp: Removed.
2406         * dom/MutationCallback.idl: Removed custom bindings using sequence<T>.
2407
2408 2012-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2409
2410         Unreviewed, rolling out r113431.
2411         http://trac.webkit.org/changeset/113431
2412         https://bugs.webkit.org/show_bug.cgi?id=83372
2413
2414         for breaking at least Chromium compilation (Requested by
2415         pfeldman on #webkit).
2416
2417         * rendering/RenderView.cpp:
2418         (WebCore::RenderView::paint):
2419         (WebCore::RenderView::shouldRepaint):
2420         (WebCore::RenderView::repaintViewRectangle):
2421         (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers):
2422         (WebCore::RenderView::computeRectForRepaint):
2423         (WebCore::RenderView::selectionBounds):
2424         (WebCore::RenderView::viewRect):
2425         (WebCore::RenderView::unscaledDocumentRect):
2426         * rendering/RenderView.h:
2427         (RenderView):
2428
2429 2012-04-06  Peter Rybin  <peter.rybin@gmail.com>
2430
2431         Web Inspector: CodeGeneratorInspector.py: completely switch all domains to 'strict' mode
2432         https://bugs.webkit.org/show_bug.cgi?id=83332
2433
2434         Reviewed by Pavel Feldman.
2435
2436         Hardcoded list of domains is removed from generator. Partial domain sorting is dropped as unneeded.
2437         Types with open propery list are introduced: validator allows undocumented properties for them.
2438
2439         Timeline domain code is patched to do runtimeCast in the last moment because true switching to
2440         type-safe interfaces should take significant time and should be done separately.
2441
2442         * inspector/CodeGeneratorInspector.py:
2443         (Generator.go):
2444         (Generator.process_event):
2445         (Generator.process_command):
2446         * inspector/InspectorTimelineAgent.cpp:
2447         (WebCore::InspectorTimelineAgent::willSendResourceRequest):
2448         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
2449
2450 2012-04-06  Peter Rybin  <peter.rybin@gmail.com>
2451
2452         Web Inspector: CodeGeneratorInspector.py: stop accepting raw InspectorObject in generated setters
2453         https://bugs.webkit.org/show_bug.cgi?id=83327
2454
2455         Reviewed by Pavel Feldman.
2456
2457         Generator fixed to have strict types in generated setter methods.
2458
2459         Client code is switched from InspectorObject's and String's to generated types where
2460         needed.
2461
2462         * inspector/CodeGeneratorInspector.py:
2463         (AdHocTypeContext):
2464         (format_setter_value_expression):
2465         * inspector/ConsoleMessage.cpp:
2466         (WebCore::messageSourceValue):
2467         (WebCore::messageTypeValue):
2468         (WebCore::messageLevelValue):
2469         (WebCore::ConsoleMessage::addToFrontend):
2470         * inspector/InspectorApplicationCacheAgent.cpp:
2471         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
2472         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
2473         * inspector/InspectorApplicationCacheAgent.h:
2474         (InspectorApplicationCacheAgent):
2475         * inspector/InspectorCSSAgent.cpp:
2476         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
2477         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
2478         (WebCore::InspectorCSSAgent::detectOrigin):
2479         * inspector/InspectorCSSAgent.h:
2480         (InspectorCSSAgent):
2481         * inspector/InspectorDOMAgent.cpp:
2482         (WebCore::InspectorDOMAgent::buildObjectForNode):
2483         * inspector/InspectorIndexedDBAgent.cpp:
2484         (WebCore):
2485         * inspector/InspectorMemoryAgent.cpp:
2486         * inspector/InspectorPageAgent.cpp:
2487         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
2488         * inspector/InspectorResourceAgent.cpp:
2489         (WebCore::buildObjectForTiming):
2490         (WebCore::buildObjectForCachedResource):
2491         * inspector/InspectorStyleSheet.cpp:
2492         (WebCore::InspectorStyle::buildObjectForStyle):
2493         (WebCore::InspectorStyleSheet::create):
2494         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
2495         (WebCore::InspectorStyleSheet::buildObjectForRule):
2496         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
2497         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
2498         (WebCore::InspectorStyleSheetForInlineStyle::create):
2499         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
2500         * inspector/InspectorStyleSheet.h:
2501         (InspectorCSSId):
2502         (WebCore::InspectorCSSId::asProtocolValue): method is made template as now it returns 2 formally different types.
2503         (InspectorStyleSheet):
2504         (WebCore::InspectorStyleSheet::canBind):
2505         (InspectorStyleSheetForInlineStyle):
2506
2507 2012-04-06  Pavel Feldman  <pfeldman@chromium.org>
2508
2509         Web Inspector: highlight diff in the gutter, not in the line content.
2510         https://bugs.webkit.org/show_bug.cgi?id=83371
2511
2512         Reviewed by Yury Semikhatsky.
2513
2514         Now that the editing mode is enabled by default, diff highlighting gets annoying.
2515         I am moving it to the gutter (same decoration as before, but now coloring gutter only).
2516
2517         * inspector/front-end/TextViewer.js:
2518         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
2519         * inspector/front-end/textViewer.css:
2520         (.diff-container .webkit-added-line.webkit-line-number):
2521         (.diff-container .webkit-removed-line.webkit-line-number):
2522         (.diff-container .webkit-changed-line.webkit-line-number):
2523
2524 2012-04-06  Peter Rybin  <peter.rybin@gmail.com>
2525
2526         Web Inspector: CodeGeneratorInspector.py: stop accepting raw InspectorObject in generated setters
2527         https://bugs.webkit.org/show_bug.cgi?id=83327
2528
2529         Reviewed by Pavel Feldman.
2530
2531         Generator fixed to have strict types in generated setter methods.
2532
2533         Client code is switched from InspectorObject's and String's to generated types where
2534         needed.
2535
2536         * inspector/CodeGeneratorInspector.py:
2537         (AdHocTypeContext):
2538         (format_setter_value_expression):
2539         * inspector/ConsoleMessage.cpp:
2540         (WebCore::messageSourceValue):
2541         (WebCore::messageTypeValue):
2542         (WebCore::messageLevelValue):
2543         (WebCore::ConsoleMessage::addToFrontend):
2544         * inspector/InspectorApplicationCacheAgent.cpp:
2545         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
2546         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
2547         * inspector/InspectorApplicationCacheAgent.h:
2548         (InspectorApplicationCacheAgent):
2549         * inspector/InspectorCSSAgent.cpp:
2550         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
2551         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
2552         (WebCore::InspectorCSSAgent::detectOrigin):
2553         * inspector/InspectorCSSAgent.h:
2554         (InspectorCSSAgent):
2555         * inspector/InspectorDOMAgent.cpp:
2556         (WebCore::InspectorDOMAgent::buildObjectForNode):
2557         * inspector/InspectorIndexedDBAgent.cpp:
2558         (WebCore):
2559         * inspector/InspectorMemoryAgent.cpp:
2560         * inspector/InspectorPageAgent.cpp:
2561         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
2562         * inspector/InspectorResourceAgent.cpp:
2563         (WebCore::buildObjectForTiming):
2564         (WebCore::buildObjectForCachedResource):
2565         * inspector/InspectorStyleSheet.cpp:
2566         (WebCore::InspectorStyle::buildObjectForStyle):
2567         (WebCore::InspectorStyleSheet::create):
2568         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
2569         (WebCore::InspectorStyleSheet::buildObjectForRule):
2570         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
2571         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
2572         (WebCore::InspectorStyleSheetForInlineStyle::create):
2573         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
2574         * inspector/InspectorStyleSheet.h:
2575         (InspectorCSSId):
2576         (WebCore::InspectorCSSId::asProtocolValue): method is made template as now it returns 2 formally different types.
2577         (InspectorStyleSheet):
2578         (WebCore::InspectorStyleSheet::canBind):
2579         (InspectorStyleSheetForInlineStyle):
2580
2581 2012-04-06  Pavel Feldman  <pfeldman@chromium.org>
2582
2583         Web Inspector: highlight diff in the gutter, not in the line content.
2584         https://bugs.webkit.org/show_bug.cgi?id=83371
2585
2586         Reviewed by Yury Semikhatsky.
2587
2588         Now that the editing mode is enabled by default, diff highlighting gets annoying.
2589         I am moving it to the gutter (same decoration as before, but now coloring gutter only).
2590
2591         * inspector/front-end/TextViewer.js:
2592         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
2593         * inspector/front-end/textViewer.css:
2594         (.diff-container .webkit-added-line.webkit-line-number):
2595         (.diff-container .webkit-removed-line.webkit-line-number):
2596         (.diff-container .webkit-changed-line.webkit-line-number):
2597
2598 2012-04-06  Pavel Feldman  <pfeldman@chromium.org>
2599
2600         Web Inspector: highlight diff in the gutter, not in the line content.
2601         https://bugs.webkit.org/show_bug.cgi?id=83371
2602
2603         Reviewed by Yury Semikhatsky.
2604
2605         Now that the editing mode is enabled by default, diff highlighting gets annoying.
2606         I am moving it to the gutter (same decoration as before, but now coloring gutter only).
2607
2608         * inspector/front-end/TextViewer.js:
2609         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
2610         * inspector/front-end/textViewer.css:
2611         (.diff-container .webkit-added-line.webkit-line-number):
2612         (.diff-container .webkit-removed-line.webkit-line-number):
2613         (.diff-container .webkit-changed-line.webkit-line-number):
2614
2615 2012-04-06  Pavel Feldman  <pfeldman@chromium.org>
2616
2617         Web Inspector: remove url from the saved urls map before the save action.
2618         https://bugs.webkit.org/show_bug.cgi?id=83364
2619
2620         Reviewed by Yury Semikhatsky.
2621
2622         URL gets added back upon successful save anyways, but if user chooses cancel saving,
2623         we stop bugging him with the save-as dialog.
2624
2625         * inspector/front-end/NetworkPanel.js:
2626         (WebInspector.NetworkLogView.prototype._exportAll):
2627         (WebInspector.NetworkLogView.prototype._exportResource):
2628         * inspector/front-end/ResourcesPanel.js:
2629         (WebInspector.FrameResourceTreeElement.prototype._appendSaveAsAction.doSave):
2630         (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent.doSave):
2631         * inspector/front-end/TextViewer.js:
2632         (WebInspector.TextViewer.prototype._contextMenu):
2633         (WebInspector.TextViewer.prototype._commitEditing):
2634         * inspector/front-end/TimelineModel.js:
2635         (WebInspector.TimelineModel.prototype.saveToFile):
2636         * inspector/front-end/inspector.js:
2637
2638 2012-04-06  Andrey Kosyakov  <caseq@chromium.org>
2639
2640         Web Inspector: display frame details in popover on frame strip in Timeline panel
2641         https://bugs.webkit.org/show_bug.cgi?id=83365
2642
2643         Reviewed by Pavel Feldman.
2644
2645         - added popovers for frame strips;
2646         - factored out generateAggregatedInfo for reuse in the above;
2647         - made frame event dividers thinner, darker and greyer.
2648
2649         * English.lproj/localizedStrings.js: Added "FPS" and "Frame"
2650         * inspector/front-end/TimelineFrameController.js:
2651         (WebInspector.TimelineFrameController.prototype._flushFrame): added startTimeOffset.
2652         (WebInspector.TimelineFrameController.prototype._createSyntheticFrame): ditto.
2653         * inspector/front-end/TimelineModel.js:
2654         (WebInspector.TimelineModel.prototype._updateBoundaries):
2655         (WebInspector.TimelineModel.prototype.recordOffsetInSeconds):
2656         * inspector/front-end/TimelinePanel.js:
2657         (WebInspector.TimelinePanel.prototype._updateFrames): added link to frame to strip div.
2658         (WebInspector.TimelinePanel.prototype._refresh):
2659         (WebInspector.TimelinePanel.prototype._getPopoverAnchor): handle frame anchors separately.
2660         (WebInspector.TimelinePanel.prototype._mouseMove): ditto.
2661         (WebInspector.TimelinePanel.prototype._showPopover):
2662         * inspector/front-end/TimelinePresentationModel.js:
2663         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
2664         (WebInspector.TimelinePresentationModel._generateAggregatedInfo): factored out for reuse.
2665         (WebInspector.TimelinePresentationModel.generatePopupContentForFrame):
2666         * inspector/front-end/inspectorCommon.css:
2667         (.resources-dividers-label-bar):
2668         * inspector/front-end/timelinePanel.css:
2669         (.timeline .resources-event-divider.timeline-frame-divider): made divider thin and grey.
2670         (.timeline-frame-strip): bumped z-index, added pointer-events: auto.
2671
2672 2012-04-06  Pavel Feldman  <pfeldman@chromium.org>
2673
2674         Web Inspector: show "dirty" flag for CSS files edited in the resources panel.
2675         https://bugs.webkit.org/show_bug.cgi?id=83363
2676
2677         Reviewed by Yury Semikhatsky.
2678
2679         Added TextEdited notification into the editable source frame, listening to it
2680         in the resources panel.
2681
2682         * inspector/front-end/ResourceView.js:
2683         (WebInspector.EditableResourceSourceFrame.prototype._contentChanged):
2684         (WebInspector.EditableResourceSourceFrame.prototype.isDirty):
2685         * inspector/front-end/ResourcesPanel.js:
2686         (WebInspector.FrameResourceTreeElement.prototype._appendRevision):
2687         (WebInspector.FrameResourceTreeElement.prototype.sourceView):
2688         (WebInspector.FrameResourceTreeElement.prototype._sourceViewTextEdited):
2689
2690 2012-04-06  Levi Weintraub  <leviw@chromium.org>
2691
2692         Update LayoutUnit usage in RenderView
2693         https://bugs.webkit.org/show_bug.cgi?id=83147
2694
2695         Reviewed by Julien Chaffraix.
2696
2697         Updating the usage of LayoutUnits in RenderView in preparation for sub-pixel layout. This mostly
2698         affects paint and repaint functions, which take LayoutRects up to the RenderView level. This is
2699         necessary as we continue to accumulate sub-pixel offsets up to this level.
2700
2701         No new tests. No change in behavior.
2702
2703         * rendering/RenderView.cpp:
2704         (WebCore::RenderView::paint): Adding an assert that we're being called to paint on pixel
2705         boundaries. We don't currently ever position RenderViews at sub-pixel offsets.
2706         (WebCore::RenderView::shouldRepaint):
2707         (WebCore::RenderView::repaintViewRectangle): Switching to a LayoutRect and cleaning up a fixme
2708         that used decomposed offsets. Pixel snapping is applied before handing the rect up to the
2709         FrameView.
2710         (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers): Pixel snapping before handing
2711         the rect up to the Compositor.
2712         (WebCore::RenderView::computeRectForRepaint):
2713         (WebCore::RenderView::selectionBounds):
2714         (WebCore::RenderView::viewRect):
2715         (WebCore::RenderView::unscaledDocumentRect):
2716         * rendering/RenderView.h:
2717         (RenderView):
2718
2719 2012-04-06  Andrey Kosyakov  <caseq@chromium.org>
2720
2721         Web Inspector: hide popover on mouseout from anchor
2722         https://bugs.webkit.org/show_bug.cgi?id=83362
2723
2724         Reviewed by Pavel Feldman.
2725
2726         - start hide popover timer when mouse moves out of popover anchor, as we won't receive mousemove events any more;
2727         - factored out starting of popover kill timer to a method.
2728
2729         * inspector/front-end/Popover.js:
2730         (WebInspector.PopoverHelper):
2731         (WebInspector.PopoverHelper.prototype._mouseMove): Factored out StartHidePopoverTimer()
2732         (WebInspector.PopoverHelper.prototype._mouseOut): Just call StartHidePopoverTimer() when mouse moves out of anchor.
2733         (WebInspector.PopoverHelper.prototype._startHidePopoverTimer.doHide): 
2734         (WebInspector.PopoverHelper.prototype._startHidePopoverTimer):
2735         (WebInspector.PopoverHelper.prototype._hidePopover): Reset hoverElement (aka anchor) when hiding popover.
2736
2737 2012-04-06  Andrey Kosyakov  <caseq@chromium.org>
2738
2739         [Chromium] Web Inspector: getEventListeners(window) crashes on NTP
2740         https://bugs.webkit.org/show_bug.cgi?id=83353
2741
2742         Reviewed by Pavel Feldman.
2743
2744         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2745         (WebCore::V8InjectedScriptHost::getEventListenersCallback):
2746
2747 2012-04-06  Kent Tamura  <tkent@chromium.org>
2748
2749         Touch ChromeClient.h to fix Chromium build.
2750         https://bugs.webkit.org/show_bug.cgi?id=83258
2751
2752         * page/ChromeClient.h:
2753
2754 2012-04-06  Kent Tamura  <tkent@chromium.org>
2755
2756         Initial LocalizedDateICU.cpp implementation
2757         https://bugs.webkit.org/show_bug.cgi?id=60868
2758
2759         Reviewed by Hajime Morita.
2760
2761         Add LocalizedDateICU.cpp, which supports only Date type.  It uses a
2762         short format because a date field is keyboard-editable.
2763         e.g. 5/15/11 in US locale.
2764
2765         * WebCore.gyp/WebCore.gyp: Exclude LocalizedDateNone.cpp.
2766         * WebCore.gypi: Add LocalizedDateICU.cpp.
2767         * platform/text/LocalizedDateICU.cpp: Added.
2768         (WebCore::parseLocalizedDate):
2769         (WebCore::formatLocalizedDate):
2770
2771 2012-04-05  Alexander Pavlov  <apavlov@chromium.org>
2772
2773         [REGRESSION] Refreshed autofill popup renders garbage
2774         https://bugs.webkit.org/show_bug.cgi?id=83255
2775         http://code.google.com/p/chromium/issues/detail?id=118374
2776
2777         The code used to update only the PopupContainer coordinates as if they were the coordinates relative
2778         to the root view. Instead, a WebWidget positioned relative to the screen origin holds the PopupContainer,
2779         so it is the WebWidget that should be positioned in PopupContainer::refresh(), and the PopupContainer's
2780         location should be (0, 0) (and their sizes should always be equal).
2781
2782         Reviewed by Kent Tamura.
2783
2784         No new tests, as the popup appearance is not testable in WebKit.
2785
2786         * platform/chromium/PopupContainer.cpp:
2787         (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Variable renamed.
2788         (WebCore::PopupContainer::showPopup): Use m_originalFrameRect rather than frameRect()
2789         for passing into chromeClient.
2790         (WebCore::PopupContainer::showInRect): Set up the correct frameRect() for the container.
2791         (WebCore::PopupContainer::refresh): Resize the container and position the WebWidget correctly.
2792         * platform/chromium/PopupContainer.h:
2793         (PopupContainer):
2794
2795 2012-04-06  Kent Tamura  <tkent@chromium.org>
2796
2797         Calendar Picker: Add code to open/close the calendar picker
2798         https://bugs.webkit.org/show_bug.cgi?id=83258
2799
2800         Reviewed by Hajime Morita.
2801
2802         No new tests. This code is not used because of no ENABLE_INPUT_TYPE_DATE.
2803
2804         * WebCore.gypi: Add existing header files.
2805
2806         * html/DateInputType.cpp:
2807         (WebCore::DateInputType::DateInputType):
2808         Moved from DateInputType.h because the constructor depends on
2809         CalendarPickerElement.
2810         (WebCore::DateInputType::createShadowSubtree):
2811         Store a CalendarPickerElement object.
2812         (WebCore::DateInputType::destroyShadowSubtree):
2813         Release the CalendarPickerElement object.
2814         (WebCore::DateInputType::handleBlurEvent):
2815         Close the calendar picker when the input loses focus.
2816         * html/DateInputType.h:
2817         (DateInputType):
2818         - Move the constructor definition to DateInputType.cpp
2819         - Add function declarations
2820         - Add m_pickerElement data member.
2821
2822         * html/shadow/CalendarPickerElement.cpp:
2823         (WebCore::CalendarPickerElement::hostInput): A helper to get the host <input>.
2824         (WebCore::CalendarPickerElement::defaultEventHandler):
2825         If the element is clicked, open a calendar picker.
2826         (WebCore::CalendarPickerElement::openPopup):
2827         Opens a calendar picker by ChromeClient::openPagePopup().
2828         (WebCore::CalendarPickerElement::closePopup):
2829         Closes a calendar picker by ChromeClient::closePagePopup().
2830         (WebCore::CalendarPickerElement::detach):
2831         Closes a calendar picker when the element loses a renderer.
2832
2833         (WebCore::CalendarPickerElement::contentSize):
2834         Provides the initial size of a popup.
2835         (WebCore::addString): A helper for writeDocument().
2836         (WebCore::addJavaScriptString): ditto.
2837         (WebCore::addProperty): ditto.
2838         (WebCore::CalendarPickerElement::writeDocument):
2839         Provides the source of a popup. The function creates a complete HTML with:
2840         - WebCore/Resources/calendarPicker.css
2841         - WebCore/Resources/calendarPicker.js
2842         - An object to pass localization strings and <input> state
2843         (WebCore::CalendarPickerElement::setValueAndClosePopup):
2844         Sets the value from a calendar picker to the <input>.
2845         (WebCore::CalendarPickerElement::didClosePopup):
2846         Clear the popup object.
2847         * html/shadow/CalendarPickerElement.h:
2848         (CalendarPickerElement): Add declarations.
2849
2850         * platform/text/LocalizedCalendarICU.cpp:
2851         (WebCore::getFirstDayOfWeek): Make sure this is 0-base. UCAL_SUNDAY is 1.
2852
2853 2012-04-05  Adele Peterson  <adele@apple.com>
2854
2855         <rdar://problem/11133179> and https://bugs.webkit.org/show_bug.cgi?id=74129
2856         REGRESSION (SnowLeopard, 5.1.4): All WK2 horizontal scrollbars look broken
2857
2858         Patch by Dan Bernstein, Reviewed by Beth Dakin.
2859
2860         This code assumed that the current CTM wouldn't have extraneous operations built into it, 
2861         but this bug is evidence that that assumption was wrong. We should just get the base CTM instead 
2862         and apply the device scale factor to it.
2863
2864         No tests added since the SnowLeopard-style scrollbars aren't testable in our regression tests right now.
2865
2866         * platform/graphics/GraphicsContext.cpp:
2867         (WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
2868         (WebCore::GraphicsContext::applyDeviceScaleFactor):
2869         * platform/graphics/GraphicsContext.h: (GraphicsContext):
2870         * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
2871
2872 2012-04-05  Yuta Kitamura  <yutak@chromium.org>
2873
2874         Leak in WebSocketChannel with workers/worker-reload.html
2875         https://bugs.webkit.org/show_bug.cgi?id=83345
2876
2877         Reviewed by David Levin.
2878
2879         A speculative fix of memory leaks caused by worker-reload.html.
2880
2881         No new tests, as this change imposes no functional change.
2882
2883         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2884         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy):
2885         Receive the peer as PassOwnPtr<> so the destructor of the task object can
2886         delete the peer even if the task didn't run before main thread's cleanup period.
2887         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
2888         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
2889         (WorkerThreadableWebSocketChannel):
2890
2891 2012-04-05  Lu Guanqun  <guanqun.lu@intel.com>
2892
2893         combine two arrays (coreExceptionNames and coreExceptionDescriptions) into one array
2894         https://bugs.webkit.org/show_bug.cgi?id=83141
2895
2896         Reviewed by Adam Barth.
2897
2898         No new tests required.
2899
2900         * dom/DOMCoreException.cpp:
2901         (CoreException):
2902         (WebCore):
2903         (WebCore::DOMCoreException::initializeDescription):
2904
2905 2012-04-05  David Barton  <dbarton@mathscribe.com>
2906
2907         Remove intrinsic padding from contentBoxRect(), etc.
2908         https://bugs.webkit.org/show_bug.cgi?id=83092
2909
2910         Reviewed by Julien Chaffraix.
2911
2912         "Intrinsic padding" does not count as CSS padding, but is treated as padding by basic
2913         layout and rendering code, e.g. RenderBlock::layout(). A lot of code relies on the
2914         equation border-box = content-box + padding + border (+ scrollbars). To keep this valid,
2915         change 5 functions in RenderBox.h to not include intrinsic padding in the content box,
2916         thus reverting to their behavior before the patch for bug 33593. Instead, have
2917         sizingBox(renderer) in CSSComputedStyleDeclaration.cpp explicitly put the intrinsic
2918         padding in computed CSS content-box values [for javascript getComputedStyle()], so the
2919         above equation still also holds for CSS computed values. This seems more consistent with
2920         how the padding...() functions behave since the patch for bug 23487, and will work
2921         better for MathML. For instance, a block's contentLogicalWidth() will be the
2922         availableLogicalWidth() for use by child elements.
2923
2924         No new tests. The only real observable changes are illustrated in the bug 83092 attached
2925         test case and discussion. These are minor and hard to automate.
2926
2927         * css/CSSComputedStyleDeclaration.cpp:
2928         (WebCore::sizingBox):
2929         * editing/DeleteSelectionCommand.cpp:
2930         (WebCore::DeleteSelectionCommand::removeNode):
2931         * rendering/RenderBox.h:
2932         (WebCore::RenderBox::contentBoxRect):
2933         (WebCore::RenderBox::contentWidth):
2934         (WebCore::RenderBox::contentHeight):
2935         (WebCore::RenderBox::contentLogicalWidth):
2936         (WebCore::RenderBox::contentLogicalHeight):
2937             - Change these 5 functions to omit intrinsic padding from the content box.
2938         * rendering/RenderTableCell.cpp:
2939         (WebCore::RenderTableCell::cellBaselinePosition):
2940         * rendering/RenderTableSection.cpp:
2941         (WebCore::RenderTableSection::firstLineBoxBaseline):
2942
2943 2012-04-05  Hironori Bono  <hbono@chromium.org>
2944
2945         [Chromium] moving a cursor on a misspelled word should not remove a misspelled underline
2946         https://bugs.webkit.org/show_bug.cgi?id=83214
2947
2948         Reviewed by Ryosuke Niwa.
2949
2950         When Chrome enables asynchronous spellchecking, it adds Spelling markers in the
2951         background. For this case, moving a cursor should not remove these markers
2952         because it requires Chrome to spellcheck text again. This change prevents
2953         removing Spelling markers added by spellcheckers asynchronously.
2954
2955         Test: platform/chromium/editing/spelling/move-cursor-to-misspelled-word.html
2956
2957         * editing/Editor.cpp:
2958         (WebCore::Editor::respondToChangedSelection):
2959
2960 2012-04-05  Hans Muller  <hmuller@adobe.com>
2961
2962         CSS Exclusions polygon shape arguments should be comma separated
2963         https://bugs.webkit.org/show_bug.cgi?id=82368
2964
2965         Reviewed by Ryosuke Niwa.
2966
2967         Changed the CSS Parser to accept a conventional comma separated argument list for the
2968         polygon exclusion shape. The syntax had used spaces to separate x,y coordinates, like:
2969         polygon(10px,20px 30px,40px).  Now commas separate points: polygon(10px 20px, 30px 40px).
2970         This change is per the draft exclusions spec, http://dev.w3.org/csswg/css3-exclusions.
2971         Additional relevant information about CSS argument list syntax can be found
2972         here: http://dev.w3.org/csswg/css3-values/#component-whitespace.
2973
2974         Factored comma recognition idiom in CSSParser.cpp into isComma() utility function.
2975
2976         The existing tests have been updated.
2977
2978         * css/CSSParser.cpp:
2979         (WebCore::isComma)
2980         (WebCore::CSSParser::parseFillPosition)
2981         (WebCore::CSSParser::parseFillRepeat)
2982         (WebCore::CSSParser::parseFillProperty)
2983         (WebCore::CSSParser::parseCubicBezierTimingFunctionValue)
2984         (WebCore::CSSParser::parseAnimationTimingFunction)
2985         (WebCore::CSSParser::parseAnimationProperty)
2986         (WebCore::CSSParser::parseExclusionShapePolygon)
2987         (WebCore::CSSParser::parseDeprecatedGradient)
2988         (WebCore::CSSParser::parseRadialGradient)
2989         (WebCore::CSSParser::parseGradientColorStops)
2990         (WebCore::CSSParser::parseImageSet)
2991         (WebCore::filterInfoForName)
2992         (WebCore::CSSParser::parseCustomFilter)
2993         (WebCore::CSSParser::parseFontFeatureSettings)
2994
2995         * css/CSSWrapShapes.cpp:
2996         (WebCore::CSSWrapShapePolygon::cssText):
2997
2998 2012-04-05  Joshua Bell  <jsbell@chromium.org>
2999
3000         IndexedDB: Support string.length in keyPaths
3001         https://bugs.webkit.org/show_bug.cgi?id=83221
3002
3003         Special case in the IDB spec - keyPaths can reference the |length| property
3004         of string values. Other instrinsic properties (|length| of Array, etc) are
3005         handled automagically. Relevant section of the updated spec is:
3006         http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#key-path-construct
3007
3008         Reviewed by Kentaro Hara.
3009
3010         Test: storage/indexeddb/keypath-intrinsic-properties.html
3011
3012         * bindings/v8/IDBBindingUtilities.cpp:
3013         (WebCore):
3014
3015 2012-04-05  Arvid Nilsson  <anilsson@rim.com>
3016
3017         [BlackBerry] Update the InstrumentedPlatformCanvas after rebasing Skia
3018         https://bugs.webkit.org/show_bug.cgi?id=83314
3019
3020         Reviewed by George Staikos.
3021
3022         RIM PR: 143771
3023         One new virtual method was added to the SkCanvas, to draw a nine piece
3024         image. Override it and mark output as not being a solid color anymore.
3025
3026         * platform/graphics/blackberry/InstrumentedPlatformCanvas.h:
3027         (WebCore::InstrumentedPlatformCanvas::drawBitmapNine):
3028         (InstrumentedPlatformCanvas):
3029
3030 2012-04-05  Oliver Hunt  <oliver@apple.com>
3031
3032         Make WebCore use jsCast rather than static_cast for casting JSC objects
3033         https://bugs.webkit.org/show_bug.cgi?id=83320
3034
3035         Reviewed by Stephanie Lewis.
3036
3037         Mechanically replace static_cast with jsCast where ever we can.
3038
3039         * WebCore.exp.in:
3040         * bindings/js/DOMWrapperWorld.cpp:
3041         (WebCore::JSStringOwner::finalize):
3042         * bindings/js/DOMWrapperWorld.h:
3043         (WebCore::currentWorld):
3044         * bindings/js/JSArrayBufferCustom.cpp:
3045         (WebCore::JSArrayBufferConstructor::constructJSArrayBuffer):
3046         * bindings/js/JSAudioContextCustom.cpp:
3047         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
3048         * bindings/js/JSCSSRuleListCustom.cpp:
3049         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
3050         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3051         (WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
3052         (WebCore::cssPropertyGetterCallback):
3053         * bindings/js/JSCSSValueCustom.cpp:
3054         (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
3055         (WebCore::JSCSSValueOwner::finalize):
3056         * bindings/js/JSDOMBinding.cpp:
3057         (WebCore::reportException):
3058         * bindings/js/JSDOMBinding.h:
3059         (WebCore::deprecatedGlobalObjectForPrototype):
3060         (WebCore::getDOMPrototype):
3061         * bindings/js/JSDOMFormDataCustom.cpp:
3062         (WebCore::toHTMLFormElement):
3063         (WebCore::JSDOMFormDataConstructor::constructJSDOMFormData):
3064         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
3065         (WebCore::JSDOMMimeTypeArray::nameGetter):
3066         * bindings/js/JSDOMPluginArrayCustom.cpp:
3067         (WebCore::JSDOMPluginArray::nameGetter):
3068         * bindings/js/JSDOMPluginCustom.cpp:
3069         (WebCore::JSDOMPlugin::nameGetter):
3070         * bindings/js/JSDOMStringMapCustom.cpp:
3071         (WebCore::JSDOMStringMap::nameGetter):
3072         * bindings/js/JSDOMWindowBase.cpp:
3073         (WebCore::toJSDOMWindow):
3074         * bindings/js/JSDOMWindowCustom.cpp:
3075         (WebCore::childFrameGetter):
3076         (WebCore::indexGetter):
3077         (WebCore::namedItemGetter):
3078         (WebCore::toDOMWindow):
3079         * bindings/js/JSDOMWindowCustom.h:
3080         (WebCore::asJSDOMWindow):
3081         * bindings/js/JSDOMWindowShell.h:
3082         (WebCore::JSDOMWindowShell::window):
3083         * bindings/js/JSDOMWrapper.h:
3084         (WebCore::JSDOMWrapper::globalObject):
3085         * bindings/js/JSDataViewCustom.cpp:
3086         (WebCore::JSDataViewConstructor::constructJSDataView):
3087         * bindings/js/JSEventListener.cpp:
3088         (WebCore::JSEventListener::handleEvent):
3089         * bindings/js/JSEventTarget.cpp:
3090         (WebCore):
3091         (WebCore::toEventTarget):
3092         * bindings/js/JSFloat32ArrayCustom.cpp:
3093         (WebCore::JSFloat32ArrayConstructor::constructJSFloat32Array):
3094         * bindings/js/JSFloat64ArrayCustom.cpp:
3095         (WebCore::JSFloat64ArrayConstructor::constructJSFloat64Array):
3096         * bindings/js/JSGeolocationCustom.cpp:
3097         (WebCore::JSGeolocation::getCurrentPosition):
3098         (WebCore::JSGeolocation::watchPosition):
3099         * bindings/js/JSHTMLAllCollectionCustom.cpp:
3100         (WebCore::callHTMLAllCollection):
3101         (WebCore::JSHTMLAllCollection::nameGetter):
3102         * bindings/js/JSHTMLCollectionCustom.cpp:
3103         (WebCore::JSHTMLCollection::nameGetter):
3104         * bindings/js/JSHTMLDocumentCustom.cpp:
3105         (WebCore::JSHTMLDocument::nameGetter):
3106         * bindings/js/JSHTMLFormElementCustom.cpp:
3107         (WebCore::JSHTMLFormElement::nameGetter):
3108         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
3109         (WebCore::JSHTMLFrameSetElement::nameGetter):
3110         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
3111         (WebCore::JSHTMLOptionsCollection::remove):
3112         * bindings/js/JSImageConstructor.cpp:
3113         (WebCore::constructImage):
3114         * bindings/js/JSInjectedScriptManager.cpp:
3115         (WebCore::InjectedScriptManager::createInjectedScript):
3116         (WebCore::InjectedScriptManager::discardInjectedScript):
3117         (WebCore::InjectedScriptManager::injectedScriptFor):
3118         * bindings/js/JSInt16ArrayCustom.cpp:
3119         (WebCore::JSInt16ArrayConstructor::constructJSInt16Array):
3120         * bindings/js/JSInt32ArrayCustom.cpp:
3121         (WebCore::JSInt32ArrayConstructor::constructJSInt32Array):
3122         * bindings/js/JSInt8ArrayCustom.cpp:
3123         (WebCore::JSInt8ArrayConstructor::constructJSInt8Array):
3124         * bindings/js/JSLazyEventListener.cpp:
3125         (WebCore::JSLazyEventListener::initializeJSFunction):
3126         * bindings/js/JSNamedNodeMapCustom.cpp:
3127         (WebCore::JSNamedNodeMap::nameGetter):
3128         * bindings/js/JSNodeCustom.cpp:
3129         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
3130         (WebCore::JSNodeOwner::finalize):
3131         * bindings/js/JSNodeCustom.h:
3132         (WebCore::toJS):
3133         * bindings/js/JSNodeFilterCustom.cpp:
3134         (WebCore::toNodeFilter):
3135         * bindings/js/JSNodeListCustom.cpp:
3136         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
3137         (WebCore::JSNodeList::nameGetter):
3138         * bindings/js/JSPluginElementFunctions.cpp:
3139         (WebCore::runtimeObjectPropertyGetter):
3140         (WebCore::callPlugin):
3141         * bindings/js/JSPopStateEventCustom.cpp:
3142         (WebCore::JSPopStateEvent::state):
3143         * bindings/js/JSSQLTransactionCustom.cpp:
3144         (WebCore::JSSQLTransaction::executeSql):
3145         * bindings/js/JSSharedWorkerCustom.cpp:
3146         (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
3147         * bindings/js/JSStorageCustom.cpp:
3148         (WebCore::JSStorage::nameGetter):
3149         * bindings/js/JSStyleSheetListCustom.cpp:
3150         (WebCore::JSStyleSheetList::nameGetter):
3151         * bindings/js/JSTextTrackCueCustom.cpp:
3152         (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
3153         * bindings/js/JSTextTrackCustom.cpp:
3154         (WebCore::JSTextTrackOwner::isReachableFromOpaqueRoots):
3155         * bindings/js/JSTextTrackListCustom.cpp:
3156         (WebCore::JSTextTrackListOwner::isReachableFromOpaqueRoots):
3157         * bindings/js/JSTrackCustom.cpp:
3158         (WebCore::toTrack):
3159         * bindings/js/JSUint16ArrayCustom.cpp:
3160         (WebCore::JSUint16ArrayConstructor::constructJSUint16Array):
3161         * bindings/js/JSUint32ArrayCustom.cpp:
3162         (WebCore::JSUint32ArrayConstructor::constructJSUint32Array):
3163         * bindings/js/JSUint8ArrayCustom.cpp:
3164         (WebCore::JSUint8ArrayConstructor::constructJSUint8Array):
3165         * bindings/js/JSUint8ClampedArrayCustom.cpp:
3166         (WebCore::JSUint8ClampedArrayConstructor::constructJSUint8ClampedArray):
3167         * bindings/js/JSWebKitMutationObserverCustom.cpp:
3168         (WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver):
3169         * bindings/js/JSWebKitPointCustom.cpp:
3170         (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
3171         * bindings/js/JSWebSocketCustom.cpp:
3172         (WebCore::JSWebSocketConstructor::constructJSWebSocket):
3173         * bindings/js/JSWorkerContextBase.cpp:
3174         (WebCore::toJSDedicatedWorkerContext):
3175         (WebCore::toJSSharedWorkerContext):
3176         * bindings/js/JSWorkerCustom.cpp:
3177         (WebCore::JSWorkerConstructor::constructJSWorker):
3178         * bindings/js/JSXSLTProcessorCustom.cpp:
3179         (WebCore::JSXSLTProcessor::importStylesheet):
3180         (WebCore::JSXSLTProcessor::transformToFragment):
3181         (WebCore::JSXSLTProcessor::transformToDocument):
3182         * bindings/js/ScriptCallStackFactory.cpp:
3183         (WebCore::createScriptCallStackForInspector):
3184         * bindings/js/ScriptControllerMac.mm:
3185         (WebCore::updateStyleIfNeededForBindings):
3186         * bindings/js/ScriptDebugServer.cpp:
3187         (WebCore::ScriptDebugServer::dispatchDidPause):
3188         * bindings/js/ScriptObject.cpp:
3189         (WebCore::ScriptGlobalObject::set):
3190         * bindings/js/ScriptState.cpp:
3191         (WebCore::domWindowFromScriptState):
3192         (WebCore::scriptExecutionContextFromScriptState):
3193         * bindings/js/SerializedScriptValue.cpp:
3194         (WebCore::CloneSerializer::fillTransferMap):
3195         (WebCore::CloneSerializer::dumpArrayBufferView):
3196         (WebCore::CloneDeserializer::getJSValue):
3197         (WebCore::CloneDeserializer::readTerminal):
3198         * bindings/objc/WebScriptObject.mm:
3199         (-[WebScriptObject _isSafeScript]):
3200         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
3201         * bindings/scripts/CodeGeneratorJS.pm:
3202         (GenerateGetOwnPropertySlotBody):
3203         (GenerateGetOwnPropertyDescriptorBody):
3204         (GenerateImplementation):
3205         (GenerateCallWith):
3206         (NativeToJSValue):
3207         (GenerateConstructorDefinition):
3208         * bridge/jni/jni_jsobject.h:
3209         * bridge/jni/jni_jsobject.mm:
3210         (JavaJSObject::convertJObjectToValue):
3211         * bridge/jni/jsc/JavaInstanceJSC.cpp:
3212         (JavaInstance::invokeMethod):
3213         * bridge/objc/objc_utility.mm:
3214         (JSC::Bindings::convertValueToObjcValue):
3215         * bridge/runtime_method.cpp:
3216         (JSC::callRuntimeMethod):
3217         * bridge/runtime_object.cpp:
3218         (JSC::Bindings::callRuntimeConstructor):
3219         * testing/js/WebCoreTestSupport.cpp:
3220         (WebCoreTestSupport::injectInternalsObject):
3221         (WebCoreTestSupport::resetInternalsObject):
3222
3223 2012-04-05  Martin Robinson  <mrobinson@igalia.com>
3224
3225         [GTK] Scrolling some iframes that are partially out of the viewport leads to repaint errors
3226         https://bugs.webkit.org/show_bug.cgi?id=83309
3227
3228         Reviewed by Gustavo Noronha Silva.
3229
3230         Test: platform/gtk/fast/frames/scrolling-iframe-out-of-viewport.html
3231
3232         The X11 backing store was not properly trimming the scroll region when it
3233         was only a portion of the screen. This was hidden by subsequent repaints.
3234
3235         * platform/gtk/GtkWidgetBackingStoreX11.cpp:
3236         (WebCore::WidgetBackingStore::scroll): Fix the calculation of the scrolling region.
3237
3238 2012-04-05  Sheriff Bot  <webkit.review.bot@gmail.com>
3239
3240         Unreviewed, rolling out r113299.
3241         http://trac.webkit.org/changeset/113299
3242         https://bugs.webkit.org/show_bug.cgi?id=83297
3243
3244         The patch broke 11 tests on Lion. (Requested by jonlee on
3245         #webkit).
3246
3247         * xml/parser/XMLDocumentParser.h:
3248         (XMLDocumentParser):
3249         * xml/parser/XMLDocumentParserLibxml2.cpp:
3250         (WebCore::XMLDocumentParser::XMLDocumentParser):
3251         (WebCore::XMLDocumentParser::startElementNs):
3252         (WebCore::XMLDocumentParser::endElementNs):
3253         (WebCore::getEntityHandler):
3254         (WebCore::XMLDocumentParser::initializeParserContext):
3255
3256 2012-04-05  Justin Novosad  <junov@chromium.org>
3257
3258         [Chromium] Correct misleading trace event names in Canvas2DLayerChromium
3259         https://bugs.webkit.org/show_bug.cgi?id=83310
3260
3261         Reviewed by Adrienne Walker.
3262
3263         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
3264         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
3265
3266 2012-04-05  Dean Jackson  <dino@apple.com>
3267
3268         [mac] requestAnimationFrame sometimes stuck when page loads in a background tab
3269         https://bugs.webkit.org/show_bug.cgi?id=76105
3270
3271         Reviewed by Simon Fraser.
3272
3273         Fix three issues with requestAnimationFrame:
3274         - It's possible for the call to rAF to come to the document before there
3275           is a page associated. Added a guard for this.
3276         - A page may try to suspend the scripted animations before the
3277           ScriptedAnimationController exists, in which case we need to
3278           suspend it immediately after it is created. Do this by keeping
3279           track of the state in Page. Otherwise rAF would be busy looping
3280           on hidden pages until they are brought to the front and hidden again.
3281         - A page created in the background (from WebKit1) does not get
3282           informed it is not visible. This can mean that resume() is called
3283           more times than suspend() and we get into a state where the number
3284           of suspensions becomes -1, and thus fails truthiness tests. Clamp it
3285           to values >= 0.
3286
3287         No new tests, since this is not automatically testable. The most reliable test
3288         is to open a page with rAF in a background tab within Safari.
3289
3290         * dom/Document.cpp:
3291         (WebCore::Document::webkitRequestAnimationFrame):
3292         * dom/ScriptedAnimationController.cpp:
3293         (WebCore::ScriptedAnimationController::resume):
3294         * page/Page.cpp:
3295         (WebCore::Page::Page):
3296         (WebCore::Page::suspendScriptedAnimations):
3297         (WebCore::Page::resumeScriptedAnimations):
3298         * page/Page.h:
3299         (WebCore::Page::scriptedAnimationsSuspended):
3300         (Page):
3301
3302 2012-04-05  Brady Eidson  <beidson@apple.com>
3303
3304         <rdar://problem/9359029> and https://bugs.webkit.org/show_bug.cgi?id=83311
3305         Crashes in WebProcess at WebCore::HistoryController::recursiveSetProvisionalItem when restoring previous session
3306
3307         Reviewed by Sam Weinig.
3308
3309         It's possible to hit a race condition between the UIProcess and the WebProcess where the UIProcess records for a 
3310         page have been cleared out but the WebProcess is still trying to perform a history navigation within that page.
3311         
3312         In this situation HistoryController code that expects there to always be a current history item in the back/forward
3313         controller is wrong.
3314
3315         No new tests. (The race conditions involved have proven making a test impractical)
3316
3317         * loader/HistoryController.cpp:
3318         (WebCore::HistoryController::recursiveSetProvisionalItem): Don't ASSERT the fromItem. We now know there might not be one.
3319         (WebCore::HistoryController::recursiveGoToItem): Ditto
3320         (WebCore::HistoryController::itemsAreClones): Always return false if either item is null, as a null item and a non-null
3321           item cannot possible be clones of each other.
3322
3323 2012-04-05  Adam Klein  <adamk@chromium.org>
3324
3325         Crash in MutationObservers due to an invalid HashSet iterator
3326         https://bugs.webkit.org/show_bug.cgi?id=83304
3327
3328         Reviewed by Ojan Vafai.
3329
3330         If the observed node has been GCed when we clear transient observers
3331         from it, the HashSet iterator in WebKitMutationObserver::deliver would
3332         be invalidated. This patch fixes that behavior by copying the relevant
3333         registrations into a seperate vector first and operating on the copy.
3334
3335         This patch also fixes a bug: transient observers should be cleared
3336         after every microtask, not just when delivering.
3337
3338         Tests: fast/mutation/clear-transient-without-delivery.html
3339                fast/mutation/transient-gc-crash.html
3340
3341         * dom/MutationObserverRegistration.cpp:
3342         (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
3343         Notify the observer that it has a transient registration so it can be properly cleared.
3344         * dom/MutationObserverRegistration.h:
3345         (WebCore::MutationObserverRegistration::hasTransientRegistrations):
3346         Add an accessor for use when deliver() creates its vector of registrations.
3347         * dom/WebKitMutationObserver.cpp:
3348         (WebCore::WebKitMutationObserver::setHasTransientRegistration): Add this to the active observer set
3349         to allow transient registrations to be cleared appropriately.
3350         (WebCore::WebKitMutationObserver::deliver): Avoid modifying m_registrations while iterating over it.
3351         Clear registrations before checking for a lack of records to deliver.
3352         * dom/WebKitMutationObserver.h:
3353
3354 2012-04-05  Adam Klein  <adamk@chromium.org>
3355
3356         Rebaseline binding tests after r113272.
3357
3358         * bindings/scripts/test/V8/V8TestInterface.cpp:
3359         (WebCore::V8TestInterface::constructorCallback):
3360         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3361         (WebCore::V8TestNamedConstructorConstructorCallback):
3362         * bindings/scripts/test/V8/V8TestObj.cpp:
3363         (WebCore::V8TestObj::constructorCallback):
3364         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3365         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
3366
3367 2012-04-05  Stephen White  <senorblanco@chromium.org>
3368
3369         [chromium] Drawing an accelerated canvas onto itself is slow.
3370         https://bugs.webkit.org/show_bug.cgi?id=83295
3371
3372         Fixed by using a GPU-side deepCopy() in skia, so we don't trigger a
3373         readback and re-upload.
3374
3375         Reviewed by James Robinson.
3376
3377         Correctness is covered by existing tests. Performance is covered
3378         by the test case attached to the bug.
3379
3380         * platform/graphics/skia/ImageSkia.cpp:
3381         (WebCore::BitmapImageSingleFrameSkia::create):
3382
3383 2012-04-05  Dana Jansens  <danakj@chromium.org>
3384
3385         [chromium] Record the number of tiles paint-culled instead of the incorrect number of pixels
3386         https://bugs.webkit.org/show_bug.cgi?id=82423
3387
3388         Reviewed by Adrienne Walker.
3389
3390         We currently attempt to record the number of pixels we save from uploading,
3391         however the number is wrong in two ways.
3392         1) An early-out if everything is culled results in nothing being reported.
3393         2) With threaded-compositor, the number of pixels uploaded in one tile can be
3394         changed by culling in another tile, making the number far too difficult to
3395         compute to be worthwhile. If a tile was going to be partial-updated, but is
3396         culled, now a new tile gets to be partial-updated instead, which affects the
3397         numbers.
3398
3399         This patch breaks up CCOverdrawMetrics to make the methods/variables less
3400         overloaded and more clear. This way they don't have to mirror each other
3401         so closely on paint/draw sides.
3402
3403         Then we record the number of tiles for which we prevented upload via paint
3404         culling. This will still over-report (a dirty culled tile stays dirty and
3405         will be culled again each commit), but it seems more reasonable as it
3406         clearly does not try to mimic a performance metric in the way that a pixel
3407         count does, but still gives a rough estimation of the amount of paint
3408         culling going on in a page.
3409
3410         Covered by existing tests, modified where needed.
3411
3412         * platform/graphics/chromium/TiledLayerChromium.cpp:
3413         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
3414         * platform/graphics/chromium