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