Attempt to fix the Chromium Mac build after <http://trac.webkit.org/changeset/122802>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-16  Daniel Bates  <dbates@webkit.org>
2
3         Attempt to fix the Chromium Mac build after <http://trac.webkit.org/changeset/122802>
4         (https://bugs.webkit.org/show_bug.cgi?id=91451)
5  
6         Remove unused private instance variable AbsoluteQuadsGeneratorContext::m_wasFixed.
7         This instance variable has remained unused since it was added in
8         <http://trac.webkit.org/changeset/116718> (https://bugs.webkit.org/show_bug.cgi?id=85725).
9
10         I'm unclear as to why the Chromium Mac build began to complain about this
11         unused instance variable following <http://trac.webkit.org/changeset/122802>, since this
12         code has been in the tree for a while and we previously instantiated AbsoluteQuadsGeneratorContext
13         with wasFixed (even though it wasn't used). Regardless, we should remove the unused
14         instance variable AbsoluteQuadsGeneratorContext::m_wasFixed.
15
16         * rendering/RenderInline.cpp:
17         (WebCore): Remove AbsoluteQuadsGeneratorContext::m_wasFixed.
18         (WebCore::RenderInline::absoluteQuads):
19
20 2012-07-16  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
21
22         Add RegisterProtocolHandlerClient to the Modules/protocolhandler
23         https://bugs.webkit.org/show_bug.cgi?id=90940
24
25         Reviewed by Hajime Morita.
26
27         As a step to let protocol handler be moved to the modules, RegisterProtocolHandlerClient needs
28         to be added to the Modules/protocolhandler. Because ChromeClient has some virtual functions for
29         protocol handlers, virtual functions should be moved to RegisterProtocolHandlerClient.
30
31         In addition, NavigatorRegisterProtocolHandler should be supplementable.
32
33         No new tests. Covered by existing tests.
34
35         * GNUmakefile.list.am:
36         * Modules/protocolhandler/NavigatorRegisterProtocolHandler.cpp:
37         (WebCore::NavigatorRegisterProtocolHandler::from):
38         (WebCore::NavigatorRegisterProtocolHandler::create):
39         (WebCore):
40         (WebCore::NavigatorRegisterProtocolHandler::registerProtocolHandler):
41         (WebCore::customHandlersStateString):
42         (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered):
43         (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler):
44         (WebCore::NavigatorRegisterProtocolHandler::supplementName):
45         (WebCore::provideRegisterProtocolHandlerTo):
46         * Modules/protocolhandler/NavigatorRegisterProtocolHandler.h:
47         (WebCore):
48         (NavigatorRegisterProtocolHandler):
49         (WebCore::NavigatorRegisterProtocolHandler::NavigatorRegisterProtocolHandler):
50         (WebCore::NavigatorRegisterProtocolHandler::client):
51         * Modules/protocolhandler/RegisterProtocolHandlerClient.h: Added.
52         (WebCore):
53         (RegisterProtocolHandlerClient):
54         * WebCore.gypi:
55         * loader/EmptyClients.h:
56         * page/ChromeClient.h:
57         (ChromeClient):
58         * platform/network/soup/CookieJarSoup.cpp:
59         (WebCore::setCookies):
60         (WebCore::getRawCookies):
61
62 2012-07-16  Pete Williamson  <petewil@google.com>
63
64         Changed the behavior of iconURLs to always recalculate the list.
65         https://bugs.webkit.org/show_bug.cgi?id=88665
66
67         Reviewed by Kent Tamura.
68
69         As it turns out, it can contain stale URLs in the case that some script
70         manipulates the DOM, which breaks scripts trying to reset the favicon
71         URL. Also added a method in Internals to allow tests to get the list of
72         icon
73
74         Tests: fast/dom/icon-url-change.html
75                fast/dom/icon-url-list.html
76
77         * WebCore.exp.in: export Document::iconURLs on the mac for the Internals class
78         * dom/Document.cpp:
79         (WebCore::Document::iconURLs): Changed the method to recalculate the iconURL list every time
80         (WebCore::Document::addIconURL): we no longer need to add to the internal list since we recalculate it
81         (WebCore::Document::setUseSecureKeyboardEntryWhenActive): removed extra whitespace
82         * dom/Document.h:
83         (Document): removed the addIconURL method which is no longer used
84         * html/HTMLLinkElement.cpp:
85         (WebCore::HTMLLinkElement::iconType): exposed the icon type with an accessor
86         (WebCore):
87         (WebCore::HTMLLinkElement::iconSizes): exposed the icon sizes with an accessor
88         * html/HTMLLinkElement.h:
89         (HTMLLinkElement): declared the icon type and size accessors
90         * testing/Internals.cpp:
91         (WebCore::Internals::iconURLs): made a method to be used by unit tests for inspecting the icon URL list
92         (WebCore):
93         * testing/Internals.h:
94         (Internals): declared the method for unit testing the icon URL list
95         * testing/Internals.idl: exported the Document::iconURLs function
96
97 2012-07-16  Hajime Morrita  <morrita@chromium.org>
98
99         WebCore needs WEBCORE_TESTING macro to mark methods being exported for testing.
100         https://bugs.webkit.org/show_bug.cgi?id=90764
101
102         Reviewed by Adam Barth.
103
104         Defined WEBCORE_TESTING based on USE(EXPORT_MACROS_FOR_TESTING) and
105         applied it to FrameDestructionObserver.
106
107         * bindings/js/JSDOMGlobalObject.h: Removed conflicting symbols
108         * page/FrameDestructionObserver.h: Added WEBKIT_TESTING
109         (FrameDestructionObserver):
110         * platform/PlatformExportMacros.h:
111
112 2012-07-16  Kiran Muppala  <cmuppala@apple.com>
113
114         REGRESSION: RenderInline::absoluteQuads produces incorrect results for fixed position.
115         https://bugs.webkit.org/show_bug.cgi?id=91451
116
117         Reviewed by Simon Fraser.
118
119         RenderInline::absoluteQuads relies on copies of RenderGeometryMap,
120         created indirectly by passing AbsoluteQuadsGeneratorContext object by
121         value.  These copies are unsafe because the individual transform steps
122         within the geometry map include a owned poitner to their respective
123         transform.
124
125         Modify the callee methods to take context by reference and disable
126         copy constructor for RenderGeometryMap.
127
128         Test: fast/inline/inline-fixed-position-boundingbox.html
129
130         * rendering/RenderGeometryMap.h:
131         (WebCore::RenderGeometryMapStep::RenderGeometryMapStep): Add missing
132         m_offset to copy constructor initialization list.
133         (RenderGeometryMap): Disable copy constructor.
134         * rendering/RenderInline.cpp: Pass context object by reference.
135         (WebCore::RenderInline::generateLineBoxRects): 
136         (WebCore::RenderInline::generateCulledLineBoxRects):
137         (WebCore::RenderInline::absoluteRects):
138         (WebCore::RenderInline::absoluteQuads):
139         (WebCore::RenderInline::linesBoundingBox):
140         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
141         (WebCore::RenderInline::addFocusRingRects):
142         * rendering/RenderInline.h:
143         (RenderInline::generateLineBoxRects): Update method declarations to
144         show pass by reference context parameter.
145         (RenderInline::generateCulledLineBoxRects): Ditto.
146
147 2012-07-16  Hayato Ito  <hayato@chromium.org>
148
149         Some events should be always stopped at shadow boundary.
150         https://bugs.webkit.org/show_bug.cgi?id=90436
151
152         Reviewed by Ryosuke Niwa.
153
154         The spec is here:
155         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#events-that-are-always-stopped
156
157         Test: fast/dom/shadow/events-stopped-at-shadow-boundary.html
158
159         * dom/EventDispatcher.cpp:
160         (WebCore::EventDispatcher::determineDispatchBehavior):
161
162 2012-07-16  Yoshifumi Inoue  <yosin@chromium.org>
163
164         REGRESSION(r119948): [Form] HTMLInputElement.valueAsNumber for input type "month" should return number of month since January 1970
165         https://bugs.webkit.org/show_bug.cgi?id=91211
166
167         Reviewed by Kent Tamura.
168
169         This patch changes BaseDateAndTimeInputType::valueAsDouble() to call
170         virtual function parseToNumber() which "month" input type overrides
171         instead of non-virtual function parseToDouble() which returns number
172         of milliseconds.
173
174         No new tests. Existing test (fast/form/month/input-valueasnumber-month.html) coverts this, although it is disabled.
175
176         * html/BaseDateAndTimeInputType.cpp:
177         (WebCore::BaseDateAndTimeInputType::valueAsDouble): Changed to call parseToNumber().
178         (WebCore::BaseDateAndTimeInputType::parseToNumber): Changed to what parseToDouble() did.
179         * html/BaseDateAndTimeInputType.h:
180         (BaseDateAndTimeInputType): Remove parseToDouble().
181
182 2012-07-16  Adrienne Walker  <enne@google.com>
183
184         [chromium] Turn off ScrollbarLayerChromium for Windows due to bad alpha values
185         https://bugs.webkit.org/show_bug.cgi?id=91438
186
187         Reviewed by Kenneth Russell.
188
189         r120509 turned on blending for scrollbar thumbs. Unfortunately for
190         Windows XP scrollbar thumbs, their alpha channel is bogus and so the
191         thumb ends up being completely transparent. This should ultimately be
192         fixed in Chromium theme code, but in the meantime this patch turns
193         off the use of ScrollbarLayerChromium.
194
195         This change makes Windows scrollbars fall back to using normal
196         ContentLayerChromiums and being painted all in one layer on the main
197         thread rather than being painted separately and composited on the
198         compositor thread.
199
200         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
201         (WebCore::createScrollbarLayer):
202
203 2012-07-16  Koji Ishii  <kojiishi@gmail.com>
204
205         Vertical alternate glyph (GSUB) support for OpenTypeVerticalData
206         https://bugs.webkit.org/show_bug.cgi?id=81389
207
208         Reviewed by Tony Chang.
209
210         This patch adds support for reading 'GSUB' OpenType table to get
211         vertical alternate glyphs.
212         http://www.microsoft.com/typography/otspec/gsub.htm
213
214         Like bug 81326, this code isn't on any code path yet.
215
216         Tests: WebKit/chromium/tests/OpenTypeVerticalDataTest.cpp
217
218         * platform/graphics/opentype/OpenTypeTypes.h:
219         (WebCore::OpenType::validateTable): Moved from OpenTypeVerticalData.cpp for unit tests.
220         (OpenType):
221         (TableBase): Ditto.
222         (WebCore::OpenType::TableBase::isValidEnd):
223         (WebCore::OpenType::TableBase::validatePtr):
224         (WebCore::OpenType::TableBase::validateOffset):
225         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
226         (OpenType): Added several OpenType tables used by 'GSUB' table.
227         (CoverageTable):
228         (Coverage1Table):
229         (Coverage2Table):
230         (RangeRecord):
231         (SubstitutionSubTable):
232         (WebCore::OpenType::SubstitutionSubTable::coverage):
233         (SingleSubstitution2SubTable):
234         (LookupTable):
235         (WebCore::OpenType::LookupTable::getSubstitutions):
236         (LookupList):
237         (WebCore::OpenType::LookupList::lookup):
238         (FeatureTable):
239         (WebCore::OpenType::FeatureTable::getGlyphSubstitutions):
240         (FeatureList):
241         (FeatureRecord):
242         (WebCore::OpenType::FeatureList::feature):
243         (LangSysTable):
244         (WebCore::OpenType::LangSysTable::feature):
245         (ScriptTable):
246         (LangSysRecord):
247         (WebCore::OpenType::ScriptTable::defaultLangSys):
248         (ScriptList):
249         (ScriptRecord):
250         (WebCore::OpenType::ScriptList::script):
251         (WebCore::OpenType::ScriptList::defaultScript):
252         (WebCore::OpenType::ScriptList::defaultLangSys):
253         (GSUBTable):
254         (WebCore::OpenType::GSUBTable::scriptList):
255         (WebCore::OpenType::GSUBTable::featureList):
256         (WebCore::OpenType::GSUBTable::lookupList):
257         (WebCore::OpenType::GSUBTable::defaultLangSys):
258         (WebCore::OpenType::GSUBTable::feature):
259         (WebCore::OpenType::GSUBTable::getVerticalGlyphSubstitutions):
260         (WebCore::OpenTypeVerticalData::OpenTypeVerticalData):
261         (WebCore::OpenTypeVerticalData::loadMetrics): Split code to load metrics from ctor.
262         (WebCore::OpenTypeVerticalData::loadVerticalGlyphSubstitutions): Load the vertical alternate Glyph substitution table.
263         (WebCore):
264         (WebCore::OpenTypeVerticalData::substituteWithVerticalGlyphs): Substitute Glyph IDs with vertical alternate Glyph IDs.
265         * platform/graphics/opentype/OpenTypeVerticalData.h:
266         (OpenTypeVerticalData): Added m_verticalGlyphMap.
267
268 2012-07-16  Vincent Scheib  <scheib@chromium.org>
269
270         Fix spelling of EnforceIFrameAllowFullScreenRequirement and ExemptIFrameAllowFullScreenRequirement.
271         https://bugs.webkit.org/show_bug.cgi?id=91437
272
273         Reviewed by Adrienne Walker.
274
275         Document contained spelling errors of 'FulScreen' instead of 'FullScreen'
276         for the FullScreenCheckType enumeration.
277
278         No test changes needed.
279
280         * dom/Document.cpp:
281         (WebCore::Document::requestFullScreenForElement):
282         * dom/Document.h:
283         * dom/Element.cpp:
284         (WebCore::Element::webkitRequestFullscreen):
285         (WebCore::Element::webkitRequestFullScreen):
286         * html/HTMLMediaElement.cpp:
287         (WebCore::HTMLMediaElement::enterFullscreen):
288         * html/shadow/MediaControlElements.cpp:
289         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
290
291 2012-07-16  MORITA Hajime  <morrita@google.com>
292
293         Comment on WebCore::HTMLMediaElement::childShouldCreateRenderer() should explain why
294         https://bugs.webkit.org/show_bug.cgi?id=91174
295
296         Reviewed by Kent Tamura.
297
298         Clarified the explanation.
299
300         * html/HTMLMediaElement.cpp:
301         (WebCore::HTMLMediaElement::childShouldCreateRenderer):
302
303 2012-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
304
305         Unreviewed, rolling out r120033.
306         http://trac.webkit.org/changeset/120033
307         https://bugs.webkit.org/show_bug.cgi?id=91454
308
309         Broke background gradients (Requested by smfr on #webkit).
310
311         * platform/graphics/GeneratorGeneratedImage.cpp:
312         (WebCore::GeneratorGeneratedImage::draw):
313
314 2012-07-16  Joshua Bell  <jsbell@chromium.org>
315
316         IndexedDB: Implement spec updates to IDBTransaction.error
317         https://bugs.webkit.org/show_bug.cgi?id=91409
318
319         Reviewed by Tony Chang.
320
321         The Indexed DB spec was updated to resolve some edge cases around the
322         IDBTransaction.error attribute. It was agreed that accessing error should
323         never throw, error should be null if the transaction is not finished or
324         abort() was explicitly called, an appropriate error should be returned if
325         a commit failed, and a generic AbortError should be used if a request
326         callback throws. These cases are now handled per spec, except that a reason
327         is not provided for the commit failure (it's always UnknownError).
328
329         Test: storage/indexeddb/transaction-error.html
330               storage/indexeddb/transaction-abort.html
331
332         * Modules/indexeddb/IDBRequest.cpp:
333         (WebCore::IDBRequest::dispatchEvent): Refactor some nested if() blocks; don't
334         re-abort the transaction if dispatching in response to an abort.
335         (WebCore::IDBRequest::uncaughtExceptionInEventHandler): Abort transaction
336         only if not already aborting, and set it's error to AbortError.
337         * Modules/indexeddb/IDBTransaction.cpp:
338         (WebCore::IDBTransaction::onAbort): Set error if abort triggered by back end.
339         * Modules/indexeddb/IDBTransaction.h:
340         (WebCore::IDBTransaction::db): Move impl to header file.
341         (WebCore::IDBTransaction::error): Move impl to header file, simplify.
342         (IDBTransaction):
343         * Modules/indexeddb/IDBTransaction.idl: The error attribute no longer throws.
344
345 2012-07-16  Joshua Bell  <jsbell@chromium.org>
346
347         IndexedDB: Implement spec updates to IDBTransaction.error
348         https://bugs.webkit.org/show_bug.cgi?id=91409
349
350         Reviewed by Tony Chang.
351
352         The Indexed DB spec was updated to resolve some edge cases around the
353         IDBTransaction.error attribute. It was agreed that accessing error should
354         never throw, error should be null if the transaction is not finished or
355         abort() was explicitly called, an appropriate error should be returned if
356         a commit failed, and a generic AbortError should be used if a request
357         callback throws. These cases are now handled per spec, except that a reason
358         is not provided for the commit failure (it's always UnknownError).
359
360         Test: storage/indexeddb/transaction-error.html
361               storage/indexeddb/transaction-abort.html
362
363         * Modules/indexeddb/IDBRequest.cpp:
364         (WebCore::IDBRequest::dispatchEvent): Refactor some nested if() blocks; don't
365         re-abort the transaction if dispatching in response to an abort.
366         (WebCore::IDBRequest::uncaughtExceptionInEventHandler): Abort transaction
367         only if not already aborting, and set it's error to AbortError.
368         * Modules/indexeddb/IDBTransaction.cpp:
369         (WebCore::IDBTransaction::onAbort): Set error if abort triggered by back end.
370         * Modules/indexeddb/IDBTransaction.h:
371         (WebCore::IDBTransaction::db): Move impl to header file.
372         (WebCore::IDBTransaction::error): Move impl to header file, simplify.
373         (IDBTransaction):
374         * Modules/indexeddb/IDBTransaction.idl: The error attribute no longer throws.
375
376 2012-07-16  Alec Flett  <alecflett@chromium.org>
377
378         IndexedDB: Introduce putWithIndexKeys and calculate them in the renderer
379         https://bugs.webkit.org/show_bug.cgi?id=90923
380
381         Reviewed by Darin Fisher.
382
383         Refactor IndexWriter to depend only on IDBIndexMetadata and on
384         (databaseId, objectStoreId, indexId) so that it can talk directly
385         to the backing store, and also eventually be moved into the renderer.
386
387         This also introduces IDBObjectStoreBackendInterface::putWithIndexKeys
388         as a replacement for IDBObjectStoreBackendInterface::put, already
389         stubbed out in the chromium port. It will fully replace put()
390         after both chromium and webkit sides have reached alignment.
391
392         No new tests as this is just a refactor and existing tests cover
393         correctness.
394
395         * Modules/indexeddb/IDBCursor.cpp:
396         (WebCore::IDBCursor::setValueReady):
397         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
398         * Modules/indexeddb/IDBIndexBackendImpl.h:
399         * Modules/indexeddb/IDBObjectStore.h:
400         (IDBObjectStore):
401         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
402         (WebCore::IDBObjectStoreBackendImpl::put):
403         (WebCore):
404         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
405         (WebCore::IDBObjectStoreBackendImpl::putInternal):
406         (WebCore::IDBObjectStoreBackendImpl::populateIndex):
407         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
408         (IDBObjectStoreBackendImpl):
409         * Modules/indexeddb/IDBObjectStoreBackendInterface.h:
410         * Modules/indexeddb/IDBRequest.cpp:
411         (WebCore::IDBRequest::onSuccess):
412
413 2012-07-16  Adrienne Walker  <enne@google.com>
414
415         [chromium] Unify compositor quad transforms into content space
416         https://bugs.webkit.org/show_bug.cgi?id=91350
417
418         Reviewed by Kenneth Russell.
419
420         For the purpose of simplification and as a first step towards removing
421         any transform that takes a centered rect, remove the ability of layers
422         to override the quad transform. All quads and quad transforms operate
423         on content space with the origin in the top left.
424
425         The gutter quads used to use the root layer (that doesn't draw
426         content) as the layer to create the shared quad state from. This is
427         now created manually as a layer without bounds should never in general
428         need a shared quad state created for it.
429
430         No change in functionality; tested by existing layout and unit tests.
431
432         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
433         (WebCore::CCIOSurfaceLayerImpl::appendQuads):
434         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
435         (WebCore::CCLayerImpl::createSharedQuadState):
436         * platform/graphics/chromium/cc/CCLayerImpl.h:
437         (CCLayerImpl):
438         * platform/graphics/chromium/cc/CCRenderPass.cpp:
439         (WebCore::CCRenderPass::appendQuadsToFillScreen):
440         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
441         (WebCore::CCSolidColorLayerImpl::appendQuads):
442         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
443         (CCSolidColorLayerImpl):
444         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
445         (WebCore::CCTextureLayerImpl::appendQuads):
446         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
447         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
448         (CCTiledLayerImpl):
449         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
450         (WebCore::CCVideoLayerImpl::appendQuads):
451
452 2012-07-16  Adrienne Walker  <enne@google.com>
453
454         [chromium] Unify compositor quad transforms into content space
455         https://bugs.webkit.org/show_bug.cgi?id=91350
456
457         Reviewed by Kenneth Russell.
458
459         For the purpose of simplification and as a first step towards removing
460         any transform that takes a centered rect, remove the ability of layers
461         to override the quad transform. All quads and quad transforms operate
462         on content space with the origin in the top left.
463
464         The gutter quads used to use the root layer (that doesn't draw
465         content) as the layer to create the shared quad state from. This is
466         now created manually as a layer without bounds should never in general
467         need a shared quad state created for it.
468
469         No change in functionality; tested by existing layout and unit tests.
470
471         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
472         (WebCore::CCIOSurfaceLayerImpl::appendQuads):
473         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
474         (WebCore::CCLayerImpl::createSharedQuadState):
475         * platform/graphics/chromium/cc/CCLayerImpl.h:
476         (CCLayerImpl):
477         * platform/graphics/chromium/cc/CCRenderPass.cpp:
478         (WebCore::CCRenderPass::appendQuadsToFillScreen):
479         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
480         (WebCore::CCSolidColorLayerImpl::appendQuads):
481         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
482         (CCSolidColorLayerImpl):
483         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
484         (WebCore::CCTextureLayerImpl::appendQuads):
485         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
486         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
487         (CCTiledLayerImpl):
488         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
489         (WebCore::CCVideoLayerImpl::appendQuads):
490
491 2012-07-16  Joshua Bell  <jsbell@chromium.org>
492
493         IndexedDB: Resolve test and IDL FIXMEs for a handful of landed patches
494         https://bugs.webkit.org/show_bug.cgi?id=91423
495
496         Reviewed by Tony Chang.
497
498         IDBObjectStore.createIndex() had a hack to handle a null keyPath argument for the
499         DOMString[] overload and treat it as the string "null". Now that IDL arrays are not
500         nullable by default following r121817 this hack can be removed and the binding layer
501         will automagically coerce to DOMString.
502
503         Test: storage/indexeddb/keypath-basics.html
504
505         * Modules/indexeddb/IDBObjectStore.cpp:
506         (WebCore::IDBObjectStore::createIndex): Remove special case for null in DOMString[] overload.
507         * Modules/indexeddb/IDBObjectStore.idl: Remove Nullable suffix from DOMString[] overload
508         so that the DOMString overload will match null.
509
510 2012-07-16  Bear Travis  <betravis@adobe.com>
511
512         Resolve CSS Exclusions shapeInside, shapeOutside properties to Length based WrapShape classes
513         https://bugs.webkit.org/show_bug.cgi?id=89670
514
515         Reviewed by Dirk Schulze.
516
517         Layout of CSS Exclusions requires length based WrapShape classes,
518         rather than the existing CSSValue based CSSWrapShape classes. This
519         patch adds length based WrapShape analogs to the CSSWrapShapes, and
520         modifies RenderStyle to use a WrapShape instead of a CSSWrapShape.
521         The translation between WrapShape and CSSWrapShape classes
522         is handled by helper functions in the new WrapShapeFunctions files.
523         StyleBuilder resolves CSSWrapShapes to WrapShapes for layout use.
524         CSSComputedStyleDeclaration translates WrapShapes to CSSWrapShapes
525         for style use.
526
527         There are existing tests that cover the style serialization / resolution
528         in fast/exclusions/parsing-wrap-shape-inside.html and
529         fast/exclusions/parsing/wrap-shape-outside.html
530
531         Test: fast/exclusions/parsing-wrap-shape-lengths.html
532
533         * CMakeLists.txt: Build system changes for adding new files
534         * GNUmakefile.list.am: Ditto
535         * Target.pri: Ditto
536         * WebCore.gypi: Ditto
537         * WebCore.vcproj/WebCore.vcproj: Ditto
538         * WebCore.xcodeproj/project.pbxproj: Ditto
539         * css/CSSComputedStyleDeclaration.cpp: Translate WrapShapes back to CSSWrapShapes
540         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
541         * css/CSSWrapShapes.h: Mostly changing functions to be const
542         (WebCore::CSSWrapShapeRectangle::type):
543         (WebCore::CSSWrapShapeCircle::type):
544         (WebCore::CSSWrapShapeEllipse::type):
545         (WebCore::CSSWrapShapePolygon::getXAt):
546         (WebCore::CSSWrapShapePolygon::getYAt):
547         (WebCore::CSSWrapShapePolygon::values):
548         (WebCore::CSSWrapShapePolygon::type):
549         * css/StyleBuilder.cpp: Resolve CSSWrapShapes to WrapShapes
550         (WebCore):
551         (WebCore::ApplyPropertyWrapShape::setValue):
552         (WebCore::ApplyPropertyWrapShape::applyValue):
553         (WebCore::ApplyPropertyWrapShape::createHandler):
554         * css/WrapShapeFunctions.cpp: Added.
555         (WebCore):
556         (WebCore::valueForWrapShape):
557         (WebCore::convertToLength):
558         (WebCore::wrapShapeForValue):
559         * css/WrapShapeFunctions.h: Added.
560         (WebCore):
561         * rendering/style/RenderStyle.h:
562         * rendering/style/StyleRareNonInheritedData.h:
563         (StyleRareNonInheritedData):
564         * rendering/style/WrapShapes.h: Added.
565         (WebCore):
566         (WrapShape):
567         (WebCore::WrapShape::~WrapShape):
568         (WebCore::WrapShape::WrapShape):
569         (WrapShapeRectangle):
570         (WebCore::WrapShapeRectangle::create):
571         (WebCore::WrapShapeRectangle::left):
572         (WebCore::WrapShapeRectangle::top):
573         (WebCore::WrapShapeRectangle::width):
574         (WebCore::WrapShapeRectangle::height):
575         (WebCore::WrapShapeRectangle::cornerRadiusX):
576         (WebCore::WrapShapeRectangle::cornerRadiusY):
577         (WebCore::WrapShapeRectangle::setLeft):
578         (WebCore::WrapShapeRectangle::setTop):
579         (WebCore::WrapShapeRectangle::setWidth):
580         (WebCore::WrapShapeRectangle::setHeight):
581         (WebCore::WrapShapeRectangle::setCornerRadiusX):
582         (WebCore::WrapShapeRectangle::setCornerRadiusY):
583         (WebCore::WrapShapeRectangle::type):
584         (WebCore::WrapShapeRectangle::WrapShapeRectangle):
585         (WrapShapeCircle):
586         (WebCore::WrapShapeCircle::create):
587         (WebCore::WrapShapeCircle::left):
588         (WebCore::WrapShapeCircle::top):
589         (WebCore::WrapShapeCircle::radius):
590         (WebCore::WrapShapeCircle::setLeft):
591         (WebCore::WrapShapeCircle::setTop):
592         (WebCore::WrapShapeCircle::setRadius):
593         (WebCore::WrapShapeCircle::type):
594         (WebCore::WrapShapeCircle::WrapShapeCircle):
595         (WrapShapeEllipse):
596         (WebCore::WrapShapeEllipse::create):
597         (WebCore::WrapShapeEllipse::top):
598         (WebCore::WrapShapeEllipse::left):
599         (WebCore::WrapShapeEllipse::radiusX):
600         (WebCore::WrapShapeEllipse::radiusY):
601         (WebCore::WrapShapeEllipse::setTop):
602         (WebCore::WrapShapeEllipse::setLeft):
603         (WebCore::WrapShapeEllipse::setRadiusX):
604         (WebCore::WrapShapeEllipse::setRadiusY):
605         (WebCore::WrapShapeEllipse::type):
606         (WebCore::WrapShapeEllipse::WrapShapeEllipse):
607         (WrapShapePolygon):
608         (WebCore::WrapShapePolygon::create):
609         (WebCore::WrapShapePolygon::windRule):
610         (WebCore::WrapShapePolygon::values):
611         (WebCore::WrapShapePolygon::getXAt):
612         (WebCore::WrapShapePolygon::getYAt):
613         (WebCore::WrapShapePolygon::setWindRule):
614         (WebCore::WrapShapePolygon::appendPoint):
615         (WebCore::WrapShapePolygon::type):
616         (WebCore::WrapShapePolygon::WrapShapePolygon):
617
618 2012-07-16  Simon Fraser  <simon.fraser@apple.com>
619
620         Fix compositing layers in columns when in paginated mode
621         https://bugs.webkit.org/show_bug.cgi?id=91425
622
623         Reviewed by Dave Hyatt.
624
625         Enhance a hack that was added to allow composited layers to
626         display in columns to work for paginated mode, where the
627         RenderView is renderer with columns.
628
629         Test: compositing/columns/composited-in-paginated.html
630
631         * rendering/RenderLayer.cpp:
632         (WebCore::RenderLayer::updateLayerPosition):
633
634 2012-07-16  Emil A Eklund  <eae@chromium.org>
635
636         Inconsistent rounding in table layout causes background color to bleed through
637         https://bugs.webkit.org/show_bug.cgi?id=91410
638
639         Reviewed by Eric Seidel.
640
641         At certain zoom levels a rounding error in the table layout code cases
642         the table background color to bleed through between cells. Tables layout
643         happens on pixel bounds however the paint offset wasn't correctly rounded.
644
645         Test: fast/sub-pixel/table-rows-no-gaps.html
646
647         * rendering/RenderTable.cpp:
648         (WebCore::RenderTable::paintObject):
649         Round paintOffset before passing it to the paint method of the children.
650
651 2012-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
652
653         Unreviewed, rolling out r122739.
654         http://trac.webkit.org/changeset/122739
655         https://bugs.webkit.org/show_bug.cgi?id=91424
656
657         Broke mac builds (Requested by rniwa on #webkit).
658
659         * inspector/CodeGeneratorInspector.py:
660         (flatten_list):
661
662 2012-07-16  Dana Jansens  <danakj@chromium.org>
663
664         [chromium] Remove non-ephemeral data from RenderSurface as it duplicates data from the owning layer
665         https://bugs.webkit.org/show_bug.cgi?id=91418
666
667         Reviewed by Adrienne Walker.
668
669         This removes the filters and masks from render surfaces, and makes them
670         used directly from the owning layer. Also removes skipsDraw from
671         surfaces as it was just not used at all.
672
673         Covered by existing tests.
674
675         * platform/graphics/chromium/LayerChromium.h:
676         (WebCore::LayerChromium::filters):
677         (WebCore::LayerChromium::backgroundFilters):
678         (WebCore::LayerChromium::hasMask):
679         (WebCore::LayerChromium::hasReplica):
680         (WebCore::LayerChromium::replicaHasMask):
681         (LayerChromium):
682         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
683         (WebCore::RenderSurfaceChromium::RenderSurfaceChromium):
684         * platform/graphics/chromium/RenderSurfaceChromium.h:
685         (RenderSurfaceChromium):
686         * platform/graphics/chromium/cc/CCLayerImpl.h:
687         (WebCore::CCLayerImpl::hasMask):
688         (WebCore::CCLayerImpl::hasReplica):
689         (WebCore::CCLayerImpl::replicaHasMask):
690         (CCLayerImpl):
691         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
692         (WebCore::CCLayerTreeHost::calculateMemoryForRenderSurfaces):
693         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
694         (WebCore::calculateDrawTransformsInternal):
695         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
696         (WebCore::::finishedRenderTarget):
697         (WebCore::reduceOcclusionBelowSurface):
698         (WebCore::::leaveToRenderTarget):
699         * platform/graphics/chromium/cc/CCRenderPass.cpp:
700         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
701         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
702         (WebCore::CCRenderSurface::drawableContentRect):
703         (WebCore::CCRenderSurface::appendQuads):
704         * platform/graphics/chromium/cc/CCRenderSurface.h:
705         (CCRenderSurface):
706
707 2012-07-16  Beth Dakin  <bdakin@apple.com>
708
709         https://bugs.webkit.org/show_bug.cgi?id=91299
710         Paginated views should restrict available height to column height
711         -and corresponding-
712         <rdar://problem/11152108>
713
714         Reviewed by Dan Bernstein.
715
716         Now that RenderViews can have columns, availableLogicalHeight needs to consider 
717         that column height, much like how availableLogicalWidth already considers column 
718         width.
719
720         availableLogicalHeight is newly virtual, like the already-virtual 
721         availableLogicalWidth.
722         * rendering/RenderBox.h:
723         (RenderBox):
724
725         Check with the columnHeight.
726         * rendering/RenderView.cpp:
727         (WebCore):
728         (WebCore::RenderView::availableLogicalHeight):
729         * rendering/RenderView.h:
730
731         setPagination now takes pageLength as an optional parameter. 
732         * testing/InternalSettings.cpp:
733         (WebCore::InternalSettings::setPagination):
734         * testing/InternalSettings.h:
735         (WebCore::InternalSettings::setPagination):
736         (InternalSettings):
737         * testing/InternalSettings.idl:
738         * testing/Internals.cpp:
739         (WebCore::Internals::setPagination):
740         * testing/Internals.h:
741         (WebCore::Internals::setPagination):
742         (Internals):
743         * testing/Internals.idl:
744
745 2012-07-16  Dana Jansens  <danakj@chromium.org>
746
747         [chromium] Remove targetRenderSurface concept, give layers a renderTarget which is the layer whose coordinate space they draw into
748         https://bugs.webkit.org/show_bug.cgi?id=91288
749
750         Reviewed by Adrienne Walker.
751
752         Always use pointers to layers when discussing render targets instead of
753         pointing directly to a RenderSurface.
754
755         Covered by existing tests.
756
757         * platform/graphics/chromium/LayerChromium.cpp:
758         (WebCore::LayerChromium::LayerChromium):
759         (WebCore::LayerChromium::createRenderSurface):
760         * platform/graphics/chromium/LayerChromium.h:
761         (WebCore::LayerChromium::renderTarget):
762         (WebCore::LayerChromium::setRenderTarget):
763         (LayerChromium):
764         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
765         * platform/graphics/chromium/RenderSurfaceChromium.h:
766         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
767         (WebCore::ScrollbarLayerChromium::setTexturePriorities):
768         * platform/graphics/chromium/TiledLayerChromium.cpp:
769         (WebCore::TiledLayerChromium::setTexturePrioritiesInRect):
770         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
771         (WebCore::CCLayerImpl::CCLayerImpl):
772         (WebCore::CCLayerImpl::createRenderSurface):
773         (WebCore::CCLayerImpl::dumpLayerProperties):
774         * platform/graphics/chromium/cc/CCLayerImpl.h:
775         (WebCore::CCLayerImpl::renderTarget):
776         (WebCore::CCLayerImpl::setRenderTarget):
777         (CCLayerImpl):
778         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
779         (WebCore::calculateLayerScissorRect):
780         (WebCore::calculateSurfaceScissorRect):
781         (WebCore::calculateVisibleContentRect):
782         (WebCore::computeScrollCompensationForThisLayer):
783         (WebCore::calculateDrawTransformsInternal):
784         (WebCore::pointIsClippedBySurfaceOrClipRect):
785         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
786         (WebCore::::enterLayer):
787         (WebCore::::leaveLayer):
788         (WebCore::::enterRenderTarget):
789         (WebCore::::finishedRenderTarget):
790         (WebCore):
791         (WebCore::reduceOcclusionBelowSurface):
792         (WebCore::::leaveToRenderTarget):
793         (WebCore::::markOccludedBehindLayer):
794         (WebCore::::occluded):
795         (WebCore::::unoccludedContentRect):
796         (WebCore::::unoccludedContributingSurfaceContentRect):
797         (WebCore::::layerScissorRectInTargetSurface):
798         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
799         (CCOcclusionTrackerBase):
800         (WebCore::CCOcclusionTrackerBase::StackObject::StackObject):
801         (StackObject):
802         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
803         (WebCore::CCQuadCuller::appendSurface):
804         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
805         * platform/graphics/chromium/cc/CCRenderSurface.h:
806         (CCRenderSurface):
807
808 2012-07-16  Florin Malita  <fmalita@chromium.org>
809
810         SVGAnimationElement::currentValuesForValuesAnimation crash
811         https://bugs.webkit.org/show_bug.cgi?id=91326
812
813         Reviewed by Simon Fraser.
814
815         SVGSMILElement::progress() assumes that seekToIntervalCorrespondingToTime() always
816         lands inside a defined interval, but one can force arbitrary time offsets using
817         setCurrentTime(). This patch adds logic for handling non-interval time offsets
818         gracefully.
819
820         Test: svg/animations/smil-setcurrenttime-crash.svg
821
822         * svg/animation/SVGSMILElement.cpp:
823         (WebCore::SVGSMILElement::progress):
824
825 2012-07-16  Joshua Netterfield  <jnetterfield@rim.com>
826
827         [BlackBerry] Upstream WebGL Code
828         https://bugs.webkit.org/show_bug.cgi?id=91143
829
830         Reviewed by Rob Buis.
831
832         This patch includes BlackBerry-specific fixes for anti-aliasing, logging, and shader compilation.
833
834         No new tests, because there is no new functionality.
835
836         * platform/graphics/GraphicsContext3D.h: Add a value for TI Imagination chipsets on BlackBerry platforms
837         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp: Multiple downstream changes
838         (WebCore::GraphicsContext3D::GraphicsContext3D):
839         (WebCore::GraphicsContext3D::reshapeFBOs):
840         (WebCore):
841         (WebCore::GraphicsContext3D::logFrameBufferStatus):
842         (WebCore::GraphicsContext3D::readPixelsIMG): BlackBerry-specific fix for Imagination hardware.
843         (WebCore::GraphicsContext3D::paintsIntoCanvasBuffer):
844         (WebCore::GraphicsContext3D::platformTexture):
845         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
846         (WebCore::GraphicsContext3D::paintToCanvas):
847         * platform/graphics/opengl/Extensions3DOpenGL.h: Remove unnecessary whitespace.
848         (Extensions3DOpenGL):
849         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
850         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): Hack to fix ANGLE-generated code on BlackBerry platforms.
851         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
852         (Extensions3DOpenGLCommon):
853         * platform/graphics/opengl/Extensions3DOpenGLES.cpp: I am not in a position to change system headers from correct to incorrect.
854         (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisample):
855         (WebCore::Extensions3DOpenGLES::supportsExtension):
856         * platform/graphics/opengl/Extensions3DOpenGLES.h: I am not in a position to change system headers from correct to incorrect.
857         (Extensions3DOpenGLES):
858         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Add a BlackBerry-specific anti-aliasing fix.
859         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
860         (WebCore::GraphicsContext3D::prepareTexture):
861         (WebCore::GraphicsContext3D::bindFramebuffer):
862         (WebCore::GraphicsContext3D::compileShader):
863         (WebCore::GraphicsContext3D::copyTexImage2D):
864         (WebCore::GraphicsContext3D::copyTexSubImage2D):
865         (WebCore):
866         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
867         (WebCore):
868
869 2012-07-16  Tony Chang  <tony@chromium.org>
870
871         Position grid items by row/column index
872         https://bugs.webkit.org/show_bug.cgi?id=91293
873
874         Reviewed by Ojan Vafai.
875
876         Do some initial grid positioning. Only handle the simple case where tracks are
877         fixed values and don't properly size the grid items. This gives us something to
878         work with and starts implementing the "Grid Track Sizing Algorithm":
879         http://dev.w3.org/csswg/css3-grid-layout/#grid-track-sizing-algorithm0
880
881         Test: fast/css-grid-layout/place-cell-by-index.html
882
883         * rendering/RenderGrid.cpp:
884         (RenderGrid::GridTrack): Data structure for holding the track size. UsedBreadth matches the terminology
885         used in the spec.
886         (WebCore::RenderGrid::layoutBlock): Pull in some boiler plate code and put the
887         grid specific code in layoutGridItems.
888         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Implement part of the grid track sizing algorithm.
889         (WebCore::RenderGrid::layoutGridItems): Compute the size of grid tracks, layout and position children.
890         (WebCore::RenderGrid::findChildLogicalPosition): Map track sizes to the actual position of the child.
891         * rendering/RenderGrid.h:
892         * rendering/style/RenderStyle.h: Just return a copy of Length rather than a reference to Length. This seems
893         more consistent with other getters that return a Length.
894
895 2012-07-16  Sami Kyostila  <skyostil@chromium.org>
896
897         [chromium] Only apply page scale delta to root scroll layer
898         https://bugs.webkit.org/show_bug.cgi?id=91374
899
900         Reviewed by Adrienne Walker.
901
902         When the user pinch-zooms the web page though the Chromium compositor, the
903         per-layer page scale delta is used to keep track of the difference between the
904         page scale on the compositor thread versus the main thread. On the next
905         commit to the main thread these values are reset to 1.
906
907         When calculating layer positions, the compositor applies a layer's page scale
908         delta both to the layer itself as well as all of its children. Since we are
909         currently updating the page scale delta on all scrollable layers, this results
910         in scrollable child layers getting scaled multiple times.
911
912         This patch changes the compositor to only apply the page scale delta on the
913         root scroll layer.
914
915         New unit test: CCLayerTreeHostImplTest.pageScaleDeltaAppliedToRootScrollLayerOnly
916
917         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
918         (WebCore::CCLayerTreeHostImpl::setPageScaleFactorAndLimits):
919         (WebCore::CCLayerTreeHostImpl::setPageScaleDelta):
920
921 2012-07-16  Kihong Kwon  <kihong.kwon@samsung.com>
922
923         Remove setController from BatteryClient
924         https://bugs.webkit.org/show_bug.cgi?id=90944
925
926         Reviewed by Adam Barth.
927
928         BatteryClient doesn't need to keep m_controller,
929         because BatteryController can be accessed using BatteryController::from().
930         Remove BatteryClient::setController function.
931
932         No new tests. Covered by existing tests.
933
934         * Modules/battery/BatteryClient.h:
935         * Modules/battery/BatteryController.cpp:
936         (WebCore::BatteryController::BatteryController):
937
938 2012-07-16  Mike West  <mkwst@chromium.org>
939
940         Invalid `script-nonce` directives should block script execution.
941         https://bugs.webkit.org/show_bug.cgi?id=91353
942
943         Reviewed by Adam Barth.
944
945         If the `script-nonce` Content Security Policy directive contains an
946         invalid value, we should fail loudly, throwing a warning to the console
947         and denying execution of script on the page. The is in line with the
948         current state of the experimental CSP 1.1 Editors Draft[1].
949
950         [1]: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#script-nonce--experimental
951
952         Test: http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce.html
953
954         * page/ContentSecurityPolicy.cpp:
955         (WebCore::CSPDirectiveList::checkNonceAndReportViolation):
956             Check against null rather than empty for early exit, otherwise
957             only compare nonces if the stored nonce isn't empty.
958         (WebCore::CSPDirectiveList::parseScriptNonce):
959             Assign the empty string if nonce is invalid.
960
961 2012-07-16  Min Qin  <qinmin@chromium.org>
962
963         [Android] remove RenderThemeChromiumAndroid::paintMediaFullscreenButton()
964         https://bugs.webkit.org/show_bug.cgi?id=91291
965
966         Reviewed by Adam Barth.
967
968         The recent media control refactoring added paintMediaFullscreenButton() in RenderThemeChromiumSkia.
969         Since RenderThemeChromiumAndroid inherits from that class, we don't need to redefine this function.
970         No test needed as this change just removes an unnecessary override.
971
972         * rendering/RenderThemeChromiumAndroid.cpp:
973         * rendering/RenderThemeChromiumAndroid.h:
974
975 2012-07-16  Peter Rybin  <peter.rybin@gmail.com>
976
977         Web Inspector: CodeGeneratorInspector.py: fix output write logic to support incremental build
978         https://bugs.webkit.org/show_bug.cgi?id=90642
979
980         Reviewed by Yury Semikhatsky.
981
982         A small intermediate writer is added. It handles comparing old and new source before actual writing.
983
984         * inspector/CodeGeneratorInspector.py:
985         (flatten_list):
986         (SmartOutput):
987         (SmartOutput.__init__):
988         (SmartOutput.write):
989         (SmartOutput.close):
990
991 2012-07-16  Dana Jansens  <danakj@chromium.org>
992
993         [chromium] Incorrect assertion: Replicas will cause a RenderPass to be removed twice
994         https://bugs.webkit.org/show_bug.cgi?id=91328
995
996         Reviewed by Adrienne Walker.
997
998         We asserted that we would never attempt to remove a render pass that had
999         already been removed. This was incorrect as a surface with a replica has
1000         two quads and both may cause us to attempt its removal. We must handle
1001         this case gracefully.
1002
1003         Test: CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit
1004
1005         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1006         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass):
1007
1008 2012-07-16  Ilya Tikhonovsky  <loislo@chromium.org>
1009
1010         Web Inspector: native memory: fix instrumentation for string members
1011         https://bugs.webkit.org/show_bug.cgi?id=91384
1012
1013         Reviewed by Pavel Feldman.
1014
1015         It was possible to report a string member via addMember instead of addString.
1016         This patch is fixing the problem and adding a link time guard.
1017
1018         Covered by existing inspector performance tests infrastructure.
1019
1020         * dom/ElementAttributeData.h:
1021         (WebCore::ElementAttributeData::reportMemoryUsage):
1022         * dom/MemoryInstrumentation.h:
1023         (WebCore):
1024         (WebCore::MemoryClassInfo::addString):
1025         * dom/QualifiedName.h:
1026         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
1027
1028 2012-07-16  Zoltan Horvath  <zoltan@webkit.org>
1029
1030         Unreviewed. Remove unnecessary executable bits after r122720.
1031
1032         * platform/graphics/ImageSource.h:
1033         * platform/graphics/qt/ImageBufferQt.cpp:
1034         * platform/graphics/qt/ImageDecoderQt.cpp:
1035         * platform/graphics/qt/ImageQt.cpp:
1036         * platform/graphics/qt/StillImageQt.h:
1037         * platform/graphics/qt/TransparencyLayer.h:
1038
1039 2012-07-16  Zoltan Horvath  <zoltan@webkit.org>
1040
1041         [Qt] Change NativeImagePtr from QPixmap* to QImage*
1042         https://bugs.webkit.org/show_bug.cgi?id=88785
1043
1044         Reviewed by Simon Hausmann.
1045
1046         Since we use raster engine there is no difference between QPixmap and QImage, so we are going
1047         to use QImage everywhere where it is possible. This refactoring contains the change of the
1048         NativeImagePtr typedef from QPixmap* to QImage* and covers the related modifications.
1049
1050         Part of the change is similar to Viatcheslav Ostapenko's internal work.
1051
1052         Covered by existing tests.
1053
1054         * bridge/qt/qt_pixmapruntime.cpp:
1055         (JSC::Bindings::QtPixmapAssignToElementMethod::invoke):
1056         (JSC::Bindings::QtPixmapInstance::variantFromObject):
1057         * platform/DragImage.h:
1058         (WebCore):
1059         * platform/graphics/GraphicsContext.h:
1060         (GraphicsContext):
1061         * platform/graphics/Image.h:
1062         (Image):
1063         * platform/graphics/ImageSource.h:
1064         (WebCore):
1065         * platform/graphics/gstreamer/ImageGStreamer.h:
1066         * platform/graphics/gstreamer/ImageGStreamerQt.cpp:
1067         (ImageGStreamer::ImageGStreamer):
1068         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1069         (WebCore::GraphicsContext3D::getImageData):
1070         * platform/graphics/qt/GraphicsContextQt.cpp:
1071         (WebCore::GraphicsContext::pushTransparencyLayerInternal):
1072         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1073         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1074         * platform/graphics/qt/ImageBufferDataQt.h:
1075         (ImageBufferData):
1076         * platform/graphics/qt/ImageBufferQt.cpp:
1077         (WebCore::ImageBufferData::ImageBufferData):
1078         (WebCore::ImageBuffer::copyImage):
1079         (WebCore::ImageBuffer::clip):
1080         (WebCore::ImageBuffer::platformTransformColorSpace):
1081         (WebCore::getImageData):
1082         (WebCore::ImageBuffer::putByteArray):
1083         (WebCore::encodeImage):
1084         (WebCore::ImageBuffer::toDataURL):
1085         * platform/graphics/qt/ImageDecoderQt.cpp:
1086         (WebCore::ImageFrame::asNewNativeImage):
1087         * platform/graphics/qt/ImageQt.cpp:
1088         (graphics):
1089         (loadResourceImage):
1090         (WebCore::Image::loadPlatformResource):
1091         (WebCore::Image::setPlatformResource):
1092         (WebCore::Image::drawPattern):
1093         (WebCore::BitmapImage::BitmapImage):
1094         (WebCore::BitmapImage::draw):
1095         (WebCore::BitmapImage::checkForSolidColor):
1096         (WebCore::BitmapImage::create):
1097         * platform/graphics/qt/NativeImageQt.h: Added.
1098         (WebCore):
1099         (NativeImageQt):
1100         (WebCore::NativeImageQt::defaultFormatForAlphaEnabledImages):
1101         (WebCore::NativeImageQt::defaultFormatForOpaqueImages):
1102          * platform/graphics/qt/PatternQt.cpp:
1103         (WebCore::Pattern::createPlatformPattern):
1104         * platform/graphics/qt/StillImageQt.cpp:
1105         (WebCore::StillImage::StillImage):
1106         (WebCore::StillImage::~StillImage):
1107         (WebCore::StillImage::currentFrameHasAlpha):
1108         (WebCore::StillImage::size):
1109         (WebCore::StillImage::nativeImageForCurrentFrame):
1110         (WebCore::StillImage::draw):
1111         * platform/graphics/qt/StillImageQt.h:
1112         (WebCore::StillImage::create):
1113         (WebCore::StillImage::createForRendering):
1114         (StillImage):
1115         * platform/graphics/qt/TransparencyLayer.h:
1116         (WebCore::TransparencyLayer::TransparencyLayer):
1117         (TransparencyLayer):
1118         * platform/graphics/texmap/TextureMapperGL.cpp:
1119         * platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp:
1120         (WebCore::GraphicsSurface::createReadOnlyImage):
1121          * platform/qt/ClipboardQt.cpp:
1122         (WebCore::ClipboardQt::createDragImage):
1123         (WebCore::ClipboardQt::declareAndWriteDragImage):
1124         * platform/qt/CursorQt.cpp:
1125         (WebCore::createCustomCursor):
1126         * platform/qt/DragImageQt.cpp:
1127         (WebCore::createDragImageFromImage):
1128         * platform/qt/PasteboardQt.cpp:
1129         (WebCore::Pasteboard::writeImage):
1130
1131 2012-07-16  Ilya Tikhonovsky  <loislo@chromium.org>
1132
1133         Web Inspector: moving forward to the better memory instrumentation API
1134         https://bugs.webkit.org/show_bug.cgi?id=91259
1135
1136         Reviewed by Pavel Feldman.
1137
1138         I'm trying to remove unnecessary complexity of the API
1139         reportInstrumentedObject and reportInstrumentedPointer will be replaced with addInstrumentedMember
1140         The same will happen with reportPointer, reportObject pair.
1141         Also info.report* will be replaced with info.add*
1142
1143         * bindings/js/ScriptWrappable.h:
1144         (WebCore::ScriptWrappable::reportMemoryUsage):
1145         * bindings/v8/DOMDataStore.cpp:
1146         (WebCore::DOMDataStore::reportMemoryUsage):
1147         * bindings/v8/IntrusiveDOMWrapperMap.h:
1148         (WebCore::ChunkedTable::reportMemoryUsage):
1149         * bindings/v8/ScriptProfiler.cpp:
1150         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
1151         * bindings/v8/ScriptWrappable.h:
1152         (WebCore::ScriptWrappable::reportMemoryUsage):
1153         * bindings/v8/V8Binding.cpp:
1154         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
1155         (WebCore::StringCache::reportMemoryUsage):
1156         * bindings/v8/V8DOMMap.h:
1157         * css/StylePropertySet.h:
1158         (WebCore::StylePropertySet::reportMemoryUsage):
1159         * dom/CharacterData.cpp:
1160         (WebCore::CharacterData::reportMemoryUsage):
1161         * dom/ContainerNode.h:
1162         (WebCore::ContainerNode::reportMemoryUsage):
1163         * dom/Document.cpp:
1164         (WebCore::Document::reportMemoryUsage):
1165         * dom/Element.h:
1166         (WebCore::Element::reportMemoryUsage):
1167         * dom/ElementAttributeData.h:
1168         (WebCore::ElementAttributeData::reportMemoryUsage):
1169         * dom/MemoryInstrumentation.h:
1170         (WebCore::MemoryInstrumentation::addInstrumentedMember):
1171         (MemoryInstrumentation):
1172         (WebCore::MemoryInstrumentation::addMember):
1173         (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedMember):
1174         (WebCore::MemoryInstrumentation::OwningTraits::addMember):
1175         (WebCore::MemoryInstrumentation::addInstrumentedMemberImpl):
1176         (WebCore::MemoryInstrumentation::addMemberImpl):
1177         (WebCore::MemoryClassInfo::addInstrumentedMember):
1178         (WebCore::MemoryClassInfo::addMember):
1179         (WebCore::MemoryClassInfo::addHashMap):
1180         (WebCore::MemoryClassInfo::addHashSet):
1181         (WebCore::MemoryClassInfo::addListHashSet):
1182         (WebCore::MemoryClassInfo::addVector):
1183         (WebCore::MemoryClassInfo::addString):
1184         (WebCore::MemoryInstrumentation::addHashMap):
1185         (WebCore::MemoryInstrumentation::addHashSet):
1186         (WebCore::MemoryInstrumentation::addListHashSet):
1187         (WebCore::MemoryInstrumentation::addVector):
1188         * dom/Node.cpp:
1189         (WebCore::Node::reportMemoryUsage):
1190         * dom/QualifiedName.h:
1191         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
1192         (WebCore::QualifiedName::reportMemoryUsage):
1193         * inspector/InspectorMemoryAgent.cpp:
1194         (WebCore):
1195         * platform/TreeShared.h:
1196         (WebCore::TreeShared::reportMemoryUsage):
1197
1198 2012-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
1199
1200         Unreviewed, rolling out r122714.
1201         http://trac.webkit.org/changeset/122714
1202         https://bugs.webkit.org/show_bug.cgi?id=91380
1203
1204         It broke mac compilation (Requested by loislo on #webkit).
1205
1206         * bindings/js/ScriptWrappable.h:
1207         (WebCore::ScriptWrappable::reportMemoryUsage):
1208         * bindings/v8/DOMDataStore.cpp:
1209         (WebCore::DOMDataStore::reportMemoryUsage):
1210         * bindings/v8/IntrusiveDOMWrapperMap.h:
1211         (WebCore::ChunkedTable::reportMemoryUsage):
1212         * bindings/v8/ScriptProfiler.cpp:
1213         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
1214         * bindings/v8/ScriptWrappable.h:
1215         (WebCore::ScriptWrappable::reportMemoryUsage):
1216         * bindings/v8/V8Binding.cpp:
1217         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
1218         (WebCore::StringCache::reportMemoryUsage):
1219         * bindings/v8/V8DOMMap.h:
1220         * css/StylePropertySet.h:
1221         (WebCore::StylePropertySet::reportMemoryUsage):
1222         * dom/CharacterData.cpp:
1223         (WebCore::CharacterData::reportMemoryUsage):
1224         * dom/ContainerNode.h:
1225         (WebCore::ContainerNode::reportMemoryUsage):
1226         * dom/Document.cpp:
1227         (WebCore::Document::reportMemoryUsage):
1228         * dom/Element.h:
1229         (WebCore::Element::reportMemoryUsage):
1230         * dom/ElementAttributeData.h:
1231         (WebCore::ElementAttributeData::reportMemoryUsage):
1232         * dom/MemoryInstrumentation.h:
1233         (WebCore::MemoryInstrumentation::reportObject):
1234         (MemoryInstrumentation):
1235         (WebCore::MemoryInstrumentation::reportPointer):
1236         (WebCore::MemoryClassInfo::reportInstrumentedPointer):
1237         (WebCore::MemoryClassInfo::reportInstrumentedObject):
1238         (WebCore::MemoryClassInfo::reportPointer):
1239         (WebCore::MemoryClassInfo::reportObject):
1240         (WebCore::MemoryClassInfo::reportHashMap):
1241         (WebCore::MemoryClassInfo::reportHashSet):
1242         (WebCore::MemoryClassInfo::reportListHashSet):
1243         (WebCore::MemoryClassInfo::reportVector):
1244         (MemoryClassInfo):
1245         (WebCore::MemoryClassInfo::reportString):
1246         (WebCore):
1247         (WebCore::MemoryInstrumentation::reportInstrumentedPointer):
1248         (WebCore::MemoryInstrumentation::reportInstrumentedObject):
1249         (WebCore::MemoryInstrumentation::reportHashMap):
1250         (WebCore::MemoryInstrumentation::reportHashSet):
1251         (WebCore::MemoryInstrumentation::reportListHashSet):
1252         (WebCore::MemoryInstrumentation::reportVector):
1253         * dom/Node.cpp:
1254         (WebCore::Node::reportMemoryUsage):
1255         * dom/QualifiedName.h:
1256         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
1257         (WebCore::QualifiedName::reportMemoryUsage):
1258         * inspector/InspectorMemoryAgent.cpp:
1259         (WebCore):
1260         * platform/TreeShared.h:
1261         (WebCore::TreeShared::reportMemoryUsage):
1262
1263 2012-07-16  Ilya Tikhonovsky  <loislo@chromium.org>
1264
1265         Web Inspector: moving forward to the better memory instrumentation API
1266         https://bugs.webkit.org/show_bug.cgi?id=91259
1267
1268         Reviewed by Pavel Feldman.
1269
1270         I'm trying to remove unnecessary complexity of the API
1271         reportInstrumentedObject and reportInstrumentedPointer will be replaced with addInstrumentedMember
1272         The same will happen with reportPointer, reportObject pair.
1273         Also info.report* will be replaced with info.add*
1274
1275         * bindings/js/ScriptWrappable.h:
1276         (WebCore::ScriptWrappable::reportMemoryUsage):
1277         * bindings/v8/DOMDataStore.cpp:
1278         (WebCore::DOMDataStore::reportMemoryUsage):
1279         * bindings/v8/IntrusiveDOMWrapperMap.h:
1280         (WebCore::ChunkedTable::reportMemoryUsage):
1281         * bindings/v8/ScriptProfiler.cpp:
1282         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
1283         * bindings/v8/ScriptWrappable.h:
1284         (WebCore::ScriptWrappable::reportMemoryUsage):
1285         * bindings/v8/V8Binding.cpp:
1286         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
1287         (WebCore::StringCache::reportMemoryUsage):
1288         * bindings/v8/V8DOMMap.h:
1289         * css/StylePropertySet.h:
1290         (WebCore::StylePropertySet::reportMemoryUsage):
1291         * dom/CharacterData.cpp:
1292         (WebCore::CharacterData::reportMemoryUsage):
1293         * dom/ContainerNode.h:
1294         (WebCore::ContainerNode::reportMemoryUsage):
1295         * dom/Document.cpp:
1296         (WebCore::Document::reportMemoryUsage):
1297         * dom/Element.h:
1298         (WebCore::Element::reportMemoryUsage):
1299         * dom/ElementAttributeData.h:
1300         (WebCore::ElementAttributeData::reportMemoryUsage):
1301         * dom/MemoryInstrumentation.h:
1302         (WebCore::MemoryInstrumentation::addInstrumentedMember):
1303         (MemoryInstrumentation):
1304         (WebCore::MemoryInstrumentation::addMember):
1305         (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedMember):
1306         (WebCore::MemoryInstrumentation::OwningTraits::addMember):
1307         (WebCore::MemoryInstrumentation::addInstrumentedMemberImpl):
1308         (WebCore::MemoryInstrumentation::addMemberImpl):
1309         (WebCore::MemoryClassInfo::addInstrumentedMember):
1310         (WebCore::MemoryClassInfo::addMember):
1311         (WebCore::MemoryClassInfo::addHashMap):
1312         (WebCore::MemoryClassInfo::addHashSet):
1313         (WebCore::MemoryClassInfo::addListHashSet):
1314         (WebCore::MemoryClassInfo::addVector):
1315         (WebCore::MemoryClassInfo::addString):
1316         (WebCore::MemoryInstrumentation::addHashMap):
1317         (WebCore::MemoryInstrumentation::addHashSet):
1318         (WebCore::MemoryInstrumentation::addListHashSet):
1319         (WebCore::MemoryInstrumentation::addVector):
1320         * dom/Node.cpp:
1321         (WebCore::Node::reportMemoryUsage):
1322         * dom/QualifiedName.h:
1323         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
1324         (WebCore::QualifiedName::reportMemoryUsage):
1325         * inspector/InspectorMemoryAgent.cpp:
1326         (WebCore):
1327         * platform/TreeShared.h:
1328         (WebCore::TreeShared::reportMemoryUsage):
1329
1330 2012-07-16  Ilya Tikhonovsky  <loislo@chromium.org>
1331
1332         Web Inspector: native memory instrumentation: extract instrumentation methods into MemoryClassInfo
1333         https://bugs.webkit.org/show_bug.cgi?id=91227
1334
1335         Reviewed by Pavel Feldman.
1336
1337         void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
1338         {
1339             MemoryClassInfo<Node> info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
1340             info.visitBaseClass<ScriptWrappable>(this);
1341
1342             info.addMember(m_notInstrumentedPointer); // automatically detects poniter/reference
1343             info.addInstrumentedMember(m_next);
1344             info.addHashSet<MemoryInstrumentation::NonClass>(m_aHash);                // NonClass value_type (report only size of internal template structures)
1345             info.addHashSet<MemoryInstrumentation::NotInstrumentedClass>(m_aHashSet); // not instrumented value_type (use sizeof)
1346             info.addHashSet<MemoryInstrumentation::InstrumentedClass>(m_aHashSet);    // instrumented value_type (call visit)
1347         }
1348
1349         The change is covered by existing tests for native memory snapshot.
1350
1351         * bindings/v8/DOMDataStore.cpp:
1352         (WebCore::DOMDataStore::reportMemoryUsage):
1353         * bindings/v8/IntrusiveDOMWrapperMap.h:
1354         (WebCore::ChunkedTable::reportMemoryUsage):
1355         * bindings/v8/ScriptWrappable.h:
1356         (WebCore::ScriptWrappable::reportMemoryUsage):
1357         * bindings/v8/V8Binding.cpp:
1358         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
1359         (WebCore::StringCache::reportMemoryUsage):
1360         * bindings/v8/V8DOMMap.h:
1361         * css/StylePropertySet.h:
1362         (WebCore::StylePropertySet::reportMemoryUsage):
1363         * dom/CharacterData.cpp:
1364         (WebCore::CharacterData::reportMemoryUsage):
1365         * dom/ContainerNode.h:
1366         (WebCore::ContainerNode::reportMemoryUsage):
1367         * dom/Document.cpp:
1368         (WebCore::Document::reportMemoryUsage):
1369         * dom/Element.h:
1370         (WebCore::Element::reportMemoryUsage):
1371         * dom/ElementAttributeData.h:
1372         (WebCore::ElementAttributeData::reportMemoryUsage):
1373         * dom/MemoryInstrumentation.h:
1374         (MemoryInstrumentation):
1375         (WebCore::MemoryObjectInfo::objectType):
1376         (WebCore::MemoryObjectInfo::objectSize):
1377         (WebCore::MemoryObjectInfo::memoryInstrumentation):
1378         (MemoryObjectInfo):
1379         (WebCore::MemoryObjectInfo::reportObjectInfo):
1380         (WebCore):
1381         (MemoryClassInfo):
1382         (WebCore::MemoryClassInfo::MemoryClassInfo):
1383         (WebCore::MemoryClassInfo::visitBaseClass):
1384         (WebCore::MemoryClassInfo::reportInstrumentedPointer):
1385         (WebCore::MemoryClassInfo::reportInstrumentedObject):
1386         (WebCore::MemoryClassInfo::reportPointer):
1387         (WebCore::MemoryClassInfo::reportObject):
1388         (WebCore::MemoryClassInfo::reportHashMap):
1389         (WebCore::MemoryClassInfo::reportHashSet):
1390         (WebCore::MemoryClassInfo::reportListHashSet):
1391         (WebCore::MemoryClassInfo::reportVector):
1392         (WebCore::MemoryClassInfo::reportString):
1393         * dom/Node.cpp:
1394         (WebCore::Node::reportMemoryUsage):
1395         * dom/QualifiedName.h:
1396         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
1397         (WebCore::QualifiedName::reportMemoryUsage):
1398         * platform/TreeShared.h:
1399         (WebCore::TreeShared::reportMemoryUsage):
1400
1401 2012-07-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1402
1403         Unreviewed. Fix make distcheck.
1404
1405         * GNUmakefile.am: Add missing idl directory.
1406         * GNUmakefile.list.am: Add missing files to compilation.
1407
1408 2012-07-16  Eugene Klyuchnikov  <eustas.big@gmail.com>
1409
1410         Web Inspector: Implement message loop instrumentation for timeline
1411         https://bugs.webkit.org/show_bug.cgi?id=88325
1412
1413         Reviewed by Pavel Feldman.
1414
1415         Message loop instrumentation will show when the render thread is busy.
1416
1417         * inspector/front-end/Settings.js:
1418         (WebInspector.ExperimentsSettings):
1419         Added new experiment.
1420         * inspector/front-end/TimelineGrid.js:
1421         (WebInspector.TimelineGrid.prototype.get dividersLabelBarElement):
1422         Exposed label bar element.
1423         * inspector/front-end/TimelinePanel.js:
1424         (WebInspector.TimelinePanel):
1425         (WebInspector.TimelinePanel.prototype._resetPanel):
1426         Cleanups recorded tasks.
1427         (WebInspector.TimelinePanel.prototype._refresh):
1428         Updates CPU bar.
1429         (WebInspector.TimelinePanel.prototype._refreshRecords):
1430         Ditto.
1431         (WebInspector.TimelinePanel.prototype._refreshCpuBars.compareEndTime):
1432         Ditto.
1433         (WebInspector.TimelinePanel.prototype._refreshCpuBars):
1434         Ditto.
1435         (WebInspector.TimelinePanel.prototype._enableMainThreadMonitoringExperiment):
1436         Adds CPU bar to UI.
1437         (WebInspector.TimelinePanel.prototype._showPopover):
1438         Fix NPE.
1439         (WebInspector.TimelineCalculator.prototype.computeTime):
1440         Utility for position to time conversion.
1441         (WebInspector.TimelineCalculator.prototype.setDisplayWindow):
1442         Remenbers clientWidth.
1443         * inspector/front-end/TimelinePresentationModel.js:
1444         (WebInspector.TimelinePresentationModel.categories):
1445         Define CPU bar colors.
1446         * inspector/front-end/timelinePanel.css:
1447         (.timeline-cpu-bars):
1448         CPU bar styles.
1449         (.timeline-cpu-bars-label):
1450         Ditto.
1451
1452 2012-07-16  Sheriff Bot  <webkit.review.bot@gmail.com>
1453
1454         Unreviewed, rolling out r122681.
1455         http://trac.webkit.org/changeset/122681
1456         https://bugs.webkit.org/show_bug.cgi?id=91363
1457
1458         Patch introduces crashes in debug builds for GTK and EFL ports
1459         (Requested by zdobersek on #webkit).
1460
1461         * platform/ScrollableArea.cpp:
1462         (WebCore::ScrollableArea::scrollPositionChanged):
1463
1464 2012-07-16  Luke Macpherson  <macpherson@chromium.org>
1465
1466         Compilation failure in StyleResolver.cpp (clang)
1467         https://bugs.webkit.org/show_bug.cgi?id=89892
1468
1469         Reviewed by Ryosuke Niwa.
1470
1471         Patch adds assertions that unreachable code is in fact not reached.
1472
1473         Covered by fast/css/variables tests.
1474
1475         * css/CSSParser.cpp:
1476         (WebCore::CSSParser::parseValue):
1477         * css/StyleResolver.cpp:
1478         (WebCore::StyleResolver::collectMatchingRulesForList):
1479
1480 2012-07-15  Mike Lawther  <mikelawther@chromium.org>
1481
1482         Fix calculation of rgba's alpha in CSS custom text
1483         https://bugs.webkit.org/show_bug.cgi?id=91355
1484
1485         Reviewed by Ryosuke Niwa.
1486
1487         Alpha values are stored as an 8 bit value. To convert this to a float in the
1488         range [0,1], we need to divide by 255, not 256. 
1489
1490         Test: fast/css/rgba-custom-text.html
1491
1492         * css/CSSPrimitiveValue.cpp:
1493         (WebCore::CSSPrimitiveValue::customCssText):
1494
1495 2012-07-15  Jason Liu  <jason.liu@torchmobile.com.cn>
1496
1497         [BlackBerry] We shouldn't call didFinishLoading for the old request when a new request has been sent by notifyAuthReceived.
1498         https://bugs.webkit.org/show_bug.cgi?id=90962
1499
1500         Reviewed by Rob Buis.
1501
1502         We start a new NetworkJob with credentials after receiving 401/407 status.
1503         We should not release resources in webcore when the old job is closed because
1504         they are needed by the new one.
1505         We should do as 3XX.
1506
1507         No new tests. No change in behaviour.
1508
1509         * platform/network/blackberry/NetworkJob.cpp:
1510         (WebCore::NetworkJob::NetworkJob):
1511         (WebCore::NetworkJob::notifyAuthReceived):
1512         (WebCore::NetworkJob::shouldReleaseClientResource):
1513         (WebCore::NetworkJob::handleRedirect):
1514         * platform/network/blackberry/NetworkJob.h:
1515         (NetworkJob):
1516
1517 2012-07-15  Ryosuke Niwa  <rniwa@webkit.org>
1518
1519         REGRESSION(r122660): Cannot iterate over HTMLCollection that contains non-child descendent nodes in some conditions
1520         https://bugs.webkit.org/show_bug.cgi?id=91334
1521
1522         Reviewed by Ojan Vafai.
1523
1524         The bug was caused by using lastChild() as the starting node for traversePreviousNode. Since it's the inverse of
1525         Node::traverseNextNode(), which visits nodes in pre order, we must start our search from the last descendent node,
1526         which is visited traverseNextNode immediately before reaching the root node.
1527
1528         Test: fast/dom/htmlcollection-backwards-subtree-iteration.html
1529
1530         * html/HTMLCollection.cpp:
1531         (WebCore::lastDescendent):
1532         (WebCore):
1533         (WebCore::itemBeforeOrAfter):
1534
1535 2012-07-15  Joseph Pecoraro  <pecoraro@apple.com>
1536
1537         Windowless WebView not firing JavaScript load event if there is a media element
1538         https://bugs.webkit.org/show_bug.cgi?id=91331
1539
1540         Reviewed by Eric Carlson.
1541
1542         In prepareForLoad we start deferring the load event. If we fall into this
1543         clause where the page can not start loading media we bail, potentially
1544         indefinitely waiting until we can start loading media. Since we can not
1545         be certain this will ever happen, we should stop deferring the page's
1546         load event.
1547
1548         Test: WebKit1.WindowlessWebViewWithMedia TestWebKitAPI test. The only
1549         way this path was reachable right now is on the mac port.
1550
1551         * html/HTMLMediaElement.cpp:
1552         (WebCore::HTMLMediaElement::loadInternal):
1553
1554 2012-07-15  Dan Bernstein  <mitz@apple.com>
1555
1556         <rdar://problem/11875795> REGRESSION (tiled drawing): Page’s scroll bars flash with each character you type in a textarea (affects Wikipedia and YouTube)
1557         https://bugs.webkit.org/show_bug.cgi?id=91348
1558
1559         Reviewed by Anders Carlsson.
1560
1561         * platform/ScrollableArea.cpp:
1562         (WebCore::ScrollableArea::scrollPositionChanged): Added an early return if the scroll position
1563         did not, in fact, change. This avoids the call to ScrollAnimator::notifyContentAreaScrolled,
1564         which is what causes the scroll bars to flash.
1565
1566 2012-07-14  Eric Carlson  <eric.carlson@apple.com>
1567
1568         Enable AVCF hardware video decoding
1569         https://bugs.webkit.org/show_bug.cgi?id=90015
1570         <rdar://problem/10770317>
1571
1572         Reviewed by Anders Carlsson.
1573
1574         * html/HTMLMediaElement.cpp:
1575         (WebCore):
1576         (WebCore::HTMLMediaElement::mediaPlayerGraphicsDeviceAdapter): New, return the client's graphics 
1577             device adapter.
1578         * html/HTMLMediaElement.h:
1579
1580         * page/ChromeClient.h:
1581         (WebCore::ChromeClient::graphicsDeviceAdapter): New.
1582
1583         * platform/graphics/MediaPlayer.cpp:
1584         (WebCore::MediaPlayer::graphicsDeviceAdapter): New, ask the media element for the graphics
1585             device adapter.
1586         * platform/graphics/MediaPlayer.h:
1587
1588         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Soft-link AVCFPlayerSetDirect3DDevice
1589             and AVCFPlayerEnableHardwareAcceleratedVideoDecoderKey.
1590
1591         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: 
1592         (WebCore::MediaPlayerPrivateAVFoundationCF::createAVAssetForURL): Pass the current d3d9
1593             device interface to the AVFWrapper.
1594         (WebCore::AVFWrapper::createAssetForURL): If the d3d9 device implements IDirect3DDevice9Ex,
1595             tell the AVAsset to enable hardware video decoding.
1596         (WebCore::AVFWrapper::createPlayer): Pass the d3d9 device to the player if it implements IDirect3DDevice9Ex.
1597
1598         * platform/graphics/ca/win/CACFLayerTreeHost.h:
1599         (WebCore::CACFLayerTreeHost::graphicsDeviceAdapter): New, default implementation.
1600
1601         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h:
1602         (WebCore::LegacyCACFLayerTreeHost::graphicsDeviceAdapter): New, default implementation.
1603         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
1604         (WebCore::WKCACFViewLayerTreeHost::graphicsDeviceAdapter): New.
1605         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
1606
1607         * platform/win/SoftLinking.h: Define SOFT_LINK_DLL_IMPORT_OPTIONAL, SOFT_LINK_LOADED_LIBRARY,
1608             and SOFT_LINK_VARIABLE_DLL_IMPORT_OPTIONAL.
1609
1610 2012-07-14  Ryosuke Niwa  <rniwa@webkit.org>
1611
1612         Fix Chromium Mac build failure after r122670.
1613
1614         * platform/graphics/mac/ComplexTextController.cpp:
1615
1616 2012-07-14  Mark Rowe  <mrowe@apple.com>
1617
1618         Fix the Snow Leopard build.
1619
1620         * platform/LocalizedStrings.cpp:
1621         (WebCore::contextMenuItemTagLookUpInDictionary): Fix a typo in the condition so that Snow Leopard
1622         continues to take the expected path.
1623
1624 2012-07-14  Ryosuke Niwa  <rniwa@webkit.org>
1625
1626         Accessing the last item in children should be a constant time operation
1627         https://bugs.webkit.org/show_bug.cgi?id=91320
1628
1629         Reviewed by Ojan Vafai.
1630
1631         Traverse nodes from the last item when the target offset we're looking for is closer to the last item
1632         than to the cached item. e.g. if the cached item was at offset 0 in the collection and length was 100,
1633         we should not be looking for the item at offset 95 from the cached item.
1634
1635         Note that this trick can be only used in HTML collection that supports itemBefore and when the length
1636         cache is available.
1637
1638         Also broke shouldSearchFromFirstItem into smaller logical pieces to clarify the intents.
1639
1640         Test: perf/htmlcollection-last-item.html
1641
1642         * html/HTMLCollection.cpp:
1643         (WebCore):
1644         (WebCore::HTMLCollection::isLastItemCloserThanLastOrCachedItem):
1645         (WebCore::HTMLCollection::isFirstItemCloserThanCachedItem):
1646         (WebCore::HTMLCollection::item):
1647         * html/HTMLCollection.h:
1648         (HTMLCollection):
1649
1650 2012-07-14  Mark Rowe  <mrowe@apple.com>
1651
1652         Fix the Windows build.
1653
1654         * platform/network/cf/DNSCFNet.cpp: Fix the condition to take Windows in to account.
1655
1656 2012-07-14  Mark Rowe  <mrowe@apple.com>
1657
1658         Make it explicit which code paths iOS should use when doing checks based on OS X versions.
1659
1660         Rubber-stamped by David Kilzer.
1661
1662         * WebCore.exp.in:
1663         * accessibility/AccessibilityList.h:
1664         * accessibility/AccessibilityTable.h:
1665         * accessibility/mac/AXObjectCacheMac.mm:
1666         * editing/mac/EditorMac.mm:
1667         * loader/MainResourceLoader.cpp:
1668         * loader/MainResourceLoader.h:
1669         * page/AlternativeTextClient.h:
1670         * page/mac/SettingsMac.mm:
1671         * platform/LocalizedStrings.cpp:
1672         * platform/MemoryPressureHandler.cpp:
1673         * platform/audio/mac/AudioBusMac.mm:
1674         * platform/graphics/Gradient.h:
1675         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1676         * platform/graphics/ca/GraphicsLayerCA.cpp:
1677         * platform/graphics/ca/PlatformCALayer.h:
1678         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1679         * platform/graphics/ca/mac/TileCache.mm:
1680         * platform/graphics/cg/GraphicsContextCG.cpp:
1681         * platform/graphics/cg/ImageBufferCG.cpp:
1682         * platform/graphics/cg/ImageBufferDataCG.h:
1683         * platform/graphics/cg/ImageCG.cpp:
1684         * platform/graphics/cg/ImageSourceCG.cpp:
1685         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1686         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1687         * platform/graphics/mac/ComplexTextController.cpp:
1688         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1689         * platform/graphics/mac/FontCacheMac.mm:
1690         * platform/graphics/mac/FontCustomPlatformData.cpp:
1691         * platform/graphics/mac/FontMac.mm:
1692         * platform/graphics/mac/GraphicsContextMac.mm:
1693         * platform/graphics/mac/SimpleFontDataMac.mm:
1694         * platform/graphics/mac/WebLayer.h:
1695         * platform/graphics/mac/WebLayer.mm:
1696         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1697         * platform/mac/DisplaySleepDisabler.cpp:
1698         * platform/mac/DisplaySleepDisabler.h:
1699         * platform/mac/HTMLConverter.h:
1700         * platform/mac/HTMLConverter.mm:
1701         * platform/mac/MemoryPressureHandlerMac.mm:
1702         * platform/mac/SharedTimerMac.mm:
1703         * platform/mac/SuddenTermination.mm:
1704         * platform/mac/WebFontCache.mm:
1705         * platform/network/Credential.h:
1706         * platform/network/ResourceHandle.h:
1707         * platform/network/cf/DNSCFNet.cpp:
1708         * platform/network/cf/ProxyServerCFNet.cpp:
1709         * platform/network/cf/ResourceRequest.h:
1710         * platform/network/cf/SocketStreamHandleCFNet.cpp:
1711         * platform/network/mac/AuthenticationMac.mm:
1712         * platform/network/mac/CookieStorageMac.mm:
1713         * platform/network/mac/ResourceHandleMac.mm:
1714         * platform/network/mac/ResourceRequestMac.mm:
1715         * platform/network/mac/WebCoreURLResponse.mm:
1716         * platform/text/TextChecking.h:
1717         * platform/text/cf/HyphenationCF.cpp:
1718         * platform/text/mac/HyphenationMac.mm:
1719         * rendering/RenderLayerBacking.cpp:
1720         * rendering/RenderLayerCompositor.cpp:
1721
1722 2012-07-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1723
1724         Unreviewed, rolling out r122614.
1725         http://trac.webkit.org/changeset/122614
1726         https://bugs.webkit.org/show_bug.cgi?id=91317
1727
1728         Broke performance tests (Requested by rniwa on #webkit).
1729
1730         * bindings/v8/V8Binding.cpp:
1731         (WebCore::StringCache::v8ExternalStringSlow):
1732
1733 2012-07-05  Robert Hogan  <robert@webkit.org>
1734
1735         CSS 2.1 failure: vertical-align-boxes-001 fails
1736         https://bugs.webkit.org/show_bug.cgi?id=90626
1737
1738         Reviewed by Eric Seidel.
1739
1740         Tests: css2.1/20110323/vertical-align-boxes-001.htm
1741
1742         A percentage value vertical-align is always a percentage of the actual line-height rather than
1743         the margin box per http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align: 'Percentages: 
1744         refer to the 'line-height' of the element itself'.  Confusingly, RenderBox::lineheight() is a
1745         shorthand into the dimensions of the margin box for replaced elements in the other vertical-align
1746         cases, i.e. where it's the margin box that's relevant rather than the 'line-height'. So rather than patch RenderBox's
1747         lineHeight() to somehow consider the percentage cases, just give percentage vertical-align the full computedLineHeight()
1748         rather than lineHeight()'s margin box.
1749
1750         * rendering/RootInlineBox.cpp:
1751         (WebCore::RootInlineBox::verticalPositionForBox):
1752
1753 2012-07-13  Ryosuke Niwa  <rniwa@webkit.org>
1754
1755         Iterating backwards over HTMLCollection is O(n^2)
1756         https://bugs.webkit.org/show_bug.cgi?id=91306
1757
1758         Reviewed by Anders Carlsson.
1759
1760         Fixed the bug by introducing itemBefore that iterates nodes backwards to complement itemAfter.
1761         Unfortunately, some HTML collections such as HTMLFormCollection and HTMLTableRowsCollection have
1762         its own itemAfter function and writing an equivalent itemBefore is somewhat tricky. For now,
1763         added a new boolean flag indicating whether a given HTML collection supports itemBefore or not,
1764         and left those HTML collections that override itemAfter alone.
1765
1766         This also paves our way to share more code between DynamicNodeList and HTMLCollection.
1767
1768         Test: perf/htmlcollection-backwards-iteration.html
1769
1770         * dom/DynamicNodeList.h:
1771         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Takes ItemBeforeSupportType.
1772         (WebCore::DynamicNodeListCacheBase::supportsItemBefore): Added.
1773         (DynamicNodeListCacheBase):
1774         (WebCore::DynamicNodeListCacheBase::setItemCache): Replaced a FIXME by an assertion now that
1775         we can.
1776         * html/HTMLAllCollection.cpp:
1777         (WebCore::HTMLAllCollection::HTMLAllCollection): Supports itemBefore since it doesn't override
1778         itemAfter.
1779         * html/HTMLCollection.cpp:
1780         (WebCore::HTMLCollection::HTMLCollection):
1781         (WebCore::HTMLCollection::create):
1782         (WebCore::isAcceptableElement): Made it a static local function instead of a static member.
1783         (WebCore::nextNode): Templatized.
1784         (WebCore::itemBeforeOrAfter): Extracted from itemAfter and templatized.
1785         (WebCore::HTMLCollection::itemBefore): Added.
1786         (WebCore::HTMLCollection::itemAfter):
1787         (WebCore::HTMLCollection::shouldSearchFromFirstItem): Added. Determines whether we should reset
1788         the item cache to the first item. We obviously do if the cache is invalid. If the target offset
1789         is after the cached offset, then we shouldn't go back regardless of availability of itemBefore.
1790         Otherwise, we go back to the first item iff itemBefore is not available or the distance from
1791         the cached offset to the target offset is greater than the target offset itself.
1792         (WebCore::HTMLCollection::length):
1793         (WebCore::HTMLCollection::item): Use the term "offset" to match the terminology elsewhere.
1794         (WebCore::HTMLCollection::itemBeforeOrAfterCachedItem): Ditto. Also added the logic to iterate
1795         nodes backwards using itemBefore. Once we're in this branch, we should always find a matching
1796         item since the target offset was less than the cached offset, and offsets are non-negative.
1797         If we had ever reached the end of the loop without finding an item, it indicates that the cache
1798         has been invalid and we have some serious bug elsewhere.
1799         * html/HTMLCollection.h:
1800         (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
1801         (HTMLCollection):
1802         * html/HTMLOptionsCollection.cpp:
1803         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): Supports itemBefore since it doesn't
1804         override itemAfter.
1805         * html/HTMLFormCollection.cpp:
1806         (WebCore::HTMLFormCollection::HTMLFormCollection): Doesn't support itemBefore as it overrides
1807         itemAfter.
1808         * html/HTMLNameCollection.cpp:
1809         (WebCore::HTMLNameCollection::HTMLNameCollection): Ditto.
1810         * html/HTMLPropertiesCollection.cpp:
1811         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
1812         * html/HTMLTableRowsCollection.cpp:
1813         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
1814
1815 2012-07-13  Eric Penner  <epenner@google.com>
1816
1817         [chromium] Add 'self-managed' option to CCPrioritizedTexture to enable render-surface and canvas use cases.
1818         https://bugs.webkit.org/show_bug.cgi?id=91177
1819
1820         Reviewed by Adrienne Walker.
1821
1822         This makes the render-surface memory use case generic as 'self-managed' textures,
1823         as this use case is popping up in other places (eg. canvases). It's exactly the
1824         same idea except we can have as many place-holders as we want at arbitrary
1825         priorities.
1826
1827         This already tested by the render surface unit tests which now also use the 
1828         generic placeholder.
1829
1830         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1831         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1832         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
1833         (WebCore::CCLayerTreeHost::updateLayers):
1834         (WebCore::CCLayerTreeHost::setPrioritiesForSurfaces):
1835         (WebCore):
1836         (WebCore::CCLayerTreeHost::setPrioritiesForLayers):
1837         (WebCore::CCLayerTreeHost::prioritizeTextures):
1838         (WebCore::CCLayerTreeHost::calculateMemoryForRenderSurfaces):
1839         (WebCore::CCLayerTreeHost::paintLayerContents):
1840         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1841         (CCLayerTreeHost):
1842         * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp:
1843         (WebCore::CCPrioritizedTexture::CCPrioritizedTexture):
1844         (WebCore::CCPrioritizedTexture::setToSelfManagedMemoryPlaceholder):
1845         * platform/graphics/chromium/cc/CCPrioritizedTexture.h:
1846         (CCPrioritizedTexture):
1847         (WebCore::CCPrioritizedTexture::setIsSelfManaged):
1848         (WebCore::CCPrioritizedTexture::isSelfManaged):
1849         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
1850         (WebCore::CCPrioritizedTextureManager::prioritizeTextures):
1851         (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
1852         (WebCore::CCPrioritizedTextureManager::destroyBacking):
1853         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
1854         (CCPrioritizedTextureManager):
1855         (WebCore::CCPrioritizedTextureManager::memoryForSelfManagedTextures):
1856
1857 2012-07-13  Kent Tamura  <tkent@chromium.org>
1858
1859         Internals: Clean up the mock PagePopupDriver correctly.
1860         https://bugs.webkit.org/show_bug.cgi?id=91250
1861
1862         Unreviewed, a trivial testing code fix.
1863
1864         * testing/InternalSettings.cpp:
1865         (WebCore::InternalSettings::Backup::restoreTo):
1866         (WebCore::InternalSettings::reset):
1867         Resetting PaePopupDriver here instead of Backup::restoreTo.
1868         Also, close the mock popup before resetting PagePopupDriver by clearing m_pagePopupDriver.
1869         * testing/MockPagePopupDriver.cpp:
1870         (WebCore::MockPagePopupDriver::~MockPagePopupDriver):
1871         Close the popup.
1872
1873 2012-07-13  Tony Payne  <tpayne@chromium.org>
1874
1875         Remove Widget from screenColorProfile
1876         https://bugs.webkit.org/show_bug.cgi?id=91300
1877
1878         Reviewed by Adam Barth.
1879
1880         Chromium, the only platform implementing screenColorProfile, does not
1881         need the Widget, so removing for simplicity.
1882
1883         Covered by existing tests.
1884
1885         * platform/PlatformScreen.h:
1886         (WebCore): Updated comment to remove reference to type param that no
1887         longer exists and removed Widget param.
1888         * platform/blackberry/PlatformScreenBlackBerry.cpp:
1889         (WebCore::screenColorProfile): Removed widget param.
1890         * platform/chromium/PlatformScreenChromium.cpp:
1891         (WebCore::screenColorProfile): Removed widget param.
1892         * platform/efl/PlatformScreenEfl.cpp:
1893         (WebCore::screenColorProfile): Removed widget param.
1894         * platform/gtk/PlatformScreenGtk.cpp:
1895         (WebCore::screenColorProfile): Removed widget param.
1896         * platform/image-decoders/ImageDecoder.h:
1897         (WebCore::ImageDecoder::qcmsOutputDeviceProfile): removed param to
1898         match screenColorProfile()'s new spec.
1899         * platform/mac/PlatformScreenMac.mm:
1900         (WebCore::screenColorProfile): Removed widget param.
1901         * platform/qt/PlatformScreenQt.cpp:
1902         (WebCore::screenColorProfile): Removed widget param.
1903         * platform/win/PlatformScreenWin.cpp:
1904         (WebCore::screenColorProfile): Removed widget param.
1905
1906 2012-07-13  Brian Anderson  <brianderson@chromium.org>
1907
1908         [chromium] Add flushes to CCTextureUpdater::update
1909         https://bugs.webkit.org/show_bug.cgi?id=89035
1910
1911         Reviewed by Adrienne Walker.
1912
1913         Automatic flushes are being removed from the command buffer, so
1914         this moves the flushes into the CCTextureUpdater itself.
1915
1916         CCTextureUpdaterTest added to verify texture upload/flushing patterns.
1917
1918         * platform/graphics/chromium/cc/CCGraphicsContext.h:
1919         (WebCore::CCGraphicsContext::flush):
1920         (CCGraphicsContext):
1921         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
1922         (WebCore):
1923         (WebCore::CCTextureUpdater::update): Manual flushes added here.
1924
1925 2012-07-13  Kiran Muppala  <cmuppala@apple.com>
1926
1927         REGRESSION: RenderInline boundingBox ignores relative position offset
1928         https://bugs.webkit.org/show_bug.cgi?id=91168
1929
1930         Reviewed by Simon Fraser.
1931
1932         RenderGeometryMap, used for caching the transform to the view,
1933         expects the first mapping pushed, to be that of the view itself.
1934         RenderInline was instead pushing it's own offset first.  Besides
1935         the offset of the view itself was not being pushed.
1936
1937         Relaxed the RenderGeometryMap restriction that the first pushed
1938         step should be of the view.  It is sufficient that the view's mapping
1939         is pushed in the first call to pushMappingsToAncestor.  Modified
1940         RenderInline to push the offset of the view also to the geometry map.
1941
1942         Test: fast/inline/inline-relative-offset-boundingbox.html
1943
1944         * rendering/RenderGeometryMap.cpp:
1945         (WebCore::RenderGeometryMap::pushMappingsToAncestor): Add assertion to
1946         check if mapping to view was pushed in first invocation.
1947         (WebCore::RenderGeometryMap::pushView): Correct assertion that checks
1948         if the view's mapping is the first one to be applied.
1949         (WebCore::RenderGeometryMap::stepInserted): Use isRenderView to check if
1950         a mapping step belongs to a view instead of using mapping size.
1951         (WebCore::RenderGeometryMap::stepRemoved): Ditto.
1952         * rendering/RenderInline.cpp:
1953         (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::AbsoluteQuadsGeneratorContext):
1954         Push mappings all the way up to and including the view.
1955
1956 2012-07-13  Xianzhu Wang  <wangxianzhu@chromium.org>
1957
1958         Move WebCore/platform/text/Base64 to WTF/wtf/text
1959         https://bugs.webkit.org/show_bug.cgi?id=91162
1960
1961         Reviewed by Adam Barth.
1962
1963         No new tests. Files moving only.
1964
1965         * CMakeLists.txt:
1966         * GNUmakefile.list.am:
1967         * Modules/websockets/WebSocketHandshake.cpp:
1968         (WebCore::generateSecWebSocketKey):
1969         (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
1970         * Target.pri:
1971         * WebCore.gypi:
1972         * WebCore.order:
1973         * WebCore.vcproj/WebCore.vcproj:
1974         * WebCore.xcodeproj/project.pbxproj:
1975         * fileapi/FileReaderLoader.cpp:
1976         (WebCore::FileReaderLoader::convertToDataURL):
1977         * inspector/DOMPatchSupport.cpp:
1978         (WebCore::DOMPatchSupport::createDigest):
1979         * inspector/InspectorFileSystemAgent.cpp:
1980         (WebCore):
1981         * inspector/InspectorPageAgent.cpp:
1982         (WebCore::InspectorPageAgent::cachedResourceContent):
1983         (WebCore::InspectorPageAgent::sharedBufferContent):
1984         * loader/archive/mhtml/MHTMLArchive.cpp:
1985         (WebCore::MHTMLArchive::generateMHTMLData):
1986         * loader/archive/mhtml/MHTMLParser.cpp:
1987         (WebCore::MHTMLParser::parseNextPart):
1988         * page/DOMWindow.cpp:
1989         (WebCore::DOMWindow::btoa):
1990         (WebCore::DOMWindow::atob):
1991         * page/Page.cpp:
1992         (WebCore::Page::userStyleSheetLocationChanged):
1993         * platform/graphics/cairo/ImageBufferCairo.cpp:
1994         (WebCore::ImageBuffer::toDataURL):
1995         * platform/graphics/cg/ImageBufferCG.cpp:
1996         (WebCore::CGImageToDataURL):
1997         * platform/graphics/gtk/ImageBufferGtk.cpp:
1998         (WebCore::ImageBuffer::toDataURL):
1999         * platform/graphics/skia/FontCustomPlatformData.cpp:
2000         (WebCore::createUniqueFontName):
2001         * platform/graphics/skia/ImageBufferSkia.cpp:
2002         (WebCore::ImageBuffer::toDataURL):
2003         (WebCore::ImageDataToDataURL):
2004         * platform/graphics/win/FontCustomPlatformData.cpp:
2005         (WebCore::createUniqueFontName):
2006         * platform/graphics/wince/FontCustomPlatformData.cpp:
2007         (WebCore::createUniqueFontName):
2008         * platform/graphics/wince/ImageBufferWinCE.cpp:
2009         * platform/graphics/wx/ImageBufferWx.cpp:
2010         * platform/network/DataURL.cpp:
2011         (WebCore::handleDataURL):
2012         * platform/network/cf/ResourceHandleCFNet.cpp:
2013         (WebCore::applyBasicAuthorizationHeader):
2014         * platform/network/mac/ResourceHandleMac.mm:
2015         (WebCore::applyBasicAuthorizationHeader):
2016         * platform/network/soup/ResourceHandleSoup.cpp:
2017         * platform/win/SSLKeyGeneratorWin.cpp:
2018         (WebCore::WebCore::signedPublicKeyAndChallengeString):
2019
2020 2012-07-13  Xianzhu Wang  <wangxianzhu@chromium.org>
2021
2022         [Chromium] Sometimes bottom of text is truncated when page has a fractional scale
2023         https://bugs.webkit.org/show_bug.cgi?id=88684
2024
2025         Reviewed by Tony Chang.
2026
2027         When the page has a fractional scale, the ascent and descent part of the fonts might be fractional.
2028         If the descent part is rounded down, the bottom of the text might be truncated when displayed
2029         when subpixel text positioning is enabled.
2030         To avoid that, borrow one unit from the ascent when possible.
2031
2032         Test: fast/text/descent-clip-in-scaled-page.html
2033
2034         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
2035         (WebCore::FontPlatformData::setupPaint): Moved NoPreference handling into querySystemForRenderStyle so that fontRenderStyle() can have actual styles without NoPreference.
2036         (WebCore::FontPlatformData::querySystemForRenderStyle): Added NoPreference handling (moved from setupPaint)
2037         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
2038         (FontPlatformData):
2039         (WebCore::FontPlatformData::fontRenderStyle): Added to let SimpleFontDataSkia access the font render styles.
2040         * platform/graphics/skia/SimpleFontDataSkia.cpp:
2041         (WebCore::SimpleFontData::platformInit):
2042
2043 2012-07-13  Ryosuke Niwa  <rniwa@webkit.org>
2044
2045         Remove an assertion after r122637.
2046
2047         * dom/DynamicNodeList.h:
2048         (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange):
2049
2050 2012-07-13  Pierre Rossi  <pierre.rossi@gmail.com>
2051
2052         [Qt] Improve the mobile theme slightly
2053         https://bugs.webkit.org/show_bug.cgi?id=90806
2054
2055         Reviewed by Kenneth Rohde Christiansen.
2056
2057         Improve drawing of the mobile theme's controls' background.
2058
2059         Ensure the focus ring never appears with the mobile theme, since it
2060         looks bad in combination with the highlights.
2061
2062         No new tests. The painting code from the mobile theme is still
2063         not covered specifically (it will when we revive pixel tests).
2064
2065         * platform/qt/RenderThemeQtMobile.cpp:
2066         (WebCore):
2067         (WebCore::addPointToOctants): Added. This is simply a helper to avoid
2068             doing too much duplicate work in drawControlBackground.
2069         (WebCore::drawControlBackground): Rely on the octant logic added above
2070             and take the opportunity to increase the granularity.
2071         (WebCore::borderPen):
2072         (WebCore::StylePainterMobile::findLineEdit):
2073         (WebCore::RenderThemeQtMobile::adjustTextFieldStyle):
2074         * platform/qt/RenderThemeQtMobile.h:
2075         (RenderThemeQtMobile):
2076         (WebCore::RenderThemeQtMobile::supportsFocusRing):
2077
2078 2012-07-13  Julien Chaffraix  <jchaffraix@webkit.org>
2079
2080         Remove an always-failing table-wrapping check in RenderObject::addChild
2081         https://bugs.webkit.org/show_bug.cgi?id=91286
2082
2083         Reviewed by Eric Seidel.
2084
2085         Due to the structure of the code, this test is always failing (newChild->isTableCell()
2086         is true to get in the branch).
2087
2088         The changeset adding the code didn't add testing so I poundered adding the mentioned test,
2089         which is passing. However the test would need to be blindly changed to be included in our
2090         test harness. I would also expect this code to be exercised by other table tests anyway.
2091
2092         * rendering/RenderObject.cpp:
2093         (WebCore::RenderObject::addChild):
2094         Removed never-reached branch. While at it, removed a 'what' comment in the same file.
2095
2096 2012-07-13  Emil A Eklund  <eae@chromium.org>
2097
2098         Use LayoutBoxExtent for image outsets
2099         https://bugs.webkit.org/show_bug.cgi?id=91166
2100
2101         Reviewed by Tony Chang.
2102
2103         Change RenderStyle and calling code to use LayoutBoxExtent for image
2104         outsets and remove text direction and writing mode versions of the
2105         outline getters from RenderStyle as LayoutBoxExtent provides the same
2106         functionality.
2107
2108         No new tests, no change in functionality.
2109
2110         * platform/graphics/FractionalLayoutBoxExtent.h:
2111         * platform/graphics/FractionalLayoutBoxExtent.cpp:
2112         (WebCore::FractionalLayoutBoxExtent::logicalTop):
2113         (WebCore::FractionalLayoutBoxExtent::logicalBottom):
2114         Add logicalTop and logicalBottom methods to go with the existing
2115         logicalLeft and logicalRight ones.
2116
2117         * platform/graphics/FractionalLayoutRect.h:
2118         (WebCore::FractionalLayoutRect::expand):
2119         Add FractionalLayoutBoxExtent version of expand method.
2120
2121         * rendering/InlineFlowBox.cpp:
2122         (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
2123         Change implementation to use the new FractionalLayoutBoxExtent version of
2124         borderImageOutsets and the logicalTop/Bottom/Left/Right methods.
2125         
2126         (WebCore::clipRectForNinePieceImageStrip):
2127         Change implementation to use the new FractionalLayoutBoxExtent version of
2128         borderImageOutsets.
2129         
2130         * rendering/RenderBox.cpp:
2131         (WebCore::RenderBox::maskClipRect):
2132         Change implementation to use the new FractionalLayoutBoxExtent version of
2133         borderImageOutsets and the new FractionalLayoutRect::expand method.
2134         
2135         (WebCore::RenderBox::addVisualEffectOverflow):
2136         Change implementation to use the new FractionalLayoutBoxExtent version of
2137         borderImageOutsets.
2138         
2139         * rendering/RenderBoxModelObject.cpp:
2140         (WebCore::RenderBoxModelObject::paintNinePieceImage):
2141         Change implementation to use the new FractionalLayoutBoxExtent version of
2142         borderImageOutsets and the new FractionalLayoutRect::expand method.
2143
2144         * rendering/style/RenderStyle.h:
2145         * rendering/style/RenderStyle.cpp:
2146         (WebCore::RenderStyle::imageOutsets):
2147         Change getImageOutsets to return a FractionalLayoutBoxExtent object and
2148         rename to imageOutsets to match the webkit naming convention for getters.
2149
2150         Remove getBorderImageHorizontalOutsets, getBorderImageVerticalOutsets,
2151         getBorderImageInlineDirectionOutsets, getImageHorizontalOutsets,
2152         getImageVerticalOutsets and getBorderImageBlockDirectionOutsets methods
2153         as the same functionality is provided by FractionalLayoutBoxExtent.
2154
2155 2012-07-13  David Hyatt  <hyatt@apple.com>
2156
2157         https://bugs.webkit.org/show_bug.cgi?id=91278
2158         Improve block margin estimation function to account for not having a layout and for quirks mode
2159         
2160         Reviewed by Simon Fraser.
2161
2162         * rendering/RenderBlock.cpp:
2163         (WebCore::RenderBlock::marginBeforeEstimateForChild):
2164         Revise marginBeforeEstimateForChild so that it computes block margins for the grandchild before
2165         recurring. This includes the quirks margin information as well. This ensures that the margins are
2166         up-to-date when checked, even before the object has had its first layout.
2167         
2168         * rendering/RenderBlock.h:
2169         (WebCore::RenderBlock::setMarginStartForChild):
2170         (WebCore::RenderBlock::setMarginEndForChild):
2171         (WebCore::RenderBlock::setMarginBeforeForChild):
2172         (WebCore::RenderBlock::setMarginAfterForChild):
2173         * rendering/RenderBox.cpp:
2174         (WebCore::RenderBox::computeBlockDirectionMargins):
2175         * rendering/RenderBox.h:
2176         (RenderBox):
2177         Add consts in order to compile.
2178
2179 2012-07-13  Ryosuke Niwa  <rniwa@webkit.org>
2180
2181         NodeLists should not invalidate on irreleavnt attribute changes
2182         https://bugs.webkit.org/show_bug.cgi?id=91277
2183
2184         Reviewed by Ojan Vafai.
2185
2186         Explicitely check the invalidation type and the changed attribute in NodeListNodeData::invalidateCaches
2187         and ElementRareData::clearHTMLCollectionCaches to only invalidate node lists affected by the change.
2188
2189         Also merged invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged
2190         as invalidateNodeListCachesInAncestors since they're almost identical after r122498.
2191
2192         In addition, moved shouldInvalidateNodeListForType from Document.cpp to DynamicNodeList.h and renamed it to
2193         shouldInvalidateTypeOnAttributeChange since it needs to called in Node.cpp and ElementRareData.h.
2194
2195         * dom/Attr.cpp:
2196         (WebCore::Attr::setValue):
2197         (WebCore::Attr::childrenChanged):
2198         * dom/ContainerNode.cpp:
2199         (WebCore::ContainerNode::childrenChanged):
2200         * dom/Document.cpp:
2201         (WebCore::Document::registerNodeListCache): Calls isRootedAtDocument() instead of directly comparing
2202         the value of NodeListRootType in order to prepare for the bug 80269.
2203         (WebCore::Document::unregisterNodeListCache): Ditto.
2204         (WebCore): shouldInvalidateNodeListForType is moved to DynamicNodeList.h
2205         (WebCore::Document::shouldInvalidateNodeListCaches):
2206         * dom/DynamicNodeList.h:
2207         (DynamicNodeListCacheBase):
2208         (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Moved from Document.cpp.
2209         * dom/Element.cpp: 
2210         (WebCore::Element::attributeChanged):
2211         * dom/ElementRareData.h:
2212         (WebCore::ElementRareData::clearHTMLCollectionCaches): Takes const QualifiedName* to compare against
2213         the invalidation type of HTML collections via shouldInvalidateTypeOnAttributeChange.
2214         * dom/Node.cpp:
2215         (WebCore::Node::invalidateNodeListCachesInAncestors): Merged invalidateNodeListCachesInAncestors and
2216         invalidateNodeListsCacheAfterChildrenChanged. Also pass attrName to clearHTMLCollectionCaches.
2217         (WebCore::NodeListsNodeData::invalidateCaches): Compares attrName against the invalidation type of
2218         node lists via shouldInvalidateTypeOnAttributeChange.
2219         (WebCore):
2220         * dom/Node.h:
2221         (Node):
2222         * dom/NodeRareData.h:
2223         (WebCore::NodeRareData::ensureNodeLists): Merged NodeRareData::createNodeLists.
2224         (WebCore::NodeRareData::clearChildNodeListCache): Moved from Node.cpp.
2225         (NodeRareData):
2226         * html/HTMLCollection.h:
2227         (HTMLCollectionCacheBase):
2228
2229 2012-07-13  Arpita Bahuguna  <arpitabahuguna@gmail.com>
2230
2231         Refactor RenderTable to use the section's iteration functions.
2232         https://bugs.webkit.org/show_bug.cgi?id=89751
2233
2234         Reviewed by Julien Chaffraix.
2235
2236         Removing anti-pattern wherever possible from RenderTable code. Also, modifying
2237         RenderTable sections' iterations to use helper functions.
2238
2239         No new tests required for this change since no change in behavior is expected.
2240
2241         * rendering/RenderTable.cpp:
2242         (WebCore::RenderTable::addOverflowFromChildren):
2243         (WebCore::RenderTable::setCellLogicalWidths):
2244         (WebCore::RenderTable::outerBorderStart):
2245         (WebCore::RenderTable::outerBorderEnd):
2246         Removed anti-patterns involving iterations over RenderObjects.
2247
2248         (WebCore::RenderTable::outerBorderAfter):
2249         Modified RenderTable sections' iteration to use helper functions.
2250
2251 2012-07-13  Enrica Casucci  <enrica@apple.com>
2252
2253         Threadsafety issues in WebScriptObject
2254         https://bugs.webkit.org/show_bug.cgi?id=90849
2255
2256         Reviewed by Geoff Garen.
2257
2258         Updated fix for this bug. The JSC API lock needs to be acquired also in JSObject.
2259
2260         * bindings/objc/WebScriptObject.mm:
2261         (-[WebScriptObject JSObject]):
2262
2263 2012-07-13  Raymond Toy  <rtoy@google.com>
2264
2265         DelayNode doesn't work if delayTime.value == delayTime.maxValue
2266         https://bugs.webkit.org/show_bug.cgi?id=90357
2267
2268         Reviewed by Kenneth Russell.
2269
2270         Increase delay buffer size slightly so that the read and write
2271         pointers don't become equal when the delay and the max delay are
2272         the same.
2273         
2274         Tests: webaudio/delaynode-max-default-delay.html
2275                webaudio/delaynode-max-nondefault-delay.html
2276
2277         * Modules/webaudio/DelayDSPKernel.cpp:
2278         (WebCore): Moved SmoothingTimeConstant to WebCore namespace.
2279         (WebCore::DelayDSPKernel::DelayDSPKernel): Add some additional checks to prevent crashes; use bufferLengthForDelay to compute buffer length.
2280         (WebCore::DelayDSPKernel::bufferLengthForDelay): New function to compute buffer length.
2281         * Modules/webaudio/DelayDSPKernel.h:
2282         (DelayDSPKernel): Declare bufferLengthForDelay. 
2283
2284 2012-07-13  Benjamin Poulain  <bpoulain@apple.com>
2285
2286         Always aggressively preload on iOS
2287         https://bugs.webkit.org/show_bug.cgi?id=91276
2288
2289         Reviewed by Simon Fraser.
2290
2291         * loader/cache/CachedResourceLoader.cpp:
2292         (WebCore::CachedResourceLoader::preload):
2293
2294 2012-07-13  Vineet Chaudhary  <rgf748@motorola.com>
2295
2296         Restructure V8Utilities::extractTransferables() with help of toV8Sequence()
2297         https://bugs.webkit.org/show_bug.cgi?id=91208
2298
2299         Reviewed by Kentaro Hara.
2300
2301         We can remove the specialised check for MessagePort from V8Utilities::extractTransferables()
2302         using toV8Sequence() as it validates the passed object for sequence type per WebIDL spec.
2303
2304         No new test as just refactoring.
2305         Existing tests under fast/dom/Window/window-* fast/dom/events/*
2306         covers tests.
2307
2308         * bindings/v8/V8Utilities.cpp:
2309         (WebCore::extractTransferables):
2310
2311 2012-07-13  Vincent Scheib  <scheib@chromium.org>
2312
2313         Pointer Lock handles disconnected DOM elements
2314         https://bugs.webkit.org/show_bug.cgi?id=77029
2315
2316         Reviewed by Adrienne Walker.
2317
2318         Pointer Lock Controller now checks when elements or documents are
2319         removed, and unlocks if the target element is being removed.
2320
2321         Tests: pointer-lock/locked-element-iframe-removed-from-dom.html
2322                pointer-lock/locked-element-removed-from-dom.html
2323
2324         * dom/Document.cpp:
2325         (WebCore::Document::detach):
2326         * dom/Element.cpp:
2327         (WebCore::Element::removedFrom):
2328         (WebCore::Element::webkitRequestPointerLock):
2329         * page/PointerLockController.cpp:
2330         (WebCore::PointerLockController::requestPointerLock):
2331         (WebCore::PointerLockController::elementRemoved):
2332         (WebCore):
2333         (WebCore::PointerLockController::documentDetached):
2334         (WebCore::PointerLockController::didLosePointerLock):
2335         (WebCore::PointerLockController::enqueueEvent):
2336         * page/PointerLockController.h:
2337         (WebCore):
2338         (PointerLockController):
2339
2340 2012-07-13  Ryosuke Niwa  <rniwa@webkit.org>
2341
2342         HTMLCollection should use DynamicNodeList's invalidation model
2343         https://bugs.webkit.org/show_bug.cgi?id=90326
2344
2345         Reviewed by Anders Carlsson.
2346
2347         Make HTMLCollection invalidated upon attribute and children changes instead of invalidating it on demand
2348         by comparing DOM tree versions. Node that HTMLCollections owned by Document are invalidated with other
2349         document-rooted node lists in m_listsInvalidatedAtDocument for simplicity although this mechanism is
2350         normally used for node lists owned by a non-Document node that contains nodes outside of its subtree.
2351         ItemProperties and FormControls are more "traditional" users of the mechanism.
2352
2353         Also, merged DynamicNodeList::invalidateCache and HTMLCollection::invalidateCache.
2354
2355         * dom/Document.cpp:
2356         (WebCore::Document::registerNodeListCache): Renamed. No longer takes NodeListInvalidationType or
2357         NodeListRootType since they can be obtained from the cache base. Increment the node list counter for
2358         InvalidateOnIdNameAttrChange when a HTMLCollection is passed in since all HTMLCollections need to be
2359         invalidated on id or name content attribute changes due to named getters.
2360         (WebCore::Document::unregisterNodeListCache): Ditto.
2361         (WebCore::shouldInvalidateNodeListForType):
2362         (WebCore::Document::shouldInvalidateNodeListCaches):
2363         (WebCore::Document::clearNodeListCaches):
2364         * dom/Document.h:
2365         (WebCore): Added InvalidateOnIdNameAttrChange, InvalidateOnHRefAttrChange, and InvalidateOnAnyAttrChange.
2366         (Document):
2367         * dom/DynamicNodeList.cpp:
2368         (WebCore::DynamicNodeListCacheBase::invalidateCache): Added. Invalidates caches of both DynamicNodeList
2369         and HTMLCollection. We can't afford to use virtual function calls here because this function is called on
2370         all node lists and HTML collections owned by ancestors of an element under which a node is added, removed,
2371         or its attributes are changed.
2372         (WebCore):
2373         * dom/DynamicNodeList.h:
2374         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Initializes member variables directly
2375         instead of calling clearCache now that DynamicNodeListCacheBase::invalidateCache has become polymorphic.
2376         (DynamicNodeListCacheBase): Increased the number of bits for m_invalidationType since we now have 9
2377         invalidation types.
2378         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
2379         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
2380         * dom/ElementRareData.h:
2381         (ElementRareData):
2382         (WebCore::ElementRareData::clearHTMLCollectionCaches): Added.
2383         (WebCore::ElementRareData::adoptTreeScope): Added; similar to NodeRareData::adoptTreeScope.
2384         * dom/Node.cpp:
2385         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Clears HTML collection caches as well as
2386         node list caches.
2387         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto.
2388         * dom/NodeRareData.h:
2389         (WebCore::NodeListsNodeData::adoptTreeScope):
2390         * dom/TreeScopeAdopter.cpp:
2391         (WebCore::TreeScopeAdopter::moveTreeToNewScope): Calls ElementRareData's adoptTreeScope as well as
2392         NodeRareData's.
2393         * html/HTMLAllCollection.cpp:
2394         (WebCore::HTMLAllCollection::namedItemWithIndex):
2395         * html/HTMLCollection.cpp:
2396         (WebCore::rootTypeFromCollectionType): Added. As mentioned above, treat all Document-owned HTML collection
2397         as if rooted at document for convenience.
2398         (WebCore::invalidationTypeExcludingIdAndNameAttributes): Added. Since all HTML collection requires
2399         invalidation on id and name content attribute changes, which is taken care by the special logic in
2400         Document::registerNodeListCache, exclude those two attributes from consideration.
2401         (WebCore::HTMLCollection::HTMLCollection): Calls Document::registerNodeListCache.
2402         (WebCore::HTMLCollection::~HTMLCollection): Calls Document::unregisterNodeListCache.
2403         (WebCore::HTMLCollection::length):
2404         (WebCore::HTMLCollection::item):
2405         (WebCore::HTMLCollection::namedItem):
2406         (WebCore::HTMLCollection::updateNameCache):
2407         * html/HTMLCollection.h:
2408         (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
2409         (HTMLCollectionCacheBase): Removed m_cacheTreeVersion and clearCache since they're no longer used.
2410         (HTMLCollection):
2411         * html/HTMLFormCollection.cpp:
2412         (WebCore::HTMLFormCollection::namedItem):
2413         (WebCore::HTMLFormCollection::updateNameCache):
2414         * html/HTMLOptionsCollection.h:
2415         (HTMLOptionsCollection):
2416         * html/HTMLPropertiesCollection.cpp:
2417         (WebCore::HTMLPropertiesCollection::updateNameCache):
2418         * html/HTMLPropertiesCollection.h:
2419         (WebCore::HTMLPropertiesCollection::invalidateCache):
2420
2421 2012-07-13  Shawn Singh  <shawnsingh@chromium.org>
2422
2423         [chromium] Remove incorrect debug assertion in LayerRendererChromium.cpp
2424         https://bugs.webkit.org/show_bug.cgi?id=91260
2425
2426         Reviewed by Adrienne Walker.
2427
2428         ASSERT(!clipped) was being triggered after skinny almost-degenerate
2429         quads went through anti-aliasing inflation, and then were being
2430         transformed back from device space to local space. It turns out
2431         this assertion is too aggressive, and we don't yet have an obvious
2432         need to change the behavior on the clipped==true case.
2433
2434         No new tests needed, this patch fixes only comments and debug code.
2435
2436         * platform/graphics/chromium/LayerRendererChromium.cpp:
2437         (WebCore::LayerRendererChromium::drawRenderPassQuad):
2438            fixed a comment.
2439
2440         (WebCore::LayerRendererChromium::drawTileQuad):
2441            fixed a similar comment, removed unnecessary assertion.
2442
2443 2012-07-13  Philip Rogers  <pdr@google.com>
2444
2445         Remove assert in localCoordinateSpaceTransform()
2446         https://bugs.webkit.org/show_bug.cgi?id=91189
2447
2448         Reviewed by Nikolas Zimmermann.
2449
2450         The assert in localCoordinateSpaceTransform was added to catch subclasses forgetting
2451         to override the method but it is better to simply return the identity matrix.
2452
2453         This scenario can occur when we break the SVG content model, such as asking for
2454         the CTM of a <g> element inside a <tspan>. This is undefined in the spec because
2455         tspan is not a subclass of SVGLocatable but both Firefox and Opera
2456         implement this by returning the identity matrix.
2457
2458         Test: svg/custom/invalid-ctm.svg
2459
2460         * svg/SVGStyledElement.cpp:
2461         (WebCore::SVGStyledElement::localCoordinateSpaceTransform):
2462
2463 2012-07-13  Kentaro Hara  <haraken@chromium.org>
2464
2465         [V8] String wrappers should be marked Independent
2466         https://bugs.webkit.org/show_bug.cgi?id=91251
2467
2468         Reviewed by Adam Barth.
2469
2470         Currently V8 String wrappers are not marked Independent.
2471         By marking them Independent, they can be reclaimed by the scavenger GC.
2472
2473         I tried to find some cases where this change reduces memory usage,
2474         but couldn't due to sensitive behavior of GC.
2475
2476         No tests. No change in behavior.
2477
2478         * bindings/v8/V8Binding.cpp:
2479         (WebCore::StringCache::v8ExternalStringSlow):
2480
2481 2012-07-13  Peter Beverloo  <peter@chromium.org>
2482
2483         [Chromium] Make the v8 i18n API dependency conditional for Android, disable strict aliasing
2484         https://bugs.webkit.org/show_bug.cgi?id=91240
2485
2486         Reviewed by Adam Barth.
2487
2488         Disable the v8 internationalization API for Chromium Android, as it's
2489         disabled and not always available in checkouts. Furthermore, disable
2490         strict aliasing for the webkit_remaining target, similar to what
2491         x11-based builds are doing (see the webcore_prerequisites target).
2492
2493         * WebCore.gyp/WebCore.gyp:
2494
2495 2012-07-13  Kentaro Hara  <haraken@chromium.org>
2496
2497         [CallWith=XXX] arguments should be placed at the head of method arguments
2498         https://bugs.webkit.org/show_bug.cgi?id=91217
2499
2500         Reviewed by Adam Barth.
2501
2502         The EFL build with the ENABLE_FILE_SYSTEM flag caused a build error,
2503         because CodeGeneratorJS.pm assumes webkitEntries(ScriptExecutionContext*, HTMLInputElement*)
2504         but the actual signature is webkitEntries(HTMLInputElement*, ScriptExecutionContext*) (bug 91185).
2505
2506         Per https://trac.webkit.org/wiki/WebKitIDL#CallWith, [CallWith=XXX] arguments should be placed
2507         at the head of the arguments. (i.e. the behavior of CodeGeneratorJS.pm is correct.)
2508
2509         Thus the correct fix is (1) to change the signature of webkitEntries() and webkitGetAsEntry()
2510         so that ScriptExecutionContext* comes first and (2) to modify CodeGeneratorV8.pm to support the order.
2511
2512         Test: bindings/scripts/test/TestObj.idl
2513
2514         * Modules/filesystem/DataTransferItemFileSystem.h: Placed ScriptExecutionContext* at the head of arguments.
2515         (DataTransferItemFileSystem):
2516         * Modules/filesystem/HTMLInputElementFileSystem.cpp: Ditto.
2517         (WebCore::HTMLInputElementFileSystem::webkitEntries):
2518         * Modules/filesystem/HTMLInputElementFileSystem.h: Ditto.
2519         (HTMLInputElementFileSystem):
2520         * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp: Ditto.
2521         (WebCore::DataTransferItemFileSystem::webkitGetAsEntry):
2522
2523         * bindings/scripts/CodeGeneratorV8.pm: Modified to support the correct order.
2524         (GenerateNormalAttrGetter):
2525         (GenerateNormalAttrSetter):
2526         (GenerateFunctionCallString):
2527
2528         * bindings/scripts/test/V8/V8TestInterface.cpp: Updated run-bindings-tests results.
2529         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
2530
2531 2012-07-13  Mary Wu  <mary.wu@torchmobile.com.cn>
2532
2533         [BlackBerry] Some small changes in network code
2534         https://bugs.webkit.org/show_bug.cgi?id=90974
2535
2536         Reviewed by Rob Buis.
2537
2538         1. Set status in NetworkJob/SocketStreamHandleBlackBerry so that
2539         its wrapped stream can also query the stream result.
2540         2. pass download attribute to NetworkRequest.
2541
2542         RIM PR# 171555
2543         Reviewed internally by Lyon Chen and Joe Mason.
2544
2545         * platform/network/blackberry/NetworkJob.cpp:
2546         (WebCore::NetworkJob::handleNotifyClose):
2547         * platform/network/blackberry/NetworkJob.h:
2548         (WebCore::NetworkJob::status):
2549         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
2550         (WebCore::platformTargetTypeForRequest):
2551         * platform/network/blackberry/SocketStreamHandle.h:
2552         (WebCore::SocketStreamHandle::status):
2553         (SocketStreamHandle):
2554         * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
2555         (WebCore::SocketStreamHandle::notifyStatusReceived):
2556         (WebCore::SocketStreamHandle::notifyClose):
2557
2558 2012-07-13  Vsevolod Vlasov  <vsevik@chromium.org>
2559
2560         Web Inspector: Remove uiSourceCode from Resource.
2561         https://bugs.webkit.org/show_bug.cgi?id=91201
2562
2563         Reviewed by Pavel Feldman.
2564
2565         Removed Resource._uiSourceCode field as it is not used anymore.
2566
2567         * inspector/front-end/Resource.js:
2568         (WebInspector.Resource.prototype.isHidden):
2569         * inspector/front-end/UISourceCode.js:
2570         (WebInspector.UISourceCode):
2571
2572 2012-07-13  Sheriff Bot  <webkit.review.bot@gmail.com>
2573
2574         Unreviewed, rolling out r122450 and r122580.
2575         http://trac.webkit.org/changeset/122450
2576         http://trac.webkit.org/changeset/122580
2577         https://bugs.webkit.org/show_bug.cgi?id=91263
2578
2579         Caused multiple regressions on ClusterFuzz (Requested by
2580         inferno-sec on #webkit).
2581
2582         * bindings/js/ScriptWrappable.h:
2583         (WebCore::ScriptWrappable::reportMemoryUsage):
2584         * bindings/v8/DOMDataStore.cpp:
2585         (WebCore::DOMDataStore::reportMemoryUsage):
2586         * bindings/v8/IntrusiveDOMWrapperMap.h:
2587         (WebCore::ChunkedTable::reportMemoryUsage):
2588         * bindings/v8/ScriptWrappable.h:
2589         (WebCore::ScriptWrappable::reportMemoryUsage):
2590         * bindings/v8/V8Binding.cpp:
2591         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
2592         (WebCore::StringCache::reportMemoryUsage):
2593         * bindings/v8/V8DOMMap.h:
2594         * css/PropertySetCSSStyleDeclaration.cpp:
2595         (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
2596         * css/StylePropertySet.cpp:
2597         * css/StylePropertySet.h:
2598         (WebCore::StylePropertySet::reportMemoryUsage):
2599         * dom/CharacterData.cpp:
2600         (WebCore::CharacterData::reportMemoryUsage):
2601         * dom/ContainerNode.h:
2602         (WebCore::ContainerNode::reportMemoryUsage):
2603         * dom/Document.cpp:
2604         (WebCore::Document::reportMemoryUsage):
2605         * dom/Element.cpp:
2606         (WebCore::Element::detachAttribute):
2607         (WebCore::Element::removeAttribute):
2608         (WebCore::Element::attributes):
2609         (WebCore::Element::setAttributeInternal):
2610         (WebCore::Element::parserSetAttributes):
2611         (WebCore::Element::hasEquivalentAttributes):
2612         (WebCore::Element::createAttributeData):
2613         (WebCore):
2614         (WebCore::Element::setAttributeNode):
2615         (WebCore::Element::removeAttributeNode):
2616         (WebCore::Element::getAttributeNode):
2617         (WebCore::Element::getAttributeNodeNS):
2618         (WebCore::Element::hasAttribute):
2619         (WebCore::Element::hasAttributeNS):
2620         (WebCore::Element::normalizeAttributes):
2621         (WebCore::Element::cloneAttributesFromElement):
2622         * dom/Element.h:
2623         (WebCore::Element::attributeData):
2624         (Element):
2625         (WebCore::Element::reportMemoryUsage):
2626         (WebCore::Element::ensureAttributeData):
2627         (WebCore::Element::updatedAttributeData):
2628         (WebCore::Element::ensureUpdatedAttributeData):
2629         * dom/ElementAttributeData.cpp:
2630         (WebCore::ElementAttributeData::attrIfExists):
2631         (WebCore::ElementAttributeData::ensureAttr):
2632         (WebCore::ElementAttributeData::setAttr):
2633         (WebCore::ElementAttributeData::removeAttr):
2634         (WebCore::ElementAttributeData::setClass):
2635         (WebCore):
2636         (WebCore::ElementAttributeData::ensureInlineStyle):
2637         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
2638         (WebCore::ElementAttributeData::destroyInlineStyle):
2639         (WebCore::ElementAttributeData::addAttribute):
2640         (WebCore::ElementAttributeData::removeAttribute):
2641         (WebCore::ElementAttributeData::isEquivalent):
2642         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
2643         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
2644         (WebCore::ElementAttributeData::cloneDataFrom):
2645         (WebCore::ElementAttributeData::clearAttributes):
2646         (WebCore::ElementAttributeData::replaceAttribute):
2647         (WebCore::ElementAttributeData::getAttributeNode):
2648         * dom/ElementAttributeData.h:
2649         (WebCore::ElementAttributeData::create):
2650         (ElementAttributeData):
2651         (WebCore::ElementAttributeData::setIdForStyleResolution):
2652         (WebCore::ElementAttributeData::setAttributeStyle):
2653         (WebCore::ElementAttributeData::length):
2654         (WebCore::ElementAttributeData::isEmpty):
2655         (WebCore::ElementAttributeData::attributeItem):
2656         (WebCore::ElementAttributeData::getAttributeItem):
2657         (WebCore::ElementAttributeData::reportMemoryUsage):
2658         (WebCore::ElementAttributeData::ElementAttributeData):
2659         (WebCore::ElementAttributeData::attributeVector):
2660         (WebCore::ElementAttributeData::clonedAttributeVector):
2661         (WebCore::ElementAttributeData::removeAttribute):
2662         (WebCore::ElementAttributeData::getAttributeItemIndex):
2663         * dom/MemoryInstrumentation.h:
2664         (MemoryInstrumentation):
2665         (MemoryObjectInfo):
2666         (WebCore::MemoryObjectInfo::reportInstrumentedPointer):
2667         (WebCore::MemoryObjectInfo::reportPointer):
2668         (WebCore::MemoryObjectInfo::reportInstrumentedObject):
2669         (WebCore::MemoryObjectInfo::reportObject):
2670         (WebCore::MemoryObjectInfo::reportObjectInfo):
2671         (WebCore::MemoryObjectInfo::reportHashMap):
2672         (WebCore::MemoryObjectInfo::reportHashSet):
2673         (WebCore::MemoryObjectInfo::reportListHashSet):
2674         (WebCore::MemoryObjectInfo::reportVector):
2675         (WebCore::MemoryObjectInfo::reportString):
2676         (WebCore::MemoryObjectInfo::objectType):
2677         (WebCore::MemoryObjectInfo::objectSize):
2678         (WebCore::MemoryObjectInfo::memoryInstrumentation):
2679         * dom/Node.cpp:
2680         (WebCore::Node::reportMemoryUsage):
2681         * dom/QualifiedName.h:
2682         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
2683         (WebCore::QualifiedName::reportMemoryUsage):
2684         * dom/StyledElement.cpp:
2685         (WebCore::StyledElement::style):
2686         (WebCore::StyledElement::classAttributeChanged):
2687         (WebCore::StyledElement::setInlineStyleProperty):
2688         (WebCore::StyledElement::removeInlineStyleProperty):
2689         (WebCore::StyledElement::addSubresourceAttributeURLs):
2690         * dom/StyledElement.h:
2691         (WebCore::StyledElement::ensureInlineStyle):
2692         * html/parser/HTMLConstructionSite.cpp:
2693         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
2694         * platform/TreeShared.h:
2695         (WebCore::TreeShared::reportMemoryUsage):
2696         * xml/parser/XMLDocumentParserQt.cpp:
2697         (WebCore::XMLDocumentParser::XMLDocumentParser):
2698
2699 2012-07-13  Huang Dongsung  <luxtella@company100.net>
2700
2701         Remove down-casting to BitmapImage in GraphicsContext::drawImage.
2702         https://bugs.webkit.org/show_bug.cgi?id=90755
2703
2704         Reviewed by Simon Fraser.
2705
2706         Add a BitmapImage draw method which takes RespectImageOrientationEnum enum as
2707         the last argument for CG. Then we can remove the conditional down-casting in
2708         GraphicsContext::drawImage.
2709
2710         This change is needed for parallel image decoders. Because parallel image
2711         decoders use a Bitmap image wrapper class which extends Image (not Bitmap), the
2712         down-casting above causes the loss of RespectImageOrientationEnum which must be
2713         passed to BitmapImage.
2714
2715         No new tests, no behavior change.
2716
2717         * platform/graphics/BitmapImage.cpp:
2718         * platform/graphics/BitmapImage.h:
2719         * platform/graphics/GraphicsContext.cpp:
2720         (WebCore::GraphicsContext::drawImage):
2721         * platform/graphics/Image.cpp:
2722         (WebCore::Image::draw):
2723         (WebCore):
2724         * platform/graphics/Image.h:
2725         (Image):
2726
2727 2012-07-13  Lauro Neto  <lauro.neto@openbossa.org>
2728
2729         Fix QtWebKit build with OpenGLES after GC3D/E3D refactor
2730         https://bugs.webkit.org/show_bug.cgi?id=91156
2731
2732         Reviewed by Noam Rosenthal.
2733
2734         Adds several build fixes.
2735
2736         * platform/graphics/GraphicsContext3D.h:
2737             Use E3DOpenGLES instead of previously removed E3DQt.
2738
2739         * platform/graphics/OpenGLESShims.h:
2740             Enable defines for Qt.
2741
2742         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2743         (WebCore::Extensions3DOpenGLES::blitFramebuffer):
2744         (WebCore):
2745         (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisample):
2746         (WebCore::Extensions3DOpenGLES::copyTextureCHROMIUM):
2747             Added pure virtual stubs.
2748
2749         (WebCore::Extensions3DOpenGLES::supportsExtension):
2750             Remove PROC suffix. See bug #91130.
2751
2752         * platform/graphics/opengl/Extensions3DOpenGLES.h:
2753         (Extensions3DOpenGLES):
2754             Added pure virtual stubs.
2755
2756         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2757         (WebCore::GraphicsContext3D::reshapeFBOs):
2758             Readded missing function after removed in r122250.
2759
2760         (WebCore):
2761             Use PLATFORM(BLACKBERRY) guard around port-specific include.
2762
2763         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2764             Added USE(OPENGL_ES_2) guard instead of always loading the OpenGL extensions.
2765
2766
2767 2012-07-13  Keishi Hattori  <keishi@webkit.org>
2768
2769         Form of FormAssociatedElement is not updated when id target changes.
2770         https://bugs.webkit.org/show_bug.cgi?id=91042
2771
2772         Reviewed by Kent Tamura.
2773
2774         Test: fast/forms/update-form-attribute-element.html
2775
2776         This patch introduces the IdTargetObserver and IdTargetObserverRegistry class.
2777         They can be used to be notified when the element that an id is pointing to (the id target)
2778         changes.
2779
2780         * CMakeLists.txt: Added IdTargetObserverRegistry.{h,cpp} and IdTargetObserver.{h,cpp}
2781         * GNUmakefile.list.am: Ditto.
2782         * Target.pri: Ditto.
2783         * WebCore.gypi: Ditto.
2784         * WebCore.vcproj/WebCore.vcproj: Ditto.
2785         * WebCore.xcodeproj/project.pbxproj: Ditto.
2786         * dom/DOMAllInOne.cpp:
2787         * dom/IdTargetObserver.cpp: Added. When you want notified of changes to an id target, you should create a new class that inherits this.
2788         (WebCore):
2789         (WebCore::IdTargetObserver::IdTargetObserver):
2790         (WebCore::IdTargetObserver::~IdTargetObserver):
2791         * dom/IdTargetObserver.h: Added.
2792         (WebCore):
2793         (IdTargetObserver):
2794         * dom/IdTargetObserverRegistry.cpp: Added.
2795         (WebCore):
2796         (WebCore::IdTargetObserverRegistry::create):
2797         (WebCore::IdTargetObserverRegistry::addObserver): Register an IdTargetObserver to observe an id target.
2798         (WebCore::IdTargetObserverRegistry::removeObserver): Unregisters an IdTargetObserver from observing.
2799         (WebCore::IdTargetObserverRegistry::notifyObserversInternal):
2800         * dom/IdTargetObserverRegistry.h: Added.
2801         (WebCore):
2802         (IdTargetObserverRegistry):
2803         (WebCore::IdTargetObserverRegistry::IdTargetObserverRegistry):
2804         (WebCore::IdTargetObserverRegistry::notifyObservers): Calls idTargetChanged on all observers for an id. Inlining first part of function for performance.
2805         * dom/TreeScope.cpp:
2806         (WebCore::TreeScope::TreeScope):
2807         (WebCore::TreeScope::addElementById): Calls IdTargetObserverRegistry::notifyObservers because the id target might have changed.
2808         (WebCore::TreeScope::removeElementById): Ditto.
2809         * dom/TreeScope.h:
2810         (WebCore):
2811         (WebCore::TreeScope::idTargetObserverRegistry):
2812         (TreeScope):
2813         * html/FormAssociatedElement.cpp: Observer for id targets defined by the form attribute.
2814         (WebCore::FormAssociatedElement::didMoveToNewDocument):
2815         (WebCore::FormAssociatedElement::insertedInto):
2816         (WebCore::FormAssociatedElement::removedFrom):
2817         (WebCore::FormAssociatedElement::formAttributeChanged):
2818         (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): Creates and sets up a new FormAttributeTargetObserver.
2819         (WebCore):
2820         (WebCore::FormAssociatedElement::formAttributeTargetChanged):
2821         (WebCore::FormAttributeTargetObserver::create):
2822         (WebCore::FormAttributeTargetObserver::FormAttributeTargetObserver):
2823         (WebCore::FormAttributeTargetObserver::idTargetChanged):
2824         * html/FormAssociatedElement.h:
2825         (FormAssociatedElement):
2826         * html/FormController.cpp:
2827         * html/FormController.h:
2828         (FormController):
2829         * html/HTMLFormElement.cpp:
2830         (WebCore::HTMLFormElement::removedFrom):
2831         (WebCore::HTMLFormElement::formElementIndexWithFormAttribute): Modified to take a range. It
2832         scans the range and returns the index to insert the element in m_associatedElement.
2833         (WebCore::HTMLFormElement::formElementIndex): Modified to only scan the elements in
2834         m_associatedElement that precede and follow the form element.
2835         * html/HTMLFormElement.h:
2836         (HTMLFormElement):
2837
2838 2012-07-13  Gabor Rapcsanyi  <rgabor@webkit.org>
2839
2840         Optimizing blend filter to ARM-NEON with intrinsics
2841         https://bugs.webkit.org/show_bug.cgi?id=90949
2842
2843         Reviewed by Zoltan Herczeg.
2844
2845         The feBlend SVG filter modes can be greatly fasten up with ARM-NEON since
2846         we are able to calculate with 2 pixels (8 channels) at the same time.
2847         The code is written with NEON intrinsics and it doesn't affect the
2848         general - it has the same behaviour as the original algorithm.
2849         With this NEON optimization the calculation is ~4.5 times faster for each mode.
2850
2851         Existing tests cover this issue.
2852
2853         * CMakeLists.txt:
2854         * GNUmakefile.list.am:
2855         * Target.pri:
2856         * WebCore.gypi:
2857         * WebCore.vcproj/WebCore.vcproj:
2858         * WebCore.xcodeproj/project.pbxproj:
2859         * platform/graphics/filters/FEBlend.cpp:
2860         (WebCore::FEBlend::platformApplyGeneric):
2861         (WebCore):
2862         (WebCore::FEBlend::platformApplySoftware):
2863         * platform/graphics/filters/FEBlend.h:
2864         (FEBlend):
2865         * platform/graphics/filters/arm/FEBlendNEON.h: Added.
2866         (WebCore):
2867         (FEBlendUtilitiesNEON):
2868         (WebCore::FEBlendUtilitiesNEON::div255): integer divison with 255
2869         (WebCore::FEBlendUtilitiesNEON::normal): calculate normal mode blending for two pixels
2870         (WebCore::FEBlendUtilitiesNEON::multiply): calculate multiply mode blending for two pixels
2871         (WebCore::FEBlendUtilitiesNEON::screen): calculate screen mode blending for two pixels
2872         (WebCore::FEBlendUtilitiesNEON::darken): calculate darken mode blending for two pixels
2873         (WebCore::FEBlendUtilitiesNEON::lighten): calculate lighten mode blending for two pixels
2874         (WebCore::FEBlend::platformApplyNEON):
2875
2876 2012-07-13  Ilya Tikhonovsky  <loislo@chromium.org>
2877
2878         Web Inspector: native memory instrumentation: extract instrumentation methods into MemoryClassInfo
2879         https://bugs.webkit.org/show_bug.cgi?id=91227
2880
2881         Reviewed by Pavel Feldman.
2882
2883         void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
2884         {
2885             MemoryClassInfo<Node> info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
2886             info.visitBaseClass<ScriptWrappable>(this);
2887
2888             info.addMember(m_notInstrumentedPointer); // automatically detects poniter/reference
2889             info.addInstrumentedMember(m_next);
2890             info.addHashSet<MemoryInstrumentation::NonClass>(m_aHash);                // NonClass value_type (report only size of internal template structures)
2891             info.addHashSet<MemoryInstrumentation::NotInstrumentedClass>(m_aHashSet); // not instrumented value_type (use sizeof)
2892             info.addHashSet<MemoryInstrumentation::InstrumentedClass>(m_aHashSet);    // instrumented value_type (call visit)
2893         }
2894
2895         The change is covered by existing tests for native memory snapshot.
2896
2897         * bindings/v8/DOMDataStore.cpp:
2898         (WebCore::DOMDataStore::reportMemoryUsage):
2899         * bindings/v8/IntrusiveDOMWrapperMap.h:
2900         (WebCore::ChunkedTable::reportMemoryUsage):
2901         * bindings/v8/ScriptWrappable.h:
2902         (WebCore::ScriptWrappable::reportMemoryUsage):
2903         * bindings/v8/V8Binding.cpp:
2904         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
2905         (WebCore::StringCache::reportMemoryUsage):
2906         * bindings/v8/V8DOMMap.h:
2907         * css/StylePropertySet.h:
2908         (WebCore::StylePropertySet::reportMemoryUsage):
2909         * dom/CharacterData.cpp:
2910         (WebCore::CharacterData::reportMemoryUsage):
2911         * dom/ContainerNode.h:
2912         (WebCore::ContainerNode::reportMemoryUsage):
2913         * dom/Document.cpp:
2914         (WebCore::Document::reportMemoryUsage):
2915         * dom/Element.h:
2916         (WebCore::Element::reportMemoryUsage):
2917         * dom/ElementAttributeData.h:
2918         (WebCore::ElementAttributeData::reportMemoryUsage):
2919         * dom/MemoryInstrumentation.h:
2920         (MemoryInstrumentation):
2921         (WebCore::MemoryObjectInfo::objectType):
2922         (WebCore::MemoryObjectInfo::objectSize):
2923         (WebCore::MemoryObjectInfo::memoryInstrumentation):
2924         (MemoryObjectInfo):
2925         (WebCore::MemoryObjectInfo::reportObjectInfo):
2926         (WebCore):
2927         (MemoryClassInfo):
2928         (WebCore::MemoryClassInfo::MemoryClassInfo):
2929         (WebCore::MemoryClassInfo::visitBaseClass):
2930         (WebCore::MemoryClassInfo::reportInstrumentedPointer):
2931         (WebCore::MemoryClassInfo::reportInstrumentedObject):
2932         (WebCore::MemoryClassInfo::reportPointer):
2933         (WebCore::MemoryClassInfo::reportObject):
2934         (WebCore::MemoryClassInfo::reportHashMap):
2935         (WebCore::MemoryClassInfo::reportHashSet):
2936         (WebCore::MemoryClassInfo::reportListHashSet):
2937         (WebCore::MemoryClassInfo::reportVector):
2938         (WebCore::MemoryClassInfo::reportString):
2939         * dom/Node.cpp:
2940         (WebCore::Node::reportMemoryUsage):
2941         * dom/QualifiedName.h:
2942         (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
2943         (WebCore::QualifiedName::reportMemoryUsage):
2944         * platform/TreeShared.h:
2945         (WebCore::TreeShared::reportMemoryUsage):
2946
2947 2012-07-13  Pavel Feldman  <pfeldman@chromium.org>
2948
2949         Web Inspector: align scope filters
2950         https://bugs.webkit.org/show_bug.cgi?id=91213
2951
2952         Reviewed by Vsevolod Vlasov.
2953
2954         * inspector/front-end/elementsPanel.css:
2955         (.crumbs):
2956         * inspector/front-end/inspector.css:
2957         (.status-bar > div):
2958         (.scope-bar):
2959         (.scope-bar li):
2960         (.scope-bar li.all):
2961         * inspector/front-end/networkLogView.css:
2962
2963 2012-07-13  Peter Rybin  <peter.rybin@gmail.com>
2964
2965         Web Inspector: too many hardcoded strings in InspectorBackendDispatcher.
2966         https://bugs.webkit.org/show_bug.cgi?id=89198
2967
2968         Reviewed by Yury Semikhatsky.
2969
2970         Instead of generating error message string on every call (mostly for nothing),
2971         error message is generated deeper inside the handler and only command name
2972         is passed every time.
2973
2974         * inspector/CodeGeneratorInspector.py:
2975         (Generator.process_command):
2976
2977 2012-07-13  Joshua Netterfield  <jnetterfield@rim.com>
2978
2979         [BlackBerry] Update about:* pages
2980         https://bugs.webkit.org/show_bug.cgi?id=91121
2981
2982         Reviewed by Yong Li.
2983
2984         Update the about:config pages, and improve the aesthetics of the about:build, about:version, about:credits, about:memory, about:config, and similar pages.
2985
2986         No new tests, because there is no new funtionality.
2987
2988         * platform/network/blackberry/NetworkJob.cpp: Update the aesthetics of about:* pages
2989
2990 2012-07-13  Olivier Blin  <olivier.blin@softathome.com>
2991
2992         Fix checking for optional DeviceOrientationEvent.absolute in JSC bindings
2993         https://bugs.webkit.org/show_bug.cgi?id=91225
2994
2995         Reviewed by Steve Block.
2996
2997         This issue comes from r105036
2998
2999         * bindings/js/JSDeviceOrientationEventCustom.cpp:
3000         (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
3001
3002 2012-07-13  Andrei Bucur  <abucur@adobe.com>
3003         [CSS Regions] Fix build for bug 89000
3004         https://bugs.webkit.org/show_bug.cgi?id=91215
3005
3006         Reviewed by Kentaro Hara.
3007
3008         Remove the unused variable m_state that was a leftover from a previous version of the patch.
3009
3010         Tests: No new tests, build fix.
3011
3012         * dom/WebKitNamedFlow.cpp:
3013         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
3014         * dom/WebKitNamedFlow.h:
3015         (WebKitNamedFlow):
3016
3017 2012-07-13  Kenichi Ishibashi  <bashi@chromium.org>
3018
3019         [Chromium] Fix bugs in HarfBuzzShaper
3020         https://bugs.webkit.org/show_bug.cgi?id=90951
3021
3022         Reviewed by Tony Chang.
3023
3024         The current implementation has following problems:
3025         - Cannot render RTL text if the TextRun is divided into more than two
3026           HarfBuzzRun.
3027         - Script handling in TextRun partitioning is incorrect.
3028         - Inaccurate calculation of selection rect.
3029         - Wrong rendering position when the first glyph of the TextRun have
3030           non-zero offsets in terms of HarfBuzz.
3031
3032         To fix these problems I rewrote HarfBuzzShaper class. Here is the summary:
3033         - Divide the whole range of TextRun first, then shape them in visual
3034           order.
3035         - Divide TextRun in the same way of old-harfbuzz's
3036           hb_utf16_script_run_next().
3037         - Prefer float than int when calculating selection.
3038         - Adjust the drawing point after shaping.
3039
3040         Added tests covers the fix except for the last problem. The last problem will be covered
3041         by fast/text/international/complex-joining-using-gpos.html after chromium linux port switches
3042         to use HarfBuzzShaper.
3043
3044         Tests: fast/text/shaping/shaping-script-order.html
3045                fast/text/shaping/shaping-selection-rect.html
3046
3047         * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
3048         (WebCore::Font::drawComplexText): Adjusts point after shaping.
3049         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
3050         (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
3051         (WebCore):
3052         (WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult): Added.
3053         (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndAdvance): Offsets are no longer needed.
3054         (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset): Calculates character offset based on advance.
3055         (WebCore::normalizeCharacters): Added.
3056         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
3057         (WebCore::HarfBuzzShaper::~HarfBuzzShaper):
3058         (WebCore::HarfBuzzShaper::shape): Divides TextRun first, then shapes them.
3059         (WebCore::HarfBuzzShaper::adjustStartPoint): Added.
3060         (WebCore::HarfBuzzShaper::collectHarfBuzzRuns): Added.
3061         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Added.
3062         (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): Followed other changes.
3063         (WebCore::HarfBuzzShaper::selectionRect): Use float for calculating selection.
3064         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
3065         (HarfBuzzShaper): Holds the start index of character. Removed unnecessary variables.
3066         (WebCore::HarfBuzzShaper::HarfBuzzRun::create): Ditto.
3067         (HarfBuzzRun):
3068         (WebCore::HarfBuzzShaper::HarfBuzzRun::fontData): Added.
3069         (WebCore::HarfBuzzShaper::HarfBuzzRun::startIndex): Ditto.
3070         (WebCore::HarfBuzzShaper::HarfBuzzRun::glyphs): Ditto.
3071         (WebCore::HarfBuzzShaper::HarfBuzzRun::advances): Ditto.
3072
3073 2012-07-13  Kentaro Hara  <haraken@chromium.org>
3074
3075         Unreviewed, rolling out r122545.
3076         http://trac.webkit.org/changeset/122545
3077         https://bugs.webkit.org/show_bug.cgi?id=91185
3078
3079         We found that this was a wrong fix
3080
3081         * bindings/scripts/CodeGeneratorJS.pm:
3082         (GenerateImplementation):
3083
3084 2012-07-13  Kentaro Hara  <haraken@chromium.org>
3085
3086         Unreviewed, rolling out r122553.
3087         http://trac.webkit.org/changeset/122553
3088         https://bugs.webkit.org/show_bug.cgi?id=91198
3089
3090         We found that this was a wrong fix
3091
3092         * bindings/scripts/CodeGeneratorJS.pm:
3093         (GenerateImplementation):
3094
3095 2012-07-13  Kent Tamura  <tkent@chromium.org>
3096
3097         Change the timing of form state restore
3098         https://bugs.webkit.org/show_bug.cgi?id=89962
3099
3100         Reviewed by Hajime Morita.
3101
3102         For a preparation to fix a form identification problem (Bug 91209),
3103         restore controls states when the parsing of their owner forms is
3104         completed. For controls without owners, their states are restored when
3105         their parsing is completed as ever.
3106
3107         No new tests. This doesn't change observable behavior.
3108
3109         * html/FormController.cpp:
3110         (WebCore::ownerFormForState):
3111         Added. This code was used in formKey(), and restoreControlState*() use it.
3112         (WebCore::FormKeyGenerator::formKey): Use ownerFormForState(). No behavior change.
3113         (WebCore::FormController::restoreControlStateFor):
3114         Moved some code from HTMLFormControlElementWithState::finishParsingChildren().
3115         The difference is we don't resotre state if this control is owned by a form.
3116         (WebCore::FormController::restoreControlStateIn):
3117         Restore states of associated controls. This is called from
3118         finishParsingChildren() for <form>.
3119         * html/FormController.h:
3120         (FormController):
3121         - Declare restoreControlStateFor() and restoreControlStateIn().
3122         - Make takeStateForFormElement() private.
3123
3124         * html/FormAssociatedElement.cpp:
3125         (WebCore::FormAssociatedElement::isFormControlElementWithState):
3126         Added. The default implementation returns false.
3127         * html/FormAssociatedElement.h:
3128         (FormAssociatedElement):
3129         Added isFormControlElementWithState() for FormController::restoreControlStateIn().
3130         * html/HTMLFormControlElementWithState.cpp:
3131         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
3132         Some code was moved to FormController:restoreControlStateFor().
3133         (WebCore::HTMLFormControlElementWithState::isFormControlElementWithState):
3134         Added. Returns true.
3135         * html/HTMLFormControlElementWithState.h:
3136         (HTMLFormControlElementWithState): Declare isFormControlElementWithState().
3137         * html/HTMLFormElement.cpp:
3138         (WebCore::HTMLFormElement::finishParsingChildren):
3139         Added. Calls FormController::restoreControlStateIn().
3140         * html/HTMLFormElement.h:
3141         (HTMLFormElement): Declare finishParsingChildren().
3142
3143 2012-07-13  Kent Tamura  <tkent@chromium.org>
3144
3145         Make calendar pickers testable
3146         https://bugs.webkit.org/show_bug.cgi?id=84827
3147
3148         Reviewed by Hajime Morita.
3149
3150         WebCore:
3151         - Add PagePopupDriver, an interface to open/close a PagePopup.
3152         - Add setPagePopupDriver() to ChromeClient in order to inject a
3153         PagePopupDriver for testing.
3154
3155         Internals:
3156         Add MockPagePopupDriver, which creates a MockPagePopup, which creates a
3157         normal <iframe> in the top-level document, and load the popup content on
3158         it. MockPagePopupDriver is enabled by
3159         internals.settings.setEnableMockPagePopup(true).
3160
3161         Test: fast/forms/date/calendar-picker-appearance.html
3162
3163         * WebCore.gypi: Add new files.
3164         * WebCore.xcodeproj/project.pbxproj: Add files to make this buildable.
3165         * page/ChromeClient.h:
3166         (ChromeClient): Add function for PagePopupDriver.
3167         * loader/EmptyClients.h: Add empty implementations for PagePopupDriver functions.
3168         * page/PagePopupDriver.h: Added.
3169         (PagePopupDriver):
3170         (WebCore::PagePopupDriver::~PagePopupDriver):
3171
3172         * testing/InternalSettings.cpp:
3173         (WebCore::InternalSettings::Backup::restoreTo): Reset the mock PagePopupDriver.
3174         (WebCore::InternalSettings::setEnableMockPagePopup):
3175         Register MockPagePopupDriver to ChromeClient.
3176         * testing/InternalSettings.h:
3177         (InternalSettings): Declare setEnableMockPagePopup().
3178         * testing/InternalSettings.idl: ditto.
3179         * testing/MockPagePopupDriver.cpp: Added.
3180         (MockPagePopup): Pseudo PagePopup implementation with the standard <iframe>.
3181         (WebCore::MockPagePopupDriver::MockPagePopupDriver): Added.
3182         (WebCore::MockPagePopupDriver::create): Added.
3183         (WebCore::MockPagePopupDriver::~MockPagePopupDriver): Added.
3184         (WebCore::MockPagePopupDriver::openPagePopup):
3185         Added. An override of PagePopupDriver function. This creates a MockPagePopup.
3186         (WebCore::MockPagePopupDriver::closePagePopup):
3187         Added. An override of PagePopupDriver function. This deletes the MockPagePopup.
3188         * testing/MockPagePopupDriver.h:
3189         (MockPagePopupDriver): Added.
3190
3191         * testing/v8/WebCoreTestSupport.cpp:
3192         (WebCoreTestSupport::injectPagePopupController):
3193         Added. Production code uses per-Page context feature framework. However
3194         MockPagePopup uses the same page as the host page. So we can't use the
3195         framework and need to inject window.pagePopupController manually.
3196         * testing/v8/WebCoreTestSupport.h:
3197         (WebCoreTestSupport): Add injectPagePopupController().
3198
3199 2012-07-12  Pavel Feldman  <pfeldman@chromium.org>
3200
3201         Web Inspector: mute the native looks of the selects in the console.
3202         https://bugs.webkit.org/show_bug.cgi?id=91120
3203
3204         Reviewed by Vsevolod Vlasov.
3205
3206         This is necessary for Mac now that we don't use border images for select.
3207
3208         * inspector/front-end/ConsoleView.js:
3209         (WebInspector.ConsoleView.prototype.get statusBarItems):
3210         (WebInspector.ConsoleView.prototype.addContext):
3211         (WebInspector.ConsoleView.prototype.removeContext):
3212         (WebInspector.ConsoleView.prototype._updateIsolatedWorldSelector):
3213         (WebInspector.ConsoleView.prototype._appendIsolatedContextOption):
3214         (WebInspector.ConsoleView.prototype._currentEvaluationContext):
3215         (WebInspector.ConsoleView.prototype._currentIsolatedContextId):
3216         * inspector/front-end/StatusBarButton.js:
3217         (WebInspector.StatusBarComboBox):
3218         (WebInspector.StatusBarComboBox.prototype.addOption):
3219         (WebInspector.StatusBarComboBox.prototype.removeOption):
3220         (WebInspector.StatusBarComboBox.prototype.removeOptions):
3221         (WebInspector.StatusBarComboBox.prototype.selectedOption):
3222         * inspector/front-end/inspector.css:
3223         (.status-bar-select-container):
3224         (select.status-bar-item):
3225         (.console-context):
3226
3227 2012-07-13  Andrei Bucur  <abucur@adobe.com>
3228
3229         [CSS Regions] Fix the lifecycle for the flow objects and their renderers
3230         https://bugs.webkit.org/show_bug.cgi?id=89000
3231
3232         Reviewed by Eric Seidel.
3233
3234         This patch adds the concept of a NamedFlowCollection, owned by the document, that keeps track of
3235         all the named flows that exist in the Document. This collection contains a ListHashSet of weak references to
3236         all the existing NamedFlows in the document. This is not a managed set because the CREATED flows are referenced from the renderer and
3237         the NULL flows are only cached, they should be destructible.
3238         Two named flows are considered to be equal if they have the same name.
3239         I've changed the NamedFlow state to depend on the existence of its renderer. A flow thread that has a renderer will also have a NamedFlow object.
3240         A flow thread without a renderer can have a NamedFlow object, but only in the NULL state. It's possible for a NamedFlow object to jump from the
3241         NULL state to the CREATED state if it was not destroyed (e.g. it was referenced from JS). Keeping track of the NULL state flows that have listeners will be important
3242         so when they go back to the CREATED state, the listeners would still be there.
3243
3244         Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/
3245
3246         Tests: The old tests have been modified to take into account the new behavior
3247
3248         * CMakeLists.txt:
3249         * GNUmakefile.list.am:
3250         * Target.pri:
3251         * WebCore.gypi:
3252         * WebCore.vcproj/WebCore.vcproj:
3253         * WebCore.xcodeproj/project.pbxproj:
3254         * dom/DOMAllInOne.cpp:
3255         * dom/Document.cpp:
3256         (WebCore::Document::~Document):
3257         (WebCore):
3258         (WebCore::Document::webkitGetFlowByName):
3259         (WebCore::Document::namedFlows):
3260         * dom/Document.h:
3261         (WebCore):
3262         (Document):
3263         * dom/WebKitNamedFlow.cpp:
3264         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
3265         (WebCore::WebKitNamedFlow::~WebKitNamedFlow):
3266         (WebCore::WebKitNamedFlow::create):
3267         (WebCore):
3268         (WebCore::WebKitNamedFlow::name):
3269         (WebCore::WebKitNamedFlow::overset):
3270         (WebCore::nodeInFlowThread):
3271         (WebCore::WebKitNamedFlow::getRegionsByContentNode):
3272         (WebCore::WebKitNamedFlow::getContent):
3273         (WebCore::WebKitNamedFlow::setRenderer):
3274         * dom/WebKitNamedFlow.h:
3275         (WebCore):
3276         (WebKitNamedFlow):
3277         (WebCore::WebKitNamedFlow::getFlowState):
3278         (WebCore::WebKitNamedFlow::switchFlowState):
3279         * dom/WebKitNamedFlowCollection.cpp: Added.
3280         (WebCore):
3281         (WebCore::WebKitNamedFlowCollection::WebKitNamedFlowCollection):
3282         (WebCore::WebKitNamedFlowCollection::length): An O(1) operation
3283         (WebCore::WebKitNamedFlowCollection::item): An O(N) operation
3284         (WebCore::WebKitNamedFlowCollection::flowByName): An O(1) operation
3285         (WebCore::WebKitNamedFlowCollection::ensureNamedFlowInCreatedState): An O(1) operation
3286         (WebCore::WebKitNamedFlowCollection::moveNamedFlowToNullState): An O(1) operation
3287         (WebCore::WebKitNamedFlowCollection::discardNamedFlow): An O(1) operation
3288         (WebCore::WebKitNamedFlowCollection::documentDestroyed):
3289         (WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::hash):
3290         (WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::equal):
3291         (WebKitNamedFlowCollection::NamedFlowHashFunctions):
3292         (WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::hash):
3293         (WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::equal):
3294         * dom/WebKitNamedFlowCollection.h: Copied from Source/WebCore/dom/WebKitNamedFlow.h.
3295         (WebCore):
3296         (WebKitNamedFlowCollection):
3297         (WebCore::WebKitNamedFlowCollection::create):
3298         (WebCore::WebKitNamedFlowCollection::document):
3299         * rendering/FlowThreadController.cpp:
3300         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
3301         (WebCore::FlowThreadController::removeFlowThread):
3302         (WebCore):
3303         * rendering/FlowThreadController.h:
3304         (FlowThreadController):
3305         * rendering/RenderNamedFlowThread.cpp:
3306         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
3307         (WebCore):
3308         (WebCore::RenderNamedFlowThread::~RenderNamedFlowThread):
3309         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
3310         (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentNode):
3311         (WebCore::RenderNamedFlowThread::flowThreadName):
3312         (WebCore::RenderNamedFlowThread::willBeDestroyed):
3313         * rendering/RenderNamedFlowThread.h:
3314         (RenderNamedFlowThread):
3315         (WebCore::RenderNamedFlowThread::contentNodes):
3316         (WebCore::RenderNamedFlowThread::canBeDestroyed):
3317
3318 2012-07-13  Vineet Chaudhary  <rgf748@motorola.com>
3319
3320         [V8Bindings] Implement generalised method to validates that the passed object is a sequence type.
3321         https://bugs.webkit.org/show_bug.cgi?id=91056
3322
3323         Reviewed by Kentaro Hara.
3324
3325         Currently the V8 implementation validates that the passed object is a sequence type only
3326         for MessagePort in V8Utilities::extractTransferables().
3327         There should be generalised method for other types too.
3328         Spec URL: http://www.w3.org/TR/2012/WD-WebIDL-20120207/#es-sequence
3329
3330         No new test, Just refactoring. There should be no behavioral changes.
3331
3332         * bindings/v8/V8Binding.h:
3333         (WebCore::toV8Sequence): Added implementation of toV8Sequence().
3334
3335 2012-07-13  Zeno Albisser  <zeno@webkit.org>
3336
3337         [Qt][WK2] Implement GraphicsSurface for Linux/GLX.
3338         https://bugs.webkit.org/show_bug.cgi?id=90881
3339
3340         Add a GLX based GraphicsSurface implementation for Linux.
3341         Native X windows are being used for exchanging textures
3342         with the UIProcess.
3343
3344         Reviewed by Noam Rosenthal.
3345
3346         * Target.pri:
3347         * WebCore.pri:
3348         * platform/graphics/surfaces/GraphicsSurface.cpp:
3349         (WebCore::GraphicsSurface::create):
3350             Move creating GraphicsSurface instance into
3351             platformCreate/platformImport functions to allow
3352             platform specific creation based on the provided flags.
3353         (WebCore::GraphicsSurface::GraphicsSurface):
3354         (WebCore::GraphicsSurface::~GraphicsSurface):
3355             Call platformDestroy when destroying a GraphicsSurface.
3356         (WebCore):
3357         * platform/graphics/surfaces/GraphicsSurface.h:
3358             Make platformCreate/platformImport functions static
3359             to be able to call these from the static create function.
3360             Add Destructor prototype and add GraphicsSurfacePrivate member.
3361         (WebCore):
3362         (GraphicsSurface):
3363         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
3364         (WebCore):
3365         (WebCore::GraphicsSurface::platformCreate):
3366         (WebCore::GraphicsSurface::platformImport):
3367             Insert creation of GraphicsSurface instance.
3368             This allows having a platform specific creation mechanism
3369             for GLX.
3370         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp: Added.
3371         (WebCore):
3372         (OffScreenRootWindow):
3373         (WebCore::OffScreenRootWindow::OffScreenRootWindow):
3374         (WebCore::OffScreenRootWindow::get):
3375         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
3376             Add an OffScreenRootWindow singelton that is being used
3377             as a parent for all native offscreen windows.
3378         (GraphicsSurfacePrivate):
3379             This class is used to manage all the X related resources
3380             such as opening a display or creating XPixmaps etc.
3381         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
3382             Open a connection to the X server and create a
3383             QOpenGLContext that can be used to resolve GL functions.
3384         (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
3385             Properly cleanup and release all the X resources again.
3386         (WebCore::GraphicsSurfacePrivate::createSurface):
3387             Create a surface that is placed off screen and can be
3388             used as a rendering target by the WebProcess.
3389         (WebCore::GraphicsSurfacePrivate::createPixmap):
3390             Create a GLXPixmap from the XWindow that was previously
3391             redirected by the WebProcess. This GLXPixmap can then be
3392             bound to a texture and being painted on screen by the
3393             UIProcess.
3394         (WebCore::GraphicsSurfacePrivate::makeCurrent):
3395         (WebCore::GraphicsSurfacePrivate::swapBuffers):
3396         (WebCore::GraphicsSurfacePrivate::display):
3397         (WebCore::GraphicsSurfacePrivate::glxPixmap):
3398         (WebCore::GraphicsSurfacePrivate::size):
3399         (WebCore::GraphicsSurfacePrivate::glContext):
3400         (WebCore::resolveGLMethods):
3401             Initialize all the function pointers for the GL functions used.
3402         (WebCore::GraphicsSurface::platformExport):
3403         (WebCore::GraphicsSurface::platformGetTextureID):
3404             Bind the GLXPixmap to a texture.
3405         (WebCore::GraphicsSurface::platformCopyToGLTexture):
3406             Not beeing implemented for GLX.
3407         (WebCore::GraphicsSurface::platformCopyFromFramebuffer):
3408             Blit origin fbo onto the GraphicsSurface's backing.
3409         (WebCore::GraphicsSurface::platformCreate):
3410         (WebCore::GraphicsSurface::platformImport):
3411         (WebCore::GraphicsSurface::platformLock):
3412         (WebCore::GraphicsSurface::platformUnlock):
3413         (WebCore::GraphicsSurface::platformDestroy):
3414
3415 2012-07-13  Dongwoo Im  <dw.im@samsung.com>
3416
3417         CodeGeneratorJS.pm : SetterExpression should use 'push' rather than 'unshift'
3418         https://bugs.webkit.org/show_bug.cgi?id=91198
3419
3420         Reviewed by Kentaro Hara.
3421
3422         'SetterExpression' should use 'push' to make arguments, rather than 'unshift'.
3423
3424         No new tests. Covered by existing tests.
3425
3426         * bindings/scripts/CodeGeneratorJS.pm:
3427         (GenerateImplementation):
3428
3429 2012-07-13  Yoshifumi Inoue  <yosin@chromium.org>
3430
3431         REGRESSION(r119948): [Forms] Spin button Up/Down actions make value to zero for input type "number" when step mismatched
3432         https://bugs.webkit.org/show_bug.cgi?id=91197
3433
3434         Reviewed by Kent Tamura.
3435
3436         This patch fixes implementation of Decimal::ceiling() and floor().
3437         They return wrong value for small fractional numbers.
3438
3439         The bug is occurred when:
3440           - Step-able input type, e.g. number, date, datetime, and so on.
3441           - Current value is step mismatched
3442           - Current value is smaller than step
3443           - Step up/down by spin button
3444         because spin button up/down actions are implemented in InputType::setpUpFromRenderer
3445         which calls Decimal::ceiling() and floor() for step mismatched case.
3446
3447         Tests: fast/forms/number/number-stepup-stepdown-from-renderer.html: Added test cases
3448                WebKit/chromium/tests/DecimalTest.cpp: Added test cases
3449
3450         * platform/Decimal.cpp:
3451         (WebCore::Decimal::ceiling): Changed to return 1 for positive small fractional number.
3452         (WebCore::Decimal::floor): Changed to return -1 for negative small fractional number.
3453
3454 2012-07-13  Dominic Mazzoni  <dmazzoni@google.com>
3455
3456         Should be possible to focus elements within canvas fallback content
3457         https://bugs.webkit.org/show_bug.cgi?id=87898
3458
3459         Reviewed by Chris Fleizach.
3460
3461         Patches isFocusable in dom/Node.cpp and html/HTMLFormControlElement.cpp
3462         to make elements focusable if they're a descendent of a canvas element
3463         if they would otherwise have been focusable but just didn't have
3464         a renderer. Adds a bit to ElementRareData to efficiently keep track
3465         of elements in a canvas subtree.
3466
3467         Test: fast/canvas/fallback-content.html
3468
3469         * dom/Element.cpp:
3470         (WebCore::Element::attach):
3471         (WebCore::Element::detach):
3472         (WebCore::Element::setIsInCanvasSubtree):
3473         (WebCore):
3474         (WebCore::Element::isInCanvasSubtree):
3475         * dom/Element.h:
3476         (Element):
3477         * dom/ElementRareData.h:
3478         (ElementRareData):
3479         (WebCore::ElementRareData::ElementRareData):
3480         * dom/Node.cpp:
3481         (WebCore::Node::isFocusable):
3482         * html/HTMLCanvasElement.cpp:
3483         (WebCore::HTMLCanvasElement::attach):
3484         (WebCore):
3485         * html/HTMLCanvasElement.h:
3486         (HTMLCanvasElement):
3487         * html/HTMLFormControlElement.cpp:
3488         (WebCore::HTMLFormControlElement::isFocusable):
3489
3490 2012-07-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3491
3492         [GTK] Add API to get HTTPS status to WebKit2 GTK+
3493         https://bugs.webkit.org/show_bug.cgi?id=91100
3494
3495         Reviewed by Martin Robinson.
3496
3497         * platform/network/soup/ResourceResponse.h:
3498         (WebCore::ResourceResponse::soupMessageCertificate): Return the
3499         certificate.
3500         (WebCore::ResourceResponse::setSoupMessageCertificate): Set a
3501         certificate.
3502         (WebCore::ResourceResponse::soupMessageTLSErrors): Return the TLS
3503         errors.
3504         (WebCore::ResourceResponse::setSoupMessageTLSErrors): Set TLS
3505         errors.
3506         * platform/network/soup/ResourceResponseSoup.cpp:
3507         (WebCore::ResourceResponse::toSoupMessage): Set the certificate
3508         and TLS errors to the newly created SoupMessage.
3509         (WebCore::ResourceResponse::updateFromSoupMessage): Get the
3510         certificate and TLS errors from the SoupMessage.
3511
3512 2012-07-13  Ryosuke Niwa  <rniwa@webkit.org>
3513
3514         RadioNodeList is not updated upon input type change
3515         https://bugs.webkit.org/show_bug.cgi?id=91178
3516
3517         Reviewed by Alexey Proskuryakov.
3518
3519         Invalidate the radio node lists when type content attribute changes since it excludes
3520         image type input elements.
3521
3522         Test: fast/forms/radionodelist-image-type.html
3523
3524         * dom/Document.cpp:
3525         (WebCore::shouldInvalidateNodeListForType):
3526         * dom/Document.h: Renamed InvalidateOnIdNameForAttrChange to InvalidateOnFormAttrChange
3527         since listing all attribute name isn't useful at this point.
3528         * html/RadioNodeList.cpp:
3529         (WebCore::RadioNodeList::RadioNodeList):
3530
3531 2012-07-12  Dongwoo Im  <dw.im@samsung.com>
3532
3533         CodeGeneratorJS.pm need to handle the attribute which has "CallWith=ScriptExecutionContext" option.
3534         https://bugs.webkit.org/show_bug.cgi?id=91185
3535
3536         Reviewed by Kentaro Hara.
3537
3538         When an attribute has "CallWith=ScriptExecutionContext" option, 'ScriptExecutionContext*' parameter should be the last parameter.
3539
3540         No new tests. Covered by existing tests.
3541
3542         * bindings/scripts/CodeGeneratorJS.pm:
3543         (GenerateImplementation):
3544
3545 2012-07-12  Yoshifumi Inoue  <yosin@chromium.org>
3546
3547         REGRESSION(r117738): [Forms] stepMismatch for input type "time" with large step value always return false.
3548         https://bugs.webkit.org/show_bug.cgi?id=91062
3549
3550         Reviewed by Kent Tamura.
3551
3552         This patch changes value of StepRange::acceptableError to zero for
3553         integer restricted step value.
3554
3555         No new tests, existing test covers (fast/forms/time/ValidityState-stepMismatch-time.html) this change although they are listed in TestExpectation file.
3556
3557         * html/StepRange.cpp:
3558         (WebCore::StepRange::acceptableError): Changed to return 0 if step value is restricted to be an integer.
3559
3560 2012-07-12  Dan Bernstein  <mitz@apple.com>
3561
3562         Pass an option flag to CFStringGetHyphenationLocationBeforeIndex() that tells it to not
3563         terminate the search at the last word boundary before the given index.
3564
3565         Reviewed by Adele Peterson.
3566
3567         No test, because the current version of Core Foundation ignores the options parameter.
3568
3569         * platform/text/cf/HyphenationCF.cpp:
3570         (WebCore::lastHyphenLocation): Changed the options parameter from 0 to 1.
3571
3572 2012-07-12  Eric Seidel  <eric@webkit.org>
3573
3574         Incorrect behaviour calling Range setStart or setEnd with boundary in different document
3575         https://bugs.webkit.org/show_bug.cgi?id=42517
3576
3577         Reviewed by Ojan Vafai.
3578
3579         Added a new static inline "checkForDifferentRootContainer" to share some code
3580         and made setStart/setEnd do the right thing in the x-document case.  I removed
3581         the bogus checks in set*After/set*Before functions, and since they just call
3582         through to setStart/setEnd, they also now do the right thing.
3583
3584         Test: fast/dom/Range/set-wrong-document-err.html
3585
3586         * dom/Range.cpp:
3587         (WebCore::checkForDifferentRootContainer):
3588         (WebCore):
3589         (WebCore::Range::setStart):
3590         (WebCore::Range::setEnd):
3591         (WebCore::Range::setStartAfter):
3592         (WebCore::Range::setEndBefore):
3593         (WebCore::Range::setEndAfter):
3594         (WebCore::Range::setStartBefore):
3595
3596 2012-07-12  Erik Arvidsson  <arv@chromium.org>
3597
3598         [V8] Simplify CodeGeneratorV8 since V8OnProto is only true for DOMWindow
3599         https://bugs.webkit.org/show_bug.cgi?id=91165
3600
3601         Reviewed by Nate Chapin.
3602
3603         The old code was dead code since V8OnProto only ever gets set to 1 for DOMWindow.
3604
3605         No new tests. No change in functionality.
3606
3607         * bindings/scripts/CodeGeneratorV8.pm:
3608         (GenerateNormalAttrSetter):
3609
3610 2012-07-12  Ryosuke Niwa  <rniwa@webkit.org>
3611
3612         Build fix. Initialize unused const member variables to make compilers happy.
3613
3614         * dom/DynamicNodeList.h:
3615         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
3616
3617 2012-07-12  Konrad Piascik  <kpiascik@rim.com>
3618
3619         Web Inspector: Geolocation override
3620         https://bugs.webkit.org/show_bug.cgi?id=89365
3621
3622         Reviewed by Pavel Feldman.
3623
3624         Reverted original patch.
3625         Change has not been reviewed by the right people. It declares
3626         public protocol methods and is wrong in several ways.
3627
3628         * Modules/geolocation/GeolocationController.cpp:
3629         (WebCore::GeolocationController::GeolocationController):
3630         (WebCore::GeolocationController::positionChanged):
3631         * Modules/geolocation/GeolocationController.h:
3632         (GeolocationController):
3633         * inspector/Inspector.json:
3634         * inspector/InspectorInstrumentation.cpp:
3635         (WebCore):
3636         * inspector/InspectorInstrumentation.h:
3637         (WebCore):
3638         (InspectorInstrumentation):
3639         * inspector/InspectorPageAgent.cpp:
3640         (WebCore::InspectorPageAgent::InspectorPageAgent):
3641         * inspector/InspectorPageAgent.h:
3642         * inspector/front-end/Settings.js:
3643         * inspector/front-end/SettingsScreen.js:
3644         (WebInspector.UserAgentSettingsTab):
3645         (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
3646         * inspector/front-end/UserAgentSupport.js:
3647
3648 2012-07-12  Ryosuke Niwa  <rniwa@webkit.org>
3649
3650         Move m_type and m_hasNameCache from HTMLCollectionCacheBase to DynamicNodeListCacheBase for better bit packing
3651         https://bugs.webkit.org/show_bug.cgi?id=91164
3652
3653         Reviewed by Anders Carlsson.
3654
3655         Moved m_type and m_hasNameCache from HTMLCollection and renamed them to m_collectionType and m_isNameCacheValid.
3656
3657         Also renamed shouldIncludeChildren to shouldOnlyIncludeDirectChildren and negated the return value since
3658         all HTMLCollection include children in the collection and the function was meant to tell us whether the collection
3659         should include descendents that are not direct children of base().
3660
3661         In addition, renamed nextNodeOrSibling to nextNode since "or sibling" doesn't seem to add any semantic clarity.
3662
3663         * dom/DynamicNodeList.h:
3664         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
3665         (DynamicNodeListCacheBase):
3666         (WebCore::DynamicNodeListCacheBase::type):
3667         (WebCore::DynamicNodeListCacheBase::hasNameCache):
3668         (WebCore::DynamicNodeListCacheBase::setHasNameCache):
3669         (WebCore::DynamicNodeListCacheBase::clearCache):
3670         * html/HTMLCollection.cpp:
3671         (WebCore::shouldOnlyIncludeDirectChildren):
3672         (WebCore::HTMLCollection::HTMLCollection):
3673         (WebCore::HTMLCollection::isAcceptableElement):
3674         (WebCore::nextNode):
3675         (WebCore::HTMLCollection::itemAfter):
3676         * html/HTMLCollection.h:
3677         (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
3678         (HTMLCollectionCacheBase):
3679         (WebCore::HTMLCollectionCacheBase::clearCache):
3680
3681 2012-07-12  Shinya Kawanaka  <shinyak@chromium.org>
3682
3683         Needs callback before AuthorShadowRoot is added.
3684         https://bugs.webkit.org/show_bug.cgi?id=91167
3685
3686         Reviewed by Hajime Morita.
3687
3688         This is a preliminary patch for adding multiple Shadow DOM support for media elements and form elements.
3689         They assume that UserAgentShadowRoot is the oldest, however currently a page author may try to add
3690         AuthorShadowRoot before adding UserAgentShadowRoot.
3691
3692         This patch adds a callback before AuthorShadowRoot is being added, and allow us to add UserAgentShadowRoot
3693         for those elements. See also Bug 77936, Bug 77937, Bug 90532.
3694
3695         * dom/Element.h:
3696         (WebCore::Element::willAddAuthorShadowRoot):
3697         * dom/ElementShadow.cpp:
3698         (WebCore::ElementShadow::addShadowRoot):
3699         * dom/ElementShadow.h:
3700         (ElementShadow):
3701         * dom/ShadowRoot.cpp:
3702         (WebCore::ShadowRoot::create):
3703
3704 2012-07-12  Dana Jansens  <danakj@chromium.org>
3705
3706         [chromium] Remove the RenderPass pointer from RenderPassDrawQuad
3707         https://bugs.webkit.org/show_bug.cgi?id=91023
3708
3709         Reviewed by Adrienne Walker.
3710
3711         Removes the RenderPass pointer and keeps only an integer id in the
3712         quad to refer back to the RenderPass the quad reads from.
3713
3714         Covered by existing tests.
3715
3716         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3717         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3718         (WebCore::findRenderPassById):
3719         (WebCore):
3720         (WebCore::removeRenderPassesRecursive):
3721         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::shouldRemoveRenderPass):
3722         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass):
3723         (WebCore::CCLayerTreeHostImpl::removeRenderPasses):
3724         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
3725         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3726         (FrameData):
3727         (CullRenderPassesWithCachedTextures):
3728         (CullRenderPassesWithNoQuads):
3729         (CCLayerTreeHostImpl):
3730         * platform/graphics/chromium/cc/CCRenderPass.cpp:
3731         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
3732         * platform/graphics/chromium/cc/CCRenderPass.h:
3733         (WebCore):
3734         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
3735         (WebCore::CCRenderPassDrawQuad::create):
3736         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
3737         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
3738         (CCRenderPassDrawQuad):
3739         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
3740         (WebCore::CCRenderSurface::appendQuads):
3741         * platform/graphics/chromium/cc/CCRenderSurface.h:
3742         (CCRenderSurface):
3743
3744 2012-07-12  Elliott Sprehn  <esprehn@gmail.com>
3745
3746         Unneeded tree walking when adding or removing children due to RenderCounter / RenderQuote logic
3747         https://bugs.webkit.org/show_bug.cgi?id=89900
3748
3749         Reviewed by Eric Seidel and Abhishek Arya.
3750
3751         Previously we would walk the all children a renderer whenever adding
3752         or removing a child renderer from its RenderObjectChildList to look for 
3753         RenderQuote and RenderCounter instances to update. This patch introduces 
3754         a counter in RenderView for the number of RenderQuote and RenderCounter 
3755         instances in that document so we can avoid these traversals.
3756
3757         No tests needed since this is just a short circuiting of logic and the existing
3758         tests should cover it.
3759
3760         * rendering/RenderCounter.cpp:
3761         (WebCore::RenderCounter::RenderCounter): Increment instance counter.
3762         (WebCore::RenderCounter::willBeDestroyed): Decrement instance counter.
3763         (WebCore):
3764         (WebCore::RenderCounter::rendererRemovedFromTree): Short circuit when counter is zero.
3765         (WebCore::RenderCounter::rendererSubtreeAttached): Short circuit when counter is zero.
3766         * rendering/RenderCounter.h:
3767         (RenderCounter):
3768         * rendering/RenderObjectChildList.cpp:
3769         (WebCore::RenderObjectChildList::removeChildNode): Short circuit calling into Counter and Quote code when the document is being destroyed.
3770         * rendering/RenderQuote.cpp:
3771         (WebCore::RenderQuote::RenderQuote):
3772         (WebCore::RenderQuote::willBeDestroyed):
3773         (WebCore):
3774         (WebCore::RenderQuote::rendererSubtreeAttached): Increment instance counter.
3775         (WebCore::RenderQuote::rendererRemovedFromTree): Decrement instance counter.
3776         * rendering/RenderQuote.h:
3777         (RenderQuote):
3778         * rendering/RenderView.cpp:
3779         (WebCore::RenderView::RenderView):
3780         * rendering/RenderView.h: Methods for managing the RenderQuote and RenderCounter counts.
3781         (RenderView):
3782         (WebCore::RenderView::addRenderQuote):
3783         (WebCore::RenderView::removeRenderQuote):
3784         (WebCore::RenderView::hasRenderQuotes):
3785         (WebCore::RenderView::addRenderCounter):
3786         (WebCore::RenderView::removeRenderCounter):
3787         (WebCore::RenderView::hasRenderCounters):
3788
3789 2012-07-12  Ryosuke Niwa  <rniwa@webkit.org>
3790
3791         Merge HTMLCollectionWithArrayStorage into HTMLCollection
3792         https://bugs.webkit.org/show_bug.cgi?id=91144
3793
3794         Reviewed by Anders Carlsson.
3795
3796         Merged HTMLCollectionWithArrayStorage::item into HTMLCollection::item and got rid of
3797         HTMLCollectionWithArrayStorage. Also de-virtualized HTMLCollection::item and HTMLCollection::length
3798         and merged itemInArrayAfter and itemAfter.
3799
3800         In addition, improved the algorithm in HTMLCollection::length to take advantage of item cache.
3801         Instead of always computing the length from the beginning, we start the search from the cached item
3802         so that if we're near end of the collection, we avoid significant portion of the node traversal.
3803
3804         Furthermore, made HTMLCollection always call setItemCache with a non-null item and HTMLCollection::item
3805         set the length cache when it reaches the end of the collection to avoid redundant length calculations.
3806
3807         * dom/DynamicNodeList.h:
3808         (WebCore::DynamicNodeListCacheBase::setItemCache): Add a FIXME.
3809         * html/HTMLCollection.cpp:
3810         (WebCore::HTMLCollection::itemAfter): Regular HTMLCollection doesn't have uses elements array so
3811         assert that offsetInArray is always 0.
3812         (WebCore): Removed calcLength.
3813         (WebCore::HTMLCollection::length): Rewritten. The algorithm is as follows:
3814         When there is no item cache, we look for the first item by calling item(0). If item(0) returns null,
3815         then it must have set the length cache so bail out. If the previous step didn't bail out, then
3816         the item cache is valid and not null (see above), so count the number of remaining items in collection
3817         starting at the cached item's offset + 1.
3818         (WebCore::HTMLCollection::item): Avoid calling setItemCache with null. When the first item is null,
3819         set the length cache instead.
3820         (WebCore::HTMLCollection::itemAfterCachedItem): Extracted from HTMLCollectionWithArrayStorage::item.
3821         (WebCore::HTMLCollection::namedItem): Pass in arrayOffset to itemAfter. Note this variable is never
3822         used since only HTMLFormCollection and HTMLPropertiesCollection use array offsets but they override
3823         this function.
3824         (WebCore::HTMLCollection::updateNameCache): Ditto.
3825         * html/HTMLCollection.h:
3826         (HTMLCollection):
3827         (WebCore):
3828         * html/HTMLFormCollection.cpp: Removed calcLength(). Even though this function didn't iterate over
3829         the collection directly, HTMLFormElement::length and HTMLFieldSetElement::length did so we're not
3830         regressing any performance here.
3831         (WebCore::HTMLFormCollection::HTMLFormCollection):
3832         (WebCore::HTMLFormCollection::itemAfter):
3833         * html/HTMLFormCollection.h:
3834         (HTMLFormCollection):
3835         * html/HTMLNameCollection.cpp:
3836         (WebCore::HTMLNameCollection::itemAfter):
3837         * html/HTMLNameCollection.h:
3838         (HTMLNameCollection):
3839         * html/HTMLPropertiesCollection.cpp: Removed calcLength().
3840         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
3841         (WebCore::HTMLPropertiesCollection::itemAfter):
3842         (WebCore):
3843         * html/HTMLPropertiesCollection.h:
3844         (HTMLPropertiesCollection):
3845         * html/HTMLTableRowsCollection.cpp:
3846         (WebCore::HTMLTableRowsCollection::itemAfter):
3847         * html/HTMLTableRowsCollection.h:
3848         (HTMLTableRowsCollection):
3849
3850 2012-07-12  Pravin D  <pravind.2k4@gmail.com>
3851
3852         Row size/position is wrongly calculated when table having overlapping rowspan cell and colspan cell
3853         https://bugs.webkit.org/show_bug.cgi?id=16811
3854
3855         Reviewed by Julien Chaffraix.
3856
3857         The height of a row is calculated by taking the max height of the cells contained in it. When a row contains
3858         a rowSpan cell and if this row is not the last row of the cell, then its height is max height of other non
3859         rowSpan cells. If the row is the last row of the rowSpan cell, then using the contraint laid by CSS2.1 spec
3860         "For a rowSpan cell, the sum of the row heights involved must be great enough to encompass the cell spanning the rows",
3861         the last remaining height of the rowSpan(cell height minus heights of other involved rows) is taken into consideration
3862         while calculating the height of this row.
3863         Currently when calculating the height of the row we are only using the height of the primary cell at position (row, col).
3864         However when a row has colSpan cell and rowSpan, they might overlap. In such a sitution as only the primary cells height
3865         is considered, the height of the row will be calculated worngly if the other overlapping cell has greater height.
3866         Thus all the overlapping cell at position (row, col) must be considered while calculating the height of a row. 
3867
3868         Test: fast/table/last-cell-of-rowspan-overlapping-colspan-cell.html
3869
3870         * rendering/RenderTableSection.cpp:
3871         (WebCore::RenderTableSection::calcRowLogicalHeight):
3872         Fixed function to use all the overlapping cells at position(row, col) to calculate the height/position of rows.
3873
3874 2012-07-12  Joshua Bell  <jsbell@chromium.org>
3875
3876         IndexedDB: Enable IDBFactory.deleteDatabase() and webkitGetDatabaseNames() in Workers
3877         https://bugs.webkit.org/show_bug.cgi?id=90310
3878
3879         Reviewed by Tony Chang.
3880
3881         Simplify Document vs. Worker logic for IDBFactory::open() and hook up the
3882         other two IDBFactory methods for use by workers as well.
3883
3884         Test: storage/indexeddb/factory-basics-workers.html
3885
3886         * Modules/indexeddb/IDBFactory.cpp:
3887         (isContextValid): Helper function consolidating checks that context is usable.
3888         (getIndexedDBDatabasePath): Helper function for accessing group settings.
3889         (WebCore::IDBFactory::getDatabaseNames): Simplify - just pass context through to back end.
3890         (WebCore::IDBFactory::open): Ditto.
3891         (WebCore::IDBFactory::deleteDatabase): Ditto.
3892         (WebCore::IDBFactory::cmp): Whitespace.
3893         * Modules/indexeddb/IDBFactoryBackendImpl.cpp: Obsolete openFromWorker() removed.
3894         (WebCore::IDBFactoryBackendImpl::getDatabaseNames): Signature updated.
3895         (WebCore::IDBFactoryBackendImpl::deleteDatabase): Signature updated.
3896         (WebCore::IDBFactoryBackendImpl::open): Signature updated.
3897         * Modules/indexeddb/IDBFactoryBackendImpl.h:
3898         (IDBFactoryBackendImpl):
3899         * Modules/indexeddb/IDBFactoryBackendInterface.h: Interface methods now take both SecurityOrigin
3900         and ScriptExecutionContext, but not Frame. In the proxy, SecurityOrigin is redundant (can be
3901         accessed from context) but on the real back end the context is null (as Frame was previously).
3902         (IDBFactoryBackendInterface):
3903         * inspector/InspectorIndexedDBAgent.cpp:
3904         (WebCore):
3905         (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
3906         (WebCore::InspectorIndexedDBAgent::requestDatabase):
3907         (WebCore::InspectorIndexedDBAgent::requestData):
3908
3909 2012-07-12  Dana Jansens  <danakj@chromium.org>
3910
3911         [chromium] The root layer should not try create a second RenderSurface for itself
3912         https://bugs.webkit.org/show_bug.cgi?id=91124
3913
3914         Reviewed by Adrienne Walker.
3915
3916         Tests: CCLayerTreeHostImplTest.rootLayerDoesntCreateExtraSurface
3917
3918         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
3919         (WebCore::subtreeShouldRenderToSeparateSurface):
3920
3921 2012-07-12  Adam Barth  <abarth@webkit.org>
3922
3923         Regression (r122359) Layout Test html5lib/runner.html is failing
3924         https://bugs.webkit.org/show_bug.cgi?id=91047
3925
3926         Reviewed by Tony Chang.
3927
3928         This ASSERT is bogus because doctypes can be removed from the DOM and
3929         then re-added.
3930
3931         Test: fast/viewport/viewport-legacy-xhtmlmp-remove-and-add.html
3932
3933         * dom/Document.cpp:
3934         (WebCore::Document::setDocType):
3935
3936 2012-07-12  Ojan Vafai  <ojan@chromium.org>
3937
3938         Implied minimum size of flex items is min-content
3939         https://bugs.webkit.org/show_bug.cgi?id=87546
3940
3941         Reviewed by Tony Chang.
3942
3943         http://dev.w3.org/csswg/css3-flexbox/#min-size-auto
3944         In the main axis direction, min-size of auto means min-content.
3945
3946         Test: css3/flexbox/flex-item-min-size.html
3947
3948         * rendering/RenderBox.cpp:
3949         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
3950         (WebCore::RenderBox::computeContentLogicalHeightUsing):
3951         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
3952         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3953         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
3954         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
3955         It turned out that these FIXMEs are all unnecessary with the changes to RenderFlexibleBox.
3956
3957         * rendering/RenderFlexibleBox.cpp:
3958         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
3959         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
3960
3961 2012-07-12  Eric Penner  <epenner@google.com>
3962
3963         [chromium] Use CCTexture/TextureAllocator and remove TextureManager
3964         https://bugs.webkit.org/show_bug.cgi?id=91001
3965
3966         Reviewed by Adrienne Walker.
3967
3968         Use CCTexture to clean up CCPrioritizedTexture::Backing.
3969         Add TextureAllocator.h and remove remainder of TextureManager.h/cpp.
3970         Minor move/refactoring of link/unlink in CCPrioritizedTexture.
3971         Remove double initialization of the default memory limit.
3972
3973         Covered by existing tests (refactoring).
3974
3975         * WebCore.gypi:
3976         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
3977         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
3978         (WebCore):
3979         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
3980         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
3981         (WebCore):
3982         * platform/graphics/chromium/ImageLayerChromium.cpp:
3983         * platform/graphics/chromium/LayerRendererChromium.cpp:
3984         (WebCore::LayerRendererChromium::initialize):
3985         * platf