26c7ead82c9a4fc78b3bb3f3ef223e96ac62dcf2
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-06-29  Joshua Bell  <jsbell@chromium.org>
2
3         IndexedDB: Keep direction on IDBCursor to avoid calls to back end
4         https://bugs.webkit.org/show_bug.cgi?id=90114
5
6         Reviewed by Tony Chang.
7
8         Let IDBCursor handle direction() accessor locally, without a call to
9         the IDBCursorBackendImpl which (in some ports) may reside in a different
10         process. Not a heavily called function, but further reduces the surface
11         area exposed by the XXXInterface classes.
12
13         No new tests - no functional changes.
14
15         * Modules/indexeddb/IDBCursor.cpp:
16         (WebCore::IDBCursor::create): Accept direction, known at creation time.
17         (WebCore::IDBCursor::IDBCursor): Stash in member.
18         (WebCore::IDBCursor::direction): Use local copy
19         (WebCore::IDBCursor::stringToDirection): Return enum value, not int.
20         * Modules/indexeddb/IDBCursor.h:
21         (IDBCursor):
22         * Modules/indexeddb/IDBCursorBackendImpl.cpp: Remove accessor.
23         * Modules/indexeddb/IDBCursorBackendImpl.h:
24         (IDBCursorBackendImpl):
25         * Modules/indexeddb/IDBCursorBackendInterface.h: Remove accessor.
26         * Modules/indexeddb/IDBCursorWithValue.cpp:
27         (WebCore::IDBCursorWithValue::create):
28         (WebCore::IDBCursorWithValue::IDBCursorWithValue):
29         * Modules/indexeddb/IDBCursorWithValue.h:
30         (IDBCursorWithValue):
31         * Modules/indexeddb/IDBIndex.cpp: Prep IDBRequest with cursor direction too.
32         (WebCore::IDBIndex::openCursor):
33         (WebCore::IDBIndex::openKeyCursor):
34         * Modules/indexeddb/IDBObjectStore.cpp: Ditto.
35         (WebCore::IDBObjectStore::openCursor):
36         * Modules/indexeddb/IDBRequest.cpp: Stash direction for pending cursor too.
37         (WebCore::IDBRequest::IDBRequest):
38         (WebCore::IDBRequest::setCursorDetails):
39         (WebCore::IDBRequest::onSuccess): Apply stashed direction to new cursor.
40         * Modules/indexeddb/IDBRequest.h:
41         (IDBRequest):
42
43 2012-06-29  Tony Chang  <tony@chromium.org>
44
45         Allow align-self: stretch to cause the item size to shrink below its intrinsic size
46         https://bugs.webkit.org/show_bug.cgi?id=90304
47
48         Reviewed by Ojan Vafai.
49
50         The spec used to say that stretch could only make items grow, but now
51         it allows items to shrink.
52         http://dev.w3.org/csswg/css3-flexbox/#align-items-stretch
53
54         Tests: css3/flexbox/flex-align-stretch.html Updated expectations.
55                css3/flexbox/child-overflow.html Updated expectations.
56
57         * rendering/RenderFlexibleBox.cpp:
58         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
59
60 2012-06-29  James Weatherall  <wez@chromium.org>
61
62         NPObjectWrapper may not address all window script object lifetime issues
63         https://bugs.webkit.org/show_bug.cgi?id=85679
64
65         The ScriptController implementations force-deallocate the window script object to ensure that DOM objects are not leaked if an NPAPI plugin fails to release a reference to it before being destroyed. The NPObjectWrapper was added to ensure that NPAPI scripting could not touch the real window script object after it had been deallocated, by providing the plugin with a small wrapper which will leak if the plugin fails to dereference it.
66
67         This patch removes NPObjectWrapper and instead drops the window script NPObject's reference to the underlying V8Object in ScriptController::clearScriptObjects(). If a plugin fails to dereference the object then the NPV8Object wrapper will be leaked but the DOM objects it references will not.
68
69         Reviewed by Nate Chapin.
70
71         Test: plugins/npruntime/leak-window-scriptable-object.html
72
73         * WebCore.gypi:
74         * bindings/v8/NPObjectWrapper.cpp: Removed.
75         * bindings/v8/NPObjectWrapper.h: Removed.
76         * bindings/v8/NPV8Object.cpp:
77         (WebCore::disposeUnderlyingV8Object):
78         (WebCore):
79         (WebCore::freeV8NPObject):
80         (_NPN_Invoke):
81         (_NPN_InvokeDefault):
82         (_NPN_EvaluateHelper):
83         (_NPN_GetProperty):
84         (_NPN_SetProperty):
85         (_NPN_RemoveProperty):
86         (_NPN_HasProperty):
87         (_NPN_HasMethod):
88         (_NPN_Enumerate):
89         (_NPN_Construct):
90         * bindings/v8/NPV8Object.h:
91         (WebCore):
92         * bindings/v8/ScriptController.cpp:
93         (WebCore::ScriptController::ScriptController):
94         (WebCore::ScriptController::clearScriptObjects):
95         (WebCore::ScriptController::windowScriptNPObject):
96         * bindings/v8/ScriptController.h:
97         (ScriptController):
98
99 2012-06-29  Adam Barth  <abarth@webkit.org>
100
101         Update complex fonts on Android to use fonts from a newer SDK
102         https://bugs.webkit.org/show_bug.cgi?id=90296
103
104         Reviewed by Nate Chapin.
105
106         These fonts are available in the Jelly Bean SDK.
107
108         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
109         (WebCore::ComplexTextController::ComplexTextController):
110         (WebCore::ComplexTextController::getComplexFontPlatformData):
111
112 2012-06-29  Ryosuke Niwa  <rniwa@webkit.org>
113
114         HTMLCollection's caches should be owned by either ElementRareData or Document
115         https://bugs.webkit.org/show_bug.cgi?id=90322
116
117         Reviewed by Anders Carlsson.
118
119         Removed all instances of OwnPtr<HTMLCollection> except ones on ElementRareData and Document.
120         ElementRareData::ensureCachedHTMLCollection then polymorphically creates HTMLCollection or
121         its subclass as deemed necessary.
122
123         This refactoring allows us to move HTMLCollection to use the same invalidation model as
124         DynamicNodeList (invalidated during DOM mutations) in a follow up.
125
126         * dom/Document.cpp:
127         (WebCore::Document::all):
128         * dom/Document.h:
129         (Document):
130         * dom/Element.cpp:
131         (WebCore::ElementRareData::ensureCachedHTMLCollection):
132         (WebCore):
133         (WebCore::Element::cachedHTMLCollection):
134         * dom/Element.h:
135         (Element):
136         * dom/ElementRareData.h:
137         (WebCore):
138         (ElementRareData):
139         (WebCore::ElementRareData::cachedHTMLCollection):
140         * dom/Node.cpp:
141         (WebCore):
142         * dom/Node.h:
143         (Node):
144         * dom/NodeRareData.h:
145         (WebCore::NodeRareData::setItemType):
146         (NodeRareData):
147         * html/CollectionType.h:
148         * html/HTMLCollection.cpp:
149         (WebCore::shouldIncludeChildren):
150         (WebCore::HTMLCollection::isAcceptableElement):
151         * html/HTMLElement.cpp:
152         (WebCore):
153         (WebCore::HTMLElement::properties):
154         * html/HTMLElement.h:
155         (HTMLElement):
156         * html/HTMLFieldSetElement.cpp:
157         (WebCore::HTMLFieldSetElement::elements):
158         * html/HTMLFieldSetElement.h:
159         (HTMLFieldSetElement):
160         * html/HTMLFormCollection.cpp:
161         (WebCore::HTMLFormCollection::HTMLFormCollection):
162         (WebCore::HTMLFormCollection::create):
163         * html/HTMLFormCollection.h:
164         (HTMLFormCollection):
165         * html/HTMLFormElement.cpp:
166         (WebCore::HTMLFormElement::elements):
167         * html/HTMLFormElement.h:
168         * html/HTMLOptionsCollection.cpp:
169         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
170         (WebCore::HTMLOptionsCollection::create):
171         * html/HTMLOptionsCollection.h:
172         (HTMLOptionsCollection):
173         * html/HTMLSelectElement.cpp:
174         (WebCore::HTMLSelectElement::selectedOptions):
175         (WebCore::HTMLSelectElement::options):
176         (WebCore::HTMLSelectElement::invalidateSelectedItems):
177         (WebCore::HTMLSelectElement::setRecalcListItems):
178         * html/HTMLSelectElement.h:
179         * html/HTMLTableElement.cpp:
180         (WebCore::HTMLTableElement::rows):
181         * html/HTMLTableElement.h:
182         * html/HTMLTableRowsCollection.cpp:
183         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
184         (WebCore::HTMLTableRowsCollection::create):
185         * html/HTMLTableRowsCollection.h:
186         (HTMLTableRowsCollection):
187
188 2012-06-29  Ojan Vafai  <ojan@chromium.org>
189
190         Add FIXMEs for vertical writing mode and override sizes.
191         * rendering/RenderBox.cpp:
192         (WebCore::RenderBox::overrideLogicalContentWidth):
193         (WebCore::RenderBox::overrideLogicalContentHeight):
194
195 2012-06-29  James Robinson  <jamesr@chromium.org>
196
197         [chromium] Use CCThread::Task in compositor's RateLimiter instead of Timer
198         https://bugs.webkit.org/show_bug.cgi?id=90300
199
200         Reviewed by Adrienne Walker.
201
202         * platform/graphics/chromium/RateLimiter.cpp:
203         (RateLimiter::Task):
204         (WebCore::RateLimiter::Task::create):
205         (WebCore::RateLimiter::Task::~Task):
206         (WebCore::RateLimiter::Task::Task):
207         (WebCore):
208         (WebCore::RateLimiter::RateLimiter):
209         (WebCore::RateLimiter::start):
210         (WebCore::RateLimiter::stop):
211         (WebCore::RateLimiter::rateLimitContext):
212         * platform/graphics/chromium/RateLimiter.h:
213         (WebCore):
214         (RateLimiter):
215         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
216         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
217
218 2012-06-29  Tony Payne  <tpayne@chromium.org>
219
220         Remove type from screenColorProfile API
221         https://bugs.webkit.org/show_bug.cgi?id=90299
222
223         Reviewed by Adam Barth.
224
225         Covered by existing tests.
226
227         * platform/PlatformScreen.h:
228         (WebCore): Removed type from screenColorProfile().
229         * platform/blackberry/PlatformScreenBlackBerry.cpp:
230         (WebCore::screenColorProfile):
231         * platform/chromium/PlatformScreenChromium.cpp:
232         (WebCore::screenColorProfile):
233         * platform/efl/PlatformScreenEfl.cpp:
234         (WebCore::screenColorProfile):
235         * platform/gtk/PlatformScreenGtk.cpp:
236         (WebCore::screenColorProfile):
237         * platform/image-decoders/ImageDecoder.h:
238         (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Updated call to
239         screenColorProfile() to not pass type param.
240         * platform/mac/PlatformScreenMac.mm:
241         (WebCore::screenColorProfile):
242         * platform/qt/PlatformScreenQt.cpp:
243         (WebCore::screenColorProfile):
244         * platform/win/PlatformScreenWin.cpp:
245         (WebCore::screenColorProfile):
246
247 2012-06-29  Emil A Eklund  <eae@chromium.org>
248
249         Allow non-borders to be adjusted to less than 1 when zoomed out
250         https://bugs.webkit.org/show_bug.cgi?id=90104
251
252         Reviewed by Eric Seidel.
253
254         Change CSSPrimitiveValue::computeLengthDouble to allow values to be
255         adjusted to less than 1.0 when zoomed out. This avoids an off by one
256         error for floats with margins when zoomed out that can cause floats to
257         wrap and break pages.
258
259         The logic that prevents the value from being adjusted to less than 1 was
260         added to ensure that borders are still painted even when zoomed out.
261         By moving the logic to ApplyPropertyComputeLength::applyValue, which is
262         used for borders and outlines, that functionality is preserved.
263
264         Test: fast/sub-pixel/float-with-margin-in-container.html
265
266         * css/CSSPrimitiveValue.cpp:
267         (WebCore::CSSPrimitiveValue::computeLengthDouble):
268         * css/StyleBuilder.cpp:
269         (WebCore::ApplyPropertyComputeLength::applyValue):
270
271 2012-06-29  Ryosuke Niwa  <rniwa@webkit.org>
272
273         Let Xcode have its own way after r121513.
274
275         * WebCore.xcodeproj/project.pbxproj:
276
277 2012-06-29  Mihai Balan  <mibalan@adobe.com>
278
279         [CSS Regions] Adding feature defines for CSS Regions for Windows
280         https://bugs.webkit.org/show_bug.cgi?id=88645
281
282         Reviewed by Tony Chang.
283
284         Re-trying to enable CSS regions on Windows. This time only enabling
285         regions (not exclusions) because of some strange compilation/linking
286         issues.
287
288         * css/CSSPropertyNames.in: Touched file to make sure property names get properly rebuilt.
289
290 2012-06-29  Hanna Ma  <Hanma@rim.com>
291
292         Web Inspector: Add data length to resource events on timeline to
293         keep track of the amount of data loaded and the total data length
294         https://bugs.webkit.org/show_bug.cgi?id=89244
295
296         Reviewed by Pavel Feldman.
297
298         Added data length to inspector timeline popup
299         content for resources to keep track of the amount of data loaded.
300         Tests: inspector/timeline/timeline-network-received-data.html
301
302         * English.lproj/localizedStrings.js:
303         * inspector/InspectorInstrumentation.cpp:
304         (WebCore::InspectorInstrumentation::willReceiveResourceDataImpl):
305         * inspector/InspectorInstrumentation.h:
306         (InspectorInstrumentation):
307         (WebCore::InspectorInstrumentation::willReceiveResourceData):
308         * inspector/InspectorTimelineAgent.cpp:
309         (WebCore::InspectorTimelineAgent::willReceiveResourceData):
310         * inspector/InspectorTimelineAgent.h:
311         (InspectorTimelineAgent):
312         * inspector/TimelineRecordFactory.cpp:
313         (WebCore::TimelineRecordFactory::createReceiveResourceData):
314         * inspector/TimelineRecordFactory.h:
315         (TimelineRecordFactory):
316         * inspector/front-end/TimelinePanel.js:
317         (WebInspector.TimelinePanel.prototype._showPopover):
318         * inspector/front-end/TimelinePresentationModel.js:
319         (WebInspector.TimelinePresentationModel.prototype.reset):
320         (WebInspector.TimelinePresentationModel.Record):
321         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
322         * loader/ResourceLoader.cpp:
323         (WebCore::ResourceLoader::didReceiveData):
324         * inspector/timeline/timeline-network-received-data.html: Added.
325         * inspector/timeline/timeline-network-received-data-expected.txt: Added.
326         * inspector/timeline/timeline-test.js:
327
328 2012-06-29  Shawn Singh  <shawnsingh@chromium.org>
329
330         Unreviewed build fix after 121580.
331
332         WebKit Linux debug bots was complaining about signed vs unsigned integer comparison.
333
334         * html/HTMLCollection.h:
335         (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
336
337 2012-06-28  James Robinson  <jamesr@chromium.org>
338
339         [chromium] Remove mapRect and mapQuad from WebTransformationMatrix
340         https://bugs.webkit.org/show_bug.cgi?id=90230
341
342         Reviewed by Adrienne Walker.
343
344         Replaces calls to WebTransformationMatrix::mapRect/mapQuad with clipping-aware calls to CCMathUtils. In most
345         cases, we do not expect clipping to happen. For others (such as area calculations in CCOverdrawMetrics) we can
346         handle a clipped quad easily.
347
348         * platform/chromium/support/WebTransformationMatrix.cpp:
349         * platform/graphics/chromium/LayerRendererChromium.cpp:
350         (WebCore::LayerRendererChromium::drawRenderPassQuad):
351         (WebCore::LayerRendererChromium::drawTileQuad):
352         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
353         (WebCore::RenderSurfaceChromium::drawableContentRect):
354         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
355         (WebCore::CCLayerImpl::getDrawRect):
356         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
357         (WebCore::transformSurfaceOpaqueRegion):
358         (WebCore::addOcclusionBehindLayer):
359         * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
360         (WebCore):
361         (WebCore::polygonArea):
362         (WebCore::areaOfMappedQuad):
363         (WebCore::CCOverdrawMetrics::didUpload):
364         (WebCore::CCOverdrawMetrics::didCullForDrawing):
365         (WebCore::CCOverdrawMetrics::didDraw):
366         * platform/graphics/chromium/cc/CCRenderPass.cpp:
367         (WebCore::CCRenderPass::appendQuadsToFillScreen):
368         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
369         (WebCore::CCRenderSurface::drawableContentRect):
370         * platform/graphics/chromium/cc/CCSharedQuadState.cpp:
371         (WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect):
372
373 2012-06-29  Ryosuke Niwa  <rniwa@webkit.org>
374
375         Mac build fix after r121575. It rolls out r121547 but didn't roll out the follow up build fix r121553.
376
377         * platform/graphics/mac/FontCustomPlatformData.h:
378         (FontCustomPlatformData):
379
380 2012-06-29  Ryosuke Niwa  <rniwa@webkit.org>
381
382         Share the same cache in HTMLCollection and DynamicNodeLists
383         https://bugs.webkit.org/show_bug.cgi?id=90118
384
385         Reviewed by Anders Carlsson.
386
387         This patch introduces two new base classes DynamicNodeListCacheBase and HTMLCollectionCacheBase to share
388         the cache object between DynamicNodeList and HTMLCollection. HTMLCollectionCacheBase inherits from
389         DynamicNodeListCacheBase and contains extra caches and bit flags for HTMLCollection. DynamicNodeList::Cache
390         and HTMLCollection::Cache had been removed and flattened into these two classes for the easy inheritance.
391
392         In DynamicNodeList, we have a very straight forward one-to-one mapping from old Caches member variables:
393
394         m_caches.lastItem -> cachedItem()
395         m_caches.lastItemOffset -> cachedItemOffset()
396         m_caches.cachedLength -> cachedLength()
397         m_caches.isItemCacheValid -> isItemCacheValid()
398         m_caches.isLengthCacheValid -> isLengthCacheValid()
399         m_caches.type -> removed because it was never used.
400         m_caches.rootedAtDocument -> isRootedAtDocument()
401         m_caches.shouldInvalidateOnAttributeChange -> shouldInvalidateOnAttributeChange()
402
403         In HTMLCollection, there is one semantic change in the way item cache is managed. Previously, we only had
404         m_cache.current which was used as both cachedItem() and isItemCacheValid() (not valid when current is null).
405         There are some asymmetric code changes due to one-to-many relationship. Also, all method names have been updated
406         to use that of DynamicNodeList terminology. Thus we have the following correspondence:
407
408         m_cache.current -> cachedItem() / isItemCacheValid()
409         m_cache.position -> cachedItemOffset()
410         m_cache.length -> cachedLength()
411         m_cache.elementsArrayPosition -> cachedElementsArrayOffset()
412         m_cache.hasLength -> isLengthCacheValid()
413         m_cache.hasNameCache -> hasNameCache() / setHasNameCache()
414         m_cache.idCache -> idCache() / addIdCache()
415         m_cache.nameCache -> idCache() / addNameCache()
416
417         In addition, we had to rename HTMLCollection::clearCache to invalidateCache to avoid the name collision with
418         HTMLCollectionCacheBase::clearCache.
419
420         * dom/ChildNodeList.cpp:
421         (WebCore::ChildNodeList::length):
422         (WebCore::ChildNodeList::item):
423         * dom/DynamicNodeList.cpp:
424         (WebCore::DynamicSubtreeNodeList::length):
425         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
426         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
427         (WebCore::DynamicSubtreeNodeList::item):
428         * dom/DynamicNodeList.h:
429         (DynamicNodeListCacheBase):
430         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
431         (WebCore::DynamicNodeListCacheBase::isRootedAtDocument):
432         (WebCore::DynamicNodeListCacheBase::shouldInvalidateOnAttributeChange):
433         (WebCore::DynamicNodeListCacheBase::isItemCacheValid):
434         (WebCore::DynamicNodeListCacheBase::cachedItem):
435         (WebCore::DynamicNodeListCacheBase::cachedItemOffset):
436         (WebCore::DynamicNodeListCacheBase::isLengthCacheValid):
437         (WebCore::DynamicNodeListCacheBase::cachedLength):
438         (WebCore::DynamicNodeListCacheBase::setLengthCache):
439         (WebCore::DynamicNodeListCacheBase::setItemCache):
440         (WebCore::DynamicNodeListCacheBase::clearCache):
441         (WebCore):
442         (WebCore::DynamicNodeList::DynamicNodeList):
443         (WebCore::DynamicNodeList::invalidateCache):
444         (WebCore::DynamicNodeList::rootNode):
445         (DynamicNodeList):
446         * html/HTMLAllCollection.cpp:
447         (WebCore::HTMLAllCollection::namedItemWithIndex):
448         * html/HTMLCollection.cpp:
449         (WebCore::HTMLCollection::HTMLCollection):
450         (WebCore::HTMLCollection::invalidateCacheIfNeeded):
451         (WebCore::HTMLCollection::invalidateCache):
452         (WebCore::HTMLCollection::isAcceptableElement):
453         (WebCore::HTMLCollection::itemAfter):
454         (WebCore::HTMLCollection::length):
455         (WebCore::HTMLCollection::item):
456         (WebCore::HTMLCollection::checkForNameMatch):
457         (WebCore::HTMLCollection::namedItem):
458         (WebCore::HTMLCollection::updateNameCache):
459         (WebCore::HTMLCollection::hasNamedItem):
460         (WebCore::HTMLCollection::namedItems):
461         (WebCore::HTMLCollectionCacheBase::append):
462         * html/HTMLCollection.h:
463         (HTMLCollectionCacheBase):
464         (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
465         (WebCore::HTMLCollectionCacheBase::type):
466         (WebCore::HTMLCollectionCacheBase::clearCache):
467         (WebCore::HTMLCollectionCacheBase::setItemCache):
468         (WebCore::HTMLCollectionCacheBase::cachedElementsArrayOffset):
469         (WebCore::HTMLCollectionCacheBase::includeChildren):
470         (WebCore::HTMLCollectionCacheBase::cacheTreeVersion):
471         (WebCore::HTMLCollectionCacheBase::idCache):
472         (WebCore::HTMLCollectionCacheBase::nameCache):
473         (WebCore::HTMLCollectionCacheBase::appendIdCache):
474         (WebCore::HTMLCollectionCacheBase::appendNameCache):
475         (WebCore::HTMLCollectionCacheBase::hasNameCache):
476         (WebCore::HTMLCollectionCacheBase::setHasNameCache):
477         (WebCore):
478         (WebCore::HTMLCollection::isEmpty):
479         (WebCore::HTMLCollection::hasExactlyOneItem):
480         (WebCore::HTMLCollection::base):
481         (HTMLCollection):
482         * html/HTMLFormCollection.cpp:
483         (WebCore::HTMLFormCollection::item):
484         (WebCore::HTMLFormCollection::updateNameCache):
485         * html/HTMLNameCollection.cpp:
486         (WebCore::HTMLNameCollection::itemAfter):
487         * html/HTMLNameCollection.h:
488         (HTMLNameCollection):
489         * html/HTMLSelectElement.cpp:
490         (WebCore::HTMLSelectElement::invalidateSelectedItems):
491         * html/HTMLTableRowsCollection.cpp:
492         (WebCore::HTMLTableRowsCollection::itemAfter):
493         * html/HTMLTableRowsCollection.h:
494         (HTMLTableRowsCollection):
495
496 2012-06-29  Tony Chang  <tony@chromium.org>
497
498         Unreviewed, rolling out r121572.
499         http://trac.webkit.org/changeset/121572
500         https://bugs.webkit.org/show_bug.cgi?id=90249
501
502         Breaks Mac build since it depends on r121547, which was rolled
503         out
504
505         * WebCore.exp.in:
506         * page/AlternativeTextClient.h:
507         * page/ContextMenuController.cpp:
508         (WebCore::ContextMenuController::populate):
509         * platform/graphics/cg/ImageBufferDataCG.h:
510         * platform/graphics/mac/GraphicsContextMac.mm:
511         (WebCore::GraphicsContext::drawLineForDocumentMarker):
512         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
513         (WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible):
514         * platform/mac/WebCoreSystemInterface.h:
515         * platform/network/Credential.h:
516         * platform/network/cf/ResourceRequestCFNet.cpp:
517         (WebCore):
518         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
519         * platform/text/TextChecking.h:
520         (WebCore):
521         * rendering/RenderLayerBacking.cpp:
522         (WebCore::RenderLayerBacking::containsPaintedContent):
523
524 2012-06-29  Tony Chang  <tony@chromium.org>
525
526         Unreviewed, rolling out r121547.
527         http://trac.webkit.org/changeset/121547
528         https://bugs.webkit.org/show_bug.cgi?id=90256
529
530         Breaks Chromium Mac build
531
532         * platform/LocalizedStrings.cpp:
533         (WebCore::imageTitle):
534         * platform/graphics/cg/GraphicsContextCG.cpp:
535         (WebCore::GraphicsContext::setAllowsFontSmoothing):
536         * platform/graphics/cg/ImageCG.cpp:
537         (WebCore::Image::drawPattern):
538         * platform/graphics/cg/ImageSourceCG.cpp:
539         (WebCore::ImageSource::clear):
540         * platform/graphics/cg/PathCG.cpp:
541         (WebCore::Path::boundingRect):
542         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
543         (WebCore):
544         (WebCore::canSetCascadeListForCustomFont):
545         (WebCore::FontPlatformData::ctFont):
546         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
547         * platform/graphics/mac/ComplexTextController.cpp:
548         * platform/graphics/mac/FontCacheMac.mm:
549         (WebCore):
550         (WebCore::fontCacheATSNotificationCallback):
551         (WebCore::FontCache::platformInit):
552         * platform/graphics/mac/FontCustomPlatformData.cpp:
553         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
554         (WebCore::createFontCustomPlatformData):
555         * platform/graphics/mac/FontCustomPlatformData.h:
556         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
557         * platform/graphics/mac/SimpleFontDataMac.mm:
558         (WebCore::SimpleFontData::platformInit):
559         * platform/graphics/mac/WebLayer.h:
560         * platform/mac/CursorMac.mm:
561         (WebCore::Cursor::ensurePlatformCursor):
562         * platform/mac/DisplaySleepDisabler.cpp:
563         (WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
564         (WebCore):
565         (WebCore::DisplaySleepDisabler::systemActivityTimerFired):
566         * platform/mac/DisplaySleepDisabler.h:
567         (DisplaySleepDisabler):
568         * platform/mac/HTMLConverter.h:
569         * platform/mac/HTMLConverter.mm:
570         * platform/mac/PopupMenuMac.mm:
571         (WebCore::PopupMenuMac::populate):
572         * platform/mac/ScrollElasticityController.mm:
573
574 2012-06-29  Eric Penner  <epenner@google.com>
575
576         [chromium] Adding PrioritizedTexture and replacing ContentsTextureManager
577         https://bugs.webkit.org/show_bug.cgi?id=84308
578
579         Reviewed by Adrienne Walker.
580
581         PrioritizedTextures have a priority such that all texture requests can be
582         prioritized. There are three steps involved:
583             - Call setRequestPriority()
584             - Check if the request succeeded with canAcquireBackingTexture()
585             - Call acquireBackingTexture() when uploading a new texture.
586
587         Internally both the texture requests and the backing textures get sorted.
588         Requests are sorted so they can be prioritized. Backing textures are sorted
589         so that they can be recycled/evicted in the right order (lowest priority first).
590
591         Prioritizing textures doesn't assign backing textures to texture requests but
592         rather just marks which textures can have a backing texture "when needed". This
593         allows us to keep the old textures in use as long as possible.
594
595         The unit tests support all the use cases from the original texture manager
596         but also adds assumptions about priority order throughout all the tests. The
597         function assertInvariants() is added to test the validity of the manager
598         and all textures/allocations within it.
599
600         The TiledLayerChromium tests are updated to request textures first with
601         prioritizeTextures(), and update them with the updater (such that allocate
602         gets called) before pushPropertiesTo is called (when they need to be valid).
603
604         * WebCore.gypi:
605         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
606         (WebCore::BitmapCanvasLayerTextureUpdater::Texture::Texture):
607         (WebCore::BitmapCanvasLayerTextureUpdater::createTexture):
608         (WebCore::BitmapCanvasLayerTextureUpdater::updateTextureRect):
609         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
610         (WebCore):
611         (Texture):
612         (BitmapCanvasLayerTextureUpdater):
613         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
614         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::Texture):
615         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::createTexture):
616         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
617         (Texture):
618         (BitmapSkPictureCanvasLayerTextureUpdater):
619         * platform/graphics/chromium/ContentLayerChromium.cpp:
620         (WebCore::ContentLayerChromium::setTexturePriorities):
621         (WebCore):
622         (WebCore::ContentLayerChromium::update):
623         * platform/graphics/chromium/ContentLayerChromium.h:
624         (ContentLayerChromium):
625         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
626         (WebCore::createAcceleratedCanvas):
627         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::Texture):
628         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::createTexture):
629         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
630         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h:
631         (Texture):
632         (FrameBufferSkPictureCanvasLayerTextureUpdater):
633         * platform/graphics/chromium/ImageLayerChromium.cpp:
634         (WebCore::ImageLayerTextureUpdater::Texture::Texture):
635         (WebCore::ImageLayerTextureUpdater::createTexture):
636         (WebCore::ImageLayerTextureUpdater::updateTextureRect):
637         (WebCore::ImageLayerChromium::setTexturePriorities):
638         (WebCore):
639         * platform/graphics/chromium/ImageLayerChromium.h:
640         (ImageLayerChromium):
641         * platform/graphics/chromium/LayerChromium.h:
642         (LayerChromium):
643         (WebCore::LayerChromium::setTexturePriorities):
644         * platform/graphics/chromium/LayerTextureUpdater.h:
645         (WebCore::LayerTextureUpdater::Texture::texture):
646         (WebCore::LayerTextureUpdater::Texture::swapTextureWith):
647         (WebCore::LayerTextureUpdater::Texture::Texture):
648         (Texture):
649         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
650         (WebCore::ScrollbarLayerChromium::pushPropertiesTo):
651         (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
652         (WebCore::ScrollbarLayerChromium::updatePart):
653         (WebCore):
654         (WebCore::ScrollbarLayerChromium::setTexturePriorities):
655         * platform/graphics/chromium/ScrollbarLayerChromium.h:
656         (ScrollbarLayerChromium):
657         * platform/graphics/chromium/TiledLayerChromium.cpp:
658         (WebCore::UpdatableTile::managedTexture):
659         (WebCore::TiledLayerChromium::pushPropertiesTo):
660         (WebCore::TiledLayerChromium::textureManager):
661         (WebCore::TiledLayerChromium::createTile):
662         (WebCore::TiledLayerChromium::tileNeedsBufferedUpdate):
663         (WebCore::TiledLayerChromium::updateTiles):
664         (WebCore::TiledLayerChromium::setTexturePriorities):
665         (WebCore):
666         (WebCore::TiledLayerChromium::setTexturePrioritiesInRect):
667         (WebCore::TiledLayerChromium::resetUpdateState):
668         (WebCore::TiledLayerChromium::updateLayerRect):
669         (WebCore::TiledLayerChromium::idleUpdateLayerRect):
670         (WebCore::TiledLayerChromium::needsIdlePaint):
671         (WebCore::TiledLayerChromium::idlePaintRect):
672         * platform/graphics/chromium/TiledLayerChromium.h:
673         (TiledLayerChromium):
674         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
675         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
676         (WebCore::CCLayerTreeHost::deleteContentsTexturesOnImplThread):
677         (WebCore::CCLayerTreeHost::beginCommitOnImplThread):
678         (WebCore::CCLayerTreeHost::commitComplete):
679         (WebCore::CCLayerTreeHost::evictAllContentTextures):
680         (WebCore::CCLayerTreeHost::contentsTextureManager):
681         (WebCore::CCLayerTreeHost::updateLayers):
682         (WebCore::CCLayerTreeHost::prioritizeTextures):
683         (WebCore::CCLayerTreeHost::deleteTextureAfterCommit):
684         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
685         (WebCore):
686         (CCLayerTreeHost):
687         * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp: Added.
688         (WebCore):
689         (WebCore::CCPrioritizedTexture::CCPrioritizedTexture):
690         (WebCore::CCPrioritizedTexture::~CCPrioritizedTexture):
691         (WebCore::CCPrioritizedTexture::setTextureManager):
692         (WebCore::CCPrioritizedTexture::setDimensions):
693         (WebCore::CCPrioritizedTexture::requestLate):
694         (WebCore::CCPrioritizedTexture::acquireBackingTexture):
695         (WebCore::CCPrioritizedTexture::textureId):
696         (WebCore::CCPrioritizedTexture::bindTexture):
697         (WebCore::CCPrioritizedTexture::framebufferTexture2D):
698         (WebCore::CCPrioritizedTexture::setCurrentBacking):
699         * platform/graphics/chromium/cc/CCPrioritizedTexture.h: Added.
700         (WebCore):
701         (CCPrioritizedTexture):
702         (WebCore::CCPrioritizedTexture::create):
703         (WebCore::CCPrioritizedTexture::textureManager):
704         (WebCore::CCPrioritizedTexture::format):
705         (WebCore::CCPrioritizedTexture::size):
706         (WebCore::CCPrioritizedTexture::memorySizeBytes):
707         (WebCore::CCPrioritizedTexture::setRequestPriority):
708         (WebCore::CCPrioritizedTexture::requestPriority):
709         (WebCore::CCPrioritizedTexture::canAcquireBackingTexture):
710         (WebCore::CCPrioritizedTexture::haveBackingTexture):
711         (Backing):
712         (WebCore::CCPrioritizedTexture::Backing::size):
713         (WebCore::CCPrioritizedTexture::Backing::format):
714         (WebCore::CCPrioritizedTexture::Backing::memorySizeBytes):
715         (WebCore::CCPrioritizedTexture::Backing::textureId):
716         (WebCore::CCPrioritizedTexture::Backing::currentTexture):
717         (WebCore::CCPrioritizedTexture::Backing::setCurrentTexture):
718         (WebCore::CCPrioritizedTexture::Backing::Backing):
719         (WebCore::CCPrioritizedTexture::Backing::~Backing):
720         (WebCore::CCPrioritizedTexture::isAbovePriorityCutoff):
721         (WebCore::CCPrioritizedTexture::setAbovePriorityCutoff):
722         (WebCore::CCPrioritizedTexture::setManagerInternal):
723         (WebCore::CCPrioritizedTexture::currentBacking):
724         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: Added.
725         (WebCore):
726         (WebCore::CCPrioritizedTextureManager::CCPrioritizedTextureManager):
727         (WebCore::CCPrioritizedTextureManager::~CCPrioritizedTextureManager):
728         (WebCore::CCPrioritizedTextureManager::setMemoryAllocationLimitBytes):
729         (WebCore::CCPrioritizedTextureManager::prioritizeTextures):
730         (WebCore::CCPrioritizedTextureManager::clearPriorities):
731         (WebCore::CCPrioritizedTextureManager::requestLate):
732         (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
733         (WebCore::CCPrioritizedTextureManager::reduceMemory):
734         (WebCore::CCPrioritizedTextureManager::clearAllMemory):
735         (WebCore::CCPrioritizedTextureManager::allBackingTexturesWereDeleted):
736         (WebCore::CCPrioritizedTextureManager::unlink):
737         (WebCore::CCPrioritizedTextureManager::link):
738         (WebCore::CCPrioritizedTextureManager::registerTexture):
739         (WebCore::CCPrioritizedTextureManager::unregisterTexture):
740         (WebCore::CCPrioritizedTextureManager::returnBackingTexture):
741         (WebCore::CCPrioritizedTextureManager::createBacking):
742         (WebCore::CCPrioritizedTextureManager::destroyBacking):
743         (WebCore::CCPrioritizedTextureManager::assertInvariants):
744         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: Added.
745         (WebCore):
746         (CCPrioritizedTextureManager):
747         (WebCore::CCPrioritizedTextureManager::create):
748         (WebCore::CCPrioritizedTextureManager::createTexture):
749         (WebCore::CCPrioritizedTextureManager::memoryUseBytes):
750         (WebCore::CCPrioritizedTextureManager::memoryAboveCutoffBytes):
751         (WebCore::CCPrioritizedTextureManager::setMaxMemoryLimitBytes):
752         (WebCore::CCPrioritizedTextureManager::maxMemoryLimitBytes):
753         (WebCore::CCPrioritizedTextureManager::setPreferredMemoryLimitBytes):
754         (WebCore::CCPrioritizedTextureManager::preferredMemoryLimitBytes):
755         (WebCore::CCPrioritizedTextureManager::setMaxMemoryPriorityCutoff):
756         (WebCore::CCPrioritizedTextureManager::maxMemoryPriorityCutoff):
757         (WebCore::CCPrioritizedTextureManager::compareTextures):
758         (WebCore::CCPrioritizedTextureManager::compareBackings):
759         * platform/graphics/chromium/cc/CCPriorityCalculator.cpp: Added.
760         (WebCore):
761         (WebCore::CCPriorityCalculator::uiPriority):
762         (WebCore::CCPriorityCalculator::visiblePriority):
763         (WebCore::CCPriorityCalculator::lingeringPriority):
764         (WebCore::CCPriorityCalculator::priorityFromDistance):
765         (WebCore::CCPriorityCalculator::priorityFromVisibility):
766         * platform/graphics/chromium/cc/CCPriorityCalculator.h: Added.
767         (WebCore):
768         (CCPriorityCalculator):
769         (WebCore::CCPriorityCalculator::highestPriority):
770         (WebCore::CCPriorityCalculator::lowestPriority):
771         (WebCore::CCPriorityCalculator::priorityIsLower):
772         (WebCore::CCPriorityCalculator::priorityIsHigher):
773         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
774
775 2012-06-29  Eric Seidel  <eric@webkit.org>
776
777         Remove BUILDING_ON_LEOPARD now that no ports build on Leopard
778         https://bugs.webkit.org/show_bug.cgi?id=90249
779
780         Reviewed by Ryosuke Niwa.
781
782         I don't think I quite got it all yet, but this is another step towards
783         removing Leopard support in WebCore.
784
785         * WebCore.exp.in:
786         * page/AlternativeTextClient.h:
787         * page/ContextMenuController.cpp:
788         (WebCore::ContextMenuController::populate):
789         * platform/graphics/cg/ImageBufferDataCG.h:
790         * platform/graphics/mac/GraphicsContextMac.mm:
791         (WebCore::GraphicsContext::drawLineForDocumentMarker):
792         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
793         (WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible):
794         * platform/mac/WebCoreSystemInterface.h:
795         * platform/network/Credential.h:
796         * platform/network/cf/ResourceRequestCFNet.cpp:
797         (WebCore):
798         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
799         * platform/text/TextChecking.h:
800         (WebCore):
801         * rendering/RenderLayerBacking.cpp:
802         (WebCore::RenderLayerBacking::containsPaintedContent):
803
804 2012-06-29  Andreas Kling  <kling@webkit.org>
805
806         Unreviewed, rolling out r121562.
807         http://trac.webkit.org/changeset/121562
808         https://bugs.webkit.org/show_bug.cgi?id=89945
809
810         Broke a couple of editing/pasteboard tests.
811
812         * css/PropertySetCSSStyleDeclaration.cpp:
813         (WebCore::PropertySetCSSStyleDeclaration::length):
814         (WebCore::PropertySetCSSStyleDeclaration::item):
815         (WebCore::PropertySetCSSStyleDeclaration::cssText):
816         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
817         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
818         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
819         (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority):
820         (WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand):
821         (WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit):
822         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
823         (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
824         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
825         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
826         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
827         (WebCore::PropertySetCSSStyleDeclaration::copy):
828         (WebCore::PropertySetCSSStyleDeclaration::makeMutable):
829         (WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches):
830         (WebCore::InlineCSSStyleDeclaration::didMutate):
831         (WebCore::InlineCSSStyleDeclaration::parentStyleSheet):
832         * css/PropertySetCSSStyleDeclaration.h:
833         (WebCore::PropertySetCSSStyleDeclaration::clearParentElement):
834         (PropertySetCSSStyleDeclaration):
835         (WebCore::InlineCSSStyleDeclaration::InlineCSSStyleDeclaration):
836         * css/StylePropertySet.cpp:
837         (WebCore::StylePropertySet::ensureInlineCSSStyleDeclaration):
838         (WebCore::StylePropertySet::clearParentElement):
839         (WebCore):
840         * css/StylePropertySet.h:
841         (StylePropertySet):
842         * dom/ElementAttributeData.cpp:
843         (WebCore::ElementAttributeData::destroyInlineStyle):
844         (WebCore):
845         * dom/ElementAttributeData.h:
846         (ElementAttributeData):
847         * dom/StyledElement.cpp:
848         (WebCore::StyledElement::~StyledElement):
849         (WebCore):
850         (WebCore::StyledElement::styleAttributeChanged):
851         * dom/StyledElement.h:
852         (StyledElement):
853         (WebCore::StyledElement::destroyInlineStyle):
854
855 2012-06-29  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
856
857         [Qt] Add missing support for tiled shadow blur on fillRect
858         https://bugs.webkit.org/show_bug.cgi?id=90082
859
860         Reviewed by Noam Rosenthal.
861
862         This overloaded fillRect implementation also supports this optimization in
863         certain situations.
864
865         * platform/graphics/qt/GraphicsContextQt.cpp:
866         (WebCore::GraphicsContext::fillRect):
867
868 2012-06-29  Brady Eidson  <beidson@apple.com>
869
870         Build fix - These should not be executable!
871
872         Rubberstamped by Jessie Berlin.
873
874         * loader/cache/CachedSVGDocument.cpp: Removed property svn:executable.
875         * loader/cache/CachedSVGDocument.h: Removed property svn:executable.
876
877 2012-06-29  Kwang Yul Seo  <skyul@company100.net>
878
879         Update FIXME comment in XMLDocumentParser::wellFormed
880         https://bugs.webkit.org/show_bug.cgi?id=90223
881
882         Reviewed by Adam Barth.
883
884         XMLDocumentParser::wellFormed is still used by the XMLHttpRequest to check if the responseXML was well formed.
885         So it can't be removed.
886
887         * xml/parser/XMLDocumentParser.h:
888         (XMLDocumentParser):
889
890 2012-06-29  Andreas Kling  <kling@webkit.org>
891
892         Separate mutating CSSStyleDeclaration operations.
893         <http://webkit.org/b/89945>
894
895         Reviewed by Antti Koivisto.
896
897         Use separate paths for mutating the StylePropertySet wrapped by a CSSStyleDeclaration.
898         PropertySetCSSStyleDeclaration now has:
899
900             - propertySet() const
901             - ensureMutablePropertySet()
902
903         This is prep work for supporting immutable ElementAttributeData objects, the idea being
904         that calling ensureMutablePropertySet() may cause the element to convert its internal
905         attribute storage (which also holds the inline StylePropertySet.)
906
907         To that end, also removed the weird logic that allowed you to kill the inline style object
908         by removing the 'style' attribute. We now simply clear out all the properties in that case
909         which saves us a bunch of hassle (no need for a ~StyledElement anymore.)
910         Note that InlineCSSStyleDeclaration now refs the element rather than the inline style.
911
912         There should be no web-facing behavior change from any of this.
913
914         * css/PropertySetCSSStyleDeclaration.cpp:
915         (WebCore::PropertySetCSSStyleDeclaration::length):
916         (WebCore::PropertySetCSSStyleDeclaration::item):
917         (WebCore::PropertySetCSSStyleDeclaration::cssText):
918         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
919         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
920         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
921         (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority):
922         (WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand):
923         (WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit):
924         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
925         (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
926         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
927         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
928         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
929         (WebCore::PropertySetCSSStyleDeclaration::copy):
930         (WebCore::PropertySetCSSStyleDeclaration::makeMutable):
931         (WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches):
932         (WebCore::InlineCSSStyleDeclaration::InlineCSSStyleDeclaration):
933         (WebCore::InlineCSSStyleDeclaration::ref):
934         (WebCore::InlineCSSStyleDeclaration::deref):
935         (WebCore::InlineCSSStyleDeclaration::didMutate):
936         (WebCore::InlineCSSStyleDeclaration::parentStyleSheet):
937         (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
938         * css/PropertySetCSSStyleDeclaration.h:
939         (PropertySetCSSStyleDeclaration):
940         (WebCore::PropertySetCSSStyleDeclaration::propertySet):
941         (WebCore::PropertySetCSSStyleDeclaration::ensureMutablePropertySet):
942         (InlineCSSStyleDeclaration):
943         * css/StylePropertySet.cpp:
944         (WebCore::StylePropertySet::ensureInlineCSSStyleDeclaration):
945         * css/StylePropertySet.h:
946         (StylePropertySet):
947         * dom/ElementAttributeData.cpp:
948         * dom/ElementAttributeData.h:
949         (ElementAttributeData):
950         * dom/StyledElement.cpp:
951         (WebCore::StyledElement::styleAttributeChanged):
952         * dom/StyledElement.h:
953         (WebCore::StyledElement::~StyledElement):
954         (StyledElement):
955
956 2012-06-29  Kwang Yul Seo  <skyul@company100.net>
957
958         Don't call SegmentedString::toString() twice in XMLDocumentParser::append(const SegmentedString&)
959         https://bugs.webkit.org/show_bug.cgi?id=90254
960
961         Reviewed by Adam Barth.
962
963         We can reuse the local variable parseString instead of calling s.toString() again.
964         No behavior change, so no new tests.
965
966         * xml/parser/XMLDocumentParser.cpp:
967         (WebCore::XMLDocumentParser::append):
968
969 2012-06-29  Mihnea Ovidenie  <mihnea@adobe.com>
970
971         Crash when flowing a fixed positioned element into a region.
972         https://bugs.webkit.org/show_bug.cgi?id=88133
973
974         Reviewed by Julien Chaffraix and Abhishek Arya.
975
976         When a fixed positioned element is collected into a named flow, we have to make sure
977         that such element has the RenderFlowThread as containing block instead of RenderView,
978         so that the fixed positioned element is laid out properly.
979         Making the RenderFlowThread the top most containing block for named flow elements required the
980         modification of RenderLayer::convertToLayerCoords so that the fixed positioned elements inside the
981         named flow take the same code path as the absolute positioned elements inside the named flow.
982         I also added a method, checkBlockPositionedObjectsNeedLayout, in order to verify that a block
983         that is ending its layout, setNeedsLayout(false), has all the positioned children laid out.
984         This way, we will hit an assertion if an out-of-flow positioned child inside a RenderFlowThread
985         is not laid out after the RenderFlowThread is laid out.
986
987         Tests: fast/regions/absolute-pos-elem-in-named-flow.html
988                fast/regions/absolute-pos-elem-in-region.html
989                fast/regions/fixed-pos-elem-in-named-flow.html
990                fast/regions/fixed-pos-elem-in-named-flow2.html
991                fast/regions/fixed-pos-elem-in-region.html
992
993         * rendering/RenderBlock.cpp:
994         (WebCore::RenderBlock::checkPositionedObjectsNeedLayout):
995         * rendering/RenderBlock.h:
996         (RenderBlock):
997         * rendering/RenderLayer.cpp:
998         (WebCore::RenderLayer::convertToLayerCoords):
999         * rendering/RenderObject.cpp:
1000         (WebCore):
1001         (WebCore::RenderObject::checkBlockPositionedObjectsNeedLayout):
1002         (WebCore::RenderObject::containingBlock):
1003         (WebCore::RenderObject::container):
1004         * rendering/RenderObject.h:
1005         (RenderObject):
1006         (WebCore::RenderObject::setNeedsLayout):
1007
1008 2012-06-29  Konrad Piascik  <kpiascik@rim.com>
1009
1010         Don't hardcode target dpi of 160 (it should be 96 on desktop)
1011         https://bugs.webkit.org/show_bug.cgi?id=88114
1012
1013         Reviewed by Adam Barth.
1014
1015         No behavioural change, current tests in fast/viewport cover all
1016         functionality.
1017
1018         * WebCore.exp.in: Updated symbol for computeViewportAttributes.
1019         * dom/ViewportArguments.cpp: Use new parameter for devicePixelRatio
1020                                      and don't calculate it anymore.
1021         (WebCore::computeViewportAttributes):
1022         * dom/ViewportArguments.h: Change the deviceDPI parameter to
1023                                    devicePixelRatio and put the onus
1024                                    on the embedder to supply the
1025                                    correct value.  Add temporary constant.
1026         (WebCore):
1027
1028 2012-06-29  Vineet Chaudhary  <rgf748@motorola.com>
1029
1030         JS binding code generator doesn't handle "attribute unsigned long[]" well.
1031         https://bugs.webkit.org/show_bug.cgi?id=84540
1032
1033         Reviewed by Kentaro Hara.
1034
1035         In JS/V8 Bindings using traits instead of specialised functions.
1036         Also added support for "unsigned long" in JSDOMBinding and V8Binding.
1037
1038         No new tests, as no behavioural changes.
1039
1040         * bindings/js/JSDOMBinding.h:
1041         (WebCore::Traits::arrayJSValue):
1042         (WebCore::jsArray):
1043         * bindings/v8/V8Binding.h:
1044         (WebCore::Traits::arrayV8Value):
1045         (WebCore::v8Array):
1046
1047 2012-06-29  Andreas Kling  <kling@webkit.org>
1048
1049         Unreviewed mac build fix after r121547.
1050         Remove the now-unused FontCustomPlatformData::m_atsContainer.
1051
1052         * platform/graphics/mac/FontCustomPlatformData.h:
1053         (FontCustomPlatformData):
1054
1055 2012-06-29  Kent Tamura  <tkent@chromium.org>
1056
1057         <textarea> unnecessarily saves the value in some cases
1058         https://bugs.webkit.org/show_bug.cgi?id=90259
1059
1060         Reviewed by Hajime Morita.
1061
1062         Test: fast/forms/textarea/textarea-state-restore.html
1063
1064         * html/HTMLTextAreaElement.cpp:
1065         (WebCore::HTMLTextAreaElement::saveFormControlState):
1066         We apply EOL normalization to value(), but don't apply it to
1067         defaultValue(). Also value() can return a null string, which never
1068         equals to any strings. To check m_isDirty is what we need..
1069
1070 2012-06-25  Alexander Pavlov  <apavlov@chromium.org>
1071
1072         Web Inspector: Provide source data for all known rule types in CSSParser, except "keyframe" and "region"
1073         https://bugs.webkit.org/show_bug.cgi?id=88420
1074
1075         Reviewed by Antti Koivisto.
1076
1077         This change transitions the CSS source code model from a flat list of style rules to a tree of all types of CSS rules
1078         (some of them lack actual source code data), which is crucial to model-based CSS stylesheet source editing
1079         (add/remove CSS rule) and navigation.
1080         As a side effect, the CSS parsing performance on PerformanceTests/Parser/css-parser-yui.html is improved roughly by 2%:
1081         - originally: median= 282.051282051 runs/s, stdev= 1.51236798322 runs/s, min= 278.481012658 runs/s, max= 283.870967742 runs/s
1082         - with patch applied: median= 287.206266319 runs/s, stdev= 1.31518320219 runs/s, min= 282.051282051 runs/s, max= 288.713910761 runs/s
1083
1084         No new tests, as there is no client-visible behavior change. Existing Inspector tests will be modified
1085         to test the new data provided, along with the necessary Inspector plumbing.
1086
1087         * css/CSSGrammar.y:
1088         * css/CSSMediaRule.cpp:
1089         (WebCore::CSSMediaRule::reattach): Check for mediaQueries() validity before reattaching.
1090         * css/CSSParser.cpp: Unless explicitly specified below, the method changes are related to the extension of the
1091         source-based CSS model provided by the parser.
1092         (WebCore::CSSParser::CSSParser):
1093         (WebCore::CSSParser::setupParser):
1094         (WebCore::CSSParser::parseDeclaration): Accept a CSSRuleSourceData for filling, since it now contains
1095         the related style source range.
1096         (WebCore::CSSParser::createImportRule):
1097         (WebCore::CSSParser::createMediaRule): Create CSSMediaRule even if media and rules are empty,
1098         which is consistent with Mozilla.
1099         (WebCore::CSSParser::processAndAddNewRuleToSourceTreeIfNeeded):
1100         (WebCore):
1101         (WebCore::CSSParser::addNewRuleToSourceTree):
1102         (WebCore::CSSParser::createKeyframesRule):
1103         (WebCore::CSSParser::createStyleRule):
1104         (WebCore::CSSParser::createFontFaceRule):
1105         (WebCore::CSSParser::createPageRule):
1106         (WebCore::CSSParser::createRegionRule):
1107         (WebCore::CSSParser::fixUnparsedPropertyRanges):
1108         (WebCore::CSSParser::markRuleHeaderStart):
1109         (WebCore::CSSParser::markRuleHeaderEnd):
1110         (WebCore::CSSParser::markRuleBodyStart):
1111         (WebCore::CSSParser::markRuleBodyEnd):
1112         (WebCore::CSSParser::markPropertyStart):
1113         (WebCore::CSSParser::markPropertyEnd):
1114         * css/CSSParser.h:
1115         (CSSParser):
1116         * css/CSSPropertySourceData.h: Extend the model to handle more types of rules and their containments.
1117         (WebCore):
1118         (WebCore::CSSRuleSourceData::create):
1119         (WebCore::CSSRuleSourceData::createUnknown):
1120         (CSSRuleSourceData):
1121         (WebCore::CSSRuleSourceData::CSSRuleSourceData):
1122         * inspector/InspectorStyleSheet.cpp: Follow the CSSParser API changes but retain the flat stored CSS rules structure.
1123         (ParsedStyleSheet):
1124         (flattenSourceData): Flatten the rule tree to retain the existing rule-handling code intact.
1125         (ParsedStyleSheet::setSourceData):
1126         (ParsedStyleSheet::ruleSourceDataAt):
1127         (WebCore::InspectorStyle::buildObjectForStyle):
1128         (WebCore::InspectorStyle::setPropertyText):
1129         (WebCore::InspectorStyle::styleText):
1130         (WebCore::InspectorStyleSheet::setRuleSelector):
1131         (WebCore::InspectorStyleSheet::deleteRule):
1132         (WebCore::InspectorStyleSheet::buildObjectForRule):
1133         (WebCore::InspectorStyleSheet::buildObjectForStyle):
1134         (WebCore::InspectorStyleSheet::ensureSourceData):
1135         (WebCore::InspectorStyleSheet::styleSheetTextWithChangedStyle):
1136         (WebCore::InspectorStyleSheetForInlineStyle::ensureParsedDataReady):
1137         (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
1138         * inspector/InspectorStyleSheet.h:
1139
1140 2012-06-29  Vsevolod Vlasov  <vsevik@chromium.org>
1141
1142         Web Inspector: Annotate TextViewer.js
1143         https://bugs.webkit.org/show_bug.cgi?id=90266
1144
1145         Reviewed by Yury Semikhatsky.
1146
1147         Annotated TextViewer.js and fixed found errors.
1148         Drive-by: Fixed NativeMemorySnapshotView.js compilation.
1149         Drive-by: Fixed protocol-externs.js compilation.
1150         Drive-by: Removed unused platform parameter from TextViewer constructor.
1151
1152         * inspector/Inspector.json:
1153         * inspector/InspectorDebuggerAgent.cpp:
1154         (WebCore::InspectorDebuggerAgent::runScript):
1155         * inspector/InspectorDebuggerAgent.h:
1156         (InspectorDebuggerAgent):
1157         * inspector/front-end/NativeMemorySnapshotView.js:
1158         (WebInspector.NativeMemoryBarChart.prototype._updateView):
1159         * inspector/front-end/SourceFrame.js:
1160         (WebInspector.SourceFrame):
1161         * inspector/front-end/TextViewer.js:
1162         (WebInspector.TextEditorMainPanel.prototype._updateHighlightsForRange):
1163
1164 2012-06-29  Eric Seidel  <eric@webkit.org>
1165
1166         Remove still more BUILDING_ON_LEOPARD branches now that no port supports leopard
1167         https://bugs.webkit.org/show_bug.cgi?id=90256
1168
1169         Reviewed by Ryosuke Niwa.
1170
1171         * platform/LocalizedStrings.cpp:
1172         (WebCore::imageTitle):
1173         * platform/graphics/cg/GraphicsContextCG.cpp:
1174         (WebCore::GraphicsContext::setAllowsFontSmoothing):
1175         * platform/graphics/cg/ImageCG.cpp:
1176         (WebCore::Image::drawPattern):
1177         * platform/graphics/cg/ImageSourceCG.cpp:
1178         (WebCore::ImageSource::clear):
1179         * platform/graphics/cg/PathCG.cpp:
1180         (WebCore::Path::boundingRect):
1181         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1182         (WebCore::FontPlatformData::ctFont):
1183         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1184         * platform/graphics/mac/ComplexTextController.cpp:
1185         * platform/graphics/mac/FontCacheMac.mm:
1186         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
1187         (WebCore::FontCache::platformInit):
1188         * platform/graphics/mac/FontCustomPlatformData.cpp:
1189         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1190         (WebCore::createFontCustomPlatformData):
1191         * platform/graphics/mac/FontCustomPlatformData.h:
1192         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1193         * platform/graphics/mac/SimpleFontDataMac.mm:
1194         (WebCore::SimpleFontData::platformInit):
1195         * platform/graphics/mac/WebLayer.h:
1196         * platform/mac/CursorMac.mm:
1197         (WebCore::Cursor::ensurePlatformCursor):
1198         * platform/mac/DisplaySleepDisabler.cpp:
1199         (WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
1200         (WebCore::DisplaySleepDisabler::~DisplaySleepDisabler):
1201         * platform/mac/DisplaySleepDisabler.h:
1202         (DisplaySleepDisabler):
1203         * platform/mac/HTMLConverter.h:
1204         * platform/mac/HTMLConverter.mm:
1205         * platform/mac/PopupMenuMac.mm:
1206         (WebCore::PopupMenuMac::populate):
1207         * platform/mac/ScrollElasticityController.mm:
1208
1209 2012-06-29  Zan Dobersek  <zandobersek@gmail.com>
1210
1211         Unreviewed attempt at a build fix for 64-bit debug build,
1212         touch InsertionPoint.cpp to try to get it rebuilt.
1213
1214         * html/shadow/InsertionPoint.cpp:
1215         (WebCore):
1216
1217 2012-06-29  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
1218
1219         [Qt] Don't add Qt module dependencies in features.prf
1220
1221         The required dependencies are already added in WebCore.pri.
1222
1223         Reviewed by Tor Arne Vestbø.
1224
1225         * WebCore.pri:
1226
1227 2012-06-29  Taiju Tsuiki  <tzik@chromium.org>
1228
1229         Web Inspector: Add FileSystemView
1230         https://bugs.webkit.org/show_bug.cgi?id=73301
1231
1232         This patch introduce a split view as FileSystemView. Including directory tree as sidebar tree.
1233
1234         Reviewed by Vsevolod Vlasov.
1235
1236         Test: http/tests/inspector/filesystem/directory-tree.html
1237
1238         * WebCore.gypi:
1239         * WebCore.vcproj/WebCore.vcproj:
1240         * inspector/compile-front-end.py:
1241         * inspector/front-end/FileSystemModel.js:
1242         (WebInspector.FileSystemModel.Entry.compare):
1243         * inspector/front-end/FileSystemView.js: Added.
1244         * inspector/front-end/ResourcesPanel.js:
1245         (WebInspector.ResourcesPanel.prototype.showFileSystem):
1246         (WebInspector.FileSystemTreeElement.prototype.get itemURL):
1247         (WebInspector.FileSystemTreeElement.prototype.onattach):
1248         (WebInspector.FileSystemTreeElement.prototype._handleContextMenuEvent):
1249         (WebInspector.FileSystemTreeElement.prototype._refreshFileSystem):
1250         (WebInspector.FileSystemTreeElement.prototype.onselect):
1251         (WebInspector.FileSystemTreeElement.prototype.clear):
1252         * inspector/front-end/WebKit.qrc:
1253         * inspector/front-end/inspector.html:
1254
1255 2012-06-29  Kentaro Hara  <haraken@chromium.org>
1256
1257         [V8] Replace v8::Integer::New() with v8Integer() in custom bindings
1258         https://bugs.webkit.org/show_bug.cgi?id=90242
1259
1260         Reviewed by Yury Semikhatsky.
1261
1262         v8Integer() is a fast wrapper of v8::Integer::New().
1263         This patch replaces v8::Integer::New() with v8Integer() in custom bindings,
1264         and pass isolates.
1265
1266         No tests. No change in behavior.
1267
1268         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
1269         (WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator):
1270         (WebCore::V8CSSStyleDeclaration::namedPropertyQuery):
1271         * bindings/v8/custom/V8ClipboardCustom.cpp:
1272         (WebCore::V8Clipboard::typesAccessorGetter):
1273         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
1274         (WebCore::V8DOMStringMap::namedPropertyQuery):
1275         (WebCore::V8DOMStringMap::namedPropertyEnumerator):
1276         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1277         (WebCore::WindowSetTimeoutImpl):
1278         * bindings/v8/custom/V8DataViewCustom.cpp:
1279         (WebCore::V8DataView::getInt8Callback):
1280         (WebCore::V8DataView::getUint8Callback):
1281         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
1282         (WebCore::V8HTMLInputElement::selectionStartAccessorGetter):
1283         (WebCore::V8HTMLInputElement::selectionEndAccessorGetter):
1284         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1285         (WebCore::V8HTMLOptionsCollection::lengthAccessorGetter):
1286         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1287         (WebCore::V8InjectedScriptHost::functionDetailsCallback):
1288         * bindings/v8/custom/V8MessageEventCustom.cpp:
1289         (WebCore::V8MessageEvent::portsAccessorGetter):
1290         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
1291         (WebCore::V8MutationCallback::handleEvent):
1292         * bindings/v8/custom/V8NodeListCustom.cpp:
1293         (WebCore::V8NodeList::namedPropertyGetter):
1294         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
1295         (WebCore::V8SQLTransaction::executeSqlCallback):
1296         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
1297         (WebCore::V8SQLTransactionSync::executeSqlCallback):
1298         * bindings/v8/custom/V8StorageCustom.cpp:
1299         (WebCore::V8Storage::namedPropertyEnumerator):
1300         (WebCore::V8Storage::indexedPropertyGetter):
1301         (WebCore::V8Storage::namedPropertyQuery):
1302         (WebCore::V8Storage::indexedPropertySetter):
1303         (WebCore::V8Storage::indexedPropertyDeleter):
1304         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1305         (WebCore::toV8Object):
1306         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
1307         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
1308         * bindings/v8/custom/V8WorkerContextCustom.cpp:
1309         (WebCore::SetTimeoutOrInterval):
1310
1311 2012-06-29  Kentaro Hara  <haraken@chromium.org>
1312
1313         Unreviewed, rolling out r121520.
1314         http://trac.webkit.org/changeset/121520
1315         https://bugs.webkit.org/show_bug.cgi?id=90246
1316
1317         the performance optimization needs more investigation
1318
1319         * dom/DatasetDOMStringMap.cpp:
1320         (WebCore::convertPropertyNameToAttributeName):
1321         * dom/Element.cpp:
1322         (WebCore::Element::getAttributeNS):
1323         (WebCore::Element::removeAttribute):
1324         (WebCore::Element::removeAttributeNS):
1325         (WebCore::Element::getAttributeNode):
1326         (WebCore::Element::getAttributeNodeNS):
1327         (WebCore::Element::hasAttribute):
1328         (WebCore::Element::hasAttributeNS):
1329         * dom/Element.h:
1330         (Element):
1331         * dom/ElementAttributeData.cpp:
1332         (WebCore::ElementAttributeData::getAttributeNode):
1333         * dom/ElementAttributeData.h:
1334         (ElementAttributeData):
1335
1336 2012-06-29  Kentaro Hara  <haraken@chromium.org>
1337
1338         [V8] Replace v8::Integer::New() with v8Integer() in bindings/v8/*.{h,cpp}
1339         https://bugs.webkit.org/show_bug.cgi?id=90238
1340
1341         Reviewed by Yury Semikhatsky.
1342
1343         v8Integer() is a fast wrapper of v8::Integer::New().
1344         We can replace v8::Integer::New() with v8Integer()
1345         in bindings/v8/*.{h,cpp}. In addition, we pass isolate
1346         to v8Integer() where possible.
1347
1348         No tests. No change in behavior.
1349
1350         * bindings/v8/Dictionary.cpp:
1351         (WebCore::Dictionary::get):
1352         * bindings/v8/NPV8Object.cpp:
1353         (_NPN_Enumerate): Changed v8::None to 0, for consistency with other code.
1354         * bindings/v8/PageScriptDebugServer.cpp:
1355         (WebCore::PageScriptDebugServer::addListener):
1356         * bindings/v8/ScriptDebugServer.cpp:
1357         (WebCore::ScriptDebugServer::setBreakpoint):
1358         (WebCore::ScriptDebugServer::compileScript):
1359         * bindings/v8/SerializedScriptValue.cpp:
1360         * bindings/v8/V8Binding.cpp:
1361         (WebCore::v8Array):
1362         (WebCore::v8ValueToWebCoreDOMStringList):
1363         * bindings/v8/V8Binding.h:
1364         (WebCore::v8Array):
1365         (WebCore::v8NumberArrayToVector):
1366         * bindings/v8/V8Collection.h:
1367         (WebCore::nodeCollectionIndexedPropertyEnumerator):
1368         (WebCore::collectionIndexedPropertyEnumerator):
1369         * bindings/v8/V8LazyEventListener.cpp:
1370         (WebCore::V8LazyEventListener::prepareListenerObject):
1371         * bindings/v8/V8NPObject.cpp:
1372         (WebCore::npObjectQueryProperty):
1373         (WebCore::npObjectPropertyEnumerator):
1374         * bindings/v8/V8NPUtils.cpp:
1375         (WebCore::convertNPVariantToV8Object):
1376         * bindings/v8/V8Proxy.cpp:
1377         (WebCore::batchConfigureConstants):
1378         (WebCore::V8Proxy::compileScript):
1379         * bindings/v8/V8Utilities.cpp:
1380         (WebCore::createHiddenDependency):
1381         (WebCore::removeHiddenDependency):
1382         * bindings/v8/V8WindowErrorHandler.cpp:
1383         (WebCore::V8WindowErrorHandler::callListenerFunction):
1384         * bindings/v8/V8WorkerContextErrorHandler.cpp:
1385         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
1386         * bindings/v8/WorkerScriptDebugServer.cpp:
1387         (WebCore::WorkerScriptDebugServer::addListener):
1388
1389 2012-06-28  Vsevolod Vlasov  <vsevik@chromium.org>
1390
1391         Web Inspector: Resource content is not loaded if Resource.requestContent method is called before network request is finished.
1392         https://bugs.webkit.org/show_bug.cgi?id=90153
1393
1394         Reviewed by Yury Semikhatsky.
1395
1396         Test: http/tests/inspector/resource-tree/resource-request-content-while-loading.html
1397
1398         * inspector/front-end/NetworkRequest.js:
1399         * inspector/front-end/Resource.js:
1400         (WebInspector.Resource):
1401         (WebInspector.Resource.prototype.requestContent):
1402         (WebInspector.Resource.prototype._requestFinished):
1403
1404 2012-06-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1405
1406         Unreviewed, rolling out r121529.
1407         http://trac.webkit.org/changeset/121529
1408         https://bugs.webkit.org/show_bug.cgi?id=90260
1409
1410         Failed to compile on Chromium WebKitMacBuilder (Requested by
1411         keishi on #webkit).
1412
1413         * platform/LocalizedStrings.cpp:
1414         (WebCore):
1415         * platform/graphics/cg/PathCG.cpp:
1416         (WebCore::Path::platformAddPathForRoundedRect):
1417         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1418         (WebCore::FontPlatformData::FontPlatformData):
1419         (WebCore::FontPlatformData::setFont):
1420         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1421         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
1422         * platform/graphics/mac/FontMac.mm:
1423         (WebCore::showGlyphsWithAdvances):
1424         * platform/graphics/mac/SimpleFontDataMac.mm:
1425         (WebCore):
1426         * platform/mac/CursorMac.mm:
1427         (WebCore::Cursor::ensurePlatformCursor):
1428         * platform/mac/MemoryPressureHandlerMac.mm:
1429         (WebCore):
1430         * platform/mac/PlatformEventFactoryMac.mm:
1431         (WebCore::momentumPhaseForEvent):
1432         (WebCore::phaseForEvent):
1433         * platform/mac/WebCoreSystemInterface.h:
1434         * platform/mac/WebCoreSystemInterface.mm:
1435         * platform/network/mac/ResourceHandleMac.mm:
1436         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
1437         * platform/network/mac/ResourceRequestMac.mm:
1438         (WebCore::ResourceRequest::doUpdateResourceRequest):
1439         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1440         * platform/text/cf/HyphenationCF.cpp:
1441         * rendering/RenderThemeMac.mm:
1442         (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
1443
1444 2012-06-28  Vsevolod Vlasov  <vsevik@chromium.org>
1445
1446         Web Inspector: Add toggle breakpoint shortcut.
1447         https://bugs.webkit.org/show_bug.cgi?id=90188
1448
1449         Reviewed by Yury Semikhatsky.
1450
1451         * inspector/front-end/JavaScriptSourceFrame.js:
1452         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
1453         (WebInspector.JavaScriptSourceFrame.prototype._toggleBreakpoint):
1454         (WebInspector.JavaScriptSourceFrame.prototype.toggleBreakpointOnCurrentLine):
1455         * inspector/front-end/ScriptsPanel.js:
1456         (WebInspector.ScriptsPanel.prototype._toggleBreakpoint):
1457         (WebInspector.ScriptsPanel.prototype._showOutlineDialog):
1458         * inspector/front-end/TextViewer.js:
1459         (WebInspector.TextViewer.prototype.selection):
1460
1461 2012-06-28  Vsevolod Vlasov  <vsevik@chromium.org>
1462
1463         Web Inspector: Cursor should follow execution line when debugging.
1464         https://bugs.webkit.org/show_bug.cgi?id=90184
1465
1466         Reviewed by Yury Semikhatsky.
1467
1468         Added TextViewer.setSelection public method to set cursor selection in the editor.
1469         Added TextRange.createFromLocation method to create TextRanges with the same start and end points.
1470         Drive-by: removed unused _setCaretLocation() method in TextViewer.js
1471
1472         * inspector/front-end/JavaScriptSourceFrame.js:
1473         (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine):
1474         * inspector/front-end/ScriptsPanel.js:
1475         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
1476         (WebInspector.ScriptsPanel.prototype._editorSelected):
1477         * inspector/front-end/SourceFrame.js:
1478         (WebInspector.SourceFrame.prototype.setSelection):
1479         (WebInspector.SourceFrame.prototype.setContent):
1480         * inspector/front-end/TextEditorModel.js:
1481         (WebInspector.TextRange.createFromLocation):
1482         * inspector/front-end/TextViewer.js:
1483         (WebInspector.TextViewer.prototype.setSelection):
1484         (WebInspector.TextEditorMainPanel.prototype.highlightLine):
1485
1486 2012-06-27  Vsevolod Vlasov  <vsevik@chromium.org>
1487
1488         Web Inspector: IDBObjectStore.autoIncrement flag not exposed
1489         https://bugs.webkit.org/show_bug.cgi?id=89701
1490
1491         Reviewed by Yury Semikhatsky.
1492
1493         Plumbed objectStore.autoIncrement to inspector front-end and added it to tooltip.
1494
1495         * English.lproj/localizedStrings.js:
1496         * inspector/Inspector.json:
1497         * inspector/InspectorIndexedDBAgent.cpp:
1498         (WebCore):
1499         * inspector/front-end/IndexedDBModel.js:
1500         (WebInspector.IndexedDBModel.prototype._loadDatabase.callback):
1501         (WebInspector.IndexedDBModel.prototype._loadDatabase):
1502         (WebInspector.IndexedDBModel.ObjectStore):
1503         * inspector/front-end/ResourcesPanel.js:
1504         (WebInspector.IDBObjectStoreTreeElement.prototype._updateTooltip):
1505
1506 2012-06-28  Alexander Pavlov  <apavlov@chromium.org>
1507
1508         Use floating keyframe rule list when parsing @-webkit-keyframes and allow abrupt rule termination
1509         https://bugs.webkit.org/show_bug.cgi?id=90073
1510
1511         Reviewed by Antti Koivisto.
1512
1513         - The grammar is changed to allow abruptly terminated stylesheet in the @-webkit-keyframes (use closing_brace, not '}').
1514         - A floating StyleKeyframe vector is introduced to separate the creation and filling of StyleRuleKeyframes, as other rules do.
1515
1516         Test: fast/css/css-keyframe-unexpected-end.html
1517
1518         * css/CSSGrammar.y:
1519         * css/CSSParser.cpp:
1520         (WebCore::CSSParser::createFloatingKeyframeVector):
1521         (WebCore):
1522         (WebCore::CSSParser::sinkFloatingKeyframeVector):
1523         (WebCore::CSSParser::createKeyframesRule):
1524         * css/CSSParser.h:
1525
1526 2012-06-26  Yury Semikhatsky  <yurys@chromium.org>
1527
1528         Web Inspector: add character data to the DOM section of native memory view
1529         https://bugs.webkit.org/show_bug.cgi?id=89968
1530
1531         Reviewed by Vsevolod Vlasov.
1532
1533         Count strings referenced from CharacterData node and its descendants
1534         as part of the DOM tree structures in the native memory view.
1535
1536         * dom/CharacterData.cpp:
1537         (WebCore::CharacterData::reportMemoryUsage):
1538         (WebCore):
1539         * dom/CharacterData.h:
1540         (CharacterData):
1541         * dom/MemoryInstrumentation.h:
1542         (MemoryInstrumentation):
1543         (WebCore::MemoryObjectInfo::reportString):
1544         (MemoryObjectInfo):
1545         * inspector/InspectorMemoryAgent.cpp:
1546         (WebCore):
1547         (WebCore::domTreeInfo):
1548         (WebCore::jsExternalResourcesInfo):
1549         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
1550         * inspector/front-end/NativeMemorySnapshotView.js:
1551         (WebInspector.MemoryBlockViewProperties._initialize):
1552
1553 2012-06-29  Eric Seidel  <eric@webkit.org>
1554
1555         Remove more BUILDING_ON_LEOPARD branches now that no port builds on Leopard
1556         https://bugs.webkit.org/show_bug.cgi?id=90252
1557
1558         Reviewed by Ryosuke Niwa.
1559
1560         * platform/LocalizedStrings.cpp:
1561         (WebCore):
1562         * platform/graphics/cg/PathCG.cpp:
1563         (WebCore::Path::platformAddPathForRoundedRect):
1564         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1565         (WebCore::FontPlatformData::FontPlatformData):
1566         (WebCore::FontPlatformData::setFont):
1567         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1568         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
1569         * platform/graphics/mac/FontMac.mm:
1570         (WebCore::showGlyphsWithAdvances):
1571         * platform/graphics/mac/SimpleFontDataMac.mm:
1572         (WebCore):
1573         * platform/mac/CursorMac.mm:
1574         (WebCore::Cursor::ensurePlatformCursor):
1575         * platform/mac/MemoryPressureHandlerMac.mm:
1576         (WebCore):
1577         * platform/mac/PlatformEventFactoryMac.mm:
1578         (WebCore::momentumPhaseForEvent):
1579         (WebCore::phaseForEvent):
1580         * platform/mac/WebCoreSystemInterface.h:
1581         * platform/mac/WebCoreSystemInterface.mm:
1582         * platform/network/mac/ResourceHandleMac.mm:
1583         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
1584         * platform/network/mac/ResourceRequestMac.mm:
1585         (WebCore::ResourceRequest::doUpdateResourceRequest):
1586         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1587         * platform/text/cf/HyphenationCF.cpp:
1588         * rendering/RenderThemeMac.mm:
1589         (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
1590
1591 2012-06-27  Vsevolod Vlasov  <vsevik@chromium.org>
1592
1593         Web Inspector: showConsole() should close previous view in drawer.
1594         https://bugs.webkit.org/show_bug.cgi?id=90070
1595
1596         Reviewed by Yury Semikhatsky.
1597
1598         * inspector/front-end/inspector.js:
1599         (WebInspector.showConsole):
1600         (WebInspector.showPanel):
1601
1602 2012-06-29  Ryosuke Niwa  <rniwa@webkit.org>
1603
1604         Remove a #include erroneously added in r120896.
1605
1606         * editing/VisibleSelection.h:
1607
1608 2012-06-29  Yoshifumi Inoue  <yosin@chromium.org>
1609
1610         [Platform] Implement Date Time format parser
1611         https://bugs.webkit.org/show_bug.cgi?id=89963
1612
1613         Reviewed by Kent Tamura.
1614
1615         This patch introduces Unicode TR35 LDML date time format parser for
1616         input type "time" if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS) is true.
1617
1618         Test: WebKit/chromium/tests/DateTimeFormatTest.cpp
1619
1620         * CMakeLists.txt: Added DateTimeFormat.cpp
1621         * GNUmakefile.list.am: Added DateTimeFormat.{cpp,h}
1622         * Target.pri: ditto
1623         * WebCore.gypi: ditto
1624         * WebCore.vcproj/WebCore.vcproj: ditto
1625         * WebCore.xcodeproj/product.pbxproj: ditto
1626         * platform/text/DateTimeFormat.cpp: Added.
1627         (WebCore::mapCharacterToFieldTypeInternal):
1628         (WebCore::DateTimeFormat::DateTimeFormat):
1629         (WebCore::DateTimeFormat::mapCharacterToFieldType):
1630         (WebCore::DateTimeFormat::parse):
1631         * platform/text/DateTimeFormat.h: Added.
1632         (DateTimeFormat):
1633         (TokenHandler):
1634         (WebCore::DateTimeFormat::TokenHandler::~TokenHandler):
1635
1636 2012-06-29  Eric Seidel  <eric@webkit.org>
1637
1638         Remove more BUILDING_ON_LEOPARD usage in PLATFORM(MAC) code
1639         https://bugs.webkit.org/show_bug.cgi?id=85846
1640
1641         Reviewed by Adam Barth.
1642
1643         PLATFORM(MAC) has not supported Leopard for several months now.
1644         This change removes about 1/3 of the remaining BUILDING_ON_LEOPARD
1645         uses in the PLATFORM(MAC) codepaths.  PLATFORM(CHROMIUM) still
1646         supports BUILDING_ON_LEOPARD for now.
1647
1648         * WebCore.exp.in:
1649         * dom/Document.cpp:
1650         (WebCore::Document::updateRangesAfterChildrenChanged):
1651         (WebCore::Document::nodeChildrenWillBeRemoved):
1652         (WebCore::Document::nodeWillBeRemoved):
1653         (WebCore::Document::textInserted):
1654         (WebCore::Document::textRemoved):
1655         (WebCore::Document::textNodesMerged):
1656         (WebCore::Document::textNodeSplit):
1657         * editing/Editor.cpp:
1658         (WebCore::Editor::respondToChangedSelection):
1659         * editing/TypingCommand.cpp:
1660         (WebCore::TypingCommand::markMisspellingsAfterTyping):
1661         (WebCore::TypingCommand::typingAddedToOpenCommand):
1662         * editing/mac/EditorMac.mm:
1663         (WebCore::Editor::pasteWithPasteboard):
1664         * loader/EmptyClients.h:
1665         (EmptyEditorClient):
1666         * page/ContextMenuController.cpp:
1667         (WebCore::ContextMenuController::contextMenuItemSelected):
1668         (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
1669         (WebCore):
1670         (WebCore::ContextMenuController::populate):
1671         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
1672         * page/EditorClient.h:
1673         (EditorClient):
1674         * platform/LocalizedStrings.cpp:
1675         (WebCore::contextMenuItemTagSearchWeb):
1676         * platform/MemoryPressureHandler.cpp:
1677         (WebCore):
1678         * platform/SuddenTermination.h:
1679         (WebCore):
1680         * platform/graphics/ca/GraphicsLayerCA.cpp:
1681         (WebCore::GraphicsLayerCA::updateContentsImage):
1682         (WebCore::GraphicsLayerCA::constrainedSize):
1683         * platform/graphics/ca/PlatformCALayer.h:
1684         (PlatformCALayer):
1685         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
1686         (fromCAValueFunctionType):
1687         (PlatformCAAnimation::valueFunction):
1688         (PlatformCAAnimation::setValueFunction):
1689         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1690         (toCAFilterType):
1691         (PlatformCALayer::anchorPoint):
1692         (PlatformCALayer::setAnchorPoint):
1693         (PlatformCALayer::contentsTransform):
1694         (PlatformCALayer::setContentsTransform):
1695         (PlatformCALayer::isGeometryFlipped):
1696         (PlatformCALayer::setGeometryFlipped):
1697         (PlatformCALayer::acceleratesDrawing):
1698         (PlatformCALayer::setAcceleratesDrawing):
1699         (PlatformCALayer::setMinificationFilter):
1700         (PlatformCALayer::setMagnificationFilter):
1701         (PlatformCALayer::contentsScale):
1702         (PlatformCALayer::setContentsScale):
1703         * platform/graphics/ca/mac/TileCache.mm:
1704         (WebCore::TileCache::setScale):
1705         (WebCore::TileCache::setAcceleratesDrawing):
1706         (WebCore::TileCache::createTileLayer):
1707
1708 2012-06-29  Kwang Yul Seo  <skyul@company100.net>
1709
1710         Use StringBuilder in SegmentedString::toString()
1711         https://bugs.webkit.org/show_bug.cgi?id=90247
1712
1713         Reviewed by Adam Barth.
1714
1715         Use a StringBuilder instead of String concatenation because StringBuilder is generally faster.
1716         No new tests. Covered by existing tests.
1717
1718         * platform/text/SegmentedString.cpp:
1719         (WebCore::SegmentedString::toString):
1720         * platform/text/SegmentedString.h:
1721         (WebCore::SegmentedSubstring::appendTo):
1722
1723 2012-06-28  Ryosuke Niwa  <rniwa@webkit.org>
1724
1725         Mac build fix after r121518.
1726
1727         * WebCore.exp.in:
1728
1729 2012-06-28  Ryosuke Niwa  <rniwa@webkit.org>
1730
1731         DOMHTMLCollection::item may return a wrong element after namedItem is called
1732         https://bugs.webkit.org/show_bug.cgi?id=90240
1733
1734         Reviewed by Antti Koivisto.
1735
1736         The bug was caused by namedItem updating m_cache.current without updating m_cache.position.
1737         Fixed the bug by updating both. This is similar to the bug I fixed in r121478.
1738
1739         WebKit API Test: WebKit1.HTMLCollectionNamedItemTest
1740
1741         * html/HTMLCollection.cpp:
1742         (WebCore::HTMLCollection::namedItem):
1743
1744 2012-06-28  Kentaro Hara  <haraken@chromium.org>
1745
1746         Change argument types of Element::getAttribute*() from String to AtomicString
1747         https://bugs.webkit.org/show_bug.cgi?id=90246
1748
1749         Reviewed by Ryosuke Niwa.
1750
1751         This is a follow-up patch for r121439. r121439 changed an argument type of
1752         Element::getAttribute() from String to AtomicString, which optimized
1753         performance of Dromaeo/dom-attr.html. This patch changes other argument types
1754         of Element::getAttribute*() from String to AtomicString. See the ChangeLog in
1755         http://trac.webkit.org/changeset/121439 for more details about why this change
1756         optimizes performance.
1757
1758         No tests. No change in behavior.
1759
1760         * dom/DatasetDOMStringMap.cpp:
1761         (WebCore::convertPropertyNameToAttributeName):
1762         * dom/Element.cpp:
1763         (WebCore::Element::getAttributeNS):
1764         (WebCore::Element::removeAttribute):
1765         (WebCore::Element::removeAttributeNS):
1766         (WebCore::Element::getAttributeNode):
1767         (WebCore::Element::getAttributeNodeNS):
1768         (WebCore::Element::hasAttribute):
1769         (WebCore::Element::hasAttributeNS):
1770         * dom/Element.h:
1771         (Element):
1772         * dom/ElementAttributeData.cpp:
1773         (WebCore::ElementAttributeData::getAttributeNode):
1774         * dom/ElementAttributeData.h:
1775         (ElementAttributeData):
1776
1777 2012-06-28  Kent Tamura  <tkent@chromium.org>
1778
1779         REGRESSION(r106388): Form hidden element values being restored
1780         incorrectly for dynamically generated content
1781         https://bugs.webkit.org/show_bug.cgi?id=88685
1782
1783         Reviewed by Hajime Morita.
1784
1785         We should not save value attribute updated during parsing.
1786
1787         Test: fast/forms/state-restore-to-non-edited-controls.html
1788
1789         * html/HTMLInputElement.cpp:
1790         (WebCore::HTMLInputElement::HTMLInputElement):
1791         Initialize m_valueAttributeWasUpdatedAfterParsing.
1792         (WebCore::HTMLInputElement::parseAttribute):
1793         Set true to m_valueAttributeWasUpdatedAfterParsing if value
1794         attribute is updated and it's not in parsing.
1795         * html/HTMLInputElement.h:
1796         (WebCore::HTMLInputElement::valueAttributeWasUpdatedAfterParsing):
1797         Added for HiddenInputType.
1798         * html/HiddenInputType.cpp:
1799         (WebCore::HiddenInputType::saveFormControlState):
1800         Save the value only if valueAttributeWasUpdatedAfterParsing() is true.
1801
1802 2012-06-28  MORITA Hajime  <morrita@google.com>
1803
1804         [Refactoring] NodeRenderingContext ctor could be built on top of the ComposedShadowTreeWalker
1805         https://bugs.webkit.org/show_bug.cgi?id=89732
1806
1807         Reviewed by Dimitri Glazkov.
1808
1809         The constructor of NodeRenderingContext implements almost same
1810         logic as ComposedShadowTreeWalker::parent().  This change
1811         eliminates the duplication by employing ComposedShadowTreeWalker in the constructor.
1812
1813         ComposedShadowTreeWalker has same difference from
1814         NodeRenderingContext though. So this change also extends
1815         ComposedShadowTreeWalker to support these missing pieces, which
1816         are encapsulated in newly introduced ParentTranversalDetails
1817         class where:
1818
1819         - not only the parent, but also the insertion point of the child is returned,
1820         - resetStyleInheritance from the child-parent traversal is computed and
1821         - if the starting point is out of the composition, it returns null as a parent.
1822
1823         This change also inlines some ComposedShadowTreeWalker methods for speed.
1824
1825         No new tests. Covered by existing tests.
1826
1827         * WebCore.exp.in:
1828         * dom/ComposedShadowTreeWalker.cpp:
1829         (WebCore::shadowOfParent):
1830         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::didTraverseInsertionPoint):
1831         (WebCore):
1832         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::didTraverseShadowRoot):
1833         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::didFindNode):
1834         (WebCore::ComposedShadowTreeWalker::findParent):
1835         (WebCore::ComposedShadowTreeWalker::escapeFallbackContentElement):
1836         (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
1837         (WebCore::ComposedShadowTreeWalker::traverseParent):
1838         (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
1839         (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost):
1840         * dom/ComposedShadowTreeWalker.h:
1841         (ParentTranversalDetails):
1842         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::ParentTranversalDetails):
1843         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::node):
1844         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::insertionPoint):
1845         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::resetStyleInheritance):
1846         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::outOfComposition):
1847         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::childWasOutOfComposition):
1848         (ComposedShadowTreeWalker):
1849         (WebCore::ComposedShadowTreeWalker::ComposedShadowTreeWalker):
1850         (WebCore):
1851         * dom/NodeRenderingContext.cpp:
1852         (WebCore::NodeRenderingContext::NodeRenderingContext):
1853         (WebCore::NodeRenderingContext::nextRenderer):
1854         (WebCore::NodeRenderingContext::previousRenderer):
1855         (WebCore::NodeRenderingContext::parentRenderer):
1856         (WebCore::NodeRenderingContext::shouldCreateRenderer):
1857         (WebCore::NodeRenderingContext::isOnEncapsulationBoundary):
1858         * dom/NodeRenderingContext.h:
1859         (NodeRenderingContext):
1860         (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle):
1861         (WebCore::NodeRenderingContext::resetStyleInheritance):
1862         (WebCore::NodeRenderingContext::insertionPoint):
1863
1864 2012-06-28  Stephen White  <senorblanco@chromium.org>
1865
1866         Implement filter url() function.
1867         https://bugs.webkit.org/show_bug.cgi?id=72443
1868
1869         url() references can be internal, in which case the DOM nodes are
1870         retrieved directly from the current document, or external, in which
1871         case a CachedSVGDocument request is made, and the filter node build is
1872         deferred until the document is loaded.  WebKitSVGDocumentValue
1873         holds the CachedSVGDocument (if any) and the URL as a CSSValue,
1874         and is stored in the CSSValue chain as the argument to the reference
1875         filter.
1876
1877         One notable difference between internal and external references is
1878         that internal references will automatically update on an SVG filter node
1879         attribute change, while external references will not, since they live
1880         in a separate document.  This is consistent with the Mozilla
1881         implementation.  In order to make this work, the RenderLayer is made a
1882         client of the RenderSVGResourceContainer, and calls
1883         filterNeedsRepaint() when the SVG nodes are invalidated.
1884
1885         Some plumbing:  The CSS StyleResolver was refactored to load all
1886         all external resources (images, shaders and (now) SVG filters) in a
1887         single function, loadPendingResources().  The PlatformLayer typedef
1888         was moved out into its own file, in order to break a cyclic
1889         dependency.  SVGFilterBuilder was modified to accept the SourceGraphic
1890         and SourceAlpha FilterEffects in its constructor and factory function,
1891         rather than extracting them from the parent Filter.  (This is necessary
1892         so that the url() filter can correctly hook up its inputs from
1893         previous CSS filters.)
1894
1895         Reviewed by Dean Jackson.
1896
1897         Tests: css3/filters/effect-reference-external.html
1898                css3/filters/effect-reference-hw.html
1899                css3/filters/effect-reference-ordering.html
1900                css3/filters/effect-reference.html
1901
1902         * CMakeLists.txt:
1903         * GNUmakefile.list.am:
1904         * Target.pri:
1905         * WebCore.gypi:
1906         * WebCore.vcproj/WebCore.vcproj:
1907         * WebCore.xcodeproj/project.pbxproj:
1908         Add WebKitCSSSVGDocumentValue to the various build files.
1909         * css/CSSComputedStyleDeclaration.cpp:
1910         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
1911         Use the reference filter's url when getting the computed style for
1912         a reference filter.
1913         * css/CSSParser.cpp:
1914         (WebCore::CSSParser::parseFilter):
1915         Create the referenceFilterValue's argument as a
1916         WebKitCSSSVGDocumentValue instead of a CSS string.
1917         * css/CSSValue.cpp:
1918         (WebCore::CSSValue::cssText):
1919         Add support for WebKitCSSSVGDocumentValue.
1920         (WebCore::CSSValue::destroy):
1921         Add support for WebKitCSSSVGDocumentValue.
1922         * css/CSSValue.h:
1923         (WebCore::CSSValue::isWebKitCSSSVGDocumentValue):
1924         Add support for WebKitCSSSVGDocumentValue.
1925         * css/StyleResolver.cpp:
1926         (WebCore::StyleResolver::collectMatchingRulesForList):
1927         Keep track of pending SVG document references, and load them when
1928         necessary.
1929         * css/StyleResolver.h:
1930         * css/WebKitCSSSVGDocumentValue.cpp: Added.
1931         New CSSValue subclass for holding SVG document references.
1932         (WebCore::WebKitCSSSVGDocumentValue::WebKitCSSSVGDocumentValue):
1933         (WebCore::WebKitCSSSVGDocumentValue::~WebKitCSSSVGDocumentValue):
1934         (WebCore::WebKitCSSSVGDocumentValue::load):
1935         (WebCore::WebKitCSSSVGDocumentValue::customCssText):
1936         * css/WebKitCSSSVGDocumentValue.h: Added.
1937         (WebCore::WebKitCSSSVGDocumentValue::create):
1938         (WebCore::WebKitCSSSVGDocumentValue::cachedSVGDocument):
1939         (WebCore::WebKitCSSSVGDocumentValue::url):
1940         (WebCore::WebKitCSSSVGDocumentValue::loadRequested):
1941         * platform/graphics/GraphicsLayer.h:
1942         Refactor PlatformLayer out into its own file, to avoid circular
1943         includes.
1944         * platform/graphics/ImageBuffer.h:
1945         Include PlatformLayer.h instead of GraphicsLayer.h.
1946         * platform/graphics/PlatformLayer.h: Added.
1947         Refactor PlatformLayer out into its own file, to avoid circular
1948         includes.
1949         * platform/graphics/filters/FilterOperation.h:
1950         (WebCore::ReferenceFilterOperation::create):
1951         (WebCore::ReferenceFilterOperation::clone):
1952         (WebCore::ReferenceFilterOperation::url):
1953         (WebCore::ReferenceFilterOperation::fragment):
1954         (ReferenceFilterOperation):
1955         (WebCore::ReferenceFilterOperation::data):
1956         (WebCore::ReferenceFilterOperation::setData):
1957         (WebCore::ReferenceFilterOperation::operator==):
1958         (WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
1959         Augment ReferenceFilterOperation to maintain a data pointer,
1960         in order to preserve context while loading external SVG documents.
1961         Replace "reference" with "url" and "fragment" members, in order to
1962         ease retrieval of the appropriate DOM objects.
1963         * platform/graphics/filters/FilterOperations.cpp:
1964         (WebCore::FilterOperations::hasReferenceFilter):
1965         Convenience function for finding reference filters.
1966         * platform/graphics/filters/FilterOperations.h:
1967         (FilterOperations):
1968         * platform/mac/ScrollbarThemeMac.mm:
1969         Include GraphicsLayer.h explicitly, since ImageBuffer.h no longer
1970         includes it (and only includes PlatformLayer.h).
1971         * rendering/FilterEffectRenderer.cpp:
1972         (WebCore::FilterEffectRenderer::buildReferenceFilter):
1973         Utility function to build a FilterEffect node graph for a
1974         ReferenceFilterOperation.
1975         (WebCore::FilterEffectRenderer::build):
1976         Call the above builder function for ReferenceFilterOperations.
1977         * rendering/FilterEffectRenderer.h:
1978         * rendering/RenderLayer.cpp:
1979         (WebCore::RenderLayer::updateOrRemoveFilterEffect):
1980         If we have reference filters, update them along with other filters.
1981         (WebCore::RenderLayer::filterNeedsRepaint):
1982         * rendering/RenderLayerFilterInfo.cpp:
1983         (WebCore::RenderLayerFilterInfo::~RenderLayerFilterInfo):
1984         (WebCore::RenderLayerFilterInfo::notifyFinished):
1985         Implement callback function when external SVGDocuments are loaded.
1986         (WebCore::RenderLayerFilterInfo::updateReferenceFilterClients):
1987         Add the FilterInfo as a client to be called when SVGDocuments are
1988         loaded.
1989         (WebCore::RenderLayerFilterInfo::removeReferenceFilterClients):
1990         Remove this from the list of notified clients.
1991         * rendering/RenderLayerFilterInfo.h:
1992         Add new member vars for tracking internal and external SVG
1993         references, so we can remove ourselves as a client when done.
1994         * rendering/svg/RenderSVGResourceContainer.cpp:
1995         (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
1996         When marking client DOM nodes for repaint, also mark any RenderLayers
1997         referring to this DOM tree via filters as needing repaint.
1998         (WebCore::RenderSVGResourceContainer::addClientRenderLayer):
1999         (WebCore::RenderSVGResourceContainer::removeClientRenderLayer):
2000         * rendering/svg/RenderSVGResourceContainer.h:
2001         Maintain a list of RenderLayer clients on each SVG resource container,
2002         and turn SVG DOM repaint notifications into filter repaint (CSS)
2003         notifications.
2004         * rendering/svg/RenderSVGResourceFilter.cpp:
2005         (WebCore::RenderSVGResourceFilter::buildPrimitives):
2006         Construct a SourceGraphic and SourceAlpha node explicitly for the
2007         SVG builder case.
2008         * svg/graphics/filters/SVGFilterBuilder.cpp:
2009         (WebCore::SVGFilterBuilder::SVGFilterBuilder):
2010         * svg/graphics/filters/SVGFilterBuilder.h:
2011         (WebCore::SVGFilterBuilder::create):
2012         Add the SourceGraphic and SourceAlpha as parameters to the constructor
2013         and create() methods, so they can be supplied by the caller.
2014
2015 2012-06-28  Kenichi Ishibashi  <bashi@chromium.org>
2016
2017         [Chromium] CTFontCopyTable of MacOSX10.5 SDK doesn't work for layout tables
2018         https://bugs.webkit.org/show_bug.cgi?id=90235
2019
2020         Reviewed by Kent Tamura.
2021
2022         Use CGFontCopyTableForTag instead.
2023
2024         No new tests. css3/font-feature-settings-rendering.html should pass. I'll rebase expectations once bots get the result.
2025
2026         * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp:
2027         (WebCore::harfbuzzCoreTextGetTable):
2028
2029 2012-06-28  Philip Rogers  <pdr@google.com>
2030
2031         Add preventative assert in SVGTRefElement
2032         https://bugs.webkit.org/show_bug.cgi?id=90203
2033
2034         Reviewed by Abhishek Arya.
2035
2036         SVGTRefElement::detachTarget() adds a pending resource via addPendingResource.
2037         Due to some recent bugs in this area, an assert is being added to prevent
2038         users from calling detachTarget when not in a document. Doing
2039         so would create a bug such as in WK90042.
2040
2041         This assert will not fire currently because detachTarget is only called after
2042         a DOMNodeRemovedFromDocumentEvent event fires, which only comes from
2043         dispatchChildRemovalEvents when the node is in a document.
2044
2045         * svg/SVGTRefElement.cpp:
2046         (WebCore::SVGTRefElement::detachTarget):
2047
2048 2012-06-28  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
2049
2050         [Qt] Remove unnecessary AffineTransform calls
2051         https://bugs.webkit.org/show_bug.cgi?id=90178
2052
2053         Reviewed by Noam Rosenthal.
2054
2055         Qt currently ignores the const AffineTransform& parameter on
2056         Pattern::createPlatformPattern, so removing it from all its Qt calls and
2057         changing the function signature if platform is Qt.
2058
2059         * platform/graphics/Pattern.h:
2060         (Pattern):
2061         * platform/graphics/qt/FontQt.cpp:
2062         (WebCore::fillPenForContext):
2063         (WebCore::strokePenForContext):
2064         * platform/graphics/qt/FontQt4.cpp:
2065         (WebCore::fillPenForContext):
2066         (WebCore::strokePenForContext):
2067         * platform/graphics/qt/GraphicsContextQt.cpp:
2068         (WebCore::GraphicsContext::fillPath):
2069         (WebCore::GraphicsContext::strokePath):
2070         (WebCore::drawRepeatPattern):
2071         * platform/graphics/qt/PatternQt.cpp:
2072         (WebCore::Pattern::createPlatformPattern):
2073
2074 2012-06-28  No'am Rosenthal  <noam.rosenthal@nokia.com>
2075
2076         [Qt] When uploading an opaque image to a texture for TextureMapper, unnecessary alpha operations take place
2077         https://bugs.webkit.org/show_bug.cgi?id=90229
2078
2079         Reviewed by Luiz Agostini.
2080
2081         For opaque web content in WebKit2, we use the RGB32 image format. When we special-case
2082         it in GraphicsContext3DQt, we can avoid any alpha operations and perform a regular copy.
2083
2084         Covered existing API tests, as this code path is always used when rendering.
2085
2086         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2087         (WebCore::GraphicsContext3D::getImageData):
2088
2089 2012-06-28  James Robinson  <jamesr@chromium.org>
2090
2091         [chromium] Compile chromium compositor implementation files into separate .lib
2092         https://bugs.webkit.org/show_bug.cgi?id=90233
2093
2094         Reviewed by Adam Barth.
2095
2096         * WebCore.gyp/WebCore.gyp:
2097
2098 2012-06-28  Erik Arvidsson  <arv@chromium.org>
2099
2100         [V8] NodeList wrappers are not kept alive as needed
2101         https://bugs.webkit.org/show_bug.cgi?id=90194
2102
2103         Reviewed by Ojan Vafai.
2104
2105         We need to add custom reachability code for DynamicNodeLists. If the owner of
2106         a DynamicNodeList is reachable then the DynamicNodeList must also be reachable.
2107
2108         Test: fast/dom/NodeList/nodelist-reachable.html
2109
2110         * bindings/v8/custom/V8NodeListCustom.cpp:
2111         (WebCore::V8NodeList::visitDOMWrapper): AddImplicitReferences from the owner wrapper.
2112         (WebCore):
2113         * dom/NodeList.idl:
2114
2115 2012-06-28  Elliott Sprehn  <esprehn@gmail.com>
2116
2117         frameborder="no" on frameset is ignored if border attribute set
2118         https://bugs.webkit.org/show_bug.cgi?id=17767
2119
2120         Reviewed by Tony Chang.
2121
2122         Fixes <frameset> frameborder and border handling. Previously we'd
2123         override the frameborder=no setting if border was set. We also
2124         treated frameborder="anything" the same as frameborder=0 since we
2125         we just converted it to a number so frameborder=yes was incorrectly
2126         treated the same as frameborder=no.
2127
2128         Tests: fast/frames/frameset-frameborder-boolean-values.html
2129                fast/frames/frameset-frameborder-inheritance.html
2130                fast/frames/frameset-frameborder-overrides-border.html
2131
2132         * html/HTMLFrameSetElement.cpp: Proper parsing of yes,no,1,0 values.
2133         (WebCore::HTMLFrameSetElement::parseAttribute):
2134         * html/HTMLFrameSetElement.h:
2135         (WebCore::HTMLFrameSetElement::border): Border should be 0 if frameborder=no.
2136
2137 2012-06-28  Joshua Bell  <jsbell@chromium.org>
2138
2139         IndexedDB: Implement IDBTransaction internal active flag
2140         https://bugs.webkit.org/show_bug.cgi?id=89379
2141
2142         Reviewed by Tony Chang.
2143
2144         IDB transactions should only be "active" during IDB success/error callbacks;
2145         attempts to make new requests otherwise (e.g. in a setTimeout callback)
2146         should fail even if the transaction has not yet finished. Implement this logic,
2147         and the closely related requirement that transactions are deactivated when
2148         the context they were created in returns to the event loop, and finally that
2149         when so deactivated they should commit rather than abort (as previously
2150         implemented) if no requests have been filed.
2151
2152         Tests: storage/indexeddb/transaction-active-flag.html
2153                storage/indexeddb/transaction-complete-with-js-recursion-cross-frame.html
2154                storage/indexeddb/transaction-complete-with-js-recursion.html
2155                storage/indexeddb/transaction-complete-workers.html
2156
2157         * Modules/indexeddb/IDBPendingTransactionMonitor.cpp: Simplify API.
2158         (WebCore::transactions):
2159         (WebCore::IDBPendingTransactionMonitor::addNewTransaction):
2160         (WebCore::IDBPendingTransactionMonitor::deactivateNewTransactions):
2161         * Modules/indexeddb/IDBPendingTransactionMonitor.h:
2162         (WebCore):
2163         (IDBPendingTransactionMonitor):
2164         * Modules/indexeddb/IDBRequest.cpp: Unregisters from transaction when done,
2165         not on destruction. No longer responsible for working with the pending monitor.
2166         (WebCore::IDBRequest::IDBRequest):
2167         (WebCore::IDBRequest::~IDBRequest):
2168         (WebCore::IDBRequest::markEarlyDeath):
2169         (WebCore::IDBRequest::resetReadyState):
2170         (WebCore::IDBRequest::onSuccess):
2171         (WebCore::IDBRequest::dispatchEvent): Set active flag on transaction during callback.
2172         * Modules/indexeddb/IDBTransaction.cpp: Use state enum to better track lifecycle, and
2173         take ownership of relationship with pending monitor.
2174         (WebCore::IDBTransaction::IDBTransaction): Special cases for version change
2175         transactions.
2176         (WebCore::IDBTransaction::~IDBTransaction):
2177         (WebCore::IDBTransaction::error):
2178         (WebCore::IDBTransaction::setError):
2179         (WebCore::IDBTransaction::objectStore):
2180         (WebCore::IDBTransaction::objectStoreCreated):
2181         (WebCore::IDBTransaction::objectStoreDeleted):
2182         (WebCore::IDBTransaction::setActive): Let IDBRequest and IDBPendingTransactionMonitor
2183         toggle the active state. Needs some smarts because (1) state may move to Finishing during
2184         the request's dispatch phase due to an implicit/explicit abort, and (2) a monitor call
2185         will only trigger a commit if the transaction hasn't had any requests filed.
2186         (WebCore):
2187         (WebCore::IDBTransaction::abort):
2188         (WebCore::IDBTransaction::registerRequest):
2189         (WebCore::IDBTransaction::unregisterRequest):
2190         (WebCore::IDBTransaction::onAbort):
2191         (WebCore::IDBTransaction::onComplete):
2192         (WebCore::IDBTransaction::hasPendingActivity):
2193         (WebCore::IDBTransaction::dispatchEvent):
2194         (WebCore::IDBTransaction::canSuspend):
2195         (WebCore::IDBTransaction::enqueueEvent):
2196         * Modules/indexeddb/IDBTransaction.h:
2197         (WebCore::IDBTransaction::isFinished):
2198         (IDBTransaction):
2199         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2200         (WebCore::IDBTransactionBackendImpl::commit): Allow explicit commit() calls from the front end
2201         if no requests have been filed.
2202         * Modules/indexeddb/IDBTransactionBackendInterface.h:
2203         (IDBTransactionBackendInterface): Expose commit() method.
2204         * bindings/js/JSMainThreadExecState.cpp:
2205         (WebCore::JSMainThreadExecState::didLeaveScriptContext): Change target function name.
2206         * bindings/v8/V8RecursionScope.cpp:
2207         (WebCore::V8RecursionScope::didLeaveScriptContext): Change target function name.
2208
2209 2012-06-28  Philip Rogers  <pdr@google.com>
2210
2211         Prevent crash in animate resource handling
2212         https://bugs.webkit.org/show_bug.cgi?id=90042
2213
2214         Reviewed by Abhishek Arya.
2215
2216         This patch adds a check that we are in a document before registering animation
2217         resources and creating a target element in SVGSMILElement. This prevents a crash where
2218         we would register resources and create the target when we were not in a document
2219         but fail to deregister / reset the target when we were removed from a document.
2220         In failing to reset the target, we can crash when trying to deregister resources that
2221         were not created after being inserted into a document and then removed.
2222
2223         The existence of m_targetResources and registered animation resources is now
2224         tied to being in a document.
2225
2226         Test: svg/custom/animate-reference-crash.html
2227
2228         * svg/animation/SVGSMILElement.cpp:
2229         (WebCore::SVGSMILElement::targetElement):
2230
2231 2012-06-28  Joshua Bell  <jsbell@chromium.org>
2232
2233         IndexedDB: IDBDatabase should have a close pending field.
2234         https://bugs.webkit.org/show_bug.cgi?id=71129
2235
2236         Reviewed by Tony Chang.
2237
2238         Handle the IDB spec case that "versionchange" events should not be fired 
2239         against connections that have the internal "closePending" flag set but 
2240         are not yet closed due to running transactions.
2241
2242         Test: storage/indexeddb/database-closepending-flag.html
2243
2244         * Modules/indexeddb/IDBDatabase.cpp:
2245         (WebCore::IDBDatabase::onVersionChange):
2246
2247 2012-06-28  Adrienne Walker  <enne@google.com>
2248
2249         [chromium] Split WebScrollbar into WebPluginScrollbar and WebScrollbar
2250         https://bugs.webkit.org/show_bug.cgi?id=90117
2251
2252         Reviewed by James Robinson.
2253
2254         Make WebCore also depend on Platform.
2255
2256         * WebCore.gyp/WebCore.gyp:
2257
2258 2012-06-28  Hayato Ito  <hayato@chromium.org>
2259
2260         CompositeShadowTreeWalker should use InsertionPoint::hasDistribution() instead of InsertionPoint::isActive().
2261         https://bugs.webkit.org/show_bug.cgi?id=89177
2262
2263         Reviewed by Dimitri Glazkov.
2264
2265         Prevents ComposedShadowTreeWalker from escaping out of an
2266         insertion point (which has distributed nodes) from a non-used
2267         fallback element in the insertion point.  Such a fallback element
2268         should be treated as in an orphaned subtree.
2269
2270         ComposedShadowTreeParentWalker will be also fixed in a follow-up patch.
2271
2272         Test: fast/dom/shadow/composed-shadow-tree-walker.html
2273
2274         * dom/ComposedShadowTreeWalker.cpp:
2275         (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
2276
2277 2012-06-27  Ryosuke Niwa  <rniwa@webkit.org>
2278
2279         Cleanup HTMLFormCollection
2280         https://bugs.webkit.org/show_bug.cgi?id=90111
2281
2282         Reviewed by Andreas Kling.
2283
2284         Got rid of getNamedItem and renamed getNamedFormItem to firstNamedItem and got rid of duplicateNumber argument since
2285         it's always 0. Also made it a static local function. In addition, removed nextItem() since it's not used anywhere.
2286
2287         WebKit API Test: WebKit1.HTMLFormCollectionNamedItemTest
2288
2289         * html/HTMLFormCollection.cpp:
2290         (WebCore::firstNamedItem):
2291         (WebCore):
2292         (WebCore::HTMLFormCollection::namedItem):
2293         * html/HTMLFormCollection.h:
2294         (HTMLFormCollection):
2295
2296 2012-06-28  Alec Flett  <alecflett@chromium.org>
2297
2298         IndexedDB: Hook up render-side key ASSERTing for get()
2299         https://bugs.webkit.org/show_bug.cgi?id=90001
2300
2301         Reviewed by Tony Chang.
2302
2303         Hook up the new onSuccess and add it to the interface. For now,
2304         simply assert that the right value is set. Add the same assertion
2305         logic in the value-construction logic when the cursor advances.
2306
2307         No new tests, existing tests verify this refactor is correct.
2308
2309         * Modules/indexeddb/IDBCallbacks.h:
2310         (IDBCallbacks):
2311         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2312         (WebCore::IDBObjectStoreBackendImpl::getInternal):
2313         * Modules/indexeddb/IDBRequest.cpp:
2314         (WebCore):
2315         (WebCore::IDBRequest::onSuccess):
2316         * Modules/indexeddb/IDBRequest.h:
2317         * bindings/v8/IDBBindingUtilities.cpp:
2318         (WebCore::createIDBKeyFromSerializedValueAndKeyPath):
2319         * inspector/InspectorIndexedDBAgent.cpp:
2320         (WebCore):
2321
2322 2012-06-28  Gregg Tavares  <gman@google.com>
2323
2324         Add support for DEPTH_STENCIL to WEBGL_depth_texture
2325         https://bugs.webkit.org/show_bug.cgi?id=90109
2326
2327         Reviewed by Kenneth Russell.
2328
2329         * html/canvas/WebGLDepthTexture.idl:
2330         * html/canvas/WebGLFramebuffer.cpp:
2331         * html/canvas/WebGLRenderingContext.cpp:
2332         (WebCore):
2333         (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
2334
2335 2012-06-28  James Robinson  <jamesr@chromium.org>
2336
2337         [chromium] Move chromium compositor implementation files into separate section in WebCore.gypi
2338         https://bugs.webkit.org/show_bug.cgi?id=90201
2339
2340         Reviewed by Adam Barth.
2341
2342         This moves the chromium compositor implementation files to a separate gyp variable to make future changes
2343         easier. The files still all link into webcore_platform.lib, as before.
2344
2345         * WebCore.gyp/WebCore.gyp:
2346         * WebCore.gypi:
2347
2348 2012-06-28  Christophe Dumez  <christophe.dumez@intel.com>
2349
2350         [EFL] Use Eina_Module API instead of dlopen in PluginPackageEfl
2351         https://bugs.webkit.org/show_bug.cgi?id=89972
2352
2353         Reviewed by Antonio Gomes.
2354
2355         Use convenience helpers in Eina_Module to load plugins instead
2356         of POSIX dlopen().
2357
2358         No new tests, behavior has not changed.
2359
2360         * platform/FileSystem.h:
2361         (WebCore):
2362         * platform/efl/FileSystemEfl.cpp:
2363         (WebCore::unloadModule):
2364         * plugins/efl/PluginPackageEfl.cpp:
2365         (WebCore::PluginPackage::load):
2366
2367 2012-06-28  Jocelyn Turcotte  <turcotte.j@gmail.com>
2368
2369         [Qt] Fix TextureMapper rendering of GraphicsSurface on Mac
2370         https://bugs.webkit.org/show_bug.cgi?id=90154
2371
2372         Reviewed by Noam Rosenthal.
2373
2374         Fix a regression introduced in r120608.
2375         texture2DRect takes texel coordinates, unlike texture2D which needs normalized coordinates.
2376
2377         Pass an additional textureSize uniform and multiply it by the normalized coordinates.
2378
2379         * platform/graphics/texmap/TextureMapperGL.cpp:
2380         (WebCore::TextureMapperGL::drawTextureRectangleARB):
2381         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
2382         (WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram):
2383         (WebCore::TextureMapperShaderProgramRectSimple::TextureMapperShaderProgramRectSimple):
2384         * platform/graphics/texmap/TextureMapperShaderManager.h:
2385         (WebCore::TextureMapperShaderProgram::textureSizeLocation):
2386         (TextureMapperShaderProgram):
2387
2388 2012-06-28  Simon Fraser  <simon.fraser@apple.com>
2389
2390         Improve compositing logging output
2391         https://bugs.webkit.org/show_bug.cgi?id=90199
2392
2393         Reviewed by Tim Horton (w00t!).
2394
2395         Improve the compositing logging channel output in a few
2396         useful ways:
2397         1. Report memory use, rather than megapixels
2398         2. Show element class names
2399
2400         * platform/graphics/GraphicsLayer.cpp:
2401         (WebCore::GraphicsLayer::backingStoreMemoryEstimate):
2402         * platform/graphics/GraphicsLayer.h:
2403         (GraphicsLayer):
2404         * platform/graphics/ca/GraphicsLayerCA.cpp:
2405         (WebCore::GraphicsLayerCA::backingStoreMemoryEstimate):
2406         * platform/graphics/ca/GraphicsLayerCA.h:
2407         (GraphicsLayerCA):
2408         * rendering/RenderLayerBacking.cpp:
2409         (WebCore::RenderLayerBacking::nameForLayer):
2410         (WebCore::RenderLayerBacking::backingStoreMemoryEstimate):
2411         * rendering/RenderLayerBacking.h:
2412         (RenderLayerBacking):
2413         * rendering/RenderLayerCompositor.cpp:
2414         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
2415         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2416         (WebCore::RenderLayerCompositor::logLayerInfo):
2417         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2418         * rendering/RenderLayerCompositor.h:
2419         (RenderLayerCompositor):
2420
2421 2012-06-28  James Robinson  <jamesr@chromium.org>
2422
2423         [chromium] Fix up more includes in compositor code
2424         https://bugs.webkit.org/show_bug.cgi?id=90200
2425
2426         Reviewed by Adrienne Walker.
2427
2428         Adds includes we are using and removes ones that we aren't using.
2429
2430         * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
2431         * platform/graphics/chromium/ContentLayerChromium.cpp:
2432         * platform/graphics/chromium/ProgramBinding.cpp:
2433         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
2434         * platform/graphics/chromium/cc/CCGraphicsContext.h:
2435         * platform/graphics/chromium/cc/CCRenderSurface.h:
2436         (WebCore):
2437         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
2438
2439 2012-06-28  Andrei Onea  <onea@adobe.com>
2440
2441         [CSSRegions]Rename NamedFlow::contentNodes to NamedFlow::getContent()
2442         https://bugs.webkit.org/show_bug.cgi?id=90163
2443
2444         Reviewed by Andreas Kling.
2445
2446         Latest CSS Regions spec defines the NamedFlow interface as having a function named getContent,
2447         rather than an attribute named contentNodes.
2448         http://www.w3.org/TR/css3-regions/#the-namedflow-interface
2449
2450         Test: fast/regions/webkit-named-flow-get-content.html
2451
2452         * dom/WebKitNamedFlow.cpp:
2453         (WebCore::WebKitNamedFlow::getContent):
2454         * dom/WebKitNamedFlow.h:
2455         (WebKitNamedFlow):
2456         * dom/WebKitNamedFlow.idl:
2457
2458 2012-06-28  Ryosuke Niwa  <rniwa@webkit.org>
2459
2460         REGRESSION(r121232): named properties on document and window may return wrong object
2461         https://bugs.webkit.org/show_bug.cgi?id=90133
2462
2463         Reviewed by Andreas Kling.
2464
2465         Fixed the bug. Also replaced hasAnyItem by isEmpty (hasAnyItem() is equivalent to !isEmpty()).
2466
2467         Test: fast/dom/HTMLDocument/named-item-multiple-match.html
2468
2469         * bindings/js/JSHTMLDocumentCustom.cpp:
2470         (WebCore::JSHTMLDocument::nameGetter):
2471         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2472         (WebCore::V8DOMWindow::namedPropertyGetter):
2473         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2474         (WebCore::V8HTMLDocument::GetNamedProperty):
2475         * html/HTMLCollection.h:
2476         (WebCore::HTMLCollection::isEmpty):
2477         (WebCore::HTMLCollection::hasExactlyOneItem):
2478
2479 2012-06-28  Zeev Lieber  <zlieber@chromium.org>
2480
2481         [Skia] Computing the resampling mode ignores scale applied to the canvas
2482         https://bugs.webkit.org/show_bug.cgi?id=72073
2483
2484         Reviewed by Stephen White.
2485
2486         Re-basing earlier patch by Daniel Sievers; updated tests.
2487
2488         Take into account canvas scale when computing image resampling mode.
2489
2490         When drawing a bitmap and computing the best resampling mode based
2491         on the requested scale, take into account CSS scale and page scale
2492         that are applied to the canvas. This allows for single-pass scaling
2493         in potentially better quality (RESAMPLE_AWESOME) and also takes
2494         better advantage of the scaled image cache in that codepath.
2495
2496         Existing tests updated to expect different resampling method (and
2497         therefore a different image) whenever canvas scaling changes.
2498
2499         * platform/graphics/skia/ImageSkia.cpp:
2500         (WebCore::paintSkBitmap):
2501
2502 2012-06-28  James Robinson  <jamesr@chromium.org>
2503
2504         [chromium] Should schedule a commit when dropping contents textures
2505         https://bugs.webkit.org/show_bug.cgi?id=90031
2506
2507         Reviewed by Adrienne Walker.
2508
2509         If we're dropping contents textures on the impl thread, we need to schedule a commit to pick up new contents at
2510         the next commit opportunity. Also adds some traces to make debugging issues like this easier.
2511
2512         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2513         (WebCore::CCLayerTreeHostImpl::commitComplete):
2514         (WebCore::CCLayerTreeHostImpl::canDraw):
2515         (WebCore::CCLayerTreeHostImpl::releaseContentsTextures):
2516         * platform/graphics/chromium/cc/CCScheduler.cpp:
2517         (WebCore::CCScheduler::processScheduledActions):
2518
2519 2012-06-28  Antti Koivisto  <antti@apple.com>
2520
2521         Don't malloc RenderGeometryMap steps individually
2522         https://bugs.webkit.org/show_bug.cgi?id=90074
2523
2524         Reviewed by Simon Fraser.
2525
2526         Mallocs and frees for steps under RenderGeometryMap::pus/popMappingsToAncestor can total ~2% of the profile when animating transforms.
2527
2528         * rendering/RenderGeometryMap.cpp:
2529         (WebCore):
2530         (WebCore::RenderGeometryMap::absolutePoint):
2531         (WebCore::RenderGeometryMap::absoluteRect):
2532         (WebCore::RenderGeometryMap::mapToAbsolute):
2533         (WebCore::RenderGeometryMap::push):
2534         (WebCore::RenderGeometryMap::pushView):
2535         (WebCore::RenderGeometryMap::popMappingsToAncestor):
2536         * rendering/RenderGeometryMap.h:
2537         (WebCore):
2538         (WebCore::RenderGeometryMapStep::RenderGeometryMapStep):
2539         
2540             Move to header.
2541
2542         (RenderGeometryMapStep):
2543         (RenderGeometryMap):
2544         
2545             Make the step vector hold RenderGeometryMapSteps instead of RenderGeometryMapStep*'s.
2546
2547         (WTF):
2548         
2549             Give RenderGeometryMapSteps SimpleClassVectorTraits. This is needed for dealing with OwnPtr in the struct (and makes it faster too).
2550             The type is simple enought to move by memcpy.
2551
2552 2012-06-28  Kalev Lember  <kalevlember@gmail.com>
2553
2554         [GTK] Remove Windows support from plugins/gtk/
2555         https://bugs.webkit.org/show_bug.cgi?id=89501
2556
2557         Reviewed by Martin Robinson.
2558
2559         The GTK+ port now uses plugins/gtk/ on Windows, which leaves
2560         PluginPackageGtk.cpp and PluginViewGtk.cpp solely for XP_UNIX platforms.
2561
2562         * plugins/gtk/PluginPackageGtk.cpp:
2563         (WebCore::PluginPackage::fetchInfo):
2564         (WebCore::webkitgtkXError):
2565         (WebCore::PluginPackage::load):
2566         * plugins/gtk/PluginViewGtk.cpp:
2567         (WebCore::getRootWindow):
2568         (WebCore::PluginView::updatePluginWidget):
2569         (WebCore::PluginView::paint):
2570         (WebCore::PluginView::handleKeyboardEvent):
2571         (WebCore::setXCrossingEventSpecificFields):
2572         (WebCore::PluginView::handleMouseEvent):
2573         (WebCore::PluginView::handleFocusOutEvent):
2574         (WebCore::PluginView::setNPWindowIfNeeded):
2575         (WebCore::PluginView::platformGetValueStatic):
2576         (WebCore::PluginView::platformGetValue):
2577         (WebCore::getPluginDisplay):
2578         (WebCore::getVisualAndColormap):
2579         (WebCore::PluginView::platformStart):
2580         (WebCore::PluginView::platformDestroy):
2581
2582 2012-06-28  Simon Fraser  <simon.fraser@apple.com>
2583
2584         Change FrameView::scrollContentsFastPath to use m_fixedObjects
2585         https://bugs.webkit.org/show_bug.cgi?id=90045
2586
2587         Reviewed by James Robinson.
2588         
2589         FrameView now has a hash set of fixed-position objects, so use
2590         that instead of RenderBlock::positionedObjects(); we'll avoid traversing
2591         through absolutely positioned objects, and this will work better for sticky
2592         positioning in future.
2593
2594         No behavior change, so no new tests.
2595
2596         * page/FrameView.cpp:
2597         (WebCore::FrameView::scrollContentsFastPath):
2598
2599 2012-06-28  Tony Chang  <tony@chromium.org>
2600
2601         Split flex into flex-grow/flex-shrink/flex-basis
2602         https://bugs.webkit.org/show_bug.cgi?id=86525
2603
2604         Reviewed by Ojan Vafai.
2605
2606         Split flex into 3 separate properties per the spec:
2607         http://dev.w3.org/csswg/css3-flexbox/#flex-components
2608
2609         Tests: css3/flexbox/flex-longhand-parsing.html
2610                css3/flexbox/flex-property-parsing.html: Updated test results.
2611
2612         * css/CSSComputedStyleDeclaration.cpp:
2613         (WebCore): -webkit-flex is no longer enumerable.
2614         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add new css property names and use
2615         getCSSPropertyValuesForShorthandProperties for WebkitFlex. Also sort flex propery names.
2616         * css/CSSParser.cpp:
2617         (WebCore::isValidKeywordPropertyAndValue): Fix indent.
2618         (WebCore::CSSParser::parseValue): Add parsing for new properties and handle -webkit-flex: none.
2619         (WebCore::CSSParser::parseFlex): Switch to new names (positive -> grow, negative -> shrink,
2620         preferred size -> basis) and assign to longhand properties.
2621         * css/CSSParser.h:
2622         * css/CSSProperty.cpp:
2623         (WebCore::CSSProperty::isInheritedProperty): Add new properties.
2624         * css/CSSPropertyNames.in: Add new properties.
2625         * css/StyleBuilder.cpp:
2626         (WebCore::StyleBuilder::StyleBuilder): Delete special handling of applying flex and just use shorthand handlers.
2627         * css/StylePropertySet.cpp:
2628         (WebCore::StylePropertySet::getPropertyValue): Add new shorthand.
2629         (WebCore::StylePropertySet::asText):
2630         * css/StylePropertyShorthand.cpp:
2631         (WebCore::webkitFlexShorthand): Add new shorthand.
2632         (WebCore::shorthandForProperty):
2633         * css/StylePropertyShorthand.h:
2634         * css/StyleResolver.cpp:
2635         (WebCore::StyleResolver::collectMatchingRulesForList): Add to list of properties applied by StyleBuilder.
2636         Handle initial and inherit for flex.
2637
2638 2012-06-28  Kalev Lember  <kalevlember@gmail.com>
2639
2640         [GTK][Win]: Fix plugin drawing to an offscreen buffer
2641         https://bugs.webkit.org/show_bug.cgi?id=89499
2642
2643         Reviewed by Brent Fulgham.
2644
2645         Take into account that the GTK+ port draws to a backing store and adjust
2646         the target rectangle calculation accordingly.
2647
2648         * plugins/win/PluginViewWin.cpp:
2649         (WebCore::PluginView::paint):
2650         (WebCore::PluginView::setNPWindowRect):
2651
2652 2012-06-28  Kentaro Hara  <haraken@chromium.org>
2653
2654         Optimize Dromaeo/dom-attr.html by speeding up Element::getAttribute()
2655         https://bugs.webkit.org/show_bug.cgi?id=90174
2656
2657         Reviewed by Adam Barth.
2658
2659         This patch improves performance of Dromaeo/dom-attr.html by 4.0%.
2660         The patch improves performance of getAttribute() and JavaScript
2661         property setter for DOM objects (e.g. 'div.foo = 123').
2662         The performance improvement becomes larger, as the number of
2663         attributes defined on the DOM object increases.
2664
2665         Without the patch in Chromium/Linux (runs/s)
2666         7679.4, 7739.7, 7634.0, 7726.4, 7663.9
2667
2668         With the patch in Chromium/Linux (runs/s)
2669         7977.7, 8032.2, 8112.8, 7948.1, 7924.5
2670
2671         This patch just changes a type of 'name' of Element::getAttribute(String& name)
2672         from String& to AtomicString&.
2673
2674         The key observation is that AtomicString(String& x) is faster than
2675         operator==(String& x, AtomicString& y). AtomicString(String& x) calculates
2676         a hash of a given String and adds it to a hash table. The calculation
2677         complexity is O(the length of x). On the other hand,
2678         operator==(String& x, AtomicString& y) compares a String and an AtomicString by
2679         StringImpl::equal(StringImpl*, StringImpl*), the calculation complexity of
2680         which is O(2 * min(the length of x, the length of y)).
2681         In addition, the comparison logic is more complicated than the logic
2682         of calculating the hash. Consequently, AtomicString(String& x) is
2683         faster than operator==(String& x, AtomicString& y).
2684
2685         Keeping that in mind, let's estimate the performance of
2686         Element::getAttribute("class") for <div id="A" lang="B" title="C" class="D" dir="E">.
2687         Here "id", "lang", "title", "class" and "dir" are stored as AtomicStrings
2688         in QualifiedName::localName(). Initially, "class" in Element::getAttribute("class")
2689         is a String.
2690
2691         If we use Element::getAttribute(String& name) (i.e. without the patch),
2692         ElementAttributeData::getAttributeItemIndex() executes four
2693         operator==(String&, AtomicString&) by the time it finds the "class" attribute:
2694
2695         (1) if ("class" == "id")       // operator==(String&, AtomicString&)
2696         (2) if ("class" == "lang")     // operator==(String&, AtomicString&)
2697         (3) if ("class" == "title")    // operator==(String&, AtomicString&)
2698         (4) if ("class" == "class")    // operator==(String&, AtomicString&)
2699
2700         On the other hand, if we use Element::getAttribute(AtomicString& name)
2701         (i.e. with the patch), ElementAttributeData::getAttributeItemIndex()
2702         executes one AtomicString(String&) and four operator==(AtomicString&, AtomicString&)
2703         by the time it finds the "class" attribute:
2704
2705         (1) AtomicString("class")      // AtomicString(String&)
2706         (2) if ("class" == "id")       // operator==(AtomicString&, AtomicString&)
2707         (3) if ("class" == "lang")     // operator==(AtomicString&, AtomicString&)
2708         (4) if ("class" == "title")    // operator==(AtomicString&, AtomicString&)
2709         (5) if ("class" == "class")    // operator==(AtomicString&, AtomicString&)
2710
2711         Considering that the overhead of operator==(AtomicString&, AtomicString&) is close
2712         to 0 since it is just a pointer comparison, the latter approach is faster than
2713         the former approach.
2714
2715         Performance improvement will be large for elements that have multiple attributes,
2716         but it is faster even for elements that have only one attribute.
2717         For exmaple, Dromaeo/dom-attr.html tests getAttribute() for an element that has
2718         only one attribute, the result shows 4.0% improvement.
2719
2720         Another example optimized by this patch is 'div.foo = 123', where foo is not
2721         an attribute of div. In this case, before 123 is set, JavaScript calls back
2722         Element::getAttribute() to check whether 'foo' is defined on div by
2723         scanning all the attributes of div.
2724
2725         No tests. No change in behavior.
2726
2727         * dom/Element.cpp:
2728         (WebCore::Element::getAttribute):
2729         * dom/Element.h:
2730         (Element):
2731         (WebCore::Element::getAttributeItemIndex):
2732         * dom/ElementAttributeData.cpp:
2733         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
2734         * dom/ElementAttributeData.h:
2735         (ElementAttributeData):
2736         (WebCore::ElementAttributeData::getAttributeItem):
2737         (WebCore::ElementAttributeData::getAttributeItemIndex):
2738
2739 2012-06-28  Hans Wennborg  <hans@chromium.org>
2740
2741         Speech JavaScript API: Don't dispatch end event after ActiveDOMObject::stop()
2742         https://bugs.webkit.org/show_bug.cgi?id=90176
2743
2744         Reviewed by Adam Barth.
2745
2746         It is probably not safe to dispatch an event on an object that has
2747         been ActiveDOMObject::stop()'ed.
2748
2749         This used to happen in the navigate-away.html test, which I believe
2750         then caused speechgrammar-basics.html (which was typically run
2751         afterwards, by the same worker), to crash flakily. See Bug 89717.
2752
2753         Test: speechgrammar-basics.html should no longer be flaky.
2754
2755         * Modules/speech/SpeechRecognition.cpp:
2756         (WebCore::SpeechRecognition::didEnd):
2757         (WebCore::SpeechRecognition::stop):
2758         (WebCore::SpeechRecognition::SpeechRecognition):
2759         * Modules/speech/SpeechRecognition.h:
2760
2761 2012-06-28  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
2762
2763         [GTK] [WK2] Memory leak in ResourceHandleSoup.cpp
2764         https://bugs.webkit.org/show_bug.cgi?id=90168
2765
2766         Reviewed by Martin Robinson.
2767
2768         Fixed a memory leak in WebCoreSynchronousLoader by using adoptGRef
2769         instead of just getting new reference of GMainLoop.
2770
2771         No new tests. No change in behavior.
2772
2773         * platform/network/soup/ResourceHandleSoup.cpp:
2774         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
2775
2776 2012-06-27  Dana Jansens  <danakj@chromium.org>
2777
2778         [chromium] Do not multiply bounds by contentsScale in TiledLayerChromium and CanvasLayerTextureUpdater
2779         https://bugs.webkit.org/show_bug.cgi?id=90103
2780
2781         Reviewed by Adrienne Walker.
2782
2783         Non-integer scale factors can scale the bounds of a layer such that
2784         different rounding is applied to the width and height in the content
2785         bounds. We should never multiply bounds by contentsScale in order to
2786         work correctly with non-integer scale factors. Instead, always use the
2787         contentBounds/bounds ratio for width and height independently.
2788
2789         Tests: TiledLayerChromiumTest.nonIntegerContentsScaleIsNotDistortedDuringPaint
2790                TiledLayerChromiumTest.nonIntegerContentsScaleIsNotDistortedDuringInvalidation
2791
2792         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
2793         (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate):
2794         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
2795         (BitmapCanvasLayerTextureUpdater):
2796         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
2797         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
2798         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
2799         (BitmapSkPictureCanvasLayerTextureUpdater):
2800         * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
2801         (WebCore::CanvasLayerTextureUpdater::paintContents):
2802         * platform/graphics/chromium/CanvasLayerTextureUpdater.h:
2803         (CanvasLayerTextureUpdater):
2804         * platform/graphics/chromium/LayerTextureUpdater.h:
2805         (WebCore::LayerTextureUpdater::prepareToUpdate):
2806         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
2807         (WebCore::ScrollbarLayerChromium::updatePart):
2808         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
2809         (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate):
2810         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
2811         (SkPictureCanvasLayerTextureUpdater):
2812         * platform/graphics/chromium/TiledLayerChromium.cpp:
2813         (WebCore::TiledLayerChromium::setNeedsDisplayRect):
2814         (WebCore::TiledLayerChromium::updateTiles):
2815
2816 2012-06-28  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
2817
2818         [Qt] Make GC's fill{Rounded}Rect use optimized shadow blur code
2819         https://bugs.webkit.org/show_bug.cgi?id=90082
2820
2821         Reviewed by Noam Rosenthal.
2822
2823         ShadowBlur::drawRectShadow makes use of optimized tiles-based drawPattern, which
2824         is not present when using {begin/end}shadowLayer.
2825
2826         * platform/graphics/qt/GraphicsContextQt.cpp:
2827         (WebCore::GraphicsContext::fillRect):
2828         (WebCore::GraphicsContext::fillRoundedRect):
2829         (WebCore::GraphicsContext::pushTransparencyLayerInternal):
2830
2831 2012-06-28  Rahul Tiwari  <rahultiwari.cse.iitr@gmail.com>
2832
2833         Web Inspector: Provide context menu 'Delete all watch expressions.'
2834         https://bugs.webkit.org/show_bug.cgi?id=89735
2835
2836         Reviewed by Yury Semikhatsky.
2837
2838         Added context menu delete and delete all watch expressions.
2839
2840         No new tests required as its a minor UI related change.
2841
2842         * English.lproj/localizedStrings.js:
2843         * inspector/front-end/WatchExpressionsSidebarPane.js:
2844         (WebInspector.WatchExpressionsSection.prototype.updateExpression):
2845         (WebInspector.WatchExpressionsSection.prototype._deleteAllExpressions):
2846         (WebInspector.WatchExpressionsSection.prototype.findAddedTreeElement):
2847         (WebInspector.WatchExpressionTreeElement.prototype.update):
2848         (WebInspector.WatchExpressionTreeElement.prototype._contextMenu):
2849         (WebInspector.WatchExpressionTreeElement.prototype._deleteAllButtonClicked):
2850
2851 2012-06-28  Christophe Dumez  <christophe.dumez@intel.com>
2852
2853         m_cssVariablesEnabled member is not initialized in Page Settings
2854         https://bugs.webkit.org/show_bug.cgi?id=90147
2855
2856         Reviewed by Simon Hausmann.
2857
2858         Properly initialize the m_cssVariablesEnabled member in Page
2859         Settings.
2860
2861         No new tests, no behavior change.
2862
2863         * page/Settings.cpp:
2864         (WebCore::Settings::Settings):
2865
2866 2012-06-28  Balazs Kelemen  <kbalazs@webkit.org>
2867
2868         [Qt] plugin is loaded to the web process via MainResourceLoader::substituteMIMETypeFromPluginDatabase
2869         https://bugs.webkit.org/show_bug.cgi?id=86489
2870
2871         Reviewed by Simon Hausmann.
2872
2873         Removed the substituteMIMETypeFromPluginDatabase quirk from
2874         MainResourceLoader. It would be possible to fix it in a way
2875         that is compatible with WebKit2, but given that it was a Qt
2876         only fix, and that it's not clear that we still need it, and
2877         it's not even work currently, I decided to remove it. At least
2878         it is -1 platform ifdef in common code.
2879
2880         Just removed a non-tested quirk, no test needed.
2881
2882         * loader/MainResourceLoader.cpp:
2883         (WebCore::MainResourceLoader::didReceiveResponse):
2884
2885 2012-06-28  Kentaro Hara  <haraken@chromium.org>
2886
2887         [V8] Optimize Integer::New() by caching persistent handles for small integers
2888         https://bugs.webkit.org/show_bug.cgi?id=90043
2889
2890         Reviewed by Adam Barth.
2891
2892         The patch improves performance of Dromaeo/dom-query.html by 3.6%,
2893         and Bindings/scroll-top.html by 17.3%.
2894
2895         The performance results in my Chromium/Linux:
2896
2897         [Dromaeo/dom-query.html]
2898         796310.4 runs/s => 824745.4 runs/s (+3.6%)
2899
2900         [Bindings/scroll-top.html]
2901         204.68 runs/s => 240.15 runs/s (+17.3%)
2902
2903         This patch introduces V8BindingPerIsolateData::IntegerCache (just like
2904         V8BindingPerIsolateData::StringCache) to cache persistent handles
2905         for small integers.
2906
2907         No new tests. No change in behavior.
2908
2909         * bindings/v8/V8Binding.h: Implemented v8Integer() and v8UnsignedInteger(),
2910         which returns cached persistent handles for integers smaller than 64.
2911         (WebCore):
2912         (IntegerCache):
2913         (WebCore::IntegerCache::IntegerCache):
2914         (WebCore::IntegerCache::v8Integer):
2915         (WebCore::IntegerCache::v8UnsignedInteger):
2916         (WebCore::V8BindingPerIsolateData::integerCache):
2917         (V8BindingPerIsolateData):
2918         (WebCore::v8Integer):
2919         (WebCore::v8UnsignedInteger):
2920         * bindings/v8/V8Binding.cpp:
2921         (WebCore):
2922         (WebCore::IntegerCache::createSmallIntegers):
2923         * bindings/v8/WorkerScriptController.cpp:
2924         (~WorkerScriptController): ~V8BindingPerIsolateData() should be called before
2925         isolate->Exit(), since ~V8BindingPerIsolateData() calls V8 APIs that requires
2926         the current isolate.
2927
2928         * bindings/scripts/CodeGeneratorV8.pm: Replaced Integer::New() and Integer::NewFromUnsigned()
2929         with v8Integer() and v8UnsignedInteger().
2930         (GenerateNormalAttrGetter):
2931         (NativeToJSValue):
2932
2933         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: Updated run-bindings-tests results.
2934         (WebCore::TestActiveDOMObjectV8Internal::excitingAttrAttrGetter):
2935         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
2936         (WebCore::TestObjV8Internal::readOnlyIntAttrAttrGetter):
2937         (WebCore::TestObjV8Internal::shortAttrAttrGetter):
2938         (WebCore::TestObjV8Internal::unsignedShortAttrAttrGetter):
2939         (WebCore::TestObjV8Internal::intAttrAttrGetter):
2940         (WebCore::TestObjV8Internal::reflectedIntegralAttrAttrGetter):
2941         (WebCore::TestObjV8Internal::reflectedUnsignedIntegralAttrAttrGetter):
2942         (WebCore::TestObjV8Internal::reflectedCustomIntegralAttrAttrGetter):
2943         (WebCore::TestObjV8Internal::attrWithGetterExceptionAttrGetter):
2944         (WebCore::TestObjV8Internal::attrWithSetterExceptionAttrGetter):
2945         (WebCore::TestObjV8Internal::withScriptStateAttributeAttrGetter):
2946         (WebCore::TestObjV8Internal::conditionalAttr1AttrGetter):
2947         (WebCore::TestObjV8Internal::conditionalAttr2AttrGetter):
2948         (WebCore::TestObjV8Internal::conditionalAttr3AttrGetter):
2949         (WebCore::TestObjV8Internal::enabledAtRuntimeAttr1AttrGetter):
2950         (WebCore::TestObjV8Internal::enabledAtRuntimeAttr2AttrGetter):
2951         (WebCore::TestObjV8Internal::enabledAtContextAttr1AttrGetter):
2952         (WebCore::TestObjV8Internal::enabledAtContextAttr2AttrGetter):
2953         (WebCore::TestObjV8Internal::strawberryAttrGetter):
2954         (WebCore::TestObjV8Internal::descriptionAttrGetter):
2955         (WebCore::TestObjV8Internal::idAttrGetter):
2956         (WebCore::TestObjV8Internal::intMethodCallback):
2957         (WebCore::TestObjV8Internal::intMethodWithArgsCallback):
2958         (WebCore::TestObjV8Internal::classMethodWithOptionalCallback):
2959         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: Ditto.
2960         (WebCore::TestSerializedScriptValueInterfaceV8Internal::portsAttrGetter):
2961
2962 2012-06-28  Kent Tamura  <tkent@chromium.org>
2963
2964         Classify form control states by their owner forms
2965         https://bugs.webkit.org/show_bug.cgi?id=89950
2966
2967         Reviewed by Hajime Morita.
2968
2969         To improve robustness of the form state restore feature, we classify
2970         form control states by their owner forms. Owner forms are identified by
2971         their action URLs and index numbers in forms with the same action URLs.
2972
2973         Implementation approach:
2974         Extend FormElementKey class to have "formKey" string, which is a
2975         combination of the action URL and an index number, or a fixed string for
2976         no form owner.
2977         FormKeyGenerator class is responsible to generate the "formKey" strings
2978
2979         Test: fast/forms/state-restore-per-form.html
2980
2981         * html/FormController.cpp:
2982         (FormKeyGenerator):
2983         (WebCore::FormKeyGenerator::create): A factory function.
2984         (WebCore::FormKeyGenerator::FormKeyGenerator): A private constructor.
2985         (WebCore::createKey):
2986         A helper for formKey(). This makes strings like "<action URL> #<index>".
2987         (WebCore::FormKeyGenerator::formKey):
2988         Returns a formKey for the specified HTMLFormElement*.
2989         (WebCore::FormKeyGenerator::willDeleteForm):
2990         Unregister HTMLFormElement*. This function is necessary because form
2991         restore feature works during parsing and a script might delete form
2992         elements.
2993         (WebCore::formStateSignature): Bump the version.
2994         (WebCore::FormController::formElementsState):
2995         Records a formKey string for each of control state.
2996         (WebCore::FormController::setStateForNewFormElements):
2997         Loads formKeys from stateVector, and uses them for FormElementKey.
2998         (WebCore::FormController::takeStateForFormElement):
2999         - Construct and destruct FormKeyGenerator if needed.
3000         - Passing a formKey for the specified form control to FormElementKey.
3001         (WebCore::FormController::willDeleteForm):
3002         Delegate to FormKeyGenerator::willDeleteForm.
3003
3004         (WebCore::FormElementKey::FormElementKey): Add formKey argument and member.
3005         (WebCore::FormElementKey::operator=): ditto.
3006         (WebCore::FormElementKey::ref): ditto.
3007         (WebCore::FormElementKey::deref): ditto.
3008         * html/FormController.h:
3009         (FormElementKey): Add formKey argument and member.
3010         (FormController): Add a FormKeyGenerator member which is used during restoring.
3011
3012         * html/HTMLFormElement.cpp:
3013         (WebCore::HTMLFormElement::~HTMLFormElement): Notify the death to FormController.
3014
3015 2012-06-28  Sheriff Bot  <webkit.review.bot@gmail.com>
3016
3017         Unreviewed, rolling out r121395.
3018         http://trac.webkit.org/changeset/121395
3019         https://bugs.webkit.org/show_bug.cgi?id=90143
3020
3021         Patch causes crashes in fast/workers/worker-context-gc.html
3022         (Requested by zdobersek on #webkit).
3023
3024         * Modules/indexeddb/IDBFactory.cpp:
3025         (WebCore::IDBFactory::open):
3026         * workers/DedicatedWorkerThread.cpp:
3027         (WebCore::DedicatedWorkerThread::create):
3028         (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
3029         * workers/DedicatedWorkerThread.h:
3030         (DedicatedWorkerThread):
3031         * workers/DefaultSharedWorkerRepository.cpp:
3032         (SharedWorkerProxy):
3033         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
3034         * workers/SharedWorkerThread.cpp:
3035         (WebCore::SharedWorkerThread::create):
3036         (WebCore::SharedWorkerThread::SharedWorkerThread):
3037         * workers/SharedWorkerThread.h:
3038         (SharedWorkerThread):
3039         * workers/WorkerMessagingProxy.cpp:
3040         (WebCore::WorkerMessagingProxy::startWorkerContext):
3041         * workers/WorkerThread.cpp:
3042         (WebCore::WorkerThreadStartupData::create):
3043         (WorkerThreadStartupData):
3044         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
3045         (WebCore::WorkerThread::WorkerThread):
3046         * workers/WorkerThread.h:
3047         (WorkerThread):
3048
3049 2012-06-28  Yoshifumi Inoue  <yosin@chromium.org>
3050
3051         [Platform] Implement functions for localized time format information
3052         https://bugs.webkit.org/show_bug.cgi?id=89965
3053
3054         Reviewed by Kent Tamura.
3055
3056         This patch introduces three functions for time format:
3057           1. localizedTimeFormatText()
3058           2. localizedShortTimeFormatText()
3059           2. timeAMPMLabels()
3060         for input type "time" if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS) is true.
3061
3062         Having both localizedTimeFormat and localizedShortTimeFormat is for
3063         displaying only two fields hour and minute when step >= 60. There is
3064         no way to remove second field from "h:m:s" pattern string. We don't
3065         know whether ":" after "m" belongs minute or second field.
3066
3067         Test: WebKit/chromium/tests/LocalizedDateICUTest.cpp
3068
3069         * platform/text/LocaleICU.cpp:
3070         (WebCore::LocaleICU::LocaleICU):
3071         (WebCore::createFallbackAMPMLabels): Added.
3072         (WebCore::LocaleICU::initializeDateTimeFormat):  Added.
3073         (WebCore::LocaleICU::localizedTimeFormatText):  Added.
3074         (WebCore::LocaleICU::localizedShortTimeFormatText):  Added.
3075         (WebCore::LocaleICU::timeAMPMLabels):  Added.
3076         * platform/text/LocaleICU.h:
3077         (LocaleICU):
3078         * platform/text/LocalizedDate.h:
3079         * platform/text/LocalizedDateICU.cpp:
3080         (WebCore::localizedTimeFormatText):  Added.
3081         (WebCore::localizedShortTimeFormatText):  Added.
3082         (WebCore::timeAMPMLabels):  Added.
3083
3084 2012-06-27  Kentaro Hara  <haraken@chromium.org>
3085
3086         Performance: Optimize Dromaeo/dom-query.html by caching NodeRareData on Document
3087         https://bugs.webkit.org/show_bug.cgi?id=90059
3088
3089         Reviewed by Ryosuke Niwa.
3090
3091         This patch improves performance of document.getElementsBy*().
3092         e.g. the patch makes Dromaeo/dom-query.html 5.4% faster.
3093
3094         Dromaeo/dom-query.html without the patch (Chromium/Linux):
3095         784714 runs/s, 765947 runs/s, 803109 runs/s, 804450 runs/s
3096
3097         Dromaeo/dom-query.html with the patch (Chromium/Linux):
3098         839245 runs/s, 829867 runs/s, 811032 runs/s, 847486 runs/s
3099
3100         Based on the assumption that document.getElementsByClassName(),
3101         document.getElementsByTagName() and document.getElementsByName()
3102         would be used frequently in the real world, this patch implements
3103         a fast path for Document methods that require to access NodeRareData.
3104         Specifically, this patch caches a pointer to NodeRareData on Document,
3105         by which Document can access NodeRareData without looking up a HashMap.
3106
3107         The only performance concern is the overhead of the isDocumentNode() check
3108         that this patch added to Node::ensureRareData. However, I could not
3109         observe any performance regression caused by the overhead.
3110
3111         No tests. No change in behavior.
3112
3113         * dom/Document.cpp:
3114         (WebCore::Document::Document):
3115         (WebCore::Document::setCachedRareData): I didn't inline this method,
3116         since the inlining slightly regressed performance for some reason.
3117         (WebCore):
3118         * dom/Document.h:
3119         (WebCore):
3120         (WebCore::Document::cachedRareData):
3121         (Document):
3122         (~Document): Moved 'm_document = 0' to the tail of the destructor,
3123         since isDocumentNode() has to return true in clearRareData() that is called
3124         in ~Document().
3125         * dom/Node.cpp:
3126         (WebCore::Node::ensureRareData):
3127         (~Node): Moved the assertion into clearRareData().
3128
3129 2012-06-27  Mary Wu  <mary.wu@torchmobile.com.cn>
3130
3131         [BlackBerry] 0-length response with no content-type shouldn't download
3132         https://bugs.webkit.org/show_bug.cgi?id=89860
3133
3134         Reviewed by Rob Buis.
3135
3136         RIM PR# 168419
3137
3138         For 0-length response, if we can't get its mimetype from the filename,
3139         we set the mimetype to "text/plain" instead of "application/octet-stream",
3140         so it won't go to download.
3141
3142         Reviewed internally by Charles Wei.
3143
3144         * platform/network/blackberry/NetworkJob.cpp:
3145         (WebCore::NetworkJob::sendResponseIfNeeded):
3146
3147 2012-06-27  Yoshifumi Inoue  <yosin@chromium.org>
3148
3149         [Platform] Implement localizedDecimalSeparator function
3150         https://bugs.webkit.org/show_bug.cgi?id=90036
3151
3152         Reviewed by Kent Tamura.
3153
3154         This patch introduces new function localizedDecimalSeparator() when
3155         ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS). It will be used for
3156         displaying millisecond for time fields UI.
3157
3158         Test: WebKit/chromium/tests/LocalizedNumberICUTest.cpp
3159
3160         * platform/text/LocaleICU.cpp:
3161         (WebCore::LocaleICU::localizedDecimalSeparator): Added
3162         * platform/text/LocaleICU.h:
3163         (LocaleICU): Added localizedDecimalSeparator.
3164         * platform/text/LocalizedNumber.h:
3165         * platform/text/LocalizedNumberICU.cpp:
3166         (WebCore::localizedDecimalSeparator): Added.
3167         * platform/text/LocalizedNumberNone.cpp:
3168         (WebCore::localizedDecimalSeparator): Added.
3169         * platform/text/mac/LocalizedNumberMac.mm:
3170         (WebCore::localizedDecimalSeparator): Added.
3171
3172 2012-06-27  Lu Guanqun  <guanqun.lu@intel.com>
3173
3174         Add OVERRIDE to functions in UnthrottledTextureUploader class
3175         https://bugs.webkit.org/show_bug.cgi?id=90130
3176
3177         Reviewed by James Robinson.
3178
3179         No new tests required.
3180
3181         * platform/graphics/chromium/LayerRendererChromium.cpp:
3182
3183 2012-06-27  Pablo Flouret  <pablof@motorola.com>
3184
3185         pattern="" should only accept the empty string
3186         https://bugs.webkit.org/show_bug.cgi?id=89569
3187
3188         Reviewed by Kent Tamura.
3189
3190         An empty pattern attribute was being treated essentially as if the
3191         pattern wasn't present.
3192
3193         No new tests. Covered by existing tests (plus a modified one).
3194
3195         * html/BaseTextInputType.cpp:
3196         (WebCore::BaseTextInputType::patternMismatch):
3197             Check if the pattern attribute is present. If it is then use the
3198             pattern as is (in the particular case of this bug, an empty pattern
3199             will only match an empty value).
3200
3201 2012-06-27  James Robinson  <jamesr@chromium.org>
3202
3203         [chromium] Use SkColor in compositor internals
3204         https://bugs.webkit.org/show_bug.cgi?id=90108
3205
3206         Reviewed by Adrienne Walker.
3207
3208         As the title says, cutting dependencies. If we support color spaces in the compositor we will probably need to
3209         use a more sophisticated type, but for our current use SkColor is sufficient and matches our API better.
3210
3211         * platform/graphics/chromium/LayerChromium.cpp:
3212         (WebCore::LayerChromium::LayerChromium):
3213         (WebCore::LayerChromium::setBackgroundColor):
3214         (WebCore::LayerChromium::setDebugBorderColor):
3215         * platform/graphics/chromium/LayerChromium.h:
3216         (LayerChromium):
3217         (WebCore::LayerChromium::backgroundColor):
3218         * platform/graphics/chromium/LayerRendererChromium.cpp:
3219         (WebCore::LayerRendererChromium::drawDebugBorderQuad):
3220         (WebCore::LayerRendererChromium::drawSolidColorQuad):
3221         * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp:
3222         (WebCore::CCDebugBorderDrawQuad::create):
3223         (WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad):
3224         * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h:
3225         (CCDebugBorderDrawQuad):
3226         (WebCore::CCDebugBorderDrawQuad::color):
3227         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3228         (WebCore::CCLayerImpl::CCLayerImpl):
3229         (WebCore::CCLayerImpl::setBackgroundColor):
3230         (WebCore::CCLayerImpl::setDebugBorderColor):
3231         (WebCore::CCLayerImpl::hasDebugBorders):
3232         * platform/graphics/chromium/cc/CCLayerImpl.h:
3233         (CCLayerImpl):
3234         (WebCore::CCLayerImpl::backgroundColor):
3235         (WebCore::CCLayerImpl::debugBorderColor):
3236         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3237         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
3238         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3239         (WebCore::CCLayerTreeHost::setBackgroundColor):
3240         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3241         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3242         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3243         (WebCore::CCLayerTreeHostImpl::backgroundColor):
3244         (WebCore::CCLayerTreeHostImpl::setBackgroundColor):
3245         (CCLayerTreeHostImpl):
3246         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
3247         (WebCore::appendQuadInternal):
3248         * platform/graphics/chromium/cc/CCRenderPass.cpp:
3249         (WebCore::CCRenderPass::appendQuadsToFillScreen):
3250         * platform/graphics/chromium/cc/CCRenderPass.h:
3251         (WebCore):
3252         (CCRenderPass):
3253         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
3254         (WebCore::CCRenderSurface::appendQuads):
3255         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp:
3256         (WebCore::CCSolidColorDrawQuad::create):
3257         (WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
3258         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.h:
3259         (CCSolidColorDrawQuad):
3260         (WebCore::CCSolidColorDrawQuad::color):
3261         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3262         (WebCore::CCTiledLayerImpl::appendQuads):
3263
3264 2012-06-27  Charles Wei  <charles.wei@torchmobile.com.cn>
3265
3266         IndexedDB: should make the LevelDB persistant to the directory indicated in PageGroupSettings::indexedDBDataBasePath
3267         https://bugs.webkit.org/show_bug.cgi?id=88338
3268
3269         Reviewed by David Levin.
3270
3271         If the indexedDB runs in main thread it can access the GroupSettings via the document;
3272         otherwise, we need to pass the page GroupSettings to the worker thread so that accessible
3273         to the indexedDB running in WorkerContext.
3274
3275         * Modules/indexeddb/IDBFactory.cpp:
3276         (WebCore::IDBFactory::open):
3277         * workers/DedicatedWorkerThread.cpp:
3278         (WebCore::DedicatedWorkerThread::create):
3279         (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
3280         * workers/DedicatedWorkerThread.h:
3281         (DedicatedWorkerThread):
3282         * workers/DefaultSharedWorkerRepository.cpp:
3283         (SharedWorkerProxy):
3284         (WebCore::SharedWorkerProxy::groupSettings):
3285         (WebCore):
3286         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
3287         * workers/SharedWorkerThread.cpp:
3288         (WebCore::SharedWorkerThread::create):
3289         (WebCore::SharedWorkerThread::SharedWorkerThread):
3290         * workers/SharedWorkerThread.h:
3291         (SharedWorkerThread):
3292         * workers/WorkerMessagingProxy.cpp:
3293         (WebCore::WorkerMessagingProxy::startWorkerContext):
3294         * workers/WorkerThread.cpp:
3295         (WebCore::WorkerThreadStartupData::create):
3296         (WorkerThreadStartupData):
3297         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
3298         (WebCore::WorkerThread::WorkerThread):
3299         (WebCore::WorkerThread::groupSettings):
3300         (WebCore):
3301         * workers/WorkerThread.h:
3302         (WorkerThread):
3303
3304 2012-06-27  Sheriff Bot  <webkit.review.bot@gmail.com>
3305
3306         Unreviewed, rolling out r121359.
3307         http://trac.webkit.org/changeset/121359
3308         https://bugs.webkit.org/show_bug.cgi?id=90115
3309
3310         Broke many inspector tests (Requested by jpfau on #webkit).
3311
3312         * bindings/js/ScriptCallStackFactory.cpp:
3313         (WebCore::createScriptCallStack):
3314
3315 2012-06-27  Alexis Menard  <alexis.menard@openbossa.org>
3316
3317         Implement selectedOptions attribute of HTMLSelectElement.
3318         https://bugs.webkit.org/show_bug.cgi?id=80631
3319
3320         Reviewed by Ryosuke Niwa.
3321
3322         Add a new collection as a member of HTMLSelectElement which is
3323         used to store the selected elements. Extend HTMLCollection to
3324         support the new collection type needed by this feature. Make sure
3325         that we invalidate the collection when the select state of an
3326         option changes as the select state change does not trigger a dom
3327         tree version change.
3328
3329         Reference : http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#dom-select-selectedoptions
3330
3331         Test: fast/dom/HTMLSelectElement/select-selectedOptions.html
3332
3333         * html/CollectionType.h:
3334         * html/HTMLCollection.cpp:
3335         (WebCore::shouldIncludeChildren):
3336         (WebCore::HTMLCollection::clearCache):
3337         (WebCore):
3338         (WebCore::HTMLCollection::isAcceptableElement):
3339         * html/HTMLCollection.h:
3340         (HTMLCollection):
3341         * html/HTMLOptionElement.cpp:
3342         (WebCore::HTMLOptionElement::setSelectedState):
3343         * html/HTMLSelectElement.cpp:
3344         (WebCore::HTMLSelectElement::selectedOptions):
3345         (WebCore):
3346         (WebCore::HTMLSelectElement::invalidateSelectedItems):
3347         (WebCore::HTMLSelectElement::setRecalcListItems):
3348         * html/HTMLSelectElement.h:
3349         (WebCore):
3350         (HTMLSelectElement):
3351         * html/HTMLSelectElement.idl:
3352
3353 2012-06-27  Daniel Cheng  <dcheng@chromium.org>
3354
3355         Fix crash in Frame::nodeImage.
3356         https://bugs.webkit.org/show_bug.cgi?id=89911
3357
3358         Reviewed by Abhishek Arya.
3359
3360         We were caching a pointer to a RenderObject and then calling updateLayout(). Instead, we
3361         need to get a pointer to the RenderObject again after updateLayout().
3362
3363         Test: fast/events/drag-display-none-element.html
3364
3365         * page/Frame.cpp:
3366         (WebCore::Frame::nodeImage):
3367         * page/mac/FrameMac.mm:
3368         (WebCore::Frame::snapshotDragImage):
3369         (WebCore::Frame::nodeImage):
3370
3371 2012-06-27  Tony Chang  <tony@chromium.org>
3372
3373         Unreviewed, rolling out r121380.
3374         http://trac.webkit.org/changeset/121380
3375         https://bugs.webkit.org/show_bug.cgi?id=86525
3376
3377         Hits an ASSERT in debug.
3378
3379         * css/CSSComputedStyleDeclaration.cpp:
3380         (WebCore):
3381         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3382         * css/CSSParser.cpp:
3383         (WebCore::isValidKeywordPropertyAndValue):
3384         (WebCore::CSSParser::parseValue):
3385         (WebCore::CSSParser::parseFlex):
3386         * css/CSSParser.h:
3387         * css/CSSProperty.cpp:
3388         (WebCore::CSSProperty::isInheritedProperty):
3389         * css/CSSPropertyNames.in:
3390         * css/StyleBuilder.cpp:
3391         (ApplyPropertyFlex):
3392         (WebCore::ApplyPropertyFlex::applyInheritValue):
3393         (WebCore::ApplyPropertyFlex::applyInitialValue):
3394         (WebCore::ApplyPropertyFlex::applyValue):
3395         (WebCore::ApplyPropertyFlex::createHandler):
3396         (WebCore::ApplyPropertyFlex::getFlexValue):
3397         (WebCore):
3398         (WebCore::StyleBuilder::StyleBuilder):
3399         * css/StylePropertySet.cpp:
3400         (WebCore::StylePropertySet::getPropertyValue):
3401         (WebCore::StylePropertySet::asText):
3402         * css/StylePropertyShorthand.cpp:
3403         (WebCore::webkitFlexFlowShorthand):
3404         (WebCore::shorthandForProperty):
3405         * css/StylePropertyShorthand.h:
3406         (WebCore):
3407         * css/StyleResolver.cpp:
3408         (WebCore::StyleResolver::collectMatchingRulesForList):
3409
3410 2012-06-27  Rakesh KN  <rakesh.kn@motorola.com>
3411
3412         HTMLFieldSetElement::m_documentVersion is not initialized
3413         https://bugs.webkit.org/show_bug.cgi?id=90038
3414
3415         Reviewed by Kent Tamura.
3416
3417         Initialised m_documentVersion member as HTMLFieldSetElement::elements can return an wrong collection.
3418
3419         Covered by existing tests.
3420
3421         * html/HTMLFieldSetElement.cpp:
3422         (WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
3423         Initialised m_documentVersion.
3424
3425 2012-06-25  Mark Hahnenberg  <mhahnenberg@apple.com>
3426
3427         JSLock should be per-JSGlobalData
3428         https://bugs.webkit.org/show_bug.cgi?id=89123
3429
3430         Reviewed by Geoffrey Garen.
3431
3432         No new tests. Current regression tests are sufficient.
3433
3434         Changed all sites that used JSLock to instead use the new JSLockHolder
3435         and pass in the correct JS context that the code is about to interact with that 
3436         needs protection. Also added a couple JSLocks to places that didn't already 
3437         have it that needed it.
3438
3439         * bindings/js/GCController.cpp:
3440         (WebCore::collect):
3441         (WebCore::GCController::garbageCollectSoon):
3442         (WebCore::GCController::garbageCollectNow):
3443         (WebCore::GCController::discardAllCompiledCode):
3444         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
3445         (WebCore::JSSQLStatementErrorCallback::handleEvent):
3446         * bindings/js/JSCustomVoidCallback.cpp:
3447         (WebCore::JSCustomVoidCallback::handleEvent):
3448         * bindings/js/JSCustomXPathNSResolver.cpp:
3449         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
3450         * bindings/js/JSErrorHandler.cpp:
3451         (WebCore::JSErrorHandler::handleEvent):
3452         * bindings/js/JSEventCustom.cpp:
3453         (WebCore::toJS):
3454         * bindings/js/JSEventListener.cpp:
3455         (WebCore::JSEventListener::handleEvent):
3456         * bindings/js/JSInjectedScriptHostCustom.cpp:
3457         (WebCore::InjectedScriptHost::nodeAsScriptValue):
3458         (WebCore::JSInjectedScriptHost::inspectedObject):
3459         * bindings/js/JSInjectedScriptManager.cpp:
3460         (WebCore::InjectedScriptManager::createInjectedScript):
3461         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
3462         * bindings/js/JSLazyEventListener.cpp:
3463         (WebCore::JSLazyEventListener::initializeJSFunction):
3464         * bindings/js/JSMainThreadExecState.h:
3465         (WebCore::JSMainThreadExecState::evaluate):
3466         * bindings/js/JSMutationCallbackCustom.cpp:
3467         (WebCore::JSMutationCallback::handleEvent):
3468         * bindings/js/JSNodeFilterCondition.cpp:
3469         (WebCore::JSNodeFilterCondition::acceptNode):
3470         * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp:
3471         (WebCore::JSRequestAnimationFrameCallback::handleEvent):
3472         * bindings/js/JavaScriptCallFrame.cpp:
3473         (WebCore::JavaScriptCallFrame::evaluate):
3474         * bindings/js/PageScriptDebugServer.cpp:
3475         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
3476         * bindings/js/ScheduledAction.cpp:
3477         (WebCore::ScheduledAction::executeFunctionInContext):
3478         * bindings/js/ScriptCachedFrameData.cpp:
3479         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
3480         (WebCore::ScriptCachedFrameData::restore):
3481         (WebCore::ScriptCachedFrameData::clear):
3482         * bindings/js/ScriptController.cpp:
3483         (WebCore::ScriptController::evaluateInWorld):
3484         (WebCore::ScriptController::clearWindowShell):
3485         (WebCore::ScriptController::initScript):
3486         (WebCore::ScriptController::updateDocument):
3487         (WebCore::ScriptController::cacheableBindingRootObject):
3488         (WebCore::ScriptController::bindingRootObject):
3489         (WebCore::ScriptController::windowScriptNPObject):
3490         (WebCore::ScriptController::jsObjectForPluginElement):
3491         (WebCore::ScriptController::clearScriptObjects):
3492         * bindings/js/ScriptControllerMac.mm:
3493         (WebCore::ScriptController::windowScriptObject):
3494         * bindings/js/ScriptDebugServer.cpp:
3495         (WebCore::ScriptDebugServer::dispatchDidPause):
3496         * bindings/js/ScriptEventListener.cpp:
3497         (WebCore::eventListenerHandlerBody):
3498         (WebCore::eventListenerHandlerLocation):
3499         * bindings/js/ScriptFunctionCall.cpp:
3500         (WebCore::ScriptCallArgumentHandler::appendArgument):
3501         (WebCore::ScriptFunctionCall::call):
3502         (WebCore::ScriptFunctionCall::construct):
3503         (WebCore::ScriptCallback::call):
3504         * bindings/js/ScriptObject.cpp:
3505         (WebCore::ScriptGlobalObject::set):
3506         (WebCore::ScriptGlobalObject::get):
3507         (WebCore::ScriptGlobalObject::remove):
3508         * bindings/js/ScriptValue.cpp:
3509         (WebCore::ScriptValue::getString):
3510         (WebCore::ScriptValue::toInspectorValue):
3511         * bindings/js/WorkerScriptController.cpp:
3512         (WebCore::WorkerScriptController::~WorkerScriptController):
3513         (WebCore::WorkerScriptController::initScript):
3514         (WebCore::WorkerScriptController::evaluate):
3515         (WebCore::WorkerScriptController::disableEval):
3516         * bindings/objc/WebScriptObject.mm:
3517         (_didExecute):
3518         (-[WebScriptObject callWebScriptMethod:withArguments:]):
3519         (-[WebScriptObject evaluateWebScript:]):
3520         (-[WebScriptObject setValue:forKey:]):
3521         (-[WebScriptObject valueForKey:]):
3522         (-[WebScriptObject removeWebScriptKey:]):
3523         (-[WebScriptObject hasWebScriptKey:]):
3524         (-[WebScriptObject stringRepresentation]):
3525         (-[WebScriptObject webScriptValueAtIndex:]):
3526         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
3527         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
3528         * bindings/scripts/CodeGeneratorJS.pm:
3529         (GenerateCallbackImplementation):
3530         * bindings/scripts/test/JS/JSTestCallback.cpp:
3531         (WebCore::JSTestCallback::callbackWithNoParam):
3532         (WebCore::JSTestCallback::callbackWithClass1Param):
3533         (WebCore::JSTestCallback::callbackWithClass2Param):
3534         (WebCore::JSTestCallback::callbackWithStringList):
3535         (WebCore::JSTestCallback::callbackWithBoolean):
3536         (WebCore::JSTestCallback::callbackRequiresThisToPass):
3537         * bridge/NP_jsobject.cpp:
3538         (_NPN_InvokeDefault):
3539         (_NPN_Invoke):
3540         (_NPN_Evaluate):
3541         (_NPN_GetProperty):
3542         (_NPN_SetProperty):
3543         (_NPN_RemoveProperty):
3544         (_NPN_HasProperty):
3545         (_NPN_HasMethod):
3546         (_NPN_Enumerate):
3547         (_NPN_Construct):
3548         * bridge/c/c_class.cpp:
3549         (JSC::Bindings::CClass::~CClass):
3550         (JSC::Bindings::CClass::methodsNamed):
3551         (JSC::Bindings::CClass::fieldNamed):
3552         * bridge/c/c_instance.cpp:
3553         (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
3554         (JSC::Bindings::CInstance::invokeMethod):
3555         (JSC::Bindings::CInstance::invokeDefaultMethod):
3556         (JSC::Bindings::CInstance::invokeConstruct):
3557         (JSC::Bindings::CInstance::getPropertyNames):
3558         * bridge/c/c_runtime.cpp:
3559         (JSC::Bindings::CField::valueFromInstance):
3560         (JSC::Bindings::CField::setValueToInstance):
3561         * bridge/c/c_utility.cpp:
3562         (JSC::Bindings::convertValueToNPVariant):
3563         (JSC::Bindings::convertNPVariantToValue):
3564         * bridge/jni/jni_jsobject.mm:
3565         (JavaJSObject::call):
3566         (JavaJSObject::eval):
3567         (JavaJSObject::getMember):
3568         (JavaJSObject::setMember):
3569         (JavaJSObject::removeMember):
3570         (JavaJSObject::getSlot):
3571         (JavaJSObject::setSlot):
3572         (JavaJSObject::toString):
3573         (JavaJSObject::convertValueToJObject):
3574         (JavaJSObject::convertJObjectToValue):
3575         * bridge/jni/jni_objc.mm:
3576         (JSC::Bindings::dispatchJNICall):
3577         * bridge/jni/jsc/JNIUtilityPrivate.cpp:
3578         (JSC::Bindings::convertValueToJValue):
3579         * bridge/jni/jsc/JavaClassJSC.cpp:
3580         (JavaClass::JavaClass):
3581         (JavaClass::~JavaClass):
3582         * bridge/jni/jsc/JavaInstanceJSC.cpp:
3583         (JavaInstance::stringValue):
3584         * bridge/jni/jsc/JavaMethodJSC.cpp:
3585         (appendClassName):
3586         (JavaMethod::signature):
3587         * bridge/jni/jsc/JavaStringJSC.h:
3588         (JSC::Bindings::JavaString::JavaString):
3589         (JSC::Bindings::JavaString::~JavaString):
3590         (JSC::Bindings::JavaString::utf8):
3591         (JSC::Bindings::JavaString::init):
3592         * bridge/jsc/BridgeJSC.cpp:
3593         (JSC::Bindings::Instance::createRuntimeObject):
3594         (JSC::Bindings::Instance::newRuntimeObject):
3595         * bridge/objc/objc_instance.mm:
3596         (ObjcInstance::moveGlobalExceptionToExecState):
3597         (ObjcInstance::invokeObjcMethod):
3598         (ObjcInstance::invokeDefaultMethod):
3599         (ObjcInstance::setValueOfUndefinedField):
3600         (ObjcInstance::getValueOfUndefinedField):
3601         * bridge/objc/objc_runtime.mm:
3602         (JSC::Bindings::ObjcField::valueFromInstance):
3603         (JSC::Bindings::ObjcField::setValueToInstance):
3604         * bridge/objc/objc_utility.mm:
3605         (JSC::Bindings::convertValueToObjcValue):
3606         (JSC::Bindings::convertNSStringToString):
3607         (JSC::Bindings::convertObjcValueToValue):
3608         * bridge/qt/qt_instance.cpp:
3609         (JSC::Bindings::QtInstance::~QtInstance):
3610         (JSC::Bindings::QtInstance::getQtInstance):
3611         (JSC::Bindings::QtInstance::newRuntimeObject):
3612         * bridge/qt/qt_pixmapruntime.cpp:
3613         (JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject):
3614         * bridge/qt/qt_runtime.cpp:
3615         (JSC::Bindings::convertValueToQVariant):
3616         (JSC::Bindings::convertQVariantToValue):
3617         (JSC::Bindings::QtRuntimeMetaMethod::call):
3618         (JSC::Bindings::QtRuntimeConnectionMethod::call):
3619         * bridge/qt/qt_runtime_qt4.cpp:
3620         (JSC::Bindings::convertValueToQVariant):
3621         (JSC::Bindings::convertQVariantToValue):
3622         (JSC::Bindings::QtRuntimeMetaMethod::call):
3623         (JSC::Bindings::QtRuntimeConnectionMethod::call):
3624         * bridge/runtime_root.cpp:
3625         (JSC::Bindings::RootObject::gcProtect):
3626         (JSC::Bindings::RootObject::gcUnprotect):
3627         * html/HTMLCanvasElement.cpp:
3628         (WebCore::HTMLCanvasElement::createImageBuffer):
3629         * html/HTMLImageLoader.cpp:
3630         (WebCore::HTMLImageLoader::notifyFinished):
3631         * plugins/PluginView.cpp:
3632         (WebCore::PluginView::start):
3633         (WebCore::PluginView::stop):
3634         (WebCore::PluginView::performRequest):
3635         (WebCore::PluginView::npObject):
3636         (WebCore::PluginView::privateBrowsingStateChanged):
3637         * plugins/blackberry/PluginViewBlackBerry.cpp:
3638         (WebCore::PluginView::dispatchNPEvent):
3639         (WebCore::PluginView::setNPWindowIfNeeded):
3640         (WebCore::PluginView::platformStart):
3641         (WebCore::PluginView::getWindowInfo):
3642         * plugins/efl/PluginViewEfl.cpp:
3643         (WebCore::PluginView::dispatchNPEvent):
3644         * plugins/gtk/PluginViewGtk.cpp:
3645         (WebCore::PluginView::dispatchNPEvent):
3646         (WebCore::PluginView::handleKeyboardEvent):
3647         (WebCore::PluginView::handleMouseEvent):
3648         (WebCore::PluginView::setNPWindowIfNeeded):
3649         (WebCore::PluginView::platformStart):
3650         * plugins/mac/PluginViewMac.mm:
3651         (WebCore::PluginView::setNPWindowIfNeeded):
3652         (WebCore::PluginView::dispatchNPEvent):
3653         * plugins/qt/PluginViewQt.cpp:
3654         (WebCore::PluginView::dispatchNPEvent):
3655         (WebCore::PluginView::setNPWindowIfNeeded):
3656         (WebCore::PluginView::platformStart):
3657         * plugins/win/PluginViewWin.cpp:
3658         (WebCore::PluginView::dispatchNPEvent):
3659         (WebCore::PluginView::handleKeyboardEvent):
3660         (WebCore::PluginView::handleMouseEvent):
3661         (WebCore::PluginView::setNPWindowRect):
3662         * testing/js/WebCoreTestSupport.cpp:
3663         (WebCoreTestSupport::injectInternalsObject):
3664         (WebCoreTestSupport::resetInternalsObject):
3665         * xml/XMLHttpRequest.cpp:
3666         (WebCore::XMLHttpRequest::dropProtection):
3667
3668 2012-06-27  Tony Chang  <tony@chromium.org>
3669
3670         Split flex into flex-grow/flex-shrink/flex-basis
3671         https://bugs.webkit.org/show_bug.cgi?id=86525
3672
3673         Reviewed by Ojan Vafai.
3674
3675         Split flex into 3 separate properties per the spec:
3676         http://dev.w3.org/csswg/css3-flexbox/#flex-components
3677
3678         Tests: css3/flexbox/flex-longhand-parsing.html
3679                css3/flexbox/flex-property-parsing.html: Updated test results.
3680
3681         * css/CSSComputedStyleDeclaration.cpp:
3682         (WebCore): -webkit-flex is no longer enumerable.
3683         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add new css property names and use
3684         getCSSPropertyValuesForShorthandProperties for WebkitFlex. Also sort flex propery names.
3685         * css/CSSParser.cpp:
3686         (WebCore::isValidKeywordPropertyAndValue): Fix indent.
3687         (WebCore::CSSParser::parseValue): Add parsing for new properties and handle -webkit-flex: none.
3688         (WebCore::CSSParser::parseFlex): Switch to new names (positive -> grow, negative -> shrink,
3689         preferred size -> basis) and assign to longhand properties.
3690         * css/CSSParser.h:
3691         * css/CSSProperty.cpp:
3692         (WebCore::CSSProperty::isInheritedProperty): Add new properties.
3693         * css/CSSPropertyNames.in: Add new properties.
3694         * css/StyleBuilder.cpp:
3695         (WebCore::StyleBuilder::StyleBuilder): Delete special handling of applying flex and just use shorthand handlers.
3696         * css/StylePropertySet.cpp:
3697         (WebCore::StylePropertySet::getPropertyValue): Add new shorthand.
3698         (WebCore::StylePropertySet::asText):
3699         * css/StylePropertyShorthand.cpp:
3700         (WebCore::webkitFlexShorthand): Add new shorthand.
3701         (WebCore::shorthandForProperty):
3702         * css/StylePropertyShorthand.h:
3703         * css/StyleResolver.cpp:
3704         (WebCore::StyleResolver::collectMatchingRulesForList): Add to list of properties applied by StyleBuilder.
3705
3706 2012-06-27  Kentaro Hara  <haraken@chromium.org>
3707
3708         Make Element::elementRareData() and Element::ensureElementRareData() private
3709         https://bugs.webkit.org/show_bug.cgi?id=90060
3710
3711         Reviewed by Andreas Kling.
3712
3713         This is a simple refactoring. Element::elementRareData() and
3714         Element::ensureElementRareData() can be private methods.
3715
3716         No tests. No change in behavior.
3717
3718         * dom/Element.h:
3719         (Element):
3720
3721 2012-06-27  James Robinson  <jamesr@chromium.org>
3722
3723         [chromium] Delete unused includes and forward declarations from compositor code
3724         https://bugs.webkit.org/show_bug.cgi?id=90102
3725
3726         Reviewed by Adrienne Walker.
3727
3728         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
3729         * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
3730         * platform/graphics/chromium/ContentLayerChromium.h:
3731         * platform/graphics/chromium/ImageLayerChromium.cpp:
3732         * platform/graphics/chromium/LayerChromium.cpp:
3733         * platform/graphics/chromium/LayerChromium.h:
3734         * platform/graphics/chromium/LayerRendererChromium.cpp:
3735         * platform/graphics/chromium/ShaderChromium.h:
3736         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
3737         * platform/graphics/chromium/TiledLayerChromium.cpp:
3738         (WebCore::TiledLayerChromium::updateTiles):
3739         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
3740         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
3741
3742 2012-06-27  Alec Flett  <alecflett@chromium.org>
3743
3744         IndexedDB: make IDBKey immutable
3745         https://bugs.webkit.org/show_bug.cgi?id=90016
3746
3747         Reviewed by Tony Chang.
3748
3749         Make all members of IDBKey const, so that this can be considered
3750         an immutable, and thus safe to copy and/or stop ref-counting.
3751
3752         No new tests, existing tests show this works.
3753
3754         * Modules/indexeddb/IDBKey.cpp:
3755         (WebCore::IDBKey::compare):
3756         * Modules/indexeddb/IDBKey.h:
3757         (WebCore::IDBKey::createInvalid):
3758         (WebCore::IDBKey::createNumber):
3759         (WebCore::IDBKey::createString):
3760         (WebCore::IDBKey::createDate):
3761         (WebCore::IDBKey::createMultiEntryArray):
3762         (WebCore::IDBKey::createArray):
3763         (WebCore::IDBKey::date):
3764         (WebCore::IDBKey::IDBKey):
3765         (IDBKey):
3766
3767 2012-06-27  Erik Arvidsson  <arv@chromium.org>
3768
3769         [V8] Improve variable resolution order on window
3770         https://bugs.webkit.org/show_bug.cgi?id=84247
3771
3772         Reviewed by Ojan Vafai.
3773
3774         This changes the V8 flag to turn on es52_globals and updates the layout tests to reflect the fixed behavior.
3775
3776         This is the second (third?) try. Last time there was a bug in the V8 code related to the split window.
3777         I added a test that tests the failure that caused this to be rolled back last time.
3778
3779         Tests: fast/dom/Window/es52-globals.html
3780                fast/dom/Window/window-property-shadowing-onclick.html
3781
3782         * bindings/v8/V8DOMWindowShell.cpp:
3783         (WebCore::V8DOMWindowShell::initContextIfNeeded):
3784         * bindings/v8/WorkerContextExecutionProxy.cpp:
3785         (WebCore::WorkerContextExecutionProxy::initIsolate):
3786
3787 2012-06-27  James Robinson  <jamesr@chromium.org>
3788
3789         [chromium] Use categorized TRACE_EVENTN() macros in compositor code
3790         https://bugs.webkit.org/show_bug.cgi?id=90100
3791
3792         Reviewed by Adrienne Walker.
3793
3794         Specify the category in all traces in the compositor. Patch generated mostly by the sed command
3795         's/TRACE_EVENT(\(.*\), this, 0)/TRACE_EVENT0("cc", \1)/'.
3796
3797         * platform/graphics/chromium/LayerRendererChromium.cpp:
3798         (WebCore::LayerRendererChromium::beginDrawingFrame):
3799         (WebCore::LayerRendererChromium::finish):
3800         (WebCore::LayerRendererChromium::swapBuffers):
3801         (WebCore::LayerRendererChromium::initializeSharedObjects):
3802         (WebCore::LayerRendererChromium::tileCheckerboardProgram):
3803         (WebCore::LayerRendererChromium::solidColorProgram):
3804         (WebCore::LayerRendererChromium::headsUpDisplayProgram):
3805         (WebCore::LayerRendererChromium::renderPassProgram):
3806         (WebCore::LayerRendererChromium::renderPassProgramAA):
3807         (WebCore::LayerRendererChromium::renderPassMaskProgram):
3808         (WebCore::LayerRendererChromium::renderPassMaskProgramAA):
3809         (WebCore::LayerRendererChromium::tileProgram):
3810         (WebCore::LayerRendererChromium::tileProgramOpaque):
3811         (WebCore::LayerRendererChromium::tileProgramAA):
3812         (WebCore::LayerRendererChromium::tileProgramSwizzle):
3813         (WebCore::LayerRendererChromium::tileProgramSwizzleOpaque):
3814         (WebCore::LayerRendererChromium::tileProgramSwizzleAA):
3815         (WebCore::LayerRendererChromium::textureProgram):
3816         (WebCore::LayerRendererChromium::textureProgramFlip):
3817         (WebCore::LayerRendererChromium::textureIOSurfaceProgram):
3818         (WebCore::LayerRendererChromium::videoYUVProgram):
3819         (WebCore::LayerRendererChromium::videoStreamTextureProgram):
3820         * platform/graphics/chromium/LayerTextureSubImage.cpp:
3821         (WebCore::LayerTextureSubImage::uploadWithTexSubImage):
3822         (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage):
3823         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
3824         (WebCore::SkPictureCanvasLayerTextureUpdater::drawPicture):
3825         * platform/graphics/chromium/TextureCopier.cpp:
3826         (WebCore::AcceleratedTextureCopier::copyTexture):
3827         * platform/graphics/chromium/TextureManager.cpp:
3828         (WebCore::TextureManager::evictTexture):
3829         * platform/graphics/chromium/cc/CCFrameRateController.cpp:
3830         (WebCore::CCFrameRateController::setActive):
3831         (WebCore::CCFrameRateController::onTimerTick):
3832         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3833         (WebCore::CCLayerTreeHost::initialize):
3834         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
3835         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
3836         (WebCore::CCLayerTreeHost::beginCommitOnImplThread):
3837         (WebCore::CCLayerTreeHost::didLoseContext):
3838         (WebCore::CCLayerTreeHost::updateLayers):
3839         (WebCore::CCLayerTreeHost::animateLayers):
3840         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3841         (WebCore::CCSingleThreadProxy::CCSingleThreadProxy):
3842         (WebCore::CCSingleThreadProxy::~CCSingleThreadProxy):
3843         (WebCore::CCSingleThreadProxy::compositeAndReadback):
3844         (WebCore::CCSingleThreadProxy::stop):
3845         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3846         (WebCore::CCThreadProxy::CCThreadProxy):
3847         (WebCore::CCThreadProxy::~CCThreadProxy):
3848         (WebCore::CCThreadProxy::compositeAndReadback):
3849         (WebCore::CCThreadProxy::initializeContext):
3850         (WebCore::CCThreadProxy::initializeLayerRenderer):
3851         (WebCore::CCThreadProxy::setNeedsAnimate):
3852         (WebCore::CCThreadProxy::setNeedsCommit):
3853         (WebCore::CCThreadProxy::onSwapBuffersCompleteOnImplThread):
3854         (WebCore::CCThreadProxy::setNeedsCommitOnImplThread):
3855         (WebCore::CCThreadProxy::setNeedsForcedCommitOnImplThread):
3856         (WebCore::CCThreadProxy::postAnimationEventsToMainThreadOnImplThread):
3857         (WebCore::CCThreadProxy::setNeedsRedraw):
3858         (WebCore::CCThreadProxy::setNeedsRedrawOnImplThread):
3859         (WebCore::CCThreadProxy::stop):
3860         (WebCore::CCThreadProxy::finishAllRenderingOnImplThread):
3861         (WebCore::CCThreadProxy::beginFrame):
3862         (WebCore::CCThreadProxy::beginFrameCompleteOnImplThread):
3863         (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources):
3864         (WebCore::CCThreadProxy::scheduledActionCommit):
3865         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
3866         (WebCore::CCThreadProxy::acquireLayerTextures):
3867         (WebCore::CCThreadProxy::initializeImplOnImplThread):
3868         (WebCore::CCThreadProxy::initializeContextOnImplThread):
3869         (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
3870         (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread):
3871
3872 2012-06-27  W. James MacLean  <wjmaclean@chromium.org>
3873
3874         [chromium] ScrollbarLayerChromium should support painting forward-track and back-track in different styles.
3875         https://bugs.webkit.org/show_bug.cgi?id=89908
3876
3877         Reviewed by Adrienne Walker.
3878
3879         Test: platform/chromium/compositing/scrollbars/custom-composited-different-track-parts.html
3880
3881         Adds support for accelerated drawing (impl thread) of scrollbars with different styles for the
3882         forward-track and back-track parts.
3883
3884         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
3885         (WebCore::ScrollbarLayerChromium::pushPropertiesTo):
3886         (WebCore::ScrollbarBackgroundPainter::create):
3887         (WebCore::ScrollbarBackgroundPainter::ScrollbarBackgroundPainter):
3888         (ScrollbarBackgroundPainter):
3889         (WebCore::ScrollbarLayerChromium::setLayerTreeHost):
3890         (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
3891         (WebCore::ScrollbarLayerChromium::update):
3892         * platform/graphics/chromium/ScrollbarLayerChromium.h:
3893         (ScrollbarLayerChromium):
3894         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
3895         (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
3896         (WebCore):
3897         (WebCore::CCScrollbarLayerImpl::appendQuads):
3898         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
3899         (WebCore::CCScrollbarLayerImpl::setBackTrackTextureId):
3900         (WebCore::CCScrollbarLayerImpl::setForeTrackTextureId):
3901         (CCScrollbarLayerImpl):
3902
3903 2012-06-27  Ian Vollick  <vollick@chromium.org>
3904
3905         [chromium] Allow screen space rects and occluding rects to be visualized for debugging.
3906         https://bugs.webkit.org/show_bug.cgi?id=90012
3907
3908         Reviewed by Adrienne Walker.
3909
3910         No new tests. No new functionality.
3911
3912         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
3913         (WebCore::CCDebugRectHistory::enabled):
3914         (WebCore::CCDebugRectHistory::saveDebugRectsForCurrentFrame):
3915         (WebCore::CCDebugRectHistory::saveScreenSpaceRects):
3916         (WebCore):
3917         (WebCore::CCDebugRectHistory::saveOccludingRects):
3918         * platform/graphics/chromium/cc/CCDebugRectHistory.h:
3919         (WebCore):
3920         (CCDebugRectHistory):
3921         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
3922         (WebCore::CCHeadsUpDisplay::showDebugRects):
3923         (WebCore::CCHeadsUpDisplay::draw):
3924         (WebCore::CCHeadsUpDisplay::drawDebugRects):
3925         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3926         (WebCore::CCLayerTreeSettings::CCLayerTreeSettings):
3927         (CCLayerTreeSettings):
3928         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3929         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3930         (WebCore::CCLayerTreeHostImpl::drawLayers):
3931         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3932         (FrameData):
3933         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3934         (WebCore::::CCOcclusionTrackerBase):
3935         (WebCore::addOcclusionBehindLayer):
3936         (WebCore::::markOccludedBehindLayer):
3937         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
3938         (CCOcclusionTrackerBase):
3939         (WebCore::CCOcclusionTrackerBase::setOccludingScreenSpaceRectsContainer):
3940
3941 2012-06-27  Anthony Scian  <ascian@rim.com>
3942
3943         Web Inspector [JSC]: Implement ScriptCallStack::stackTrace
3944         https://bugs.webkit.org/show_bug.cgi?id=40118
3945
3946         Reviewed by Yong Li.
3947
3948         Implemented stub for createScriptCallStack to call into
3949         Interpreter and extract the current stack frames, iterate
3950         through the frames and create the return result required.
3951
3952         No new tests, manually tested thrown exception and inspector
3953         tracebacks.
3954
3955         * bindings/js/ScriptCallStackFactory.cpp:
3956         (WebCore::createScriptCallStack):
3957
3958 2012-06-27  Ryosuke Niwa  <rniwa@webkit.org>
3959
3960         Let Xcode have its own way.
3961
3962         * WebCore.xcodeproj/project.pbxproj:
3963
3964 2012-06-27  Ryosuke Niwa  <rniwa@webkit.org>
3965
3966         REGRESSION (Safari 5?): Pasting a line into textarea inserts two newlines
3967         https://bugs.webkit.org/show_bug.cgi?id=49288
3968
3969         Reviewed by Tony Chang.
3970
3971         The bug was caused by positionAvoidingPrecedingNodes getting out of a block when the insertion point is at a line break.
3972         It caused the subsequent code to be misinformed of the insertion position and ended up not pruning the extra line break.
3973
3974         Fixed the bug by checking this special case and bailing out so that we don't crawl out of the enclosing block.
3975         It's similar to checks several lines below it.
3976
3977         Test: editing/pasteboard/copy-paste-pre-line-content.html
3978
3979         * editing/ReplaceSelectionCommand.cpp:
3980         (WebCore::positionAvoidingPrecedingNodes):
3981
3982 2012-06-27  Andrei Onea  <onea@adobe.com>
3983
3984         [CSSRegions]Change display values that allow regions
3985         https://bugs.webkit.org/show_bug.cgi?id=89759
3986
3987         Reviewed by Tony Chang.
3988
3989         Allow only elements with display values of block, inline-block,
3990         table-cell, table-caption and list-item to become regions, as per
3991         CSSRegions spec: http://dev.w3.org/csswg/css3-regions .
3992         Also added test for checking whether regions are destroyed and/or created
3993         when changing display value.
3994
3995         Test: fast/regions/region-element-display-change.html
3996
3997         * rendering/RenderObject.cpp:
3998         (WebCore::RenderObject::createObject):
3999         * rendering/style/RenderStyle.h:
4000
4001 2012-06-27  Mike Lawther  <mikelawther@chromium.org>
4002
4003         CSS3 calc: blending involving expressions
4004         https://bugs.webkit.org/show_bug.cgi?id=86160
4005
4006         Reviewed by Tony Chang.
4007
4008         If either endpoint of a blend involves a calc expression, we create a new
4009         expression to perform the blend calculation.
4010
4011         Test: css3/calc/transitions.html
4012               css3/calc/transitions-dependent.html
4013
4014         * platform/Length.cpp:
4015         (WebCore):
4016         (WebCore::Length::blendCalculation):
4017         * platform/Length.h:
4018         (WebCore::Length::blend):
4019         (Length):
4020
4021 2012-06-27  Hans Muller  <hmuller@adobe.com>
4022
4023         Move CSSWrapShape style resolution from StyleResolver to StyleBuilder
4024         https://bugs.webkit.org/show_bug.cgi?id=89668
4025
4026         Reviewed by Andreas Kling.
4027
4028         Moved the resolution of the shapeInside and shapeOutside CSS properties
4029         from the StyleResolver class to StyleBuilder. This is just refactoring
4030         in preparation for fixing https://bugs.webkit.org/show_bug.cgi?id=89670.
4031
4032         No new tests were required.
4033
4034         * css/StyleBuilder.cpp:
4035         (WebCore):
4036         (ApplyPropertyWrapShape):
4037         (WebCore::ApplyPropertyWrapShape::setValue):
4038         (WebCore::ApplyPropertyWrapShape::applyValue):
4039         (WebCore::ApplyPropertyWrapShape::createHandler):
4040         (WebCore::StyleBuilder::StyleBuilder):
4041         * cs