[BlackBerry] Accelerated compositing updates
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-26  Filip Spacek  <fspacek@rim.com>
2
3         [BlackBerry] Accelerated compositing updates
4         https://bugs.webkit.org/show_bug.cgi?id=82058
5
6         Reviewed by Rob Buis.
7
8         * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
9         (WebCore::CanvasLayerWebKitThread::CanvasLayerWebKitThread):
10         (WebCore::CanvasLayerWebKitThread::~CanvasLayerWebKitThread):
11         (WebCore::CanvasLayerWebKitThread::setDevice):
12         (WebCore::CanvasLayerWebKitThread::updateTextureContentsIfNeeded):
13         * platform/graphics/blackberry/CanvasLayerWebKitThread.h:
14         (WebCore::CanvasLayerWebKitThread::create):
15         (CanvasLayerWebKitThread):
16         * platform/graphics/blackberry/InstrumentedPlatformCanvas.h:
17         (WebCore::InstrumentedPlatformCanvas::InstrumentedPlatformCanvas):
18         (WebCore::InstrumentedPlatformCanvas::save):
19         (WebCore::InstrumentedPlatformCanvas::saveLayer):
20         (WebCore::InstrumentedPlatformCanvas::restore):
21         (WebCore::InstrumentedPlatformCanvas::translate):
22         (WebCore::InstrumentedPlatformCanvas::scale):
23         (WebCore::InstrumentedPlatformCanvas::rotate):
24         (WebCore::InstrumentedPlatformCanvas::skew):
25         (WebCore::InstrumentedPlatformCanvas::concat):
26         (WebCore::InstrumentedPlatformCanvas::setMatrix):
27         (WebCore::InstrumentedPlatformCanvas::clipRect):
28         (WebCore::InstrumentedPlatformCanvas::clipPath):
29         (WebCore::InstrumentedPlatformCanvas::clipRegion):
30         (WebCore::InstrumentedPlatformCanvas::clear):
31         (WebCore::InstrumentedPlatformCanvas::drawPaint):
32         (WebCore::InstrumentedPlatformCanvas::drawPoints):
33         (WebCore::InstrumentedPlatformCanvas::drawRect):
34         (WebCore::InstrumentedPlatformCanvas::drawPath):
35         (WebCore::InstrumentedPlatformCanvas::drawBitmap):
36         (WebCore::InstrumentedPlatformCanvas::drawBitmapRect):
37         (WebCore::InstrumentedPlatformCanvas::drawBitmapMatrix):
38         (WebCore::InstrumentedPlatformCanvas::drawSprite):
39         (WebCore::InstrumentedPlatformCanvas::drawText):
40         (WebCore::InstrumentedPlatformCanvas::drawPosText):
41         (WebCore::InstrumentedPlatformCanvas::drawPosTextH):
42         (WebCore::InstrumentedPlatformCanvas::drawTextOnPath):
43         (WebCore::InstrumentedPlatformCanvas::drawPicture):
44         (WebCore::InstrumentedPlatformCanvas::drawVertices):
45         (WebCore::InstrumentedPlatformCanvas::drawData):
46         * platform/graphics/blackberry/LayerData.h:
47         (WebCore::LayerData::LayerData):
48         (WebCore::LayerData::needsTexture):
49         (LayerData):
50         * platform/graphics/blackberry/LayerTiler.cpp:
51         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
52         * platform/graphics/blackberry/LayerWebKitThread.cpp:
53         (WebCore::LayerWebKitThread::paintContents):
54         (WebCore::LayerWebKitThread::setDrawable):
55         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
56         (WebCore::loadBufferingImageData):
57         * platform/graphics/blackberry/skia/ImageBufferDataSkia.h: Renamed from Source/WebCore/platform/graphics/blackberry/skia/ImageBufferData.h.
58         (WebCore):
59         (ImageBufferData):
60
61 2012-03-26  Stephen Chenney  <schenney@chromium.org>
62
63         Failure to invalidate text position attributes when DOM changes
64         https://bugs.webkit.org/show_bug.cgi?id=81464
65
66         Reviewed by Nikolas Zimmermann.
67
68         The text positioning elements data structure in RenderSVGText must be
69         updated when either the children of the corresponding element are
70         modified, or the length of the text inside the elements changes.
71         Previously, the call to clear the text positioning elements (to force
72         recomputation) was guarded by a flag. If code tried to invalidate when
73         the flag was not set, then something set the flag, the elements would
74         be invalid at use time.
75
76         This patch modifies the method that invalidates the positining
77         attributes so that the action always happens. It also renames the
78         method to more accurately reflect its function.
79
80         Test: svg/custom/delete-modified-text-in-defs-crash.svg
81
82         * rendering/svg/RenderSVGInlineText.cpp:
83         (WebCore::RenderSVGInlineText::setTextInternal): Rename textDOMChanged to invalidateTextPositioningElements
84         * rendering/svg/RenderSVGText.cpp:
85         (WebCore::RenderSVGText::invalidateTextPositioningElements): Rename
86         textDOMChanged to invalidateTextPositioningElements and remove the check against the needsPosition... flag.
87         * rendering/svg/RenderSVGText.h:
88         (RenderSVGText): Rename textDOMChanged to invalidateTextPositioningElements
89         * svg/SVGAElement.cpp:
90         (WebCore::SVGAElement::childrenChanged): Rename textDOMChanged to invalidateTextPositioningElements
91         * svg/SVGTextContentElement.cpp:
92         (WebCore::SVGTextContentElement::childrenChanged): Rename textDOMChanged to invalidateTextPositioningElements
93
94 2012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
95
96         REGRESSION (r110065-r110080): fast/forms/placeholder-set-attribute.html is failing intermittently because WebKit fails to repaint after setting the placeholder attribute
97         https://bugs.webkit.org/show_bug.cgi?id=81802
98
99         Reviewed by Dan Bernstein.
100
101         Covered by fast/forms/placeholder-set-attribute.html which should be less flaky.
102
103         Unfortunately no new test case as this bug requires a very specific set of conditions that I couldn't reproduce deterministically.
104
105         This is a regression from r110072: RenderTextControlSingleLine would rely on the placeholder's RenderLayer to properly repaint during
106         the first layout as the placeholder has overflow: hidden set. r110072 removed the layer in this case and thus we miss a repaint.
107
108         * rendering/RenderTextControlSingleLine.cpp:
109         (WebCore::RenderTextControlSingleLine::layout):
110         For our first layout, we need to make sure our placeholder is painted. layoutBlockChild has a very similar logic to force repaint
111         on a first layout. We don't hit this logic as the placeholder is explicitly skipped in RenderTextControl::layoutSpecialExcludedChild.
112
113 2012-03-26  Julien Chaffraix  <jchaffraix@webkit.org>
114
115         REGRESSION(r110072): fast/forms/textfield-overflow.html is failing
116         https://bugs.webkit.org/show_bug.cgi?id=80531
117
118         Reviewed by Ojan Vafai.
119
120         Tested by fast/forms/textfield-overflow.html (re-enabled after this change).
121
122         The existing code would happily query layout information before calling layout (FTW!).
123         The solution is to properly layout our object, then modify some dimensions as needed while
124         marking ourself as needing layout and then layouting again.
125
126         * rendering/RenderTextControlSingleLine.cpp:
127         (WebCore::RenderTextControlSingleLine::layout):
128         Implemented a proper 2 pass layout algorithm. Removed the |relayoutChildren| logic as:
129         - layoutBlock handles automatically logical height changes.
130         - we were not modifying the logical width between layouts so we don't need to force a
131         child relayout in this case.
132
133 2012-03-26  Robin Cao  <robin.cao@torchmobile.com.cn>
134
135         [BlackBerry] Upstream LayerCompositingThread.{h, cpp}
136         https://bugs.webkit.org/show_bug.cgi?id=79873
137
138         Reviewed by Rob Buis.
139
140         Initial upstream, no new tests.
141
142         * platform/graphics/blackberry/LayerCompositingThread.cpp: Added.
143         (WebCore):
144         (WebCore::LayerCompositingThread::create):
145         (WebCore::LayerCompositingThread::LayerCompositingThread):
146         (WebCore::LayerCompositingThread::~LayerCompositingThread):
147         (WebCore::LayerCompositingThread::destroyOnCompositingThread):
148         (WebCore::LayerCompositingThread::setLayerRenderer):
149         (WebCore::LayerCompositingThread::deleteTextures):
150         (WebCore::LayerCompositingThread::setDrawTransform):
151         (WebCore::getTransformedRect):
152         (WebCore::LayerCompositingThread::getTransformedHolePunchRect):
153         (WebCore::LayerCompositingThread::drawTextures):
154         (WebCore::LayerCompositingThread::drawSurface):
155         (WebCore::LayerCompositingThread::drawMissingTextures):
156         (WebCore::LayerCompositingThread::releaseTextureResources):
157         (WebCore::LayerCompositingThread::setPluginView):
158         (WebCore::LayerCompositingThread::setMediaPlayer):
159         (WebCore::LayerCompositingThread::clearAnimations):
160         (WebCore::LayerCompositingThread::removeSublayer):
161         (WebCore::LayerCompositingThread::indexOfSublayer):
162         (WebCore::LayerCompositingThread::rootLayer):
163         (WebCore::LayerCompositingThread::removeFromSuperlayer):
164         (WebCore::LayerCompositingThread::setSublayers):
165         (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
166         (WebCore::LayerCompositingThread::setVisible):
167         (WebCore::LayerCompositingThread::setNeedsCommit):
168         (WebCore::LayerCompositingThread::scheduleCommit):
169         (WebCore::LayerCompositingThread::updateAnimations):
170         (WebCore::LayerCompositingThread::hasVisibleHolePunchRect):
171         (WebCore::LayerCompositingThread::createLayerRendererSurface):
172         * platform/graphics/blackberry/LayerCompositingThread.h: Added.
173         (Graphics):
174         (WebCore):
175         (LayerCompositingThread):
176         (WebCore::LayerCompositingThread::bindContentsTexture):
177         (WebCore::LayerCompositingThread::getSublayers):
178         (WebCore::LayerCompositingThread::setSuperlayer):
179         (WebCore::LayerCompositingThread::superlayer):
180         (WebCore::LayerCompositingThread::drawTransform):
181         (WebCore::LayerCompositingThread::setDrawOpacity):
182         (WebCore::LayerCompositingThread::drawOpacity):
183         (WebCore::LayerCompositingThread::layerRendererSurface):
184         (WebCore::LayerCompositingThread::clearLayerRendererSurface):
185         (WebCore::LayerCompositingThread::setMaskLayer):
186         (WebCore::LayerCompositingThread::maskLayer):
187         (WebCore::LayerCompositingThread::setReplicaLayer):
188         (WebCore::LayerCompositingThread::replicaLayer):
189         (WebCore::LayerCompositingThread::getDrawRect):
190         (WebCore::LayerCompositingThread::getTransformedBounds):
191         (WebCore::LayerCompositingThread::hasMissingTextures):
192         (WebCore::LayerCompositingThread::isDirty):
193         (WebCore::LayerCompositingThread::isVisible):
194         (WebCore::LayerCompositingThread::setOpacity):
195         (WebCore::LayerCompositingThread::setTransform):
196         (WebCore::LayerCompositingThread::hasRunningAnimations):
197         (WebCore::LayerCompositingThread::numSublayers):
198
199 2012-03-26  Kent Tamura  <tkent@chromium.org>
200
201         Add a notification function for detaching to TextFieldDecorator
202         https://bugs.webkit.org/show_bug.cgi?id=82142
203
204         Reviewed by Dimitri Glazkov.
205
206         Add willDetach() functio to TextFieldDecorator. This will be
207         needed if a decorator opens a popup UI on handleClick(), and the
208         popup UI should be closed when the attaching text field is
209         detached.
210
211         No new tests because of no behavior changes in any platforms.
212
213         * html/shadow/TextFieldDecorationElement.cpp:
214         (WebCore::TextFieldDecorationElement::hostInput):
215         Added. A utilify function to get an HTMLInputElement*.
216         (WebCore::TextFieldDecorationElement::updateImage): Use hostInput().
217         (WebCore::TextFieldDecorationElement::customStyleForRenderer): ditto.
218         (WebCore::TextFieldDecorationElement::detach): Added. Calls TextFieldDecorator::willDetach().
219         (WebCore::TextFieldDecorationElement::defaultEventHandler): Use hostInput().
220         * html/shadow/TextFieldDecorationElement.h:
221         (TextFieldDecorator):
222         (TextFieldDecorationElement):
223
224 2012-03-26  Dan Bernstein  <mitz@apple.com>
225
226         Tried to fix the 32-bit build after r112021.
227
228         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
229         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
230
231 2012-03-26  Leo Yang  <leo.yang@torchmobile.com.cn>
232
233         [BlackBerry] Skeleton code of AsyncFileSystemBlackBerry.cpp
234         https://bugs.webkit.org/show_bug.cgi?id=82157
235
236         Reviewed by Rob Buis.
237
238         AsyncFileSystemBlackBerry is responsible for asynchronous operating
239         on file system for the blackberry porting. It's just skeleton code
240         containing no implementation yet.
241
242         No new tests because of skeleton code.
243
244         * PlatformBlackBerry.cmake: Add AsyncFileSystemBlackBerry.cpp if ENABLE_FILE_SYSTEM is on.
245         * platform/AsyncFileSystem.cpp:
246         (WebCore):
247         * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Added.
248         (WebCore):
249         (WebCore::AsyncFileSystem::isAvailable):
250         (WebCore::AsyncFileSystem::isValidType):
251         (WebCore::AsyncFileSystem::create):
252         (WebCore::AsyncFileSystem::openFileSystem):
253         (WebCore::AsyncFileSystem::crackFileSystemURL):
254         (WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry):
255         (WebCore::AsyncFileSystemBlackBerry::~AsyncFileSystemBlackBerry):
256         (WebCore::AsyncFileSystemBlackBerry::toURL):
257         (WebCore::AsyncFileSystemBlackBerry::move):
258         (WebCore::AsyncFileSystemBlackBerry::copy):
259         (WebCore::AsyncFileSystemBlackBerry::remove):
260         (WebCore::AsyncFileSystemBlackBerry::removeRecursively):
261         (WebCore::AsyncFileSystemBlackBerry::readMetadata):
262         (WebCore::AsyncFileSystemBlackBerry::createFile):
263         (WebCore::AsyncFileSystemBlackBerry::createDirectory):
264         (WebCore::AsyncFileSystemBlackBerry::fileExists):
265         (WebCore::AsyncFileSystemBlackBerry::directoryExists):
266         (WebCore::AsyncFileSystemBlackBerry::readDirectory):
267         (WebCore::AsyncFileSystemBlackBerry::createWriter):
268         (WebCore::AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
269         * platform/blackberry/AsyncFileSystemBlackBerry.h: Added.
270         (WebCore):
271         (AsyncFileSystemBlackBerry):
272
273 2012-03-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
274
275         [BlackBerry] CredentialBackingStore implement encryptString() and decryptString()
276         https://bugs.webkit.org/show_bug.cgi?id=82204
277
278         Reviewed by Rob Buis.
279
280         Implemented encryptedString() and decryptedString() in class CredentialBackingStore
281         by calling BlackBerry::Platform::Encryptor::encryptString() and
282         BlackBerry::Platform::Encryptor::encryptString() respectively.
283
284         No new tests.
285
286         * platform/network/blackberry/CredentialBackingStore.cpp:
287         (WebCore::CredentialBackingStore::encryptedString):
288         (WebCore::CredentialBackingStore::decryptedString):
289
290 2012-03-26  Pavel Feldman  <pfeldman@chromium.org>
291
292         Web Inspector: 'use strict' exceptions stop in inspector code
293         https://bugs.webkit.org/show_bug.cgi?id=82199
294
295         Reviewed by Yury Semikhatsky.
296
297         Accessing callee from within InjectedScript made inspector stop on handled exceptions.
298         I replaced it with Object.prototype.toString.call(obj) === "[object Arguments]".
299
300         * inspector/InjectedScriptSource.js:
301
302 2012-03-26  Mihai Balan  <mibalan@adobe.com>
303
304         [CSS Regions] In region styling (@-webkit-region) the position for CSS rules is incorrectly computed
305         https://bugs.webkit.org/show_bug.cgi?id=81901
306
307         Reviewed by Antti Koivisto.
308
309         Right now CSS rules position does not take into account rules that are inside a @-webkit-region
310         declaration, leading to buggy behavior where rules that appear later in the document are superseded
311         by rules that appear earlier in the document (opposite as how things should be). The fix updates
312         the "global" rules counter once the rules in a @-webkit-region declaration have been added.
313
314         Tests: fast/regions/region-style-rule-position-expected.html
315                fast/regions/region-style-rule-position.html
316
317         * css/CSSStyleSelector.cpp:
318         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
319
320 2012-03-26  Pierre Rossi  <pierre.rossi@nokia.com>
321
322         [Qt] Disable focus ring in the mobile theme.
323         https://bugs.webkit.org/show_bug.cgi?id=81934
324
325         For mobile devices intended to be used only through
326         touch, the focus rings makes little sense and feels
327         awkward.
328
329         Reviewed by Kenneth Rohde Christiansen.
330
331         No new tests. This is merely a cosmetic touch.
332
333         * platform/qt/RenderThemeQtMobile.h:
334         (RenderThemeQtMobile):
335         (WebCore::RenderThemeQtMobile::platformFocusRingColor):
336
337 2012-03-26  Charles Wei  <charles.wei@torchmobile.com.cn>
338
339         [BlackBerry] Clean up networking code and remove WML support.
340         https://bugs.webkit.org/show_bug.cgi?id=82170
341
342         Reviewed by Rob Buis.
343
344         This just removes the WML support of BlackBerry porting, which is already 
345         removed from WebCore. No new tests needed.
346
347         * platform/blackberry/MIMETypeRegistryBlackBerry.cpp:
348         (WebCore):
349         * platform/network/blackberry/DeferredData.cpp:
350         (WebCore::DeferredData::DeferredData):
351         (WebCore::DeferredData::processDeferredData):
352         * platform/network/blackberry/DeferredData.h:
353         (DeferredData):
354         (WebCore::DeferredData::hasDeferredData):
355         * platform/network/blackberry/NetworkJob.cpp:
356         * platform/network/blackberry/NetworkJob.h:
357         (NetworkJob):
358         * platform/network/blackberry/ResourceResponse.h:
359         (WebCore::ResourceResponse::ResourceResponse):
360         (ResourceResponse):
361         * platform/network/blackberry/ResourceResponseBlackBerry.cpp:
362         (WebCore::ResourceResponse::doPlatformCopyData):
363         (WebCore::ResourceResponse::doPlatformAdopt):
364
365 2012-03-26  Philip Rogers  <pdr@google.com>
366
367         Add invalid bounding box concept to SVG containers
368         https://bugs.webkit.org/show_bug.cgi?id=81104
369
370         Reviewed by Nikolas Zimmermann.
371
372         An empty <g> element needs to use an invalid bounding box because
373         an empty bounding box isn't the default state. This change
374         introduces the concept of an invalid object bounding box for
375         both RenderSVGContainer and RenderSVGRoot. Code that
376         does not explicitly check that the bounding box is valid
377         should be unaffected by this change. We use this new invalid
378         flag in computeContainerBoundingBoxes so that we do not
379         include invalid bounding boxes.
380
381         This change also contains a small fix in
382         RenderSVGContainer::toRenderSVGContainer which depended on
383         RenderSVGViewportContainer not inheriting from RenderSVGContainer,
384         which it now does.
385
386         Test: svg/custom/getBBox-empty-container.html
387
388         * rendering/svg/RenderSVGContainer.cpp:
389         (WebCore::RenderSVGContainer::RenderSVGContainer):
390         (WebCore::RenderSVGContainer::updateCachedBoundaries):
391         * rendering/svg/RenderSVGContainer.h:
392         (WebCore::RenderSVGContainer::isObjectBoundingBoxValid):
393         (RenderSVGContainer):
394         (WebCore::toRenderSVGContainer):
395         * rendering/svg/RenderSVGRoot.cpp:
396         (WebCore::RenderSVGRoot::RenderSVGRoot):
397         (WebCore::RenderSVGRoot::updateCachedBoundaries):
398         * rendering/svg/RenderSVGRoot.h:
399         (RenderSVGRoot):
400         * rendering/svg/SVGRenderSupport.cpp:
401         (WebCore):
402         (WebCore::updateObjectBoundingBox):
403         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
404         * rendering/svg/SVGRenderSupport.h:
405         (SVGRenderSupport):
406
407 2012-03-26  Alexei Filippov  <alexeif@chromium.org>
408
409         Web Inspector: Speed up the retainers build phase.
410         https://bugs.webkit.org/show_bug.cgi?id=81763
411
412         Replacing the edge iterator in retainers building phase
413         makes it run 10 times faster (400 ms vs. 4 sec).
414
415         Reviewed by Yury Semikhatsky.
416
417         * inspector/front-end/HeapSnapshot.js:
418         (WebInspector.HeapSnapshot.prototype._buildRetainers):
419
420 2012-03-22  Alexander Pavlov  <apavlov@chromium.org>
421
422         Web Inspector: Migrate InspectorCSSAgent to strict protocol types
423         https://bugs.webkit.org/show_bug.cgi?id=81923
424
425         Reviewed by Pavel Feldman.
426
427         No new tests, as this is a refactoring.
428
429         * inspector/CodeGeneratorInspector.py:
430         * inspector/InspectorCSSAgent.cpp:
431         (SelectorProfile):
432         (WebCore::SelectorProfile::toInspectorObject):
433         (WebCore::InspectorCSSAgent::clearFrontend):
434         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
435         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
436         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
437         (WebCore::InspectorCSSAgent::getAllStyleSheets):
438         (WebCore::InspectorCSSAgent::getStyleSheet):
439         (WebCore::InspectorCSSAgent::setPropertyText):
440         (WebCore::InspectorCSSAgent::toggleProperty):
441         (WebCore::InspectorCSSAgent::setRuleSelector):
442         (WebCore::InspectorCSSAgent::addRule):
443         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
444         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
445         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
446         (WebCore::InspectorCSSAgent::collectStyleSheets):
447         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
448         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
449         * inspector/InspectorCSSAgent.h:
450         (InspectorCSSAgent):
451         * inspector/InspectorStyleSheet.cpp:
452         (WebCore::buildSourceRangeObject):
453         (WebCore::buildMediaObject):
454         (WebCore::fillMediaListChain):
455         (WebCore::InspectorStyle::buildObjectForStyle):
456         (WebCore::InspectorStyle::buildArrayForComputedStyle):
457         (WebCore::InspectorStyle::styleWithProperties):
458         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
459         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
460         (WebCore::InspectorStyleSheet::buildObjectForRule):
461         (WebCore::InspectorStyleSheet::buildObjectForStyle):
462         * inspector/InspectorStyleSheet.h:
463         (WebCore::InspectorCSSId::asProtocolValue):
464         (InspectorStyle):
465         (InspectorStyleSheet):
466
467 2012-03-26  Alexander Pavlov  <apavlov@chromium.org>
468
469         Web Inspector: [REGRESSION] Workarounds for security checks when retrieving stylesheet rule lists are broken
470         https://bugs.webkit.org/show_bug.cgi?id=82191
471
472         Reviewed by Vsevolod Vlasov.
473
474         Test: http/tests/inspector/modify-cross-domain-rule.html
475
476         * inspector/InspectorStyleSheet.cpp:
477         (WebCore::asCSSRuleList):
478         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
479
480 2012-03-26  Carlos Garcia Campos  <cgarcia@igalia.com>
481
482         Unreviewed. Fix make distcheck.
483
484         * GNUmakefile.list.am: Add missing files.
485
486 2012-03-26  Jason Liu  <jason.liu@torchmobile.com.cn>
487
488         [BlackBerry] Cookies mismatch when login to gmail.
489         https://bugs.webkit.org/show_bug.cgi?id=82165
490
491         Redirection's response can add or update cookies. The cookies of ResourceRequest is dirty
492         in this case. We shouldn't copy the dirty cookie header from ResourceRequest to PlatformRequest
493         for redirection loading.
494
495         This issue didn't happen before because we used m_cookieData not the cookie header.
496         Now we use the cookie header to avoid storing double cookie's data, and m_cookieData is removed.
497
498         Reviewed by George Staikos.
499
500         No new tests. It is a refactoring issue.
501
502         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
503         (WebCore::ResourceRequest::initializePlatformRequest):
504
505 2012-03-26  Alexis Menard  <alexis.menard@openbossa.org>
506
507         Increase code sharing between StylePropertySet and CSSPropertyLonghand.
508         https://bugs.webkit.org/show_bug.cgi?id=81960
509
510         Reviewed by Antti Koivisto.
511
512         Use longhands declaration from CSSPropertyLonghand in StylePropertySet in order
513         to avoid code duplication.
514
515         No new tests : refactoring only, we shouldn't have any behavior difference.
516
517         * css/CSSPropertyLonghand.cpp:
518         (WebCore::backgroundLonghand):
519         Re-order the array to match the spec default order.
520         (WebCore::webkitMaskLonghand):
521         Re-order to match the original order.
522         (WebCore::webkitTransformOriginLonghand):
523         A LayoutTest shows that a property was missing.
524         * css/StylePropertySet.cpp:
525         (WebCore::StylePropertySet::getPropertyValue):
526         (WebCore::StylePropertySet::borderSpacingValue):
527         (WebCore::StylePropertySet::get4Values):
528         (WebCore::StylePropertySet::getLayeredShorthandValue):
529         (WebCore::StylePropertySet::getShorthandValue):
530         (WebCore::StylePropertySet::getCommonValue):
531         (WebCore::StylePropertySet::asText):
532         * css/StylePropertySet.h:
533         (WebCore):
534         (StylePropertySet):
535
536 2012-03-26  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
537
538         [Qt] Assert in GestureTapHighlighter.
539         https://bugs.webkit.org/show_bug.cgi?id=82187
540
541         Reviewed by Kenneth Rohde Christiansen.
542
543         Adjust the boundaries of the center-rect before performing the intersection test,
544         since adjusting the boundary may cause a new intersection.
545
546         * page/GestureTapHighlighter.cpp:
547
548 2012-03-26  Antti Koivisto  <antti@apple.com>
549
550         Split MediaList into internal and CSSOM types
551         https://bugs.webkit.org/show_bug.cgi?id=82149
552
553         Reviewed by Andread Kling.
554
555         MediaList is a CSSOM type and should not be used internally.
556         
557         - Use new type MediaQuerySet internally to represent a collection of media queries.
558         - Create MediaList wrapper on-demand for CSSOM purposes only.
559         
560         This moves us forward in separating CSSOM from the internal stylesheet implementation.
561         
562         MediaQuerySet really belongs to a file of its own but that is not part of this patch.
563         
564         * css/CSSGrammar.y:
565         * css/CSSImportRule.cpp:
566         (WebCore::CSSImportRule::create):
567         (WebCore):
568         (WebCore::CSSImportRule::CSSImportRule):
569         (WebCore::CSSImportRule::~CSSImportRule):
570         (WebCore::CSSImportRule::media):
571         (WebCore::CSSImportRule::cssText):
572         * css/CSSImportRule.h:
573         (WebCore):
574         (CSSImportRule):
575         (WebCore::CSSImportRule::mediaQueries):
576         * css/CSSMediaRule.cpp:
577         (WebCore::CSSMediaRule::CSSMediaRule):
578         (WebCore::CSSMediaRule::~CSSMediaRule):
579         (WebCore::CSSMediaRule::cssText):
580         * css/CSSMediaRule.h:
581         (WebCore::CSSMediaRule::create):
582         (WebCore::CSSMediaRule::media):
583         (WebCore::CSSMediaRule::mediaQueries):
584         (CSSMediaRule):
585         * css/CSSParser.cpp:
586         (WebCore::CSSParser::parseMediaQuery):
587         (WebCore::CSSParser::createMediaQuerySet):
588         (WebCore::CSSParser::createImportRule):
589         (WebCore::CSSParser::createMediaRule):
590         (WebCore::CSSParser::updateLastMediaLine):
591         * css/CSSParser.h:
592         (WebCore):
593         (CSSParser):
594         * css/CSSStyleSelector.cpp:
595         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
596         * css/CSSStyleSheet.cpp:
597         (WebCore):
598         (WebCore::CSSStyleSheet::media):
599         (WebCore::CSSStyleSheet::setMediaQueries):
600         * css/CSSStyleSheet.h:
601         (WebCore):
602         (CSSStyleSheet):
603         (WebCore::CSSStyleSheet::mediaQueries):
604         * css/MediaList.cpp:
605         (WebCore):
606         (WebCore::MediaQuerySet::MediaQuerySet):
607         (WebCore::MediaQuerySet::~MediaQuerySet):
608         (WebCore::parseMediaDescriptor):
609         (WebCore::MediaQuerySet::parse):
610         (WebCore::MediaQuerySet::add):
611         (WebCore::MediaQuerySet::remove):
612         (WebCore::MediaQuerySet::addMediaQuery):
613         (WebCore::MediaQuerySet::mediaText):
614         (WebCore::MediaQuerySet::ensureMediaList):
615         
616             - Use OwnPtr<> for MediaQuery ownership.
617             - Move the appropriate functions to MediaQuerySet.
618             - Clean up a bit to make this more readable and better aligned to WebKit style.
619         
620         (WebCore::MediaList::MediaList):
621         (WebCore::MediaList::~MediaList):
622         (WebCore::MediaList::setMediaText):
623         (WebCore::MediaList::item):
624         (WebCore::MediaList::deleteMedium):
625         (WebCore::MediaList::appendMedium):
626         * css/MediaList.h:
627         (WebCore):
628         (WebCore::MediaQuerySet::create):
629         (WebCore::MediaQuerySet::createAllowingDescriptionSyntax):
630         (MediaQuerySet):
631         (WebCore::MediaQuerySet::queryVector):
632         (WebCore::MediaQuerySet::lastLine):
633         (WebCore::MediaQuerySet::setLastLine):
634         (MediaList):
635         (WebCore::MediaList::ref):
636         (WebCore::MediaList::deref):
637         (WebCore::MediaList::length):
638         (WebCore::MediaList::mediaText):
639         (WebCore::MediaList::queries):
640         * css/MediaQueryEvaluator.cpp:
641         (WebCore::MediaQueryEvaluator::eval):
642         * css/MediaQueryEvaluator.h:
643         (WebCore):
644         (MediaQueryEvaluator):
645         * css/MediaQueryList.cpp:
646         (WebCore::MediaQueryList::create):
647         (WebCore::MediaQueryList::MediaQueryList):
648         * css/MediaQueryList.h:
649         (WebCore):
650         (MediaQueryList):
651         * css/MediaQueryMatcher.cpp:
652         (WebCore::MediaQueryMatcher::evaluate):
653         (WebCore::MediaQueryMatcher::matchMedia):
654         * css/MediaQueryMatcher.h:
655         (WebCore):
656         (MediaQueryMatcher):
657         * css/StyleMedia.cpp:
658         (WebCore::StyleMedia::matchMedium):
659         * css/StyleSheet.cpp:
660         (WebCore::StyleSheet::~StyleSheet):
661         
662             Move the media query ownership to CSSStyleSheet where it belongs.
663         
664         (WebCore):
665         * css/StyleSheet.h:
666         (WebCore::StyleSheet::media):
667         (StyleSheet):
668         * dom/DOMImplementation.cpp:
669         (WebCore::DOMImplementation::createCSSStyleSheet):
670         * dom/ProcessingInstruction.cpp:
671         (WebCore::ProcessingInstruction::setCSSStyleSheet):
672         * dom/StyleElement.cpp:
673         (WebCore::StyleElement::createSheet):
674         * html/HTMLLinkElement.cpp:
675         (WebCore::HTMLLinkElement::process):
676         (WebCore::HTMLLinkElement::setCSSStyleSheet):
677         * html/HTMLMediaElement.cpp:
678         (WebCore::HTMLMediaElement::selectNextSourceChild):
679         * html/parser/HTMLPreloadScanner.cpp:
680         (WebCore::HTMLNames::PreloadTask::linkMediaAttributeIsScreen):
681         * inspector/InspectorStyleSheet.cpp:
682         (WebCore::buildMediaObject):
683
684 2012-03-26  Zeno Albisser  <zeno@webkit.org>
685
686         [Qt]WK2] TextureMapperShaderManager should query the program map before creating new shader program instances.
687         https://bugs.webkit.org/show_bug.cgi?id=82178
688
689         If TextureMapperShaderManager already has a reference to an instance of the
690         requested shader program type, this instance should be reused instead of
691         creating a new one.
692
693         Reviewed by Noam Rosenthal.
694
695         * platform/graphics/texmap/TextureMapperShaderManager.h:
696         (WebCore::TextureMapperShaderManager::getShaderProgram):
697
698 2012-03-26  Yury Semikhatsky  <yurys@chromium.org>
699
700         [Chromium] Web Inspector: dedicated worker inspector is empty
701         https://bugs.webkit.org/show_bug.cgi?id=82181
702
703         "beforeunload" event for worker inspector front-end is ingnored if the
704         window url is "about:blank" as it is just unload of the default content
705         before the front-end page load.
706
707         Reviewed by Pavel Feldman.
708
709         * inspector/front-end/WorkerManager.js:
710         (WebInspector.WorkerManager.prototype._workerInspectorClosing):
711
712 2012-03-22  Yury Semikhatsky  <yurys@chromium.org>
713
714         Web Inspector: split nodes and containment edges into two different arrays
715         https://bugs.webkit.org/show_bug.cgi?id=81930
716
717         Extract heap profile nodes and edges into two separate arrays. This
718         way we will have a continuous array of the heap graph nodes and can
719         aviod additional mapping between node index and its position in the
720         heap snapshot.
721
722         Reviewed by Pavel Feldman.
723
724         * inspector/front-end/HeapSnapshot.js:
725         (WebInspector.HeapSnapshot.prototype._init):
726         (WebInspector.HeapSnapshot.prototype._buildContinuousNodeArray):
727         (WebInspector.HeapSnapshot.prototype._createOnlyNodesArray):
728         (WebInspector.HeapSnapshot.prototype._restoreNodeTypes):
729         (WebInspector.HeapSnapshot.prototype._createRetainmentEdgesArray):
730         (WebInspector.HeapSnapshot.prototype._createContainmentEdgesArray):
731         * inspector/front-end/HeapSnapshotProxy.js:
732         (WebInspector.HeapSnapshotWorker):
733
734 2012-03-22  Pavel Podivilov  <podivilov@chromium.org>
735
736         Web Inspector: move resource loading logic from SourceMapParser to CompilerScriptMapping.
737         https://bugs.webkit.org/show_bug.cgi?id=81897
738
739         Reviewed by Vsevolod Vlasov.
740
741         SourceMapParser should only deal with payload parsing.
742
743         * inspector/front-end/CompilerScriptMapping.js:
744         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
745         (WebInspector.CompilerScriptMapping.prototype.addScript):
746         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
747         (WebInspector.SourceMapPayload):
748         (WebInspector.SourceMapParser):
749         (WebInspector.SourceMapParser.prototype.sourceContent):
750         (WebInspector.SourceMapParser.prototype.findEntry):
751         (WebInspector.SourceMapParser.prototype.findEntryReversed):
752         * inspector/front-end/ContentProviders.js:
753         (WebInspector.CompilerSourceMappingContentProvider):
754         (WebInspector.CompilerSourceMappingContentProvider.prototype.requestContent):
755
756 2012-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
757
758         Web Inspector: replace indexOf('a text') === 0 with RegExp because it is much faster.
759         https://bugs.webkit.org/show_bug.cgi?id=82175
760
761         We were using aString.indexOf("Window") but it is not effective from performance point of view.
762         I'm replaced it with RegExp.
763
764         Reviewed by Yury Semikhatsky.
765
766         * inspector/front-end/HeapSnapshot.js:
767         (WebInspector.HeapSnapshotNode.prototype.get isWindow):
768         (WebInspector.HeapSnapshotNode.prototype.get isDetachedDOMTree):
769
770 2012-03-26  Pavel Feldman  <pfeldman@chromium.org>
771
772         Web Inspector: breakpoints should be disabled while live editing JavaScript.
773         https://bugs.webkit.org/show_bug.cgi?id=81947
774
775         Reviewed by Yury Semikhatsky.
776
777         This change disables (removes from the backend) the breakpoints while editing script.
778         Undoing or committing the change restores the breakpoints. Main logic is implemented within
779         JavaScriptSourceFrame, but it required minor tweaking of the text editor: more correct
780         undo/redo wrapper and better detection of the noop opterations.
781
782         * inspector/front-end/JavaScriptSourceFrame.js:
783         (WebInspector.JavaScriptSourceFrame):
784         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
785         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
786         (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
787         (WebInspector.JavaScriptSourceFrame.prototype.addBreakpoint):
788         (WebInspector.JavaScriptSourceFrame.prototype.removeBreakpoint):
789         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
790         * inspector/front-end/TextEditorModel.js:
791         (WebInspector.TextEditorModel.endsWithBracketRegex.):
792         * inspector/front-end/TextViewer.js:
793         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.before):
794         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.after):
795         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo):
796         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
797
798 2012-03-25  Nat Duca  <nduca@chromium.org>
799
800         [chromium] Route willBeginFrame from compositor to WebWidget
801         https://bugs.webkit.org/show_bug.cgi?id=82171
802
803         Reviewed by Darin Fisher.
804
805         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
806         (CCLayerTreeHostClient):
807         (WebCore::CCLayerTreeHost::willBeginFrame):
808         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
809         (WebCore::CCThreadProxy::beginFrame):
810
811 2012-03-25  Hayato Ito  <hayato@chromium.org>
812
813         [Shadow DOM] Add Reified DOM Tree traversal internal APIs.
814         https://bugs.webkit.org/show_bug.cgi?id=79197
815
816         Reviewed by Dimitri Glazkov.
817
818         Add internal APIs which can be used to traverse Reified DOM tree, which is
819         a result of node distribution algorithm explained in Shadow DOM spec.
820         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
821
822         Every public functions defined in ReifiedTreeTraversal are static
823         functions and are named in a similar way to ones defined in WebCore::Node class.
824         The only difference is that ReifiedTreeTraversal APIs consider shadow
825         hosts and also traverse nodes is Shadow DOM subtrees, crossing shadow's upper and lower boundary
826         transparently.
827
828         There is no actual client which uses these APIs. Follow-up patches for FocusNavigation
829         and EventDispatcher will use the APIs so that they can traverse node in reified tree order.
830
831         Test: fast/dom/shadow/reified-tree-traversal.html
832
833         * CMakeLists.txt:
834         * GNUmakefile.list.am:
835         * Target.pri:
836         * WebCore.exp.in:
837         * WebCore.gypi:
838         * WebCore.vcproj/WebCore.vcproj:
839         * WebCore.xcodeproj/project.pbxproj:
840         * dom/ReifiedTreeTraversal.cpp: Added.
841         (WebCore):
842         (WebCore::isShadowHost):
843         (WebCore::shadowTreeFor):
844         (WebCore::shadowTreeOfParent):
845         (WebCore::ReifiedTreeTraversal::firstChild):
846         (WebCore::ReifiedTreeTraversal::lastChild):
847         (WebCore::ReifiedTreeTraversal::lastChildWithoutCrossingUpperBoundary):
848         (WebCore::ReifiedTreeTraversal::traverseChild):
849         (WebCore::ReifiedTreeTraversal::traverseLightChildren):
850         (WebCore::ReifiedTreeTraversal::traverseNode):
851         (WebCore::ReifiedTreeTraversal::nextSibling):
852         (WebCore::ReifiedTreeTraversal::previousSibling):
853         (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToInsertionPoint):
854         (WebCore::ReifiedTreeTraversal::traverseSiblingInCurrentTree):
855         (WebCore::ReifiedTreeTraversal::traverseSiblingOrBackToYoungerShadowRoot):
856         (WebCore::ReifiedTreeTraversal::escapeFallbackContentElement):
857         (WebCore::ReifiedTreeTraversal::traverseNodeEscapingFallbackContents):
858         (WebCore::ReifiedTreeTraversal::parentNode):
859         (WebCore::ReifiedTreeTraversal::parentNodeWithoutCrossingUpperBoundary):
860         (WebCore::ReifiedTreeTraversal::parentNodeOrBackToInsertionPoint):
861         (WebCore::ReifiedTreeTraversal::parentNodeInCurrentTree):
862         (WebCore::ReifiedTreeTraversal::parentNodeBackToYoungerShadowRootOrHost):
863         (WebCore::ReifiedTreeTraversal::adjustedParentNode):
864         (WebCore::ReifiedTreeTraversal::traverseNextNode):
865         (WebCore::ReifiedTreeTraversal::traverseNextNodeWithoutCrossingUpperBoundary):
866         (WebCore::ReifiedTreeTraversal::traversePreviousNode):
867         (WebCore::ReifiedTreeTraversal::traversePreviousNodeWithoutCrossingUpperBoundary):
868         * dom/ReifiedTreeTraversal.h: Added.
869         (WebCore):
870         (ReifiedTreeTraversal):
871         * dom/ShadowTree.cpp:
872         (WebCore::ShadowTree::insertionPointFor):
873         (WebCore::ShadowTree::selectionFor):
874         (WebCore):
875         * dom/ShadowTree.h:
876         (WebCore):
877         (ShadowTree):
878         * html/shadow/HTMLContentSelector.cpp:
879         (WebCore::HTMLContentSelector::findFor):
880         * html/shadow/HTMLContentSelector.h:
881         (HTMLContentSelectionSet):
882         (WebCore::HTMLContentSelectionSet::find):
883         (HTMLContentSelector):
884         * html/shadow/InsertionPoint.h:
885         (WebCore::isInsertionPoint):
886         (WebCore::toInsertionPoint):
887         (WebCore):
888         * testing/Internals.cpp:
889         (WebCore::Internals::nextSiblingInReifiedTree):
890         (WebCore):
891         (WebCore::Internals::firstChildInReifiedTree):
892         (WebCore::Internals::lastChildInReifiedTree):
893         (WebCore::Internals::traverseNextNodeInReifiedTree):
894         (WebCore::Internals::traversePreviousNodeInReifiedTree):
895         * testing/Internals.h:
896         (Internals):
897         * testing/Internals.idl:
898
899 2012-03-25  Nikita Vasilyev  <me@elv1s.ru>
900
901         Web Inspector: Indenting fully selected line should not indent the line next to it
902         https://bugs.webkit.org/show_bug.cgi?id=81758
903
904         In the editor, you can select a whole line by moving caret at 0 column
905         position and pressing Shift + Arrow Down/Up. After that, pressing Tab
906         indents 2 lines: fully selected one and the line next to it. The patch
907         changes this behaviour to indent only fully selected line since that is
908         what pretty-match all the other code editors do.
909
910         Reviewed by Pavel Feldman.
911
912         Test: inspector/editor/indentation.html
913
914         * inspector/front-end/TextViewer.js:
915         (WebInspector.TextEditorMainPanel.prototype._indentLines):
916             Do not insert indent at the begging of the last line if a selection
917             ends on its 0 column.
918         (WebInspector.TextEditorMainPanel.prototype._unindentLines):
919             Do not remove indent at the begging of the last line if a selection
920             ends on its 0 column.
921
922 2012-03-25  Abhishek Arya  <inferno@chromium.org>
923
924         Crash in ContainerNode::resumePostAttachCallbacks.
925         https://bugs.webkit.org/show_bug.cgi?id=82159
926
927         Reviewed by Hajime Morita.
928
929         Test: plugins/object-onfocus-mutation-crash.html
930
931         * dom/ContainerNode.cpp:
932         (WebCore::ContainerNode::resumePostAttachCallbacks): dispatching post attach
933         callbacks when our attach depth is 1 can fire mutation events such as onfocus
934         which can blow away |this|. Need to protect it with a RefPtr.
935         * html/HTMLPlugInImageElement.cpp:
936         (WebCore::HTMLPlugInImageElement::attach): add calls to suspend attach callbacks
937         until the function completes.
938
939 2012-03-25  Dana Jansens  <danakj@chromium.org>
940
941         [chromium] Layers with animating transforms should prepaint even if they are not visible yet
942         https://bugs.webkit.org/show_bug.cgi?id=82117
943
944         Reviewed by Adrienne Walker.
945
946         For animating transforms, instead of early-outing when the layer's
947         visible rect is empty, let it prepaint regardless.
948
949         For now, we just only paint the outermost tiles, and only for small
950         layers, with at most 9 tiles.
951
952         This changes the behaviour of ContentLayerChromium's
953         idlePaintContentsIfDirty() so I've guarded the behaviour of the two
954         prepainting functions that it calls to ensure the old behaviour holds
955         without animations, and the new behaviour works with them.
956
957         Unit test: TiledLayerChromiumTest.idlePaintZeroSizedLayer
958                    TiledLayerChromiumTest.idlePaintZeroSizedAnimatingLayer
959                    TiledLayerChromiumTest.idlePaintNonVisibleLayers
960                    TiledLayerChromiumTest.idlePaintNonVisibleAnimatingLayers
961
962         * platform/graphics/chromium/ContentLayerChromium.cpp:
963         (WebCore::ContentLayerChromium::idlePaintContentsIfDirty):
964         * platform/graphics/chromium/TiledLayerChromium.cpp:
965         (WebCore::TiledLayerChromium::prepareToUpdateIdle):
966         (WebCore::TiledLayerChromium::needsIdlePaint):
967         (WebCore::TiledLayerChromium::idlePaintRect):
968         * platform/graphics/chromium/TiledLayerChromium.h:
969         (WebCore::TiledLayerChromium::numPaintedTiles):
970         (TiledLayerChromium):
971
972 2012-03-25  Antti Koivisto  <antti@apple.com>
973
974         Don't use CSSRuleList for child rule ownership
975         https://bugs.webkit.org/show_bug.cgi?id=82127
976
977         Reviewed by Andreas Kling.
978
979         CSSMediaRule, WebKitCSSKeyframesRule and WebKitRegionRule use CSSRuleList for storing children. 
980         They should use a simple rule vector instead. CSSRuleList is a CSSOM type that should be 
981         instantiated on-demand for API purposes only.
982         
983         - Use Vector<RefPtr<CSSRule>> for storing the rule children of CSSMediaRule, WebKitCSSKeyframesRule 
984           and WebKitRegionRule.
985         - Add direct accessors, use internally instead of CSSRuleList.
986         - Make CSSRuleList an abstract base. Add concrete subclasses for dealing with the underlying storage.
987         - Instantiate CSSRuleLists on-demand.
988         - Make CSSStyleSheet.cssRules always return the same object instance. This matches Firefox and the rest
989           of our CSSOM implementation. Tested by fast/dom/gc-9.html.
990           
991         The patch decouples internals from the external API. It simplifies the child rule ownership and reduces 
992         indirection. Memory use of css rules with children is reduced (by a ptr, refcount and heap allocation overhead).
993
994         * css/CSSGrammar.y:
995         * css/CSSMediaRule.cpp:
996         (WebCore::CSSMediaRule::CSSMediaRule):
997         (WebCore::CSSMediaRule::~CSSMediaRule):
998         (WebCore::CSSMediaRule::append):
999         (WebCore::CSSMediaRule::insertRule):
1000         (WebCore::CSSMediaRule::deleteRule):
1001         (WebCore::CSSMediaRule::cssText):
1002         (WebCore::CSSMediaRule::cssRules):
1003         * css/CSSMediaRule.h:
1004         (WebCore::CSSMediaRule::create):
1005         (CSSMediaRule):
1006         (WebCore::CSSMediaRule::ruleCount):
1007         (WebCore::CSSMediaRule::ruleAt):
1008         * css/CSSParser.cpp:
1009         (WebCore::CSSParser::createMediaRule):
1010         (WebCore::CSSParser::createRuleList):
1011         (WebCore::CSSParser::createRegionRule):
1012         * css/CSSParser.h:
1013         (WebCore):
1014         * css/CSSRuleList.cpp:
1015         (WebCore):
1016         (WebCore::StaticCSSRuleList::StaticCSSRuleList):
1017         (WebCore::StaticCSSRuleList::~StaticCSSRuleList):
1018         (WebCore::StaticCSSRuleList::deref):
1019         (WebCore::StaticCSSRuleList::item):        
1020         * css/CSSRuleList.h:
1021         (CSSRuleList):
1022
1023             Turn CSSRuleList into abstract interface.
1024                     
1025         (StaticCSSRuleList):
1026         (WebCore::StaticCSSRuleList::create):
1027         (WebCore::StaticCSSRuleList::ref):
1028         (WebCore::StaticCSSRuleList::rules):
1029         (WebCore::StaticCSSRuleList::styleSheet):
1030         (WebCore::StaticCSSRuleList::length):
1031         
1032             Concrete implementation for fixed list of rules.
1033     
1034         (WebCore):
1035         (LiveCSSRuleList):
1036         (WebCore::LiveCSSRuleList::LiveCSSRuleList):
1037         (WebCore::LiveCSSRuleList::ref):
1038         (WebCore::LiveCSSRuleList::deref):
1039         (WebCore::LiveCSSRuleList::length):
1040         (WebCore::LiveCSSRuleList::item):
1041         (WebCore::LiveCSSRuleList::styleSheet):
1042         
1043             Concrete implemenation for live list backed by the underlying container rule.
1044             LiveCSSRuleList is owned by the underlying rule. Refcount is forwarded. 
1045         
1046         * css/CSSStyleSelector.cpp:
1047         (WebCore::CSSStyleSelector::sortAndTransferMatchedRules):
1048         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1049         * css/CSSStyleSelector.h:
1050         (CSSStyleSelector):
1051         * css/CSSStyleSheet.cpp:
1052         
1053             The same scheme for CSSStyleSheet.cssRule as with container rules.
1054         
1055         (StyleSheetCSSRuleList):
1056         (WebCore::StyleSheetCSSRuleList::StyleSheetCSSRuleList):
1057         (WebCore::StyleSheetCSSRuleList::ref):
1058         (WebCore::StyleSheetCSSRuleList::deref):
1059         (WebCore::StyleSheetCSSRuleList::length):
1060         (WebCore::StyleSheetCSSRuleList::item):
1061         (WebCore::StyleSheetCSSRuleList::styleSheet):
1062         (WebCore):
1063         (WebCore::CSSStyleSheet::rules):
1064         (WebCore::CSSStyleSheet::cssRules):
1065         * css/CSSStyleSheet.h:
1066         (CSSStyleSheet):
1067         * css/WebKitCSSKeyframesRule.cpp:
1068         (WebCore::WebKitCSSKeyframesRule::WebKitCSSKeyframesRule):
1069         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
1070         (WebCore):
1071         (WebCore::WebKitCSSKeyframesRule::append):
1072         (WebCore::WebKitCSSKeyframesRule::deleteRule):
1073         (WebCore::WebKitCSSKeyframesRule::findRule):
1074         (WebCore::WebKitCSSKeyframesRule::findRuleIndex):
1075         (WebCore::WebKitCSSKeyframesRule::cssText):
1076         (WebCore::WebKitCSSKeyframesRule::cssRules):
1077         * css/WebKitCSSKeyframesRule.h:
1078         (WebKitCSSKeyframesRule):
1079         (WebCore::WebKitCSSKeyframesRule::ruleCount):
1080         (WebCore::WebKitCSSKeyframesRule::ruleAt):
1081         (WebCore::WebKitCSSKeyframesRule::length):
1082         (WebCore::WebKitCSSKeyframesRule::item):
1083         * css/WebKitCSSRegionRule.cpp:
1084         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
1085         (WebCore::WebKitCSSRegionRule::~WebKitCSSRegionRule):
1086         (WebCore::WebKitCSSRegionRule::cssText):
1087         (WebCore::WebKitCSSRegionRule::cssRules):
1088         * css/WebKitCSSRegionRule.h:
1089         * inspector/InspectorStyleSheet.cpp:
1090         (WebCore::asCSSRuleList):
1091         (WebCore::InspectorStyleSheet::addRule):
1092         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
1093
1094 2012-03-25  Kentaro Hara  <haraken@chromium.org>
1095
1096         Remove duplicated GenerateConditionalString() from code generators
1097         https://bugs.webkit.org/show_bug.cgi?id=82148
1098
1099         Reviewed by Adam Barth.
1100
1101         Previously GenerateConditionalString()s were defined in each code generator,
1102         and they were doing the same thing. This patch puts GenerateConditionalString()
1103         in CodeGenerator.pm and removes duplicated GenerateConditionalString()s.
1104
1105         No tests. No change in the generated code.
1106
1107         * bindings/scripts/CodeGenerator.pm:
1108         (GenerateConditionalString):
1109         * bindings/scripts/CodeGeneratorCPP.pm:
1110         (GenerateHeader):
1111         (GenerateImplementation):
1112         * bindings/scripts/CodeGeneratorGObject.pm:
1113         (GenerateProperty):
1114         (GenerateProperties):
1115         (GenerateFunction):
1116         (WriteData):
1117         * bindings/scripts/CodeGeneratorJS.pm:
1118         (GenerateHeaderContentHeader):
1119         (GenerateImplementationContentHeader):
1120         (GenerateHeader):
1121         (GenerateImplementation):
1122         (GenerateCallbackHeader):
1123         (GenerateCallbackImplementation):
1124         * bindings/scripts/CodeGeneratorObjC.pm:
1125         (GenerateHeader):
1126         (GenerateImplementation):
1127         * bindings/scripts/CodeGeneratorV8.pm:
1128         (GenerateHeader):
1129         (GenerateNormalAttrGetter):
1130         (GenerateNormalAttrSetter):
1131         (GenerateOverloadedFunctionCallback):
1132         (GenerateFunctionCallback):
1133         (GenerateBatchedAttributeData):
1134         (GenerateImplementation):
1135         (GenerateHeaderContentHeader):
1136         (GenerateImplementationContentHeader):
1137         (GenerateCallbackHeader):
1138         (GenerateCallbackImplementation):
1139
1140 2012-03-25  Kentaro Hara  <haraken@chromium.org>
1141
1142         Move DOMWindowSQLDatabase.* to DOMWindowWebDatabase.*, and move WorkerContextSQLDatabase.* to WorkerContextWebDatabase.*
1143         https://bugs.webkit.org/show_bug.cgi?id=82146
1144
1145         Reviewed by Adam Barth.
1146
1147         Now SQLDatabase is renamed to WebDatabase (See Modules/webdatabase/).
1148         We should move DOMWindowSQLDatabase.* to DOMWindowWebDatabase.*,
1149         and move WorkerContextSQLDatabase.* to WorkerContextWebDatabase.*.
1150         We'll rename the SQL_DATABASE flag to the WEB_DATABASE flag in a follow-up patch.
1151
1152         No tests. No change in behavior.
1153
1154         * Modules/webdatabase/DOMWindowWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.cpp.
1155         (WebCore):
1156         (WebCore::DOMWindowWebDatabase::openDatabase):
1157         * Modules/webdatabase/DOMWindowWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.h.
1158         (WebCore):
1159         (DOMWindowWebDatabase):
1160         (WebCore::DOMWindowWebDatabase::DOMWindowWebDatabase):
1161         (WebCore::DOMWindowWebDatabase::~DOMWindowWebDatabase):
1162         * Modules/webdatabase/DOMWindowWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/DOMWindowSQLDatabase.idl.
1163         * Modules/webdatabase/WorkerContextWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.cpp.
1164         (WebCore):
1165         (WebCore::WorkerContextWebDatabase::openDatabase):
1166         (WebCore::WorkerContextWebDatabase::openDatabaseSync):
1167         * Modules/webdatabase/WorkerContextWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.h.
1168         (WebCore):
1169         (WorkerContextWebDatabase):
1170         (WebCore::WorkerContextWebDatabase::WorkerContextWebDatabase):
1171         (WebCore::WorkerContextWebDatabase::~WorkerContextWebDatabase):
1172         * Modules/webdatabase/WorkerContextWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextSQLDatabase.idl.
1173
1174         * DerivedSources.make:
1175         * DerivedSources.pri:
1176         * GNUmakefile.list.am:
1177         * Target.pri:
1178         * WebCore.gypi:
1179         * WebCore.vcproj/WebCore.vcproj:
1180         * WebCore.xcodeproj/project.pbxproj:
1181
1182 2012-03-25  Philip Rogers  <pdr@google.com>
1183
1184         Avoid race condition when iterating over pending resources
1185         https://bugs.webkit.org/show_bug.cgi?id=82115
1186
1187         Reviewed by Nikolas Zimmermann.
1188
1189         We can hit a race condition in SVGStyledElement::buildPendingResourcesIfNeeded
1190         where pending elements can become non-pending while we iterate over them.
1191
1192         This patch cleans up buildPendingResourcesIfNeeded and re-works how pending
1193         resources are removed. Because pending resources can be modified while
1194         iterating over them, we introduce m_pendingResourcesForRemoval that
1195         holds pending resources that are marked for removal. Instead of iterating
1196         over this list we simply remove each pending resource from
1197         m_pendingResourcesForRemoval; if a pending resource is modified or removed
1198         during the processing of another pending resource this list is updated before
1199         the next element can be accessed.
1200
1201         This change also removes removePendingResourceForElement which is no longer
1202         referenced.
1203
1204         Test: http/tests/svg/change-id-with-pending-resources.html
1205
1206         * svg/SVGDocumentExtensions.cpp:
1207         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
1208         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
1209         (WebCore::SVGDocumentExtensions::removePendingResourceForRemoval):
1210         (WebCore):
1211         (WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval):
1212         (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
1213         * svg/SVGDocumentExtensions.h:
1214         (SVGDocumentExtensions):
1215         * svg/SVGStyledElement.cpp:
1216         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
1217
1218 2012-03-25  Arvid Nilsson  <anilsson@rim.com>
1219
1220         [BlackBerry] Accelerated compositing layers fail to render when using WebPageCompositor
1221         https://bugs.webkit.org/show_bug.cgi?id=82104
1222         RIM PR: 145963
1223
1224         Reviewed by Rob Buis.
1225
1226         The embedder may use vertex buffers, which affected the interpretation
1227         our vertex array pointers from memory pointers to offsets into a vertex
1228         buffer. The resulting geometry often resulted in no visible layers on
1229         screen.
1230
1231         Fixed by getting rid of any bound buffer when we enter
1232         LayerRenderer::drawLayers().
1233
1234         * platform/graphics/blackberry/LayerRenderer.cpp:
1235         (WebCore::LayerRenderer::drawLayers):
1236
1237 2012-03-24  Nat Duca  <nduca@chromium.org>
1238
1239         [chromium] Instrument gesture animations with async traces
1240         https://bugs.webkit.org/show_bug.cgi?id=82076
1241
1242         Reviewed by Adrienne Walker.
1243
1244         * platform/ActivePlatformGestureAnimation.cpp:
1245         (WebCore::ActivePlatformGestureAnimation::~ActivePlatformGestureAnimation):
1246         (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
1247         * platform/PlatformGestureCurve.h:
1248         (PlatformGestureCurve):
1249         * platform/TouchpadFlingPlatformGestureCurve.h:
1250         (WebCore::TouchpadFlingPlatformGestureCurve::debugName):
1251         * platform/WheelFlingPlatformGestureCurve.h:
1252         (WebCore::WheelFlingPlatformGestureCurve::debugName):
1253         * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp:
1254         (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):
1255         (WebCore::CCActiveGestureAnimation::~CCActiveGestureAnimation):
1256         * platform/graphics/chromium/cc/CCGestureCurve.h:
1257         (CCGestureCurve):
1258
1259 2012-03-24  Jeffrey Pfau  <jpfau@apple.com>
1260
1261         XML error document creation should not fire mutation events
1262         https://bugs.webkit.org/show_bug.cgi?id=80765
1263
1264         Reviewed by Adam Barth.
1265
1266         Broke two tests that expected the old behavior, which have now been updated.
1267
1268         * xml/XMLErrors.cpp:
1269         (WebCore::createXHTMLParserErrorHeader):
1270         (WebCore::XMLErrors::insertErrorMessageBlock):
1271
1272 2012-03-24  Florin Malita  <fmalita@google.com>
1273
1274         ForeignObject content is zoomed two times
1275         https://bugs.webkit.org/show_bug.cgi?id=76282
1276
1277         Reviewed by Nikolas Zimmermann.
1278
1279         Test: svg/zoom/page/zoom-foreign-content.svg
1280
1281         Reset the effective zoom property for FO-nested content to avoid
1282         having the zoom factor applied multiple times (zooming is handled by
1283         the top level SVG root element).
1284
1285         * css/CSSStyleSelector.cpp:
1286         (WebCore::CSSStyleSelector::adjustRenderStyle):
1287
1288 2012-03-24  Chris Fleizach  <cfleizach@apple.com>
1289
1290         AX: Support solution to handle invalid ax text marker
1291         https://bugs.webkit.org/show_bug.cgi?id=82023
1292
1293         Reviewed by Oliver Hunt.
1294
1295         This provides methods to better use text markers so that assistive technologies
1296         can know when they are valid, and can convert them to and from absolute positions.
1297
1298         Test: platform/mac/accessibility/textmarker-routines.html
1299
1300         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
1301         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
1302         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
1303         (-[WebAccessibilityObjectWrapper _indexForTextMarker:]):
1304         (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
1305         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1306
1307 2012-03-24  Victor Carbune  <vcarbune@adobe.com>
1308
1309         Quick fix for rendering controls regression.
1310         https://bugs.webkit.org/show_bug.cgi?id=82125
1311
1312         Reviewed by Eric Carlson.
1313
1314         Only temporary fix. Tests to cover the problem should be added
1315
1316         * html/shadow/MediaControlElements.cpp:
1317         (WebCore::MediaControlPanelElement::makeOpaque): The display:none
1318         property should be toggled only by the media element now.
1319         (WebCore::MediaControlPanelElement::makeTransparent): The timer
1320         that toggles the dispalay:none shouldn't be used now.
1321
1322 2012-03-24  Kevin Ollivier  <kevino@theolliviers.com>
1323
1324         [wx] Unreviewed. Add header needed for compilation.
1325
1326         * html/shadow/TextFieldDecorationElement.cpp:
1327
1328 2012-03-24  Abhishek Arya  <inferno@chromium.org>
1329
1330         Crash in ApplyStyleCommand::applyInlineStyleToNodeRange.
1331         https://bugs.webkit.org/show_bug.cgi?id=81959
1332
1333         Reviewed by Ryosuke Niwa.
1334
1335         Test: editing/execCommand/apply-style-command-crash.html
1336
1337         * editing/ApplyStyleCommand.cpp:
1338         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): RefPtr the weak
1339         node iterator |node|.
1340         * editing/ApplyStyleCommand.h:
1341         (ApplyStyleCommand): convert |startNode| and |pastEndNode| into PassRefPtr.
1342
1343 2012-03-24  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
1344
1345         Unreviewed, build fix since we use "-Werror=unused-but-set-variable".
1346
1347         The variable 'it' was set at TextureMapperShaderManager.h:110 but never used.
1348
1349         * platform/graphics/texmap/TextureMapperShaderManager.h:
1350         (WebCore::TextureMapperShaderManager::getShaderProgram):
1351
1352 2012-03-24  Zeno Albisser  <zeno@webkit.org>
1353
1354         [Qt][WK2] Make TextureMapperShaderManager::getShaderProgram() not be a template.
1355         https://bugs.webkit.org/show_bug.cgi?id=82049
1356
1357         Change the getShaderProgram() function to not be a template.
1358         This is a workaround for a compiler bug that leads to an assert
1359         when compiling in debug mode on mac.
1360
1361         Reviewed by Noam Rosenthal.
1362
1363         * platform/graphics/texmap/TextureMapperGL.cpp:
1364         (WebCore::TextureMapperGL::drawTexture):
1365         (WebCore::TextureMapperGL::beginClip):
1366         * platform/graphics/texmap/TextureMapperShaderManager.h:
1367         (TextureMapperShaderProgram):
1368         (WebCore::TextureMapperShaderManager::getShaderProgram):
1369         (TextureMapperShaderManager):
1370
1371 2012-03-23  Shawn Singh  <shawnsingh@chromium.org>
1372
1373         [chromium] Incorrect replica originTransform used in CCDamageTracker
1374         https://bugs.webkit.org/show_bug.cgi?id=82118
1375
1376         Reviewed by Adrienne Walker.
1377
1378         Unit test added to CCDamageTrackerTest.cpp
1379
1380         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
1381         (WebCore::CCDamageTracker::extendDamageForRenderSurface):
1382
1383 2012-03-23  Dana Jansens  <danakj@chromium.org>
1384
1385         [chromium] When prepainting fails, tiles dirty rects may be cleared
1386         https://bugs.webkit.org/show_bug.cgi?id=82107
1387
1388         Reviewed by Adrienne Walker.
1389
1390         When prepainting, if a tile is unable to be reserved due to memory
1391         limits, we bail out of prepareToUpdateTiles. But we would have
1392         cleared the dirty rect of any previous tiles. This leaves them
1393         in a bad state where their textures are reserved, but their textureIds
1394         are set to 0, and they are not marked dirty. This means that they will
1395         not be updated and displayed if they become visible, since it is
1396         assumed that valid textures with zero textureId must have a dirty
1397         region.
1398
1399         We fix this by not clearing the dirty rects until we know we are
1400         going to update the layer.
1401
1402         Unit test: TiledLayerChromiumTest.pushTilesAfterIdlePaintFailed
1403
1404         * platform/graphics/chromium/TiledLayerChromium.cpp:
1405         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
1406         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1407         (WebCore::CCTiledLayerImpl::hasTextureIdForTileAt):
1408         (WebCore):
1409         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
1410         (CCTiledLayerImpl):
1411
1412 2012-03-23  Stephanie Lewis  <slewis@apple.com>
1413
1414         https://bugs.webkit.org/show_bug.cgi?id=81963 WebProcess can get stuck in GC during many low memory signals.
1415         <rdar://problem/11094830> WebProcess appears to get stuck in its GC handler (81963).
1416         Remove the call to garbage collect  in low memory signal handler.  Did some testing with hitting the low memory handler
1417         during Membuster and we would get back at most 100k - 200k.  That isn't enough to help the system, and in 
1418         that state the GC collection can take a substantial amount of time.
1419
1420         Reviewed by Geoff Garen.
1421
1422         Performance Change, no change in behavior.
1423
1424         * platform/mac/MemoryPressureHandlerMac.mm:
1425         (WebCore::MemoryPressureHandler::releaseMemory):
1426
1427 2012-03-23  W. James MacLean  <wjmaclean@chromium.org>
1428
1429         [chromium] CCLayerTreeHostImpl::scrollBegin() should return ScrollFailed for CCInputHandlerClient::Gesture type when wheel handlers found.
1430         https://bugs.webkit.org/show_bug.cgi?id=82106
1431
1432         Reviewed by Adrienne Walker.
1433
1434         Existing unit tests updated.
1435
1436         With gesture scroll events now being handled as mouse wheel events, we should not start a gesture scroll when
1437         wheel handlers are present.
1438
1439         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1440         (WebCore::CCLayerTreeHostImpl::scrollBegin):
1441
1442 2012-03-23  Adam Barth  <abarth@webkit.org>
1443
1444         Move Notifications APIs from WorkerContext.idl to WorkerContextNotifications.idl
1445         https://bugs.webkit.org/show_bug.cgi?id=79635
1446
1447         Reviewed by Kentaro Hara.
1448
1449         This patch moves the NotificationCenter from WorkerContext to
1450         WorkerContextNotificiations, reducing clutter in WorkerContext.  After
1451         this patch, Notifications are almost entirely contained in the
1452         notifications directory.
1453
1454         * CMakeLists.txt:
1455         * DerivedSources.make:
1456         * DerivedSources.pri:
1457         * GNUmakefile.list.am:
1458         * Target.pri:
1459         * WebCore.gypi:
1460         * WebCore.vcproj/WebCore.vcproj:
1461         * WebCore.xcodeproj/project.pbxproj:
1462         * workers/WorkerContext.cpp:
1463         (WebCore::WorkerContext::~WorkerContext):
1464         * workers/WorkerContext.h:
1465         (WebCore):
1466         (WorkerContext):
1467         * workers/WorkerContext.idl:
1468
1469 2012-03-23  Michal Mocny  <mmocny@google.com>
1470
1471         [chromium] RootLayer was not being checked for null causing segfaults very rarely.
1472         https://bugs.webkit.org/show_bug.cgi?id=82111
1473
1474         Reviewed by Adrienne Walker.
1475
1476         * platform/graphics/chromium/LayerRendererChromium.cpp:
1477         (WebCore::LayerRendererChromium::beginDrawingFrame):
1478         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1479         (WebCore::CCLayerTreeHostImpl::drawLayers):
1480
1481 2012-03-23  Shawn Singh  <shawnsingh@chromium.org>
1482
1483         [chromium] Fix race bug that clobbers CCLayerImpl updateRect
1484         https://bugs.webkit.org/show_bug.cgi?id=82109
1485
1486         Reviewed by Dirk Pranke.
1487
1488         If the main thread commits twice before the impl thread actually
1489         draws, then the updateRect of the first frame gets lost forever,
1490         and not propagated to the damage tracker.
1491
1492         The solution is to accumulate the updateRect. The CCLayerImpl
1493         updateRect is already being correctly cleared at the appropriate
1494         time after drawing.
1495
1496         Unit test added to LayerChromiumTest.cpp.
1497
1498         * platform/graphics/chromium/LayerChromium.cpp:
1499         (WebCore::LayerChromium::pushPropertiesTo):
1500
1501 2012-03-23  Rafael Weinstein  <rafaelw@chromium.org>
1502
1503         [MutationObservers] attributeFilter should be case sensitive at all times
1504         https://bugs.webkit.org/show_bug.cgi?id=81822
1505
1506         Reviewed by Ryosuke Niwa.
1507
1508         This removes the behavior in MutationObserverRegistration which treats
1509         attributeFilter as case insensitive for HTML elements in HTML documents.
1510
1511         Relevant tests have been updated.
1512
1513         * dom/MutationObserverRegistration.cpp:
1514         (WebCore::MutationObserverRegistration::resetObservation):
1515         (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom):
1516         * dom/MutationObserverRegistration.h:
1517         (MutationObserverRegistration):
1518
1519 2012-03-23  Kentaro Hara  <haraken@chromium.org>
1520
1521         Move WebSocket APIs from WorkerContext.idl to WorkerContextWebSocket.idl
1522         https://bugs.webkit.org/show_bug.cgi?id=79663
1523
1524         Reviewed by Adam Barth.
1525
1526         For WebKit modularization, this patch moves WebSocket APIs from WorkerContext.idl
1527         to WorkerContextWebSocket.idl.
1528
1529         Tests: http/tests/websocket/tests/hybi/workers/* (No change in test results)
1530
1531         * CMakeLists.txt:
1532         * DerivedSources.make:
1533         * DerivedSources.pri:
1534         * GNUmakefile.list.am:
1535         * Modules/websockets/WorkerContextWebSocket.idl: Added.
1536         * WebCore.gypi:
1537         * WebCore.xcodeproj/project.xcodeproj:
1538         * workers/WorkerContext.idl:
1539
1540 2012-03-23  Parag Radke  <parag@motorola.com>
1541
1542         REGRESSION: can select text of an input button
1543         https://bugs.webkit.org/show_bug.cgi?id=13624
1544
1545         Reviewed by Ryosuke Niwa.
1546
1547         Text in a button should never have a selection background of its own painted
1548         but if the button is inside an editable area, then the whole button should
1549         have it's selection background painted.
1550
1551         Test: editing/selection/selection-button-text.html
1552
1553         * rendering/RenderButton.h:
1554         Added implementation for the virtual function canBeSelectionLeaf()
1555         which returns true if the button renderer is editable, false other wise.
1556         * rendering/RenderTextFragment.h:
1557         Added implementation for the virtual function canBeSelectionLeaf()
1558         which returns true if the text fragment renderer is editable, false other wise.
1559
1560 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
1561
1562         Remove unnecessary ASSERT from LoadableTextTrack::trackElementIndex
1563         https://bugs.webkit.org/show_bug.cgi?id=82095
1564
1565         Reviewed by Dan Bernstein.
1566
1567         No new tests, removed a bogus ASSERT that was sometimes triggered by tests.
1568
1569         * html/track/LoadableTextTrack.cpp:
1570         (WebCore::LoadableTextTrack::trackElementIndex): Remove ASSERT.
1571
1572 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
1573
1574         Layout Test media/video-source-load.html is failing
1575         https://bugs.webkit.org/show_bug.cgi?id=82094
1576
1577         Reviewed by Alexey Proskuryakov.
1578
1579         No new tests, tested by media/video-source-load.html.
1580
1581         * html/HTMLMediaElement.cpp:
1582         (WebCore::HTMLMediaElement::sourceWasAdded): Set m_nextChildNodeToConsider when called 
1583             with networkState == NETWORK_EMPTY because the resource selection algorithm has
1584             not started yet.
1585
1586 2012-03-23  Alexey Proskuryakov  <ap@apple.com>
1587
1588         [Mac] No need for platform-specific ENABLE_BLOB values
1589         https://bugs.webkit.org/show_bug.cgi?id=82102
1590
1591         Reviewed by David Kilzer.
1592
1593         * Configurations/FeatureDefines.xcconfig:
1594
1595 2012-03-23  Kent Tamura  <tkent@chromium.org>
1596
1597         Add TextFieldDecorator and TextFieldDecorationElement
1598         https://bugs.webkit.org/show_bug.cgi?id=80580
1599
1600         Reviewed by Dimitri Glazkov.
1601
1602         These classes will be used to add a decoration icon to a text field
1603         <input> from outside of WebCore. We have a plan to use them in Chromium
1604         port. So this patch doesn't add TextFieldDecorationElement.{cpp,h} to
1605         non-Chromium build files.
1606
1607         How it works:
1608         When a shadow subtree for a text field is created, we ask ChromeClient
1609         to decorate it. ChromeClient appends a TextFieldDecorationElement to the
1610         existing shadow subtree or another shadow tree. A TextFieldDecorator is
1611         associated to a TextFieldDecorationElement, and it provides decoration
1612         icon images and a click handler.
1613
1614         No new tests. This patch won't make any behavior change for now.
1615
1616         * WebCore.gypi: Add TextFieldDecorationElement.cpp and TextFieldDecorationElement.h
1617         * dom/Element.h:
1618         (WebCore::Element::isTextFieldDecoration):
1619         * html/TextFieldInputType.cpp:
1620         (WebCore::TextFieldInputType::createShadowSubtree):
1621         Calls ChromeClient::willAddTextFieldDecorationsTo() and addTextFieldDecorationsTo().
1622         * html/shadow/TextFieldDecorationElement.cpp: Added.
1623         (WebCore::TextFieldDecorator::~TextFieldDecorator):
1624         (WebCore::TextFieldDecorationElement::TextFieldDecorationElement):
1625         (WebCore::TextFieldDecorationElement::create):
1626         (WebCore::TextFieldDecorationElement::isTextFieldDecoration):
1627         (WebCore::TextFieldDecorationElement::updateImage):
1628         (WebCore::TextFieldDecorationElement::customStyleForRenderer):
1629         Sets the size to a square of the font-size.
1630         (WebCore::TextFieldDecorationElement::createRenderer):
1631         Always creates a RenderImage.
1632         (WebCore::TextFieldDecorationElement::attach):
1633         Sets an image for appropriate state.
1634         (WebCore::TextFieldDecorationElement::isMouseFocusable):
1635         (WebCore::TextFieldDecorationElement::defaultEventHandler):
1636         Delegate a click event to the corresponding function of TextFieldDecorator.
1637         * html/shadow/TextFieldDecorationElement.h: Added.
1638         (TextFieldDecorator): Added.
1639         (TextFieldDecorationElement): Added.
1640         (WebCore::toTextFieldDecorationElement): Added.
1641         * page/ChromeClient.h:
1642         (WebCore::ChromeClient::willAddTextFieldDecorationsTo): Add an empty implementation.
1643         (WebCore::ChromeClient::addTextFieldDecorationsTo): ditto.
1644
1645 2012-03-23  Adam Klein  <adamk@chromium.org>
1646
1647         Match DOM4 spec with respect to DocumentFragment insertion
1648         https://bugs.webkit.org/show_bug.cgi?id=82089
1649
1650         Reviewed by Ryosuke Niwa.
1651
1652         DOM4 specifies the behavior of appendChild, insertBefore, and replaceChild
1653         in terms of "mutation algorithms":
1654
1655         http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#mutation-algorithms
1656
1657         This change updates WebKit to match, in particular with regard to DocumentFragments.
1658         Previously, ContainerNode would remove nodes one at a time, then add them to the new parent.
1659         When combined with MutationObservers, this results in overly-verbose mutation records.
1660         Now we create as few records as possible, matching the spec as well as Gecko's implementation
1661         of MutationObservers.
1662
1663         Note that we still need to check validity each time through the loop,
1664         since inserting a node may dispatch events. In a future change, I hope
1665         to move these events so that they fire only after all nodes are inserted,
1666         but that's too much to tackle all in one.
1667
1668         Tests: fast/mutation/document-fragment-insertion.html
1669
1670         * dom/ContainerNode.cpp:
1671         (WebCore::collectChildrenAndRemoveFromOldParent): New helper method
1672         combining collectTargetNodes() with the removal of the collected nodes from
1673         their old parent, if any.
1674         (WebCore::ContainerNode::insertBefore): Use new helper method instead
1675         of removing nodes one at a time from the fragment.
1676         (WebCore::ContainerNode::replaceChild): ditto. Also removed some redundant asserts
1677         and moved the "do nothing" check out of the loop.
1678         (WebCore::ContainerNode::appendChild): Use new helper method.
1679
1680 2012-03-23  Stephen White  <senorblanco@chromium.org>
1681
1682         [skia] Switch to Skia's implementation of the feMorphology filter.
1683         https://bugs.webkit.org/show_bug.cgi?id=82085
1684
1685         Reviewed by Dirk Schulze.
1686
1687         Covered by existing tests in svg/filters/.
1688
1689         * WebCore.gypi:
1690         * platform/graphics/filters/FEMorphology.h:
1691         (FEMorphology):
1692         * platform/graphics/filters/skia/FEMorphologySkia.cpp: Added.
1693         (WebCore):
1694         (WebCore::FEMorphology::platformApplySkia):
1695
1696 2012-03-23  Adam Barth  <abarth@webkit.org>
1697
1698         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 3)
1699         https://bugs.webkit.org/show_bug.cgi?id=82027
1700
1701         Reviewed by Kentaro Hara.
1702
1703         Rather than watching for willDetachPage, NotificationCenter can just
1704         override ActiveDOMObject::stop directly to be notified when it needs to
1705         stop.
1706
1707         Switching NotificationCenter over to using ActiveDOMObject callbacks
1708         frees DOMWindowNotification to implement reconnectFrame.  However, this
1709         is only really a victory in princple because NotificationCenter always
1710         returns false for canSuspend(), which means we'll never actually use
1711         the reconnectFrame functionality.  However, this patch does move us
1712         closer to the time when NotificationCenter can implement
1713         ActiveDOMObject::suspend/resume to play nice with the PageCache.
1714
1715         * notifications/DOMWindowNotifications.cpp:
1716         (WebCore::DOMWindowNotifications::disconnectFrame):
1717         (WebCore::DOMWindowNotifications::reconnectFrame):
1718         * notifications/DOMWindowNotifications.h:
1719         (DOMWindowNotifications):
1720         * notifications/NotificationCenter.cpp:
1721         (WebCore::NotificationCenter::NotificationCenter):
1722         (WebCore::NotificationCenter::stop):
1723         * notifications/NotificationCenter.h:
1724         (NotificationCenter):
1725
1726 2012-03-23  Daniel Cheng  <dcheng@chromium.org>
1727
1728         [chromium] Support file drag out using DataTransferItemList::add(File)
1729         https://bugs.webkit.org/show_bug.cgi?id=81261
1730
1731         Reviewed by Tony Chang.
1732
1733         Original patch by Varun Jain <varunjain@chromium.org>.
1734         I've updated the original patch to remove 'downloadurl' handling since it's not tested, nor
1735         is it necessary for File objects, since File objects correspond to a native filesystem path.
1736
1737         Test: fast/events/drag-dataTransferItemList-file-handling.html
1738
1739         * platform/chromium/DataTransferItemListChromium.cpp:
1740         (WebCore::DataTransferItemListChromium::add):
1741
1742 2012-03-23  Zan Dobersek  <zandobersek@gmail.com>
1743
1744         [GObject bindings] Supplemental interfaces are not disabled with the "Conditional" attribute
1745         https://bugs.webkit.org/show_bug.cgi?id=80030
1746
1747         Reviewed by Martin Robinson.
1748
1749         Changes in CodeGeneratorGObject.pm:
1750         - group implementation of private helpers and guard them inside
1751         an ifdef if a root conditional attribute is present.
1752         - always define the type of a GObject binding, even if the root
1753         conditional feature is not enabled
1754         - the methods are generated as well, but are simply stubs if the
1755         feature is not enabled, throwing a warning upon interaction.
1756         - if the method itself is guarded by a conditional attribute,
1757         the stub implementation gains one more level of depth, throwing
1758         a warning if the method's conditional feature is not enabled
1759         but the root conditional feature is.
1760         - small style fixes in random places.
1761
1762         Also changed are GObject baselines for binding tests.
1763
1764         No new tests - no new testable functionality.
1765
1766         * bindings/gobject/GNUmakefile.am:
1767         * bindings/scripts/CodeGeneratorGObject.pm:
1768         (HumanReadableConditional):
1769         (GenerateConditionalWarn):
1770         (GenerateProperty):
1771         (GenerateProperties):
1772         (GenerateFunction):
1773         (GenerateFunctions):
1774         (GenerateCFile):
1775         (GenerateEventTargetIface):
1776         (Generate):
1777         (WriteData):
1778         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
1779         (WebKit):
1780         (WebKit::kit):
1781         (WebKit::wrapFloat64Array):
1782         (webkit_dom_float64array_finalize):
1783         (webkit_dom_float64array_foo):
1784         * bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h:
1785         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
1786         (WebKit):
1787         (WebKit::kit):
1788         (WebKit::wrapTestActiveDOMObject):
1789         (webkit_dom_test_active_dom_object_finalize):
1790         (webkit_dom_test_active_dom_object_exciting_function):
1791         (webkit_dom_test_active_dom_object_post_message):
1792         (webkit_dom_test_active_dom_object_get_exciting_attr):
1793         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObjectPrivate.h:
1794         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1795         (WebKit):
1796         (WebKit::kit):
1797         (WebKit::core):
1798         (WebKit::wrapTestCallback):
1799         (webkit_dom_test_callback_finalize):
1800         (webkit_dom_test_callback_callback_with_no_param):
1801         (webkit_dom_test_callback_callback_with_class1param):
1802         (webkit_dom_test_callback_callback_with_class2param):
1803         (webkit_dom_test_callback_callback_with_non_bool_return_type):
1804         (webkit_dom_test_callback_callback_with_string_list):
1805         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
1806         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
1807         (WebKit):
1808         (WebKit::kit):
1809         (WebKit::wrapTestCustomNamedGetter):
1810         (webkit_dom_test_custom_named_getter_finalize):
1811         (webkit_dom_test_custom_named_getter_another_function):
1812         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetterPrivate.h:
1813         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
1814         (WebKit):
1815         (WebKit::kit):
1816         (WebKit::wrapTestEventConstructor):
1817         (webkit_dom_test_event_constructor_finalize):
1818         (webkit_dom_test_event_constructor_get_attr1):
1819         (webkit_dom_test_event_constructor_get_attr2):
1820         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h:
1821         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1822         (WebKit):
1823         (WebKit::core):
1824         (WebKit::wrapTestEventTarget):
1825         (webkit_dom_test_event_target_finalize):
1826         (webkit_dom_test_event_target_item):
1827         (webkit_dom_test_event_target_dispatch_event):
1828         * bindings/scripts/test/GObject/WebKitDOMTestEventTargetPrivate.h:
1829         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1830         (WebKit):
1831         (WebKit::kit):
1832         (WebKit::core):
1833         (WebKit::wrapTestInterface):
1834         (webkit_dom_test_interface_finalize):
1835         (webkit_dom_test_interface_supplemental_method1):
1836         (webkit_dom_test_interface_supplemental_method2):
1837         (webkit_dom_test_interface_supplemental_method4):
1838         (webkit_dom_test_interface_get_supplemental_str1):
1839         (webkit_dom_test_interface_get_supplemental_str2):
1840         (webkit_dom_test_interface_set_supplemental_str2):
1841         (webkit_dom_test_interface_get_supplemental_node):
1842         (webkit_dom_test_interface_set_supplemental_node):
1843         * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h:
1844         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
1845         (WebKit):
1846         (WebKit::kit):
1847         (WebKit::wrapTestMediaQueryListListener):
1848         (webkit_dom_test_media_query_list_listener_finalize):
1849         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h:
1850         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
1851         (WebKit):
1852         (WebKit::kit):
1853         (WebKit::wrapTestNamedConstructor):
1854         (webkit_dom_test_named_constructor_finalize):
1855         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:
1856         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1857         (WebKit):
1858         (WebKit::kit):
1859         (WebKit::core):
1860         (WebKit::wrapTestObj):
1861         (webkit_dom_test_obj_finalize):
1862         (webkit_dom_test_obj_set_property):
1863         (webkit_dom_test_obj_get_property):
1864         (webkit_dom_test_obj_constructed):
1865         (webkit_dom_test_obj_class_init):
1866         (webkit_dom_test_obj_init):
1867         (webkit_dom_test_obj_void_method):
1868         (webkit_dom_test_obj_void_method_with_args):
1869         (webkit_dom_test_obj_int_method):
1870         (webkit_dom_test_obj_int_method_with_args):
1871         (webkit_dom_test_obj_obj_method):
1872         (webkit_dom_test_obj_obj_method_with_args):
1873         (webkit_dom_test_obj_method_with_sequence_arg):
1874         (webkit_dom_test_obj_method_that_requires_all_args_and_throws):
1875         (webkit_dom_test_obj_serialized_value):
1876         (webkit_dom_test_obj_idb_key):
1877         (webkit_dom_test_obj_options_object):
1878         (webkit_dom_test_obj_method_with_exception):
1879         (webkit_dom_test_obj_with_script_state_void):
1880         (webkit_dom_test_obj_with_script_state_obj):
1881         (webkit_dom_test_obj_with_script_state_void_exception):
1882         (webkit_dom_test_obj_with_script_state_obj_exception):
1883         (webkit_dom_test_obj_with_script_execution_context):
1884         (webkit_dom_test_obj_with_script_execution_context_and_script_state):
1885         (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception):
1886         (webkit_dom_test_obj_with_script_execution_context_and_script_state_with_spaces):
1887         (webkit_dom_test_obj_method_with_optional_arg):
1888         (webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg):
1889         (webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args):
1890         (webkit_dom_test_obj_method_with_optional_string):
1891         (webkit_dom_test_obj_method_with_optional_string_is_undefined):
1892         (webkit_dom_test_obj_method_with_optional_string_is_null_string):
1893         (webkit_dom_test_obj_conditional_method1):
1894         (webkit_dom_test_obj_conditional_method2):
1895         (webkit_dom_test_obj_conditional_method3):
1896         (webkit_dom_test_obj_class_method):
1897         (webkit_dom_test_obj_class_method_with_optional):
1898         (webkit_dom_test_obj_overloaded_method1):
1899         (webkit_dom_test_obj_convert1):
1900         (webkit_dom_test_obj_convert2):
1901         (webkit_dom_test_obj_convert3):
1902         (webkit_dom_test_obj_convert4):
1903         (webkit_dom_test_obj_convert5):
1904         (webkit_dom_test_obj_mutable_point_function):
1905         (webkit_dom_test_obj_immutable_point_function):
1906         (webkit_dom_test_obj_orange):
1907         (webkit_dom_test_obj_strict_function):
1908         (webkit_dom_test_obj_get_read_only_int_attr):
1909         (webkit_dom_test_obj_get_read_only_string_attr):
1910         (webkit_dom_test_obj_get_read_only_test_obj_attr):
1911         (webkit_dom_test_obj_get_short_attr):
1912         (webkit_dom_test_obj_set_short_attr):
1913         (webkit_dom_test_obj_get_unsigned_short_attr):
1914         (webkit_dom_test_obj_set_unsigned_short_attr):
1915         (webkit_dom_test_obj_get_int_attr):
1916         (webkit_dom_test_obj_set_int_attr):
1917         (webkit_dom_test_obj_get_long_long_attr):
1918         (webkit_dom_test_obj_set_long_long_attr):
1919         (webkit_dom_test_obj_get_unsigned_long_long_attr):
1920         (webkit_dom_test_obj_set_unsigned_long_long_attr):
1921         (webkit_dom_test_obj_get_string_attr):
1922         (webkit_dom_test_obj_set_string_attr):
1923         (webkit_dom_test_obj_get_test_obj_attr):
1924         (webkit_dom_test_obj_set_test_obj_attr):
1925         (webkit_dom_test_obj_get_xml_obj_attr):
1926         (webkit_dom_test_obj_set_xml_obj_attr):
1927         (webkit_dom_test_obj_get_create):
1928         (webkit_dom_test_obj_set_create):
1929         (webkit_dom_test_obj_get_reflected_string_attr):
1930         (webkit_dom_test_obj_set_reflected_string_attr):
1931         (webkit_dom_test_obj_get_reflected_integral_attr):
1932         (webkit_dom_test_obj_set_reflected_integral_attr):
1933         (webkit_dom_test_obj_get_reflected_unsigned_integral_attr):
1934         (webkit_dom_test_obj_set_reflected_unsigned_integral_attr):
1935         (webkit_dom_test_obj_get_reflected_boolean_attr):
1936         (webkit_dom_test_obj_set_reflected_boolean_attr):
1937         (webkit_dom_test_obj_get_reflected_url_attr):
1938         (webkit_dom_test_obj_set_reflected_url_attr):
1939         (webkit_dom_test_obj_get_reflected_custom_integral_attr):
1940         (webkit_dom_test_obj_set_reflected_custom_integral_attr):
1941         (webkit_dom_test_obj_get_reflected_custom_boolean_attr):
1942         (webkit_dom_test_obj_set_reflected_custom_boolean_attr):
1943         (webkit_dom_test_obj_get_reflected_custom_url_attr):
1944         (webkit_dom_test_obj_set_reflected_custom_url_attr):
1945         (webkit_dom_test_obj_get_attr_with_getter_exception):
1946         (webkit_dom_test_obj_set_attr_with_getter_exception):
1947         (webkit_dom_test_obj_get_attr_with_setter_exception):
1948         (webkit_dom_test_obj_set_attr_with_setter_exception):
1949         (webkit_dom_test_obj_get_string_attr_with_getter_exception):
1950         (webkit_dom_test_obj_set_string_attr_with_getter_exception):
1951         (webkit_dom_test_obj_get_string_attr_with_setter_exception):
1952         (webkit_dom_test_obj_set_string_attr_with_setter_exception):
1953         (webkit_dom_test_obj_get_with_script_state_attribute):
1954         (webkit_dom_test_obj_set_with_script_state_attribute):
1955         (webkit_dom_test_obj_get_with_script_execution_context_attribute):
1956         (webkit_dom_test_obj_set_with_script_execution_context_attribute):
1957         (webkit_dom_test_obj_get_with_script_state_attribute_raises):
1958         (webkit_dom_test_obj_set_with_script_state_attribute_raises):
1959         (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises):
1960         (webkit_dom_test_obj_set_with_script_execution_context_attribute_raises):
1961         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute):
1962         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute):
1963         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises):
1964         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute_raises):
1965         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_with_spaces_attribute):
1966         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_with_spaces_attribute):
1967         (webkit_dom_test_obj_get_conditional_attr1):
1968         (webkit_dom_test_obj_set_conditional_attr1):
1969         (webkit_dom_test_obj_get_conditional_attr2):
1970         (webkit_dom_test_obj_set_conditional_attr2):
1971         (webkit_dom_test_obj_get_conditional_attr3):
1972         (webkit_dom_test_obj_set_conditional_attr3):
1973         (webkit_dom_test_obj_get_content_document):
1974         (webkit_dom_test_obj_get_mutable_point):
1975         (webkit_dom_test_obj_set_mutable_point):
1976         (webkit_dom_test_obj_get_immutable_point):
1977         (webkit_dom_test_obj_set_immutable_point):
1978         (webkit_dom_test_obj_get_strict_float):
1979         (webkit_dom_test_obj_set_strict_float):
1980         (webkit_dom_test_obj_get_description):
1981         (webkit_dom_test_obj_get_id):
1982         (webkit_dom_test_obj_set_id):
1983         (webkit_dom_test_obj_get_hash):
1984         * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h:
1985         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
1986         (WebKit):
1987         (WebKit::kit):
1988         (WebKit::core):
1989         (WebKit::wrapTestSerializedScriptValueInterface):
1990         (webkit_dom_test_serialized_script_value_interface_finalize):
1991         (webkit_dom_test_serialized_script_value_interface_accept_transfer_list):
1992         (webkit_dom_test_serialized_script_value_interface_multi_transfer_list):
1993         (webkit_dom_test_serialized_script_value_interface_get_value):
1994         (webkit_dom_test_serialized_script_value_interface_set_value):
1995         (webkit_dom_test_serialized_script_value_interface_get_readonly_value):
1996         (webkit_dom_test_serialized_script_value_interface_get_cached_value):
1997         (webkit_dom_test_serialized_script_value_interface_set_cached_value):
1998         (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
1999         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h:
2000
2001 2012-03-23  Dana Jansens  <danakj@chromium.org>
2002
2003         [chromium] Record painted pixel counts for measuring effectiveness of per-tile painting
2004         https://bugs.webkit.org/show_bug.cgi?id=82057
2005
2006         Reviewed by Adrienne Walker.
2007
2008         Adds painted pixel metrics to CCOverdrawMetrics class, and calls in
2009         to report painted areas when updating tiles in the TiledLayerChromium
2010         class.
2011
2012         Unit test: TiledLayerChromiumTest.opaqueContentsRegion
2013                    TiledLayerChromiumTest.pixelsPaintedMetrics
2014
2015         * platform/graphics/chromium/TiledLayerChromium.cpp:
2016         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
2017         * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
2018         (WebCore::CCOverdrawMetrics::CCOverdrawMetrics):
2019         (WebCore::CCOverdrawMetrics::didPaint):
2020         (WebCore):
2021         (WebCore::CCOverdrawMetrics::recordMetricsInternal):
2022         * platform/graphics/chromium/cc/CCOverdrawMetrics.h:
2023         (CCOverdrawMetrics):
2024         (WebCore::CCOverdrawMetrics::pixelsPainted):
2025
2026 2012-03-23  Abhishek Arya  <inferno@chromium.org>
2027
2028         Crash in RenderBlock::splitBlocks.
2029         https://bugs.webkit.org/show_bug.cgi?id=81926
2030
2031         Reviewed by Julien Chaffraix.
2032
2033         We are updating the :after content before calling splitFlow. The :after content
2034         gets blown away since it will go to the continuation. beforeChild was earlier
2035         set to the first child. Being the last anonymous block, its children gets pulled
2036         up in collapseAnonymousBoxChild and it gets destroyed. So, we need to update
2037         beforeChild value. 
2038
2039         Test: fast/multicol/span/update-after-content-before-child-crash.html
2040
2041         * rendering/RenderBlock.cpp:
2042         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
2043
2044 2012-03-23  Dana Jansens  <danakj@chromium.org>
2045
2046         [chromium] Improved composited debug borders
2047         https://bugs.webkit.org/show_bug.cgi?id=82071
2048
2049         Reviewed by Adrienne Walker.
2050
2051         Fix the problem with missing debug borders. Since we append quads
2052         to the list front to back now, we draw the quads in the list from
2053         back to front of the list. Which means if the debug quad is added
2054         after the layer it is drawing around, the layer can draw over top
2055         of its debug quad. Reverse the ordering when appending to fix it.
2056
2057         Make the border red around tiles that are checkerboarded. Missing
2058         tiles in non-root layers are drawn clear, so this makes them more
2059         visible.
2060
2061         Put a blue border around each render surface, and a purple border
2062         on their replicas.
2063
2064         No new tests.
2065
2066         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2067         (WebCore):
2068         (WebCore::CCRenderPass::appendQuadsForLayer):
2069         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
2070         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2071         (WebCore::CCRenderSurface::hasReplica):
2072         (WebCore):
2073         (WebCore::CCRenderSurface::createReplicaSharedQuadState):
2074         * platform/graphics/chromium/cc/CCRenderSurface.h:
2075         (CCRenderSurface):
2076         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2077         (WebCore):
2078         (WebCore::CCTiledLayerImpl::appendQuads):
2079
2080 2012-03-23  Simon Fraser  <simon.fraser@apple.com>
2081
2082         Move code that calls setAcceleratesDrawing() on GraphicsLayers into RenderLayerBacking
2083         https://bugs.webkit.org/show_bug.cgi?id=82092
2084
2085         Reviewed by Dean Jackson.
2086
2087         A RenderLayerBacking manages several GraphicsLayers, but RenderLayerCompositor
2088         was only calling setAcceleratesDrawing() on the one it knows about. Fix by moving
2089         this setting code down into RenderLayerBacking.
2090         
2091         RenderLayerCompositor now caches the setAcceleratesDrawing setting, as it does
2092         for other compositing-related settings, so that RenderLayerBacking doesn't have
2093         to grovel for Settings every time.
2094
2095         * rendering/RenderLayerBacking.cpp:
2096         (WebCore::RenderLayerBacking::createGraphicsLayer):
2097         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2098         * rendering/RenderLayerCompositor.cpp:
2099         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
2100         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
2101         (WebCore::RenderLayerCompositor::updateBacking):
2102         * rendering/RenderLayerCompositor.h:
2103         (WebCore::RenderLayerCompositor::acceleratedDrawingEnabled):
2104         (RenderLayerCompositor):
2105
2106 2012-03-23  Beth Dakin  <bdakin@apple.com>
2107
2108         https://bugs.webkit.org/show_bug.cgi?id=82083
2109
2110         Rubber-stamped by Simon Fraser.
2111
2112         This patch is just a name change. getExistingScrollAnimator() (which was 
2113         added earlier today) is now existingScrollAnimator().
2114         * loader/FrameLoader.cpp:
2115         (WebCore::FrameLoader::transitionToCommitted):
2116         * page/EventHandler.cpp:
2117         (WebCore::EventHandler::handleGestureTapDown):
2118         * page/FrameView.cpp:
2119         (WebCore::FrameView::setAnimatorsAreActive):
2120         * platform/ScrollView.cpp:
2121         (WebCore::ScrollView::updateScrollbars):
2122         * platform/ScrollableArea.cpp:
2123         (WebCore::ScrollableArea::willStartLiveResize):
2124         (WebCore::ScrollableArea::willEndLiveResize):
2125         (WebCore::ScrollableArea::contentAreaWillPaint):
2126         (WebCore::ScrollableArea::mouseEnteredContentArea):
2127         (WebCore::ScrollableArea::mouseExitedContentArea):
2128         (WebCore::ScrollableArea::mouseMovedInContentArea):
2129         (WebCore::ScrollableArea::contentAreaDidShow):
2130         (WebCore::ScrollableArea::contentAreaDidHide):
2131         (WebCore::ScrollableArea::contentsResized):
2132         (WebCore::ScrollableArea::serviceScrollAnimations):
2133         * platform/ScrollableArea.h:
2134         (WebCore::ScrollableArea::existingScrollAnimator):
2135
2136 2012-03-23  Abhishek Arya  <inferno@chromium.org>
2137
2138         Crash due to accessing removed parent lineboxes when clearing selection.
2139         https://bugs.webkit.org/show_bug.cgi?id=81359
2140
2141         Reviewed by Eric Seidel.
2142
2143         Similar to r110323, adds the canUpdateSelectionOnRootLineBoxes
2144         check to more places.
2145
2146         Test: editing/selection/clear-selection-crash.html
2147
2148         * rendering/RenderObject.cpp:
2149         (WebCore::RenderObject::canUpdateSelectionOnRootLineBoxes):
2150         * rendering/RenderSelectionInfo.h:
2151         (WebCore::RenderSelectionInfo::RenderSelectionInfo):
2152         (WebCore::RenderBlockSelectionInfo::RenderBlockSelectionInfo):
2153
2154 2012-03-23  Beth Dakin  <bdakin@apple.com>
2155
2156         https://bugs.webkit.org/show_bug.cgi?id=82083
2157         Too many ScrollAnimators are allocated on pages with frames
2158
2159         Reviewed by Geoffrey Garen.
2160
2161         This patch adds a new getter to ScrollableArea called 
2162         getExistingScrollAnimator() unlike scrollAnimator() this new function will 
2163         just return null if there is not already a ScrollAnimator. Callers should use 
2164         this new function when they have business with ScrollAnimator that does not 
2165         need to do anything when there are no scrollbars.
2166         * loader/FrameLoader.cpp:
2167         (WebCore::FrameLoader::transitionToCommitted):
2168         * page/EventHandler.cpp:
2169         (WebCore::EventHandler::handleGestureTapDown):
2170         * page/FrameView.cpp:
2171         (WebCore::FrameView::setAnimatorsAreActive):
2172         * platform/ScrollView.cpp:
2173         (WebCore::ScrollView::updateScrollbars):
2174         * platform/ScrollableArea.cpp:
2175         (WebCore::ScrollableArea::willStartLiveResize):
2176         (WebCore::ScrollableArea::willEndLiveResize):
2177         (WebCore::ScrollableArea::contentAreaWillPaint):
2178         (WebCore::ScrollableArea::mouseEnteredContentArea):
2179         (WebCore::ScrollableArea::mouseExitedContentArea):
2180         (WebCore::ScrollableArea::mouseMovedInContentArea):
2181         (WebCore::ScrollableArea::contentAreaDidShow):
2182         (WebCore::ScrollableArea::contentAreaDidHide):
2183         (WebCore::ScrollableArea::willRemoveHorizontalScrollbar):
2184         (WebCore::ScrollableArea::contentsResized):
2185         (WebCore::ScrollableArea::serviceScrollAnimations):
2186         * platform/ScrollableArea.h:
2187         (ScrollableArea):
2188         (WebCore::ScrollableArea::getExistingScrollAnimator):
2189
2190 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
2191
2192         Deal with DOM modifications when evaluating source elements.
2193         https://bugs.webkit.org/show_bug.cgi?id=81163
2194
2195         Reviewed by Alexey Proskuryakov.
2196
2197         Test: media/video-beforeload-remove-source.html
2198
2199         * dom/ContainerNode.cpp: Make NodeVector and collectNodes public, renamed as getChildNodes.
2200         (WebCore::ContainerNode::takeAllChildrenFrom): collectNodes -> getChildNodes.
2201         (WebCore::ContainerNode::willRemove): collectNodes -> getChildNodes.
2202         (WebCore::ContainerNode::willRemoveChildren): collectNodes -> getChildNodes.
2203         (WebCore::ContainerNode::insertedIntoDocument): collectNodes -> getChildNodes.
2204         (WebCore::ContainerNode::removedFromDocument): collectNodes -> getChildNodes.
2205         * dom/ContainerNode.h:
2206         (WebCore::getChildNodes):
2207
2208         * editing/ReplaceSelectionCommand.cpp: Remove unused NodeVector declaration.
2209
2210         * html/HTMLMediaElement.cpp:
2211         (WebCore::HTMLMediaElement::HTMLMediaElement): m_nextChildNodeToConsider and m_currentSourceNode
2212             are now RefPtrs.
2213         (WebCore::HTMLMediaElement::loadTimerFired): Protect HTMLMediaElement from being deleted during
2214             a DOM modification during an event callback.
2215         (WebCore::HTMLMediaElement::load): Ditto.
2216         (WebCore::HTMLMediaElement::selectMediaResource): Set m_nextChildNodeToConsider to the first
2217             child node, it will be the first node considered.
2218         (WebCore::HTMLMediaElement::havePotentialSourceChild): m_nextChildNodeToConsider and m_currentSourceNode
2219             are now RefPtrs.
2220         (WebCore::HTMLMediaElement::selectNextSourceChild): Collect all child nodes in a vector before
2221             looking for <source> nodes because 'beforeload' event handlers can mutate the DOM. Don't
2222             use a <source> that is no longer a child node after 'beforeload'. Use 0 to represent the end
2223             of the child node list because m_nextChildNodeToConsider is now a RefPtr so using the previous 
2224             sentinel, "this", would cause a retain cycle.
2225         (WebCore::HTMLMediaElement::sourceWasAdded):  m_nextChildNodeToConsider and m_currentSourceNode
2226             are now RefPtrs.
2227         (WebCore::HTMLMediaElement::sourceWillBeRemoved): Ditto.
2228         (WebCore::HTMLMediaElement::getPluginProxyParams): Protect HTMLMediaElement from being deleted during
2229             a DOM modification during an event callback.
2230         * html/HTMLMediaElement.h:
2231
2232 2012-03-23  Dean Jackson  <dino@apple.com>
2233
2234         Disable CSS_SHADERS in Apple builds
2235         https://bugs.webkit.org/show_bug.cgi?id=81996
2236
2237         Reviewed by Simon Fraser.
2238
2239         Remove ENABLE_CSS_SHADERS from FeatureDefines. It's now in Platform.h.
2240
2241         * Configurations/FeatureDefines.xcconfig:
2242
2243 2012-03-23  Dave Michael  <dmichael@chromium.org>
2244
2245         Relanding(r111754): HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called
2246         https://bugs.webkit.org/show_bug.cgi?id=80428
2247
2248         Reviewed by Eric Seidel and Ryosuke Niwa.
2249
2250         Make HTMLPluginElement release its m_NPObject in detach() to break a
2251         reference-counting cycle that happens on reload or navigation. With this
2252         change, HTMLPlugInElement::removedFromDocument is unnecessary, so it
2253         was removed. Note that Releasing m_NPObject does not result in a call to
2254         the plugin; it simply releases a reference count on the wrapper object
2255         for this HTMLPlugInElement. (The plugin's NPP_Deallocate is invoked
2256         when the render tree is destroyed, when PluginView calls
2257         PluginPackage::unload.) Thus, it is safe to release m_NPObject in
2258         detach, because it can not result in layout or style changes.
2259
2260         Also added numberOfLiveNodes() and numberOfLiveDocuments() to
2261         window.internals to enable testing.
2262
2263         Test: plugins/netscape-dom-access-and-reload.html
2264
2265         * WebCore.exp.in:
2266         * html/HTMLPlugInElement.cpp:
2267         (WebCore::HTMLPlugInElement::detach):
2268         * html/HTMLPlugInElement.h:
2269         (HTMLPlugInElement):
2270         * testing/Internals.cpp:
2271         (WebCore):
2272         (WebCore::Internals::numberOfLiveNodes):
2273         (WebCore::Internals::numberOfLiveDocuments):
2274         * testing/Internals.h:
2275         (Internals):
2276         * testing/Internals.idl:
2277
2278 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
2279
2280         CSSParser doesn't set border-*-width/style/color to initial by border shorthand property
2281         https://bugs.webkit.org/show_bug.cgi?id=82040
2282
2283         Reviewed by Antti Koivisto.
2284
2285         The border shorthand property sets values for border-width, border-style, and border-color shorthand properties.
2286         While CSSParser::parseValue can process these shorthand properties properly and set the longhand properties
2287         such as border-top-width, border-right-width, ... border-left-color, CSSParser::addProperty can't and the
2288         initialization in parseShorthand fails for the border property.
2289
2290         Fixed the bug by explicitly initializing longhand properties.
2291
2292         Changing the behavior here is unlikely to break the Web since our behavior already differs from that of Firefox
2293         and Internet Explorer. Both of those browsers return the actual initial values such as "medium" and "currentColor".
2294         This discrepancy is tracked by https://bugs.webkit.org/show_bug.cgi?id=82078.
2295
2296         Test: fast/css/border-shorthand-initialize-longhands.html
2297
2298         * css/CSSParser.cpp:
2299         (WebCore::CSSParser::parseValue): Uses borderAbridgedLonghand.
2300         (WebCore::CSSParser::parseShorthand): Uses longhand properties for initialization if one is available.
2301         This allows us to initialize multiple properties (e.g. border-*-color) for a single property missing in the set.
2302         * css/CSSPropertyLonghand.cpp:
2303         (WebCore::borderAbridgedLonghand): Added. The longhand here (border-width, border-style, border-color) is
2304         "abridged" in the sense that they're still shorthands.
2305         * css/CSSPropertyLonghand.h:
2306         (WebCore::CSSPropertyLonghand::CSSPropertyLonghand):
2307         (CSSPropertyLonghand): Added the version that takes longhand instances for initialization purposes.
2308         (WebCore::CSSPropertyLonghand::longhandsForInitialization):
2309
2310 2012-03-23  Tony Chang  <tony@chromium.org>
2311
2312         [chromium] rename newwtf target back to wtf
2313         https://bugs.webkit.org/show_bug.cgi?id=82064
2314
2315         Reviewed by Adam Barth.
2316
2317         No new tests, only renaming a build target.
2318
2319         * WebCore.gyp/WebCore.gyp:
2320
2321 2012-03-23  Adrienne Walker  <enne@google.com>
2322
2323         [chromium] Turn off painting of scrollbars on compositor thread for unsupported platforms
2324         https://bugs.webkit.org/show_bug.cgi?id=82066
2325
2326         Reviewed by James Robinson.
2327
2328         With threaded compositing, OSX will crash and Windows will have black
2329         scrollbars. Fix that by reverting to the previosu behavior of updating
2330         scrollbars on the main thread instead.
2331
2332         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
2333         (WebCore::scrollbarLayerDidChange):
2334
2335 2012-03-23  Dan Bernstein  <mitz@apple.com>
2336
2337         <rdar://problem/7883987> ASSERTION FAILED: ASSERT(input == AnimationStateInputEndTimerFired || input == AnimationStateInputPlayStatePaused) in AnimationBase::updateStateMachine causing multiple "crashes" on Lion Intel Debug WebKit testers
2338         https://bugs.webkit.org/show_bug.cgi?id=81351
2339
2340         Rubber-stamped by Jessie Berlin.
2341
2342         * page/animation/AnimationBase.cpp:
2343         (WebCore::AnimationBase::updateStateMachine): Replaced the assertion with a LOG_ERROR so that
2344         the issue is still noticeable, but it does not automatically make the debug bots red.
2345
2346 2012-03-23  Mike Lawther  <mikelawther@chromium.org>
2347
2348         CSS3 calc: image sizing works with mixed percentage/absolute
2349         https://bugs.webkit.org/show_bug.cgi?id=82017
2350
2351         Reviewed by Ojan Vafai.
2352
2353         Test: css3/calc/img-size-expected.html
2354
2355         * rendering/RenderBox.cpp:
2356         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
2357         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2358
2359 2012-03-23  Julien Chaffraix  <jchaffraix@webkit.org>
2360
2361         REGRESSION(107971): Google Voice contact list is broken in WebKit due to badly allocating the extra height
2362         https://bugs.webkit.org/show_bug.cgi?id=81826
2363
2364         Reviewed by Tony Chang.
2365
2366         Covered by tables/mozilla/bugs/bug27038-{1|2}.html.
2367
2368         This partly reverts r107971: the extra logical height distribution change was not needed
2369         to fix the bug (it is needed by the test though). We revert to giving all the extra height
2370         to the first tbody and not the first section.
2371
2372         This is broken but unfortunately some websites are relying on that. Getting a real
2373         distribution algorithm is covered by bug 81824. However this is super tricky to get
2374         right and I did not want to add more compatibility risks until I have something solid.
2375
2376         * rendering/RenderTable.cpp:
2377         (WebCore::RenderTable::distributeExtraLogicalHeight):
2378
2379 2012-03-23  Xingnan Wang  <xingnan.wang@intel.com>
2380
2381         Optimize for IPP in DirectConvolver::process()
2382         https://bugs.webkit.org/show_bug.cgi?id=80255
2383
2384         Reviewed by Chris Rogers.
2385
2386         Increase ~2X performance by conv() in IPP.
2387
2388         * platform/audio/DirectConvolver.cpp:
2389         (WebCore::DirectConvolver::DirectConvolver):
2390         (WebCore::DirectConvolver::process):
2391         * platform/audio/DirectConvolver.h:
2392         (DirectConvolver):
2393
2394 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
2395
2396         MediaStream API (JSEP): Introducing PeerConnection00 and IceCallback
2397         https://bugs.webkit.org/show_bug.cgi?id=81657
2398
2399         Reviewed by Adam Barth.
2400
2401         Last major WebCore patch for the JSEP PeerConnection, together with the associated
2402         IceCallback (they both depend on each other and IceCallback has very few lines of real code).
2403
2404         My next patch after this one will do a major overhaul of the existing layout tests
2405         and add a few new ones.
2406
2407         * GNUmakefile.list.am:
2408         * Modules/mediastream/DOMWindowMediaStream.idl:
2409         * Modules/mediastream/IceCallback.h: Added.
2410         (WebCore):
2411         (IceCallback):
2412         (WebCore::IceCallback::~IceCallback):
2413         * Modules/mediastream/IceCallback.idl: Added.
2414         * Modules/mediastream/PeerConnection00.cpp: Added.
2415         (WebCore):
2416         (WebCore::PeerConnection00::create):
2417         (WebCore::PeerConnection00::PeerConnection00):
2418         (WebCore::PeerConnection00::~PeerConnection00):
2419         (WebCore::PeerConnection00::hasLocalAudioTrack):
2420         (WebCore::PeerConnection00::hasLocalVideoTrack):
2421         (WebCore::PeerConnection00::parseMediaHints):
2422         (WebCore::PeerConnection00::createOffer):
2423         (WebCore::PeerConnection00::createAnswer):
2424         (WebCore::PeerConnection00::setLocalDescription):
2425         (WebCore::PeerConnection00::setRemoteDescription):
2426         (WebCore::PeerConnection00::localDescription):
2427         (WebCore::PeerConnection00::remoteDescription):
2428         (WebCore::PeerConnection00::startIce):
2429         (WebCore::PeerConnection00::processIceMessage):
2430         (WebCore::PeerConnection00::readyState):
2431         (WebCore::PeerConnection00::iceState):
2432         (WebCore::PeerConnection00::addStream):
2433         (WebCore::PeerConnection00::removeStream):
2434         (WebCore::PeerConnection00::localStreams):
2435         (WebCore::PeerConnection00::remoteStreams):
2436         (WebCore::PeerConnection00::close):
2437         (WebCore::PeerConnection00::didGenerateIceCandidate):
2438         (WebCore::PeerConnection00::didChangeReadyState):
2439         (WebCore::PeerConnection00::didChangeIceState):
2440         (WebCore::PeerConnection00::didAddRemoteStream):
2441         (WebCore::PeerConnection00::didRemoveRemoteStream):
2442         (WebCore::PeerConnection00::interfaceName):
2443         (WebCore::PeerConnection00::scriptExecutionContext):
2444         (WebCore::PeerConnection00::stop):
2445         (WebCore::PeerConnection00::eventTargetData):
2446         (WebCore::PeerConnection00::ensureEventTargetData):
2447         (WebCore::PeerConnection00::changeReadyState):
2448         (WebCore::PeerConnection00::changeIceState):
2449         * Modules/mediastream/PeerConnection00.h: Added.
2450         (WebCore):
2451         (PeerConnection00):
2452         (WebCore::PeerConnection00::refEventTarget):
2453         (WebCore::PeerConnection00::derefEventTarget):
2454         * Modules/mediastream/PeerConnection00.idl: Added.
2455         * WebCore.gypi:
2456         * bindings/generic/RuntimeEnabledFeatures.h:
2457         (WebCore::RuntimeEnabledFeatures::webkitPeerConnection00Enabled):
2458         * bindings/js/JSPeerConnection00Custom.cpp: Added.
2459         (WebCore):
2460         (WebCore::JSPeerConnection00Constructor::constructJSPeerConnection00):
2461         * dom/EventTargetFactory.in:
2462
2463 2012-03-23  Adrienne Walker  <enne@google.com>
2464
2465         [chromium] Fix scrollbarLayerLostContext flaky test crash on 10.6
2466         https://bugs.webkit.org/show_bug.cgi?id=82062
2467
2468         Reviewed by James Robinson.
2469
2470         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
2471         (CCScrollbarLayerImpl):
2472
2473 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
2474
2475         [chromium] MediaStream API (JSEP): Extending WebMediaStreamCenter
2476         https://bugs.webkit.org/show_bug.cgi?id=81924
2477
2478         Reviewed by Adam Barth.
2479
2480         Nothing to test, just moving methods.
2481
2482         * platform/mediastream/MediaStreamCenter.cpp:
2483         (WebCore::MediaStreamCenter::constructSDP):
2484         (WebCore):
2485
2486 2012-03-23  Sami Kyostila  <skyostil@chromium.org>
2487
2488         Reuse buffer allocation if canvas size does not change
2489         https://bugs.webkit.org/show_bug.cgi?id=80871
2490
2491         Reviewed by Stephen White.
2492
2493         If the user changes the width or height attributes of a canvas element,
2494         the contents of the canvas should be cleared and the context state
2495         should be reset. This has become a common idiom to clear the canvas
2496         "efficiently" at the start of a frame.
2497
2498         Previously, this code path triggered a full reallocation of the image
2499         buffer backing the canvas, leading to reduced performance. This patch
2500         implements an optimization where we reuse the previous image buffer
2501         allocation if the size of the canvas did not change. Also, instead of
2502         clearing the canvas every time its dimensions are touched, we only clear
2503         if anything has been drawn into the canvas since it was previously
2504         cleared.
2505
2506         Note that for now this optimization only applies for 2D canvases,
2507         since it is not entirely clear how touching the dimensions of a WebGL
2508         canvas should work.
2509
2510         Test: fast/canvas/canvas-resize-after-paint-without-layout.html +
2511               existing layout tests for canvas resetting.
2512
2513         * html/HTMLCanvasElement.cpp:
2514         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2515         (WebCore::HTMLCanvasElement::reset):
2516         (WebCore::HTMLCanvasElement::createImageBuffer): Save the initial
2517         graphics context state so we can restore it without creating a new
2518         context.
2519         (WebCore::HTMLCanvasElement::clearImageBuffer):
2520         (WebCore):
2521         (WebCore::HTMLCanvasElement::clearCopiedImage):
2522         * html/HTMLCanvasElement.h:
2523         (HTMLCanvasElement):
2524         * html/canvas/CanvasRenderingContext2D.cpp:
2525         (WebCore::CanvasRenderingContext2D::reset): No need to notify the
2526         compositor when the context is reset, because clearing the image buffer
2527         does the same thing. We can also skip the notification if we did not
2528         have an image buffer at the time of the reset, because the reset will
2529         not have any visual impact in this case. Finally, if the canvas size
2530         did change, the notification is also unnecessary because of the call
2531         to RenderObject::repaint() from HTMLCanvasElement::reset().
2532
2533 2012-03-22  Martin Robinson  <mrobinson@igalia.com>
2534
2535         Fix some code generation warnings on GTK+.
2536
2537         Reviewed by Gustavo Noronha Silva.
2538
2539         No new tests. This just fixes warnings.
2540
2541         * GNUmakefile.am: Remove nonexistent directories from the list IDL directories.
2542
2543 2012-03-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2544
2545         Unreviewed, rolling out r111751.
2546         http://trac.webkit.org/changeset/111751
2547         https://bugs.webkit.org/show_bug.cgi?id=82060
2548
2549         caused 15% page cycler regression for chromium-linux
2550         (Requested by eae on #webkit).
2551
2552         * css/CSSStyleSelector.cpp:
2553         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2554
2555 2012-03-23  Kentaro Hara  <haraken@chromium.org>
2556
2557         Support [ImplementedAs] for attributes
2558         https://bugs.webkit.org/show_bug.cgi?id=81605
2559
2560         Reviewed by Adam Barth.
2561
2562         [ImplementedAs] just supports methods. [ImplementedAs] should support
2563         attributes too.
2564
2565         Explained here: https://trac.webkit.org/wiki/WebKitIDL#ImplementedAs
2566
2567         Test: bindings/scripts/test/TestObj.idl
2568
2569         * bindings/scripts/CodeGenerator.pm: Modified to support [ImplementedAs] for attributes.
2570         (AttributeNameForGetterAndSetter):
2571
2572         * bindings/scripts/test/TestObj.idl: Added a test case.
2573
2574         * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results.
2575         (WebDOMTestObj::strawberry):
2576         (WebDOMTestObj::setStrawberry):
2577         * bindings/scripts/test/CPP/WebDOMTestObj.h:
2578         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2579         (webkit_dom_test_obj_get_strawberry):
2580         (webkit_dom_test_obj_set_strawberry):
2581         (webkit_dom_test_obj_get_property):
2582         (webkit_dom_test_obj_class_init):
2583         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2584         * bindings/scripts/test/JS/JSTestObj.cpp:
2585         (WebCore):
2586         (WebCore::jsTestObjStrawberry):
2587         (WebCore::setJSTestObjStrawberry):
2588         * bindings/scripts/test/JS/JSTestObj.h:
2589         (WebCore):
2590         * bindings/scripts/test/ObjC/DOMTestObj.h:
2591         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2592         (-[DOMTestObj strawberry]):
2593         (-[DOMTestObj setStrawberry:]):
2594         * bindings/scripts/test/V8/V8TestObj.cpp:
2595         (WebCore::TestObjInternal::strawberryAttrGetter):
2596         (TestObjInternal):
2597         (WebCore::TestObjInternal::strawberryAttrSetter):
2598         (WebCore):
2599
2600 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
2601
2602         The JSC code generator doesn't generate correct code for Constructors
2603         https://bugs.webkit.org/show_bug.cgi?id=82046
2604
2605         Reviewed by Kentaro Hara.
2606
2607         The main bulk of generated code for constructors uses the name jsConstructor
2608         for the created object, and then calls GenerateParametersCheck which generates
2609         code that uses the name castedThis.
2610
2611         * bindings/scripts/CodeGeneratorJS.pm:
2612         (GenerateConstructorDefinition):
2613         * bindings/scripts/test/JS/JSTestInterface.cpp:
2614         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
2615         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2616         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
2617         * bindings/scripts/test/JS/JSTestObj.cpp:
2618         (WebCore::JSTestObjConstructor::finishCreation):
2619         (WebCore::JSTestObjConstructor::constructJSTestObj):
2620         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2621         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
2622         * bindings/scripts/test/TestObj.idl:
2623         * bindings/scripts/test/V8/V8TestObj.cpp:
2624         (WebCore::V8TestObj::constructorCallback):
2625
2626 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
2627
2628         The JSC code generator can't handle boolean arguments for Callbacks
2629         https://bugs.webkit.org/show_bug.cgi?id=82045
2630
2631         Reviewed by Kentaro Hara.
2632
2633         CodeGeneratorJS.pm only handles DOMStrings and objects as arguments
2634         for a Callback, so I added support for boolean values as well.
2635
2636         * bindings/scripts/CodeGeneratorJS.pm:
2637         (GenerateCallbackImplementation):
2638         * bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
2639         (WebDOMTestCallback::callbackWithBoolean):
2640         * bindings/scripts/test/CPP/WebDOMTestCallback.h:
2641         (WebDOMTestCallback):
2642         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
2643         (webkit_dom_test_callback_callback_with_boolean):
2644         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
2645         * bindings/scripts/test/JS/JSTestCallback.cpp:
2646         (WebCore::JSTestCallback::callbackWithBoolean):
2647         (WebCore):
2648         * bindings/scripts/test/JS/JSTestCallback.h:
2649         (JSTestCallback):
2650         * bindings/scripts/test/ObjC/DOMTestCallback.h:
2651         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
2652         (-[DOMTestCallback callbackWithBoolean:]):
2653         * bindings/scripts/test/TestCallback.idl:
2654         * bindings/scripts/test/V8/V8TestCallback.cpp:
2655         (WebCore::V8TestCallback::callbackWithBoolean):
2656         (WebCore):
2657         * bindings/scripts/test/V8/V8TestCallback.h:
2658         (V8TestCallback):
2659
2660 2012-03-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2661
2662         Touch adjustment forgets some subtarget quads.
2663         https://bugs.webkit.org/show_bug.cgi?id=82044
2664
2665         Reviewed by Kenneth Rohde Christiansen.
2666
2667         Do not uncritically skip all nodes that are ancestors to other test results.
2668         Instead return the inner-most element if multiple nodes have the same distance.
2669
2670         Test: touchadjustment/block-testing.html
2671
2672         * page/TouchAdjustment.cpp:
2673         (WebCore::TouchAdjustment::compileSubtargetList):
2674         (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
2675
2676 2012-03-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2677
2678         TouchAdjustment does not correct for frame position
2679         https://bugs.webkit.org/show_bug.cgi?id=82043
2680
2681         Reviewed by Kenneth Rohde Christiansen.
2682
2683         Convert geometry to window coordinates before calculating distance.
2684
2685         Test: touchadjustment/iframe.html
2686
2687         * page/TouchAdjustment.cpp:
2688         (WebCore::TouchAdjustment::distanceSquaredToTargetCenterLine):
2689
2690 2012-03-23  Vlad Voicu  <vladv@rosedu.org>
2691
2692         Fixed minor WebInspector display issue
2693         Clicking on disabled sections in Styles Sidebar Pane creates new elements.
2694         https://bugs.webkit.org/show_bug.cgi?id=81925
2695
2696         Reviewed by Timothy Hatcher
2697
2698         No new tests should be required.
2699
2700         * inspector/front-end/StylesSidebarPane.js:
2701         (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick):
2702         (WebInspector.StylePropertyTreeElement.prototype):
2703
2704 2012-03-23  Kentaro Hara  <haraken@chromium.org>
2705
2706         Unreviewed, rebaselined run-bindings-tests results.
2707
2708         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
2709         * bindings/scripts/test/CPP/WebDOMTestObj.h:
2710         * bindings/scripts/test/JS/JSTestObj.cpp:
2711         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
2712         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
2713         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
2714         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
2715         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
2716         * bindings/scripts/test/V8/V8TestObj.cpp:
2717         (WebCore::TestObjInternal::methodWithCallbackArgCallback):
2718         (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback):
2719         (WebCore::TestObjInternal::methodWithCallbackAndOptionalArgCallback):
2720         (WebCore::TestObjInternal::overloadedMethod5Callback):
2721         (WebCore::TestObjInternal::overloadedMethodCallback):
2722
2723 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
2724
2725         cssText should use StringBuilder
2726         https://bugs.webkit.org/show_bug.cgi?id=82028
2727
2728         Reviewed by Hajime Morita.
2729
2730         Make StylePropertySet::asText more efficient by deploying StringBuilder;
2731         avoids heap churn by String::operator+ and String::operator+=.
2732
2733         * css/StylePropertySet.cpp:
2734         (WebCore::StylePropertySet::asText):
2735
2736 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
2737
2738         REGRESSION(r111754): plugins/reloadplugins-and-pages.html fails on all platforms
2739         https://bugs.webkit.org/show_bug.cgi?id=82035
2740
2741         Rollout r111754 since it caused a test to fail and the test added by the patch
2742         is failing on Mac WebKit 2.
2743
2744         * WebCore.exp.in:
2745         * html/HTMLPlugInElement.cpp:
2746         (WebCore::HTMLPlugInElement::detach):
2747         (WebCore):
2748         (WebCore::HTMLPlugInElement::removedFromDocument):
2749         * html/HTMLPlugInElement.h:
2750         (HTMLPlugInElement):
2751         * testing/Internals.cpp:
2752         * testing/Internals.h:
2753         (Internals):
2754         * testing/Internals.idl:
2755
2756 2012-03-23  Adam Barth  <abarth@webkit.org>
2757
2758         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 2)
2759         https://bugs.webkit.org/show_bug.cgi?id=82026
2760
2761         Reviewed by Kentaro Hara.
2762
2763         This patch removes DOMWindow::resetNotifications, which was unneeded
2764         special-case logic for clearing the notifications center.  The previous
2765         patch that tried to accomplish the same thing did not override
2766         willDetachPage, which is why it caused crashes.
2767
2768         There's actually a cleaner way to handle these cases, which will let us
2769         implement reconnectFrame, but that will need to wait for the next
2770         patch.
2771
2772         * notifications/DOMWindowNotifications.cpp:
2773         (WebCore::DOMWindowNotifications::DOMWindowNotifications):
2774         (WebCore::DOMWindowNotifications::from):
2775         (WebCore::DOMWindowNotifications::webkitNotifications):
2776         (WebCore):
2777         (WebCore::DOMWindowNotifications::disconnectFrame):
2778         (WebCore::DOMWindowNotifications::willDetachPage):
2779         (WebCore::DOMWindowNotifications::reset):
2780         * notifications/DOMWindowNotifications.h:
2781         (DOMWindowNotifications):
2782         * page/DOMWindow.cpp:
2783         (WebCore::DOMWindow::willDetachPage):
2784         (WebCore::DOMWindow::disconnectDOMWindowProperties):
2785         (WebCore::DOMWindow::clearDOMWindowProperties):
2786         * page/DOMWindow.h:
2787         (DOMWindow):
2788         * page/Frame.cpp:
2789         (WebCore::Frame::willDetachPage):
2790
2791 2012-03-22  Adam Barth  <abarth@webkit.org>
2792
2793         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 1)
2794         https://bugs.webkit.org/show_bug.cgi?id=82015
2795
2796         Reviewed by Kentaro Hara.
2797
2798         This patch moves DOMWindow.webkitNotifications from DOMWindow.idl to
2799         DOMWindowNotificiations.idl in preparation for moving notificiations
2800         into Modules.
2801
2802         A future patch will remove DOMWindow::resetNotificaitions in favor of
2803         more general mechanisms.
2804
2805         * CMakeLists.txt:
2806         * DerivedSources.make:
2807         * DerivedSources.pri:
2808         * GNUmakefile.list.am:
2809         * Target.pri:
2810         * WebCore.gypi:
2811         * WebCore.vcproj/WebCore.vcproj:
2812         * WebCore.xcodeproj/project.pbxproj:
2813         * notifications/DOMWindowNotifications.cpp: Added.
2814         (WebCore):
2815         (WebCore::DOMWindowNotifications::DOMWindowNotifications):
2816         (WebCore::DOMWindowNotifications::~DOMWindowNotifications):
2817         (WebCore::DOMWindowNotifications::from):
2818         (WebCore::DOMWindowNotifications::webkitNotifications):
2819         (WebCore::DOMWindowNotifications::reset):
2820         (WebCore::DOMWindowNotifications::supplementName):
2821         * notifications/DOMWindowNotifications.h: Added.
2822         (WebCore):
2823         (DOMWindowNotifications):
2824         * notifications/DOMWindowNotifications.idl: Added.
2825         * page/DOMWindow.cpp:
2826         (WebCore::DOMWindow::~DOMWindow):
2827         (WebCore):
2828         (WebCore::DOMWindow::resetNotifications):
2829         * page/DOMWindow.h:
2830         (WebCore):
2831         (DOMWindow):
2832         * page/DOMWindow.idl:
2833
2834 2012-03-22  Li Yin  <li.yin@intel.com>
2835
2836         A client MUST close a connection if it detects a masked frame
2837         https://bugs.webkit.org/show_bug.cgi?id=81361
2838
2839         Reviewed by Kent Tamura.
2840
2841         A server must not mask any frames that it sends to the client.
2842         Change the test case, not mask the frames from server to client.
2843         
2844         Test: http/tests/websocket/tests/hybi/invalid-masked-frames-from-server.html
2845
2846         * Modules/websockets/WebSocketChannel.cpp:
2847         (WebCore::WebSocketChannel::processFrame):
2848
2849 2012-03-22  Li Yin  <li.yin@intel.com>
2850
2851         [WebSocket]The minimal number of bytes MUST be used to encode the length
2852         https://bugs.webkit.org/show_bug.cgi?id=81443
2853
2854         Reviewed by Kent Tamura.
2855
2856         From RFC 6455 http://tools.ietf.org/html/rfc6455#section-5.2
2857         the minimal number of bytes MUST be used to encode the length
2858         
2859         New test case : http/tests/websocket/tests/hybi/invalid-encode-length.html
2860
2861         * Modules/websockets/WebSocketChannel.cpp:
2862         (WebCore::WebSocketChannel::parseFrame):
2863
2864 2012-03-22  Adam Barth  <abarth@webkit.org>
2865
2866         Unreviewed.  Sort xcodeproj file.
2867
2868         * WebCore.xcodeproj/project.pbxproj:
2869
2870 2012-03-22  Mao Yujie  <yujie.mao@intel.com>
2871
2872         Implement strict testing criterion for callback function definition
2873         https://bugs.webkit.org/show_bug.cgi?id=80005
2874
2875         Reviewed by Adam Barth.
2876
2877         Callback function should be defined as the function type instead of
2878         the object type.
2879
2880         LayoutTest: fast/dom/MediaStream/argument-types.html
2881
2882         * bindings/scripts/CodeGeneratorJS.pm:
2883         (GenerateParametersCheckExpression):
2884         (GenerateParametersCheck):
2885         * bindings/scripts/CodeGeneratorV8.pm:
2886         (GenerateParametersCheckExpression):
2887         (GenerateParametersCheck):
2888
2889 2012-03-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2890
2891         Convert hasGrammarMarker to use Internals interface
2892         https://bugs.webkit.org/show_bug.cgi?id=82004
2893
2894         Reviewed by Ryosuke Niwa.
2895
2896         Remove hasGrammarMarker functions, because it is able to work in the
2897         cross-port way through the Internals interface.
2898
2899         No new tests, since we are improving here the infra-structure
2900         for testing a specific method.
2901
2902         * testing/Internals.cpp:
2903         (WebCore::Internals::hasGrammarMarker):
2904         (WebCore):
2905         * testing/Internals.h:
2906         (Internals):
2907         * testing/Internals.idl:
2908
2909 2012-03-22  Xingnan Wang  <xingnan.wang@intel.com>
2910
2911         Add exception for the setter of "fftSize" in RealtimeAnalyserNode
2912         https://bugs.webkit.org/show_bug.cgi?id=81748
2913
2914         Reviewed by Chris Rogers.
2915
2916         * Modules/webaudio/RealtimeAnalyser.cpp:
2917         (WebCore::RealtimeAnalyser::setFftSize):
2918         * Modules/webaudio/RealtimeAnalyser.h:
2919         (RealtimeAnalyser):
2920         * Modules/webaudio/RealtimeAnalyserNode.cpp:
2921         (WebCore::RealtimeAnalyserNode::setFftSize):
2922         (WebCore):
2923         * Modules/webaudio/RealtimeAnalyserNode.h:
2924         (RealtimeAnalyserNode):
2925         * Modules/webaudio/RealtimeAnalyserNode.idl:
2926
2927 2012-03-22  Leo Yang  <leo.yang@torchmobile.com.cn>
2928
2929         [BlackBerry] Add HistoryItemViewState for BlackBerry port
2930         https://bugs.webkit.org/show_bug.cgi?id=81867
2931
2932         Reviewed by Rob Buis.
2933
2934         HistoryItemViewState is the blackberry specific field of HistoryItem.
2935         It's used to maintain the porting specific view state.
2936
2937         No new test because the port can't be built yet.
2938
2939         * history/HistoryItem.h:
2940         (HistoryItem):
2941         (WebCore::HistoryItem::viewState):
2942
2943 2012-03-22  SravanKumar Sandela  <ssandela@innominds.com>
2944
2945         Fieldset unexpectedly stretches to minimum intrinsic width
2946         https://bugs.webkit.org/show_bug.cgi?id=79128
2947
2948         Reviewed by Julien Chaffraix.
2949
2950         Fieldset element width will now check if css width is specified explicitly
2951         before stretching to minimum intrinsic width. The reference
2952         can be taken from IE9, instead of FF(FF acknowledged the broken behavior). 
2953
2954         Tests: fast/forms/fieldset-width-nostretch-ifspecified-expected.html
2955                fast/forms/fieldset-width-nostretch-ifspecified.html
2956
2957         * rendering/RenderFieldset.cpp:
2958         (WebCore::RenderFieldset::stretchesToMinIntrinsicLogicalWidth):
2959         (WebCore):
2960         * rendering/RenderFieldset.h:
2961         (RenderFieldset):
2962
2963 2012-03-22  Shawn Singh  <shawnsingh@chromium.org>
2964
2965         [chromium] Target surface should be damaged for a new layers even when layer had no changes
2966         https://bugs.webkit.org/show_bug.cgi?id=81879
2967
2968         Reviewed by Adrienne Walker.
2969
2970         Unit test added to CCDamageTrackerTest.
2971
2972         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
2973         (WebCore::CCDamageTracker::removeRectFromCurrentFrame): added a
2974         boolean arg to detect if the layer is new on this update.
2975
2976         (WebCore::CCDamageTracker::extendDamageForLayer): added logic that
2977         damages the target surface if the layer is new.
2978
2979         (WebCore::CCDamageTracker::extendDamageForRenderSurface): added
2980         logic that damages the target surface if the descendant surface is
2981         new; similar logic for the surface's replica if the replica is new.
2982
2983         * platform/graphics/chromium/cc/CCDamageTracker.h:
2984         (CCDamageTracker):
2985
2986 2012-03-22  Charles Wei  <charles.wei@torchmobile.com.cn>
2987
2988         [BlackBerry] Need to store the meta info of a page in the ViewState of the history
2989         https://bugs.webkit.org/show_bug.cgi?id=82000
2990
2991         Reviewed by Rob Buis.
2992
2993         Internally reviewed by George Staikos.
2994
2995         No new tests, BlackBerry porting doesn't build yet upstreaming.
2996
2997         * history/blackberry/HistoryItemViewState.h:
2998         (WebCore::HistoryItemViewState::HistoryItemViewState):
2999         (HistoryItemViewState):
3000
3001 2012-03-22  Adam Klein  <adamk@chromium.org>
3002
3003         [v8] wrapSlow methods should ref underlying object before creating wrapper
3004         https://bugs.webkit.org/show_bug.cgi?id=81919
3005
3006         Reviewed by Adam Barth.
3007
3008         Because instatiating the wrapper can trigger GC, it's important that
3009         wrapSlow() hold a reference to an object when creating a wrapper for
3010         that object. Once the V8 wrapper exists and is associated with the object,
3011         the reference can be handed off (via leakRef) to be handled by the normal
3012         binding code logic (where derefObject is called if the handle is GCed).
3013
3014         Binding tests have been updated to reflect this change.
3015
3016         Testing the change directly is hard. Any test landed today would only
3017         be a valid test until V8's logic about when to GC changes, at which point
3018         it would become dead weight. So I don't think it's worth landing a
3019         layout test along with this.
3020
3021         * bindings/scripts/CodeGeneratorV8.pm:
3022         (GenerateHeader): Make wrapSlow take a PassRefPtr for RefCounted objects.
3023         (GenerateToV8Converters): Get rid of the explicit call to ref() and
3024         instead call leakRef() when adding a RefCounted object to the DOM map.
3025         (GetPassRefPtrType): Helper to generate "PassRefPtr<T>", or "PassRefPtr<T<U> >" as appropriate.
3026         * bindings/scripts/test/V8/V8Float64Array.cpp:
3027         (WebCore::V8Float64Array::wrapSlow):
3028         * bindings/scripts/test/V8/V8Float64Array.h:
3029         (V8Float64Array):
3030         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3031         (WebCore::V8TestActiveDOMObject::wrapSlow):
3032         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
3033         (V8TestActiveDOMObject):
3034         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3035         (WebCore::V8TestCustomNamedGetter::wrapSlow):
3036         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
3037         (V8TestCustomNamedGetter):
3038         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3039         (WebCore::V8TestEventConstructor::wrapSlow):
3040         * bindings/scripts/test/V8/V8TestEventConstructor.h:
3041         (V8TestEventConstructor):
3042         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3043         (WebCore::V8TestEventTarget::wrapSlow):
3044         * bindings/scripts/test/V8/V8TestEventTarget.h:
3045         (V8TestEventTarget):
3046         * bindings/scripts/test/V8/V8TestInterface.cpp:
3047         (WebCore::V8TestInterface::wrapSlow):
3048         * bindings/scripts/test/V8/V8TestInterface.h:
3049         (V8TestInterface):
3050         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3051         (WebCore::V8TestMediaQueryListListener::wrapSlow):
3052         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
3053         (V8TestMediaQueryListListener):
3054         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3055         (WebCore::V8TestNamedConstructor::wrapSlow):
3056         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
3057         (V8TestNamedConstructor):
3058         * bindings/scripts/test/V8/V8TestObj.cpp:
3059         (WebCore::V8TestObj::wrapSlow):
3060         * bindings/scripts/test/V8/V8TestObj.h:
3061         (V8TestObj):
3062         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3063         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
3064         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
3065         (V8TestSerializedScriptValueInterface):
3066
3067 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3068
3069         [BlackBerry] add interface clearCredentials() and clearNeverRememberSites()
3070         https://bugs.webkit.org/show_bug.cgi?id=81887
3071
3072         Reviewed by Rob Buis.
3073
3074         Fixed SQL issue when clearing table logins and table never_remember.
3075
3076         No new tests.
3077
3078         * platform/network/blackberry/CredentialBackingStore.cpp:
3079         (WebCore::CredentialBackingStore::clearLogins):
3080         (WebCore::CredentialBackingStore::clearNeverRemember):
3081
3082 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3083
3084         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
3085         https://bugs.webkit.org/show_bug.cgi?id=80135
3086
3087         Reviewed by Rob Buis.
3088
3089         Modified the interface function authenticationChallenge() in class
3090         PageClientBlackBerry, moved Credential from return value to the
3091         function's reference parameter, and returned a bool to indicate if
3092         user pressed Ok button or not.
3093         Removed the logic which checks m_currentWebChallenge not null,
3094         because we should challenge user again if the last provided credential
3095         is not valid; also added the logic that will popup challenge
3096         dialog again immediately if user press Ok buttton directly without
3097         inputting anything.
3098
3099         No new tests.
3100
3101         * platform/blackberry/PageClientBlackBerry.h:
3102         * platform/network/blackberry/NetworkJob.cpp:
3103         (WebCore::NetworkJob::handleAuthHeader):
3104         (WebCore::NetworkJob::sendRequestWithCredentials):
3105
3106 2012-03-22  Jason Liu  <jason.liu@torchmobile.com.cn>
3107
3108         [BlackBerry] Synchronize platform/network/blackberry
3109         https://bugs.webkit.org/show_bug.cgi?id=81874
3110
3111         We changed a lot in these files locally. But the changes are not upstreamed.
3112         It is not convenient to do the other upstreaming work based on these differences.
3113         So upstream these changes.
3114
3115         Reviewed by Rob Buis.
3116
3117         No new tests. Just synchronize codes.
3118
3119         * platform/network/blackberry/NetworkJob.cpp:
3120         (WebCore::NetworkJob::NetworkJob):
3121         (WebCore::NetworkJob::initialize):
3122         (WebCore::NetworkJob::handleNotifyHeaderReceived):
3123         (WebCore::NetworkJob::handleNotifyDataReceived):
3124         (WebCore::NetworkJob::sendResponseIfNeeded):
3125         (WebCore::NetworkJob::sendRequestWithCredentials):
3126         (WebCore::NetworkJob::handleAbout):
3127         * platform/network/blackberry/NetworkJob.h:
3128         (WebCore::NetworkJob::isError):
3129         (NetworkJob):
3130         * platform/network/blackberry/NetworkManager.cpp:
3131         (WebCore::NetworkManager::startJob):
3132         * platform/network/blackberry/ResourceRequest.h:
3133         (WebCore::ResourceRequest::ResourceRequest):
3134         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
3135         (WebCore::platformTargetTypeForRequest):
3136
3137 2012-03-22  Tom Sepez  <tsepez@chromium.org>
3138
3139         XSS Auditor bypass via script tag src=data:, URLS.
3140         https://bugs.webkit.org/show_bug.cgi?id=81948
3141
3142         Reviewed by Adam Barth.
3143
3144         This change fixes an XSSAuditor bypass wherby a script with a data: URL src
3145         attribute could evade detection by using characters from the page to create
3146         a snippet for matching not found in the URL's reflected vector.  This change 
3147         terminates the snippet for matching earlier in these cases.
3148         
3149         Test: http/tests/security/xssAuditor/script-tag-with-source-data-url2.html
3150
3151         * html/parser/XSSAuditor.cpp:
3152         (WebCore::XSSAuditor::decodedSnippetForAttribute):
3153
3154 2012-03-22  Dana Jansens  <danakj@chromium.org>
3155
3156         [chromium] Incorrect assert on animating opacity for a surface
3157         https://bugs.webkit.org/show_bug.cgi?id=81994
3158
3159         Reviewed by Adrienne Walker.
3160
3161         Draw opacity and animation state match on the surface itself. A
3162         surface with animating opacity always has an owning layer without
3163         animation, as the surface does the animation for it.
3164
3165         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3166         (WebCore::CCLayerTreeHost::paintLayerContents):
3167
3168 2012-03-22  Dana Jansens  <danakj@chromium.org>
3169
3170         [chromium] Skip frames when checkerboarding an animation
3171         https://bugs.webkit.org/show_bug.cgi?id=81716
3172
3173         Reviewed by Adrienne Walker.
3174
3175         This will stop drawing frames when prepareToDraw fails, if the draw is
3176         not forced. The expected behaviour is outlined below by the unit tests.
3177
3178         When a draw fails, we:
3179         1. Set m_needsRedraw to try again next vsync
3180         2. Set m_needsCommit because we need more data from webkit to succeed
3181         3. Set m_drawIfPossibleFailed. This allows us to try draw again within
3182         the same vsync *if* a commit finishes during this time.
3183
3184         Unit test: CCSchedulerTest.RequestRedrawInsideFailedDraw
3185                    CCSchedulerTest.RequestCommitInsideFailedDraw
3186                    CCSchedulerTest.NoBeginFrameWhenDrawFails
3187                    CCSchedulerStateMachineTest.TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain
3188                    CCSchedulerStateMachineTest.TestSetNeedsRedrawDuringFailedDrawDoesNotRemoveNeedsRedraw
3189                    CCSchedulerStateMachineTest.TestCommitAfterFailedDrawAllowsDrawInSameFrame
3190                    CCSchedulerStateMachineTest.TestCommitAfterFailedAndSuccessfulDrawDoesNotAllowDrawInSameFrame
3191                    CCSchedulerStateMachineTest.TestFailedDrawIsRetriedNextVSync
3192
3193         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3194         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3195         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
3196         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3197         (CCLayerTreeHostImpl):
3198         * platform/graphics/chromium/cc/CCScheduler.cpp:
3199         (WebCore::CCScheduler::processScheduledActions):
3200         * platform/graphics/chromium/cc/CCScheduler.h:
3201         (CCSchedulerClient):
3202         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
3203         (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine):
3204         (WebCore::CCSchedulerStateMachine::nextAction):
3205         (WebCore::CCSchedulerStateMachine::updateState):
3206         (WebCore::CCSchedulerStateMachine::didDrawIfPossibleCompleted):
3207         (WebCore):
3208         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
3209         (CCSchedulerStateMachine):
3210         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3211         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
3212         (WebCore):
3213         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapIfPossible):
3214         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapForced):
3215         * platform/graphics/chromium/cc/CCThreadProxy.h:
3216         (CCThreadProxy):
3217
3218 2012-03-22  W. James MacLean  <wjmaclean@chromium.org>
3219
3220         [chromium] Force update of nonFastScrollableRegion if target CCLayerImpl has been freshly created.
3221         https://bugs.webkit.org/show_bug.cgi?id=81968
3222
3223         Reviewed by Adrienne Walker.
3224
3225         Added unit test to existing tests for TreeSynchronizer.
3226
3227         When creating a new CCLayerImpl during tree synchronization, make sure we transfer the nonFastScrollableRegion as
3228         the new CCLayerImpl will default to an empty region.
3229
3230         * platform/graphics/chromium/LayerChromium.h:
3231         (WebCore::LayerChromium::nonFastScrollableRegion):
3232         (WebCore::LayerChromium::setNonFastScrollableRegionChanged):
3233         * platform/graphics/chromium/TreeSynchronizer.cpp:
3234         (WebCore::TreeSynchronizer::reuseOrCreateCCLayerImpl):
3235
3236 2012-03-22  Raphael Kubo da Costa  <rakuco@FreeBSD.org>
3237
3238         [CMake] Unreviewed build fix after r111778.
3239
3240         * CMakeLists.txt: Replace ${JAVASCRIPTCORE_DIR}/wtf includes with
3241         ${WTF_DIR}/wtf ones.
3242
3243 2012-03-22  Tony Chang  <tony@chromium.org>
3244
3245         Unreviewed, fix chromium build after wtf move.
3246
3247         Only use newwtf, remove references to wtf.
3248
3249         * WebCore.gyp/WebCore.gyp:
3250
3251 2012-03-22  Benjamin Poulain  <bpoulain@apple.com>
3252
3253         Remove an obsolete comment regarding magic frames from Geolocation
3254         https://bugs.webkit.org/show_bug.cgi?id=81871
3255
3256         Reviewed by Alexey Proskuryakov.
3257
3258         Moving a frame into another document is no longer possible after r111361. The comment
3259         is now irrelevant.
3260
3261         * Modules/geolocation/Geolocation.cpp:
3262         (WebCore::Geolocation::stop):
3263
3264 2012-03-22  Csaba Osztrogon√°c  <ossy@webkit.org>
3265
3266         Actually move WTF files to their new home
3267         https://bugs.webkit.org/show_bug.cgi?id=81844
3268
3269         [Qt] Unreviewed buildfix after r111778.
3270
3271         * Target.pri:
3272
3273 2012-03-22  Kentaro Hara  <haraken@chromium.org>
3274
3275         run-bindings-tests output a lot of errors in TestSerializedScriptValueInterface.idl
3276         https://bugs.webkit.org/show_bug.cgi?id=81852
3277
3278         Reviewed by Adam Barth.
3279
3280         run-bindings-tests output a lot of errors in TestSerializedScriptValueInterface.idl:
3281
3282         Use of uninitialized value in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2743.
3283         Use of uninitialized value $name in substitution (s///) at WebCore/bindings/scripts/CodeGenerator.pm line 119.
3284         Use of uninitialized value $type in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2969.
3285         Use of uninitialized value $type in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2972.
3286         Use of uninitialized value $type in hash element at WebCore/bindings/scripts/CodeGenerator.pm line 367.
3287         Use of uninitialized value $type in hash element at WebCore/bindings/scripts/CodeGenerator.pm line 368.
3288         ...
3289
3290         This is because [Constructor(...)] does not yet support [Optional] arguments.
3291         It just supports [Optional=DefaultIsUndefined] and [Optional=DefaultIsNullString] arguments:
3292         https://trac.webkit.org/wiki/WebKitIDL#Constructor
3293
3294         This patch replaces [Optional] with [Optional=DefaultIsUndefined]
3295         in TestSerializedScriptValueInterface.idl.
3296
3297         Test: bindings/scripts/test/TestSerializedScriptValueInterface.idl
3298
3299         * bindings/scripts/CodeGeneratorJS.pm:
3300         (GenerateConstructorDefinition):
3301         * bindings/scripts/CodeGeneratorV8.pm:
3302         (GenerateConstructorCallback):
3303         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3304         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
3305         * bindings/scripts/test/TestSerializedScriptValueInterface.idl:
3306         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3307         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
3308
3309 2012-03-22  Michal Mocny  <mmocny@google.com>
3310
3311         [chromium] LayerRendererChromium should use GpuMemoryAllocationChanged callback to explicitly manage framebuffer.
3312         https://bugs.webkit.org/show_bug.cgi?id=81823
3313
3314         Reviewed by Adrienne Walker.
3315
3316         New UnitTests: LayerRendererChromiumTest
3317
3318         * platform/graphics/chromium/LayerRendererChromium.cpp:
3319         (LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
3320         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::create):
3321         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::~LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
3322         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChanged):
3323         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
3324         (WebCore):
3325         (WebCore::LayerRendererChromium::LayerRendererChromium):
3326         (WebCore::LayerRendererChromium::initialize):
3327         (WebCore::LayerRendererChromium::~LayerRendererChromium):
3328         (WebCore::LayerRendererChromium::setVisible):
3329         (WebCore::LayerRendererChromium::swapBuffers):
3330         (WebCore::LayerRendererChromium::discardFramebuffer):
3331         (WebCore::LayerRendererChromium::ensureFramebuffer):
3332         * platform/graphics/chromium/LayerRendererChromium.h:
3333         (WebCore):
3334         (LayerRendererChromiumClient):
3335         (LayerRendererChromium):
3336         (WebCore::LayerRendererChromium::isFramebufferDiscarded):
3337         (ScopedEnsureFramebufferAllocation):
3338         (WebCore::ScopedEnsureFramebufferAllocation::ScopedEnsureFramebufferAllocation):
3339         (WebCore::ScopedEnsureFramebufferAllocation::~ScopedEnsureFramebufferAllocation):
3340         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3341         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
3342         (LayerRendererCapabilities):
3343         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3344         (WebCore::CCLayerTreeHostImpl::setVisible):
3345         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3346         (CCLayerTreeHostImpl):
3347         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3348         (WebCore::CCSingleThreadProxy::compositeAndReadback):
3349         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3350         (WebCore::CCThreadProxy::compositeAndReadback):
3351
3352 2012-03-22  Adam Barth  <abarth@webkit.org>
3353
3354         ContainerNode::insertedIntoTree and removedFromTree use weak iteration patterns
3355         https://bugs.webkit.org/show_bug.cgi?id=80570
3356
3357         Reviewed by Ryosuke Niwa.
3358
3359         These functions use weak iteration patterns, but as far as I can tell,
3360         we never execute script below these functions.  This patch adds ASSERTs
3361         to help us avoid adding events in the future.
3362
3363         * dom/ContainerNode.cpp:
3364         (WebCore::ContainerNode::insertedIntoTree):
3365         (WebCore::ContainerNode::removedFromTree):
3366         * html/HTMLMediaElement.cpp:
3367         (WebCore::HTMLMediaElement::loadInternal):
3368             - There's a somewhat complex call chain from insertedIntoTree into
3369               HTMLMediaElement, and somewhat complex control flow below
3370               loadInternal that eventually leads to the BeforeLoad event being
3371               fired.  In studying this code, I don't see a way for the
3372               BeforeLoad event to be fired during insertedIntoTree, but I've
3373               added this assert here to make sure we don't call loadInternal
3374               when we're not supposed to dispatch events.  This ASSERT should
3375               help us catch these BeforeLoad errors more quickly.
3376
3377 2012-03-22  Raphael Kubo da Costa  <rakuco@FreeBSD.org>
3378
3379         Crash in fast/dom/navigator-detached-nocrash.html
3380         https://bugs.webkit.org/show_bug.cgi?id=81773
3381
3382         Reviewed by Adam Barth.
3383
3384         BatteryManager::create() blindly assumes the Navigator* it
3385         receives has a valid Frame, which is not always the case, as made
3386         evident by the crashing test.
3387
3388         Follow abarth's suggestion and just stop
3389         NavigatorBattery::webkitBattery() before it reaches the call to
3390         BatteryManager::create() if that's the case.
3391
3392         No new tests, covered by fast/dom/navigator-detached-nocrash.html.
3393
3394         * Modules/battery/NavigatorBattery.cpp:
3395         (WebCore::NavigatorBattery::webkitBattery):
3396
3397 2012-03-22  Emil A Eklund  <eae@chromium.org>
3398
3399         Unreviewed, add missing include statement for CSSValueList.h.
3400
3401         * css/CSSStyleSelector.h:
3402
3403 2012-03-22  Tony Chang  <tony@chromium.org>
3404
3405         flexbox flexing implementation should match the spec
3406         https://bugs.webkit.org/show_bug.cgi?id=70796
3407
3408         Reviewed by Ojan Vafai.
3409
3410         Match the algorithm in the spec. Handling min/max constraints are slightly improved.
3411         http://dev.w3.org/csswg/css3-flexbox/#resolve-the-flexible-lengths
3412
3413         New test cases in css3/flexbox/flex-algorithm-min-max.html.
3414
3415         * rendering/RenderFlexibleBox.cpp:
3416         (WebCore::adjustFlexSizeForMinAndMax): Step 5 of resolving flexible lengths.
3417         (WebCore):
3418         (WebCore::RenderFlexibleBox::Violation::Violation):
3419         (RenderFlexibleBox::Violation):
3420         (WebCore::RenderFlexibleBox::freezeViolations): Used by step 6.
3421         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
3422         * rendering/RenderFlexibleBox.h:
3423
3424 2012-03-22  Emil A Eklund  <eae@chromium.org>
3425
3426         Unreviewed, add missing import.
3427
3428         * rendering/RenderThemeMac.mm:
3429
3430 2012-03-22  Anders Carlsson  <andersca@apple.com>
3431
3432         ASSERT(!needsLayout) in RenderView.cpp when visiting http://www.panic.com/blog/
3433         https://bugs.webkit.org/show_bug.cgi?id=81953
3434         <rdar://problem/11086998>
3435
3436         Reviewed by Sam Weinig.
3437
3438         If a page ends up creating CATiledLayers, CA transactions can be committed outside of the normal
3439         CA run loop observer, so we can't call setNeedsDisplay on tile cache layers directly because then
3440         we'll end up calling into painting code before all the layers have been flushed.
3441
3442         Fix this by adding a list of dirty rects to platformCALayerDidCreateTiles and change GraphicsLayerCA to
3443         mark them as dirty. This ensures that any CA transaction commits won't cause newly added layers to be painted.
3444
3445         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3446         (WebCore::LayerClient::platformCALayerDidCreateTiles):
3447         * platform/graphics/ca/GraphicsLayerCA.cpp:
3448         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
3449         * platform/graphics/ca/GraphicsLayerCA.h:
3450         (GraphicsLayerCA):
3451         * platform/graphics/ca/PlatformCALayerClient.h:
3452         (PlatformCALayerClient):
3453         * platform/graphics/ca/mac/TileCache.mm:
3454         (WebCore::TileCache::setScale):
3455         (WebCore::TileCache::revalidateTiles):
3456         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
3457         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDidCreateTiles):
3458
3459 2012-03-19  Robert Hogan  <robert@webkit.org>
3460
3461         Text should overflow when list item height set to 0
3462         https://bugs.webkit.org/show_bug.cgi?id=78726
3463
3464         Reviewed by&nbs