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