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