[BlackBerry] Loading media data with http authentication
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-05-29  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2
3         [BlackBerry] Loading media data with http authentication
4         https://bugs.webkit.org/show_bug.cgi?id=84214
5
6         Reviewed by George Staikos.
7
8         RIM PR: 117618
9         Implemented http authentication feature for media by implementing
10         two interface functions in class MediaPlayerPrivate:
11         onAuthenticationNeeded(): this function is triggered when MMR
12         engine requires http authentication. We search the CredentialStorage
13         to see if we have already stored existing credential information,
14         or challenge user to provide it.
15         OnAuthenticationAccepted(): this function is triggered when MMR
16         engine accepts the credential information, and we need to save
17         it in CredentialStorage for later use.
18
19         Internally reviewed by Max Feil <mfeil@qnx.com>.
20
21         Manual test case: blackberry/video-load-with-authentication.html
22
23         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
24         (WebCore::generateProtectionSpaceFromMMRAuthChallenge):
25         (WebCore):
26         (WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
27         (WebCore::MediaPlayerPrivate::onAuthenticationAccepted):
28         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
29         (MediaPlayerPrivate):
30
31 2012-05-29  MORITA Hajime  <morrita@google.com>
32
33         [Shadow DOM] Node distribution should be orthogonal from node attachment
34         https://bugs.webkit.org/show_bug.cgi?id=87223
35
36         Reviewed by Dimitri Glazkov.
37
38         This chagne reorganizes Shadow DOM subtree distribution implementation.
39
40         Originally, it was interleaved across attach() of several classes like
41         InsertionPoint and ShadowRoot. Its invalidation was also mixed as a part of
42         the style recalculation and detach()-es.
43
44         This change extracts these bits of code to a set of ContentDistributor methods, which are
45         facaded by two ElementShadow API. Following two API are the primary entry points:
46
47         - ElementShadow::ensureDistribution()
48         - ElementShadow::invalidateDistribution()
49
50         The actual implementations are ContentDistributor::distribute() and
51         ContentDistributor::invalidate() respectively.
52
53         When clients need to traverse composed tree, before attach() for
54         example, they should call ensureDistribution() to make sure that
55         the traversal data structure ("the distribution") is ready.  When
56         there is any DOM mutation which can result a composed tree
57         mutation, then clients should call invalidateDistribution() to
58         mark the distribution being dated.
59
60         Here are such DOM mutations:
61
62         - The children of any ShadowRoots are changed,
63         - The children of any InsertionPoints are changed,
64         - The children of any host elements are changed,
65         - Any insertion point is inserted to or removed from the shadow tree,
66         - @select attribute of <content> is modified and
67         - New ShadowRoot is added to the shadow tree.
68
69         Note that the validity of the distribution is tracked and
70         unnecessary distribution requests are ignored.
71
72         After the invalidation, that shadow subtrees are detached once and
73         request  their  re-attachment  through  the  style  recalculation.
74         Then,  on the  responding  style recalculation  and attach(),  new
75         distribution will be computed.
76
77         No new tests. Covered by existing tests.
78
79         * dom/Element.cpp:
80         (WebCore::Element::~Element):
81         (WebCore::Element::childrenChanged):
82         * dom/ElementShadow.cpp:
83         (WebCore::ElementShadow::~ElementShadow):
84         (WebCore::ElementShadow::addShadowRoot):
85         (WebCore::ElementShadow::removeAllShadowRoots):
86         (WebCore::ElementShadow::attach):
87         (WebCore::ElementShadow::recalcStyle):
88         (WebCore::ElementShadow::ensureDistribution):
89         (WebCore::ElementShadow::invalidateDistribution):
90         * dom/ElementShadow.h:
91         (ElementShadow):
92         * dom/NodeRenderingContext.cpp:
93         (WebCore::NodeRenderingContext::NodeRenderingContext):
94         (WebCore::NodeRendererFactory::createRendererIfNeeded):
95         * dom/NodeRenderingContext.h:
96         (NodeRenderingContext):
97         * dom/ShadowRoot.cpp:
98         (WebCore::ShadowRoot::setApplyAuthorStyles):
99         (WebCore::ShadowRoot::attach):
100         (WebCore::ShadowRoot::childrenChanged):
101         (WebCore):
102         * dom/ShadowRoot.h:
103         (ShadowRoot):
104         * html/HTMLFormControlElement.cpp:
105         * html/ValidationMessage.cpp:
106         (WebCore::ValidationMessage::buildBubbleTree):
107         * html/shadow/ContentDistributor.cpp:
108         (WebCore::ContentDistributor::ContentDistributor):
109         (WebCore::ContentDistributor::~ContentDistributor):
110         (WebCore::ContentDistributor::findInsertionPointFor):
111         (WebCore::ContentDistributor::distribute):
112         (WebCore::ContentDistributor::invalidate):
113         (WebCore::ContentDistributor::finishInivalidation):
114         (WebCore::ContentDistributor::distributeSelectionsTo):
115         (WebCore::ContentDistributor::distributeShadowChildrenTo):
116         (WebCore::ContentDistributor::invalidateDistributionIn):
117         * html/shadow/ContentDistributor.h:
118         (WebCore::ContentDistributor::needsInvalidation):
119         (ContentDistributor):
120         (WebCore::ContentDistributor::needsDistribution):
121         * html/shadow/HTMLContentElement.cpp:
122         (WebCore::HTMLContentElement::parseAttribute):
123         * html/shadow/InsertionPoint.cpp:
124         (WebCore::InsertionPoint::attach):
125         (WebCore::InsertionPoint::detach):
126         (WebCore::InsertionPoint::nextTo):
127         (WebCore::InsertionPoint::previousTo):
128         (WebCore::InsertionPoint::childrenChanged):
129         * html/shadow/InsertionPoint.h:
130         (WebCore::InsertionPoint::setDistribution):
131         (WebCore::InsertionPoint::clearDistribution):
132         (InsertionPoint):
133
134 2012-05-29  Luke Macpherson  <macpherson@chromium.org>
135
136         Implement post-landing feedback for WebKitCSSTransformValue::customCSSText().
137         https://bugs.webkit.org/show_bug.cgi?id=87684
138
139         Reviewed by Darin Adler.
140
141         Darin provided some style suggesting on https://bugs.webkit.org/show_bug.cgi?id=87462 after it landed.
142         This patch incorporates those suggestions, namely using 0 instead of empty string for UnknownTransformOperation
143         and WTF_ARRAY_LENGTH instead of hard coding the array length.
144
145         Covered by existing transform tests.
146
147         * css/WebKitCSSTransformValue.cpp:
148         (WebCore):
149         (WebCore::WebKitCSSTransformValue::customCssText):
150
151 2012-05-29  Eric Seidel  <eric@webkit.org>
152
153         Fix ENABLE_IFRAME_SEAMLESS to actually fully disable <iframe seamless>
154         https://bugs.webkit.org/show_bug.cgi?id=87646
155
156         Reviewed by Adam Barth.
157
158         In the process of moving the seamless feature out of github and into bugs.webkit.org
159         multiple versions of the shouldDisplaySeamlessly function got written
160         (and moved from HTMLIFrameElement to Document), but only one of them was wrapped
161         in ENABLE_IFRAME_SEAMLESS.  HTMLIFrameElement was checking mayDisplaySeamlessly
162         directly (as was my original design), which got around the ENABLE_IFRAME_SEAMLESS check.
163         I've fixed this oversight, and the feature is now off when we tell it to be off.
164
165         This is covered by many existing tests.  I've verified locally that
166         all tests fail when ENABLE_IFRAME_SEAMLESS is disabled instead of
167         only some of them.
168
169         * dom/SecurityContext.h:
170         (SecurityContext):
171         * html/HTMLIFrameElement.cpp:
172         (WebCore::HTMLIFrameElement::shouldDisplaySeamlessly):
173
174 2012-05-29  Scott Graham  <scottmg@chromium.org>
175
176         Fix warning in preprocessing Source/WebCore/dom/DOMError.idl
177         https://bugs.webkit.org/show_bug.cgi?id=87763
178
179         Reviewed by Adam Barth.
180
181         Add newline at end of file to avoid warning:
182         ../dom/DOMError.idl:35:2: warning: no newline at end of file
183
184         * dom/DOMError.idl:
185
186 2012-05-29  Mark Pilgrim  <pilgrim@chromium.org>
187
188         [Chromium] Move fileExists to Platform.h
189         https://bugs.webkit.org/show_bug.cgi?id=87531
190
191         Reviewed by Adam Barth.
192
193         Part of a refactoring series. See tracking bug 82948.
194
195         * platform/chromium/FileSystemChromium.cpp:
196         (WebCore::fileExists):
197         * platform/chromium/PlatformSupport.h:
198         (PlatformSupport):
199
200 2012-05-29  Kentaro Hara  <haraken@chromium.org>
201
202         [V8] Rename v8Null() to v8NullWithCheck()
203         https://bugs.webkit.org/show_bug.cgi?id=87713
204
205         Reviewed by Adam Barth.
206
207         In IRC, cmarcelo@ pointed out that v8::Null() and v8Null()
208         are confusing. This patch renames v8Null() to v8NullWithCheck().
209
210         No tests. No behavior change.
211
212         * bindings/scripts/CodeGeneratorV8.pm:
213         (GenerateHeader):
214         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
215         (WebCore::toV8):
216         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
217         (WebCore::toV8):
218         * bindings/scripts/test/V8/V8TestEventConstructor.h:
219         (WebCore::toV8):
220         * bindings/scripts/test/V8/V8TestEventTarget.h:
221         (WebCore::toV8):
222         * bindings/scripts/test/V8/V8TestException.h:
223         (WebCore::toV8):
224         * bindings/scripts/test/V8/V8TestInterface.h:
225         (WebCore::toV8):
226         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
227         (WebCore::toV8):
228         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
229         (WebCore::toV8):
230         * bindings/scripts/test/V8/V8TestNode.h:
231         (WebCore::toV8):
232         * bindings/scripts/test/V8/V8TestObj.h:
233         (WebCore::toV8):
234         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
235         (WebCore::toV8):
236         * bindings/v8/V8Binding.h:
237         (WebCore::v8NullWithCheck):
238         (WebCore::v8DateOrNull):
239
240 2012-05-29  Christophe Dumez  <christophe.dumez@intel.com>
241
242         Some Content Security Policy console messages are missing line numbers in JSC
243         https://bugs.webkit.org/show_bug.cgi?id=87558
244
245         Reviewed by Adam Barth.
246
247         Make ScriptController::eventHandlerPosition() behave the same way on
248         JSC than V8. This means that TextPosition::minimumPosition() is
249         returned if parser is null, instead of
250         TextPosition::belowRangePosition(). The line numbers are now correctly
251         printed in the output of Content Security Policy tests.
252
253         Tests: http/tests/security/contentSecurityPolicy/inline-script-blocked-javascript-url.html
254                http/tests/security/contentSecurityPolicy/javascript-url-blocked.html
255
256         * bindings/js/ScriptController.cpp:
257         (WebCore::ScriptController::eventHandlerPosition):
258
259 2012-05-29  Shawn Singh  <shawnsingh@chromium.org>
260
261         [chromium] make WebTransformationMatrix object usable by non-webkit code
262         https://bugs.webkit.org/show_bug.cgi?id=87315
263
264         Reviewed by James Robinson.
265
266         This change is covered by existing tests and by whether it
267         compiles. There should be no changes in behavior.
268
269         * platform/chromium/support/WebTransformationMatrix.cpp:
270         (WebKit::WebTransformationMatrix::WebTransformationMatrix):
271         (WebKit::WebTransformationMatrix::operator=):
272         (WebKit::WebTransformationMatrix::operator==):
273         (WebKit::WebTransformationMatrix::inverse):
274         (WebKit::WebTransformationMatrix::to2dTransform):
275         (WebKit::WebTransformationMatrix::multiply):
276         (WebKit::WebTransformationMatrix::makeIdentity):
277         (WebKit::WebTransformationMatrix::translate):
278         (WebKit::WebTransformationMatrix::translate3d):
279         (WebKit::WebTransformationMatrix::translateRight3d):
280         (WebKit::WebTransformationMatrix::scale):
281         (WebKit::WebTransformationMatrix::scaleNonUniform):
282         (WebKit::WebTransformationMatrix::scale3d):
283         (WebKit::WebTransformationMatrix::rotate):
284         (WebKit::WebTransformationMatrix::rotate3d):
285         (WebKit::WebTransformationMatrix::skewX):
286         (WebKit::WebTransformationMatrix::skewY):
287         (WebKit::WebTransformationMatrix::applyPerspective):
288         (WebKit::WebTransformationMatrix::blend):
289         (WebKit::WebTransformationMatrix::hasPerspective):
290         (WebKit::WebTransformationMatrix::isInvertible):
291         (WebKit::WebTransformationMatrix::isBackFaceVisible):
292         (WebKit::WebTransformationMatrix::isIdentity):
293         (WebKit::WebTransformationMatrix::isIdentityOrTranslation):
294         (WebKit::WebTransformationMatrix::isIntegerTranslation):
295         (WebKit::WebTransformationMatrix::m11):
296         (WebKit::WebTransformationMatrix::setM11):
297         (WebKit::WebTransformationMatrix::m12):
298         (WebKit::WebTransformationMatrix::setM12):
299         (WebKit::WebTransformationMatrix::m13):
300         (WebKit::WebTransformationMatrix::setM13):
301         (WebKit::WebTransformationMatrix::m14):
302         (WebKit::WebTransformationMatrix::setM14):
303         (WebKit::WebTransformationMatrix::m21):
304         (WebKit::WebTransformationMatrix::setM21):
305         (WebKit::WebTransformationMatrix::m22):
306         (WebKit::WebTransformationMatrix::setM22):
307         (WebKit::WebTransformationMatrix::m23):
308         (WebKit::WebTransformationMatrix::setM23):
309         (WebKit::WebTransformationMatrix::m24):
310         (WebKit::WebTransformationMatrix::setM24):
311         (WebKit::WebTransformationMatrix::m31):
312         (WebKit::WebTransformationMatrix::setM31):
313         (WebKit::WebTransformationMatrix::m32):
314         (WebKit::WebTransformationMatrix::setM32):
315         (WebKit::WebTransformationMatrix::m33):
316         (WebKit::WebTransformationMatrix::setM33):
317         (WebKit::WebTransformationMatrix::m34):
318         (WebKit::WebTransformationMatrix::setM34):
319         (WebKit::WebTransformationMatrix::m41):
320         (WebKit::WebTransformationMatrix::setM41):
321         (WebKit::WebTransformationMatrix::m42):
322         (WebKit::WebTransformationMatrix::setM42):
323         (WebKit::WebTransformationMatrix::m43):
324         (WebKit::WebTransformationMatrix::setM43):
325         (WebKit::WebTransformationMatrix::m44):
326         (WebKit::WebTransformationMatrix::setM44):
327         (WebKit::WebTransformationMatrix::a):
328         (WebKit::WebTransformationMatrix::setA):
329         (WebKit::WebTransformationMatrix::b):
330         (WebKit::WebTransformationMatrix::setB):
331         (WebKit::WebTransformationMatrix::c):
332         (WebKit::WebTransformationMatrix::setC):
333         (WebKit::WebTransformationMatrix::d):
334         (WebKit::WebTransformationMatrix::setD):
335         (WebKit::WebTransformationMatrix::e):
336         (WebKit::WebTransformationMatrix::setE):
337         (WebKit::WebTransformationMatrix::f):
338         (WebKit::WebTransformationMatrix::setF):
339         (WebKit::WebTransformationMatrix::toWebCoreTransform):
340         (WebKit::WebTransformationMatrix::mapRect):
341         (WebKit::WebTransformationMatrix::mapPoint):
342         (WebKit::WebTransformationMatrix::mapQuad):
343         (WebKit::WebTransformationMatrix::projectPoint):
344
345 2012-05-29  Alexis Menard  <alexis.menard@openbossa.org>
346
347         [CSS3 Backgrounds and Borders] Implement box-decoration-break parsing.
348         https://bugs.webkit.org/show_bug.cgi?id=87678
349
350         Reviewed by Eric Seidel.
351
352         Implement the parsing part of box-decoration-break. The specification
353         is located at http://www.w3.org/TR/css3-background/#box-decoration-break.
354         So far Opera implements it. This patch only implements the parsing part of
355         the property. A following patch will implement the rendering part. Despite
356         the rendering part missing it improves http://css3test.com by 1%.
357
358         Test: fast/box-decoration-break/box-decoration-break-parsing.html
359
360         * css/CSSComputedStyleDeclaration.cpp:
361         (WebCore):
362         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
363         * css/CSSParser.cpp:
364         (WebCore::isValidKeywordPropertyAndValue):
365         (WebCore::isKeywordPropertyID):
366         * css/CSSPrimitiveValueMappings.h:
367         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
368         (WebCore):
369         (WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak):
370         * css/CSSProperty.cpp:
371         (WebCore::CSSProperty::isInheritedProperty):
372         * css/CSSPropertyNames.in:
373         * css/CSSValueKeywords.in:
374         * css/StyleBuilder.cpp:
375         (WebCore::StyleBuilder::StyleBuilder):
376         * rendering/style/RenderStyle.h:
377         * rendering/style/RenderStyleConstants.h:
378         * rendering/style/StyleBoxData.cpp:
379         (WebCore::StyleBoxData::StyleBoxData):
380         (WebCore::StyleBoxData::operator==):
381         * rendering/style/StyleBoxData.h:
382         (WebCore::StyleBoxData::boxDecorationBreak):
383         (StyleBoxData):
384
385 2012-05-29  David Barr  <davidbarr@chromium.org>
386
387         [text-overflow: ellipsis] WebKit should ignore the ellipsis for the purpose of dispatching mouse events
388         https://bugs.webkit.org/show_bug.cgi?id=63781
389
390         Reviewed by Eric Seidel.
391
392         "Ellipsing only affects rendering and must not affect layout nor dispatching of pointer events."
393         http://www.w3.org/TR/2012/WD-css3-ui-20120117/#text-overflow
394
395         Test: fast/css/text-overflow-ellipsis-hit-test.html
396
397         * rendering/EllipsisBox.cpp:
398         (WebCore::EllipsisBox::nodeAtPoint): Always return false.
399
400 2012-05-29  Gavin Peters  <gavinp@chromium.org>
401
402         [Chromium] Remove assertions on state in Prerender.cpp
403         https://bugs.webkit.org/show_bug.cgi?id=87746
404
405         Chrome was crashing in the new Prerender API on Google Web Search; this was because the DOM would stop(), setting the
406         state of the Prerenders in the document to Inactive, but an asyncronous GC would later come come along and trigger the
407         removedFromDocument behaviour on each element, including the <link> element launching the prerender.  This causes an
408         assertion failure.
409
410         I believe the late-deletion of the DOM, and the HTMLElement::removedFromDocument calls are legal, and it was the
411         overzealous assertions in Prerender that were inappropriate.
412
413         Reviewed by Adam Barth.
414
415         No new automated tests, working on a Chromium browser test. Manually test by entering many prerender and non-prerendered
416         queries into Google Web Search.
417
418         * platform/chromium/Prerender.cpp:
419         (WebCore::Prerender::Prerender):
420         (WebCore::Prerender::add):
421         (WebCore::Prerender::cancel):
422         (WebCore::Prerender::abandon):
423         * platform/chromium/Prerender.h:
424         (Prerender):
425
426 2012-05-29  Victor Carbune  <victor@rosedu.org>
427
428         Display cues in the controls area
429         https://bugs.webkit.org/show_bug.cgi?id=87591
430
431         Reviewed by Eric Carlson.
432
433         Changed the behaviour to implicitly hide the volume slidebar
434         if the controls are hidden (due mouse moving out of the video
435         area or controls are toggled through JS).
436
437         This seems to be the simplest fix to this issue, otherwise
438         on toggling the display:none property on the controls the
439         volume slidebar might appear below the video.
440
441         Re-enabled failing tests for this functionality.
442
443         * html/shadow/MediaControlElements.cpp:
444         (WebCore::MediaControlPanelElement::makeTransparent): Re-enabled
445         timer to set the display:none property on the controls.
446         * html/shadow/MediaControlRootElement.cpp:
447         (WebCore::MediaControlRootElement::hide): Added a call to hide
448         the volume slider.
449         (WebCore::MediaControlRootElement::makeTransparent): Same.
450         * html/shadow/MediaControlRootElementChromium.cpp:
451         (WebCore::MediaControlRootElementChromium::hide): Same.
452         (WebCore::MediaControlRootElementChromium::makeTransparent): Same.
453
454 2012-05-29  Adrienne Walker  <enne@google.com>
455
456         Fix transparent iframes with composited contents in WK1 on Mac
457         https://bugs.webkit.org/show_bug.cgi?id=76478
458
459         Reviewed by Simon Fraser.
460
461         Test: compositing/iframes/repaint-after-losing-scrollbars.html
462
463         * page/FrameView.cpp:
464         (WebCore::FrameView::useSlowRepaints):
465
466 2012-05-29  David Hyatt  <hyatt@apple.com>
467
468         https://bugs.webkit.org/show_bug.cgi?id=87787
469         
470         [New Multicolumn] Refactor the region and flow thread code so that it can pick up the correct column widths
471         and heights when determining the logical width and height of the flow thread itself.
472
473         This patch adds new virtual methods to RenderRegion: logicalWidthForFlowThreadContent and logicalHeightForFlowThreadContent.
474         For normal regions, these methods return the contentWidth and contentHeight of the regions themselves. For column sets,
475         however, these methods actually return the column widths and heights.
476         
477         This allows the flow thread to properly lay out according to the column width.
478         
479         Region invalidation is also done properly by using these new methods.
480         
481         In some cases the code is actually simplified, since we can get rid of some isHorizontalWritingMode() switching.
482         
483         With this patch the flow thread now actually lays out and paints at the right width (spilling out of the region set in a single unbroken
484         column).
485
486         Reviewed by Dan Bernstein.
487
488         * rendering/RenderFlowThread.cpp:
489         (WebCore::RenderFlowThread::layout):
490         (WebCore::RenderFlowThread::computeLogicalWidth):
491         (WebCore::RenderFlowThread::computeLogicalHeight):
492         * rendering/RenderMultiColumnBlock.cpp:
493         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
494         * rendering/RenderMultiColumnBlock.h:
495         (WebCore::RenderMultiColumnBlock::isRenderMultiColumnBlock):
496         (RenderMultiColumnBlock):
497         (WebCore::toRenderMultiColumnBlock):
498         (WebCore):
499         * rendering/RenderMultiColumnSet.cpp:
500         (WebCore::RenderMultiColumnSet::computeLogicalWidth):
501         (WebCore):
502         (WebCore::RenderMultiColumnSet::computeLogicalHeight):
503         * rendering/RenderMultiColumnSet.h:
504         (WebCore::RenderMultiColumnSet::setColumnWidthAndCount):
505         (RenderMultiColumnSet):
506         * rendering/RenderObject.h:
507         (WebCore::RenderObject::isRenderMultiColumnBlock):
508         * rendering/RenderRegion.cpp:
509         (WebCore::RenderRegion::logicalWidthForFlowThreadContent):
510         (WebCore):
511         (WebCore::RenderRegion::logicalHeightForFlowThreadContent):
512         (WebCore::RenderRegion::layout):
513         * rendering/RenderRegion.h:
514         (RenderRegion):
515
516 2012-05-29  Alec Flett  <alecflett@chromium.org>
517
518         IndexedDB: Align codes and names for IDB-specific and DOM-specific errors/exceptions
519         https://bugs.webkit.org/show_bug.cgi?id=87276
520
521         Reviewed by Tony Chang.
522
523         No new tests. Existing tests have been updated to use the new
524         exception constant values.
525
526         The IDB spec has evolved to DOM4-style DOMExceptions, which are
527         referred to with MixedCase, string-based style names for
528         exceptions rather than UNDERSCORE_CONSTANT_ERR codes. Change to
529         use MixedCase error/exception names, and tease out the
530         IDB-specific exception/error codes/names from the system-level
531         codes. Make sure that the legacy IDB-masked exception code values
532         match the DOM exception values. Make sure that
533         IDBDatabaseException[exception.name] still works.
534
535         * Modules/indexeddb/IDBDatabase.cpp:
536         (WebCore::IDBDatabase::createObjectStore):
537         (WebCore::IDBDatabase::transaction):
538         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
539         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
540         (WebCore::IDBDatabaseBackendImpl::setVersion):
541         (WebCore::IDBDatabaseBackendImpl::transaction):
542         * Modules/indexeddb/IDBDatabaseException.cpp:
543         (IDBDatabaseExceptionNameDescription):
544         (WebCore):
545         (WebCore::IDBDatabaseException::initializeDescription):
546         * Modules/indexeddb/IDBDatabaseException.h:
547         * Modules/indexeddb/IDBDatabaseException.idl:
548         * Modules/indexeddb/IDBObjectStore.cpp:
549         (WebCore::IDBObjectStore::createIndex):
550         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
551         (WebCore::IDBObjectStoreBackendImpl::index):
552         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
553         * Modules/indexeddb/IDBRequest.cpp:
554         (WebCore::IDBRequest::abort):
555         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
556         (WebCore::IDBTransactionBackendImpl::objectStore):
557
558 2012-05-29  David Hyatt  <hyatt@apple.com>
559
560         https://bugs.webkit.org/show_bug.cgi?id=87775
561
562         [New Multicolumn] Make sure RenderMultiColumnSets have their own copy of the count, width and height of their columns. 
563
564         Reviewed by Anders Carlsson.
565
566         * rendering/RenderMultiColumnBlock.cpp:
567         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
568         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
569         * rendering/RenderMultiColumnBlock.h:
570         (WebCore::RenderMultiColumnBlock::columnWidth):
571         (WebCore::RenderMultiColumnBlock::columnCount):
572         (RenderMultiColumnBlock):
573         * rendering/RenderMultiColumnSet.cpp:
574         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
575         * rendering/RenderMultiColumnSet.h:
576         (WebCore::RenderMultiColumnSet::columnCount):
577         (WebCore::RenderMultiColumnSet::columnWidth):
578         (WebCore::RenderMultiColumnSet::columnHeight):
579         (RenderMultiColumnSet):
580         (WebCore::RenderMultiColumnSet::setColumnWidthAndCount):
581         (WebCore::RenderMultiColumnSet::setColumnHeight):
582
583 2012-05-29  Simon Fraser  <simon.fraser@apple.com>
584
585         Incomplete repaint on twitter.com when replying to a tweet
586         https://bugs.webkit.org/show_bug.cgi?id=87553
587
588         Reviewed by Dean Jackson.
589         
590         Style changes can cause a compositing layer to change between
591         requiring its own backing store or not, e.g. with the addition
592         or removal of a transform.
593         
594         When that happens, we need to repaint the ancesetor layer that
595         this layer was, or will be drawing into.
596         
597         Factored some code out of layerWillBeRemoved() to be able to
598         also call it from setRequiresOwnBackingStore().
599
600         New manual test, ManualTests/compositing/requires-backing-change.html.
601         I was not able to get an automated pixel test to work.
602
603         * rendering/RenderLayerBacking.cpp:
604         (WebCore::RenderLayerBacking::setRequiresOwnBackingStore):
605         * rendering/RenderLayerCompositor.cpp:
606         (WebCore::RenderLayerCompositor::updateCompositingLayers): Remove trailing whitespace.
607         (WebCore::RenderLayerCompositor::repaintInCompositedAncestor):
608         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
609         * rendering/RenderLayerCompositor.h:
610
611 2012-05-29  David Hyatt  <hyatt@apple.com>
612
613         https://bugs.webkit.org/show_bug.cgi?id=87771
614         
615         [New Multicolumn] Make sure we have one column set by default and add it to the flow thread's region list.
616
617         Reviewed by Anders Carlsson.
618
619         * rendering/RenderMultiColumnBlock.cpp:
620         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
621         * rendering/RenderRegion.cpp:
622         (WebCore::RenderRegion::RenderRegion):
623
624 2012-05-29  John Sullivan  <sullivan@apple.com>
625
626         Update label for blacklisted plug-in
627         https://bugs.webkit.org/show_bug.cgi?id=87767
628         rdar://problem/11550048
629         
630         Reviewed by Kevin Decker.
631
632         * English.lproj/Localizable.strings:
633         Regenerated.
634         
635         * platform/LocalizedStrings.cpp:
636         (WebCore::insecurePluginVersionText):
637         Changed this string.
638
639 2012-05-29  Julien Chaffraix  <jchaffraix@webkit.org>
640
641         REGRESSION(r111742): box-sizing: border-box doesn't work on fixed table layout
642         https://bugs.webkit.org/show_bug.cgi?id=87536
643
644         Reviewed by Tony Chang.
645
646         Tests: fast/table/fixed-table-layout/cell-box-sizing-fixed-table-layout.html
647                fast/table/fixed-table-layout/column-box-sizing-fixed-table-layout.html
648                fast/table/fixed-table-layout/column-group-box-sizing-fixed-table-layout.html
649                fast/table/fixed-table-layout/column-in-column-group-box-sizing-fixed-table-layout.html
650
651         The change in r111742 completely ignored border-sizing (following the table's code lead unfortunately).
652         The issue is that we would count the borders and paddings twice for the border-box case which would lead
653         to the content-box including them too. From a web-author, this behavior is equivalent to ignoring box-sizing.
654
655         * rendering/FixedTableLayout.cpp:
656         (WebCore::FixedTableLayout::calcWidthArray):
657         Reworked the function to properly use computeBorderBoxLogicalWidth() for correctness. This matches
658         what RenderBox and the rendering code does generally. Also refactored the code to avoid the need
659         for local variables and make it more readable.
660
661 2012-05-25  Ojan Vafai  <ojan@chromium.org>
662
663         Absolute positioned elements in a relative positioned CSS3 Flexbox fail to display properly
664         https://bugs.webkit.org/show_bug.cgi?id=58453
665
666         Reviewed by Tony Chang.
667
668         Test: css3/flexbox/align-absolute-child.html
669
670         * rendering/RenderFlexibleBox.cpp:
671         (WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
672         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
673         (WebCore::RenderFlexibleBox::adjustAlignmentForChild):
674         When adjusting positioned items, adjust their static position, not their location.
675         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
676         (WebCore::RenderFlexibleBox::flipForWrapReverse):
677         * rendering/RenderFlexibleBox.h:
678
679 2012-05-29  Abhishek Arya  <inferno@chromium.org>
680
681         Crash due to text fragment destruction when updating first-letter block.
682         https://bugs.webkit.org/show_bug.cgi?id=87751
683
684         Reviewed by Eric Seidel.
685
686         Test: fast/text/text-fragment-first-letter-update-crash.html
687
688         * rendering/RenderObject.cpp:
689         (WebCore::RenderObject::setStyle):
690
691 2012-05-29  David Hyatt  <hyatt@apple.com>
692
693         https://bugs.webkit.org/show_bug.cgi?id=87764
694         
695         Add implementation of checkForPaginationLogicalHeightChange to RenderMultiColumnBlock.
696         
697         Also stub out ensureColumnSets() and write a comment describing how it's going to work.
698
699         Reviewed by Anders Carlsson.
700
701         * rendering/RenderMultiColumnBlock.cpp:
702         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
703         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
704         (WebCore):
705         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
706         * rendering/RenderMultiColumnBlock.h:
707         (WebCore::RenderMultiColumnBlock::columnHeight):
708         (WebCore::RenderMultiColumnBlock::setColumnHeight):
709         (RenderMultiColumnBlock):
710
711 2012-05-29  Sheriff Bot  <webkit.review.bot@gmail.com>
712
713         Unreviewed, rolling out r118620.
714         http://trac.webkit.org/changeset/118620
715         https://bugs.webkit.org/show_bug.cgi?id=87760
716
717         This patch causes regression to read an empty file/blob via
718         FileReader (Requested by jianli on #webkit).
719
720         * fileapi/FileReader.cpp:
721         (WebCore::FileReader::stringResult):
722
723 2012-05-29  Andreas Kling  <kling@webkit.org>
724
725         Make StylePropertySet a variable-sized object to reduce memory use.
726         <http://webkit.org/b/87506>
727
728         Reviewed by Antti Koivisto.
729
730         Make immutable StylePropertySet objects variable-sized and allocate exactly
731         the space needed to hold the CSSProperty objects passed at construction.
732         This lets us avoid the memory overhead of Vector<CSSProperty, 4>.
733
734         Renamed StylePropertySet::adopt* to create and createImmutable since they no
735         longer adopt the incoming vector. More cleanup will follow in this area.
736
737         This reduces memory usage across the board - the more CSS declarations,
738         the bigger the benefit. As an example, we save around ~0.5MB on wsj.com.
739
740         * css/CSSComputedStyleDeclaration.cpp:
741         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
742         * css/CSSParser.cpp:
743         (WebCore::CSSParser::createStylePropertySet):
744         * css/StylePropertySet.cpp:
745         (WebCore::StylePropertySet::createImmutable):
746         (WebCore::StylePropertySet::StylePropertySet):
747         (WebCore::StylePropertySet::~StylePropertySet):
748         (WebCore::StylePropertySet::copyPropertiesFrom):
749         (WebCore::StylePropertySet::removeProperty):
750         (WebCore::StylePropertySet::setProperty):
751         (WebCore::StylePropertySet::parseDeclaration):
752         (WebCore::StylePropertySet::addParsedProperties):
753         (WebCore::StylePropertySet::asText):
754         (WebCore::StylePropertySet::merge):
755         (WebCore::StylePropertySet::addSubresourceStyleURLs):
756         (WebCore::StylePropertySet::removePropertiesInSet):
757         (WebCore::StylePropertySet::findPropertyWithId):
758         (WebCore::StylePropertySet::removeEquivalentProperties):
759         (WebCore::StylePropertySet::copyPropertiesInSet):
760         (WebCore::StylePropertySet::averageSizeInBytes):
761         (SameSizeAsStylePropertySet):
762         (WebCore::StylePropertySet::append):
763         * css/StylePropertySet.h:
764         (WebCore::StylePropertySet::create):
765         (StylePropertySet):
766         (WebCore::StylePropertySet::propertyAt):
767         (WebCore::StylePropertySet::propertyCount):
768         (WebCore::StylePropertySet::isEmpty):
769         (WebCore::StylePropertySet::array):
770         * dom/StyledElement.cpp:
771         (WebCore::StyledElement::updateAttributeStyle):
772
773 2012-05-29  David Hyatt  <hyatt@apple.com>
774
775         https://bugs.webkit.org/show_bug.cgi?id=87759
776         
777         Pull the initial page logical height checking for columns into its own separate function. This
778         will allow the derived RenderMultiColumnBlock class to do its own setup there. It also has the
779         effect of cleaning up layoutBlock even for the existing code.
780
781         Reviewed by Anders Carlsson.
782
783         * rendering/RenderBlock.cpp:
784         (WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
785         (WebCore):
786         (WebCore::RenderBlock::layoutBlock):
787         * rendering/RenderBlock.h:
788         (RenderBlock):
789
790 2012-05-29  Victor Carbune  <victor@rosedu.org>
791
792         Update cue event dispatching for zero and negative duration cues
793         https://bugs.webkit.org/show_bug.cgi?id=85143
794
795         Reviewed by Eric Carlson.
796
797         Updated existing test.
798
799         * html/HTMLMediaElement.cpp:
800         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Explicitly
801         treated event dispatching for zero and negative duration cues.
802         (WebCore::HTMLMediaElement::textTrackAddCue): Interval tree doesn't
803         handle invalid cues with intervals - negative cues need to be treated
804         as zero-length cues as they are always missed cues anyway.
805         (WebCore::HTMLMediaElement::textTrackRemoveCue): Same.
806
807 2012-05-29  MORITA Hajime  <morrita@google.com>
808
809         ShadowRoot.getElementById() returns removed node.
810         https://bugs.webkit.org/show_bug.cgi?id=62184
811
812         Deregitration of m_elementsById map is done at Element::removedFrom()
813         But the tree scope of the removed node is already reset from a shadow root
814         to a document.
815
816         This change lookup the old shadow root through its parent node and
817         deregitrater the node against it.
818
819         Reviewed by Dimitri Glazkov.
820
821         Test: fast/dom/shadow/get-element-by-id-in-shadow-mutation.html
822
823         * dom/Element.cpp:
824         (WebCore::treeScopeOfParent):
825         (WebCore):
826         (WebCore::Element::removedFrom):
827         * dom/Element.h:
828         (Element):
829         (WebCore::Element::updateId):
830         (WebCore):
831
832 2012-05-29  Dana Jansens  <danakj@chromium.org>
833
834         [chromium] Unoccluded area in surfaces should always be clipped to the rootScissorRect
835         https://bugs.webkit.org/show_bug.cgi?id=87677
836
837         Reviewed by Adrienne Walker.
838
839         When a contributing surface is visited, and we have not visited another
840         surface, then we know the surface is completely unoccluded. However, the
841         root scissor rect should still be applied, and anything outside of it
842         should be considered occluded.
843
844         Unit test: WebKitTests::CCOcclusionTrackerTestTopmostSurfaceIsClippedToScissor
845
846         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
847         (WebCore::RenderSurfaceChromium::targetRenderSurface):
848         (WebCore):
849         * platform/graphics/chromium/RenderSurfaceChromium.h:
850         (RenderSurfaceChromium):
851         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
852         (WebCore::::unoccludedContributingSurfaceContentRect):
853         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
854         (WebCore::CCRenderSurface::targetRenderSurface):
855         (WebCore):
856         * platform/graphics/chromium/cc/CCRenderSurface.h:
857         (CCRenderSurface):
858
859 2012-05-29  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
860
861         [BlackBerry] Refactoring http/proxy authentication to use authcallback mechanism introduced with libcurl
862         https://bugs.webkit.org/show_bug.cgi?id=87706
863
864         Reviewed by Antonio Gomes.
865
866         Because we use authentication callback mechanism of libcurl,
867         which will take care of all the authentication communication
868         between UA and server, so the only thing we need to do is to
869         provide credential information when authentication callback
870         is triggered. By using this we don't need to process
871         intermediate headers for each http authentication scheme.
872
873         Implemented interface function notifyAuthReceived() in
874         NetworkJob to handle the authentication notification from
875         networking thread.
876         When the authentication callback is triggered, we should
877         cancel the current loading request and restart a new one with
878         credential information attached which comes from
879         credentialStorage or user input.
880
881         Internally reviewed by Joe Mason <jmason@rim.com>.
882
883         No new tests since there is no behavior change.
884
885         * platform/network/blackberry/NetworkJob.cpp:
886         (WebCore::NetworkJob::notifyAuthReceived):
887         (WebCore):
888         (WebCore::NetworkJob::handleNotifyHeaderReceived):
889         (WebCore::NetworkJob::sendRequestWithCredentials):
890         * platform/network/blackberry/NetworkJob.h:
891         (NetworkJob):
892
893 2012-05-29  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
894
895         [BlackBerry] http authentication challenge issue when loading subresource
896         https://bugs.webkit.org/show_bug.cgi?id=87660
897
898         Reviewed by Rob Buis.
899
900         We should try to store the credential information as soon as we
901         receive http status notification which indicates that the
902         authentication succeeds, instead of storing credentials when the
903         main resource receives notify done which is too late for loading
904         subresource.
905
906         Internally reviewed by Joe Mason <jmason@rim.com>
907
908         No new tests since there is no change in behavior.
909
910         * platform/network/blackberry/NetworkJob.cpp:
911         (WebCore::NetworkJob::handleNotifyStatusReceived):
912         (WebCore::NetworkJob::handleNotifyClose):
913
914 2012-05-29  Alexey Proskuryakov  <ap@apple.com>
915
916         [Mac] Move DefaultFonts.plist to C++ code
917         https://bugs.webkit.org/show_bug.cgi?id=87560
918         <rdar://problem/11466119>
919
920         Reviewed by Dan Bernstein.
921
922         * DerivedSources.make:
923         * Resources/DefaultFonts.plist.in: Removed.
924         * WebCore.xcodeproj/project.pbxproj:
925         * page/mac/SettingsMac.mm: (WebCore::Settings::initializeDefaultFontFamilies):
926         Instead of having a separate configuration file, just hardcode the settings in C++.
927
928 2012-05-29  Alexei Filippov  <alexeif@chromium.org>
929
930         Web Inspector: Retainers are missing for all objects
931         https://bugs.webkit.org/show_bug.cgi?id=87655
932
933         Reviewed by Yury Semikhatsky.
934
935         * inspector/front-end/HeapSnapshotDataGrids.js:
936         (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource):
937
938 2012-05-29  Philippe Normand  <pnormand@igalia.com>
939
940         [GStreamer] Video sink doesn't respect WebKit code style
941         https://bugs.webkit.org/show_bug.cgi?id=87693
942
943         Reviewed by Alexis Menard.
944
945         No change in behavior of the sink, this patch only adapts the code
946         style to WebKit's.
947
948         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
949         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
950         (_WebKitVideoSinkPrivate):
951         (webkitVideoSinkTimeoutCallback):
952         (webkitVideoSinkRender):
953         (webkitVideoSinkDispose):
954         (unlockBufferMutex):
955         (webkitVideoSinkUnlock):
956         (webkitVideoSinkUnlockStop):
957         (webkitVideoSinkStop):
958         (webkitVideoSinkStart):
959         (webkitVideoSinkMarshalVoidAndMiniObject):
960         (webkit_video_sink_class_init):
961         (webkitVideoSinkNew):
962         * platform/graphics/gstreamer/VideoSinkGStreamer.h:
963         (_WebKitVideoSink):
964         (_WebKitVideoSinkClass):
965
966 2012-05-29  Roland Takacs  <takacs.roland@stud.u-szeged.hu>
967
968         [Qt] Uninitialized shader compiler when GLES is used
969         https://bugs.webkit.org/show_bug.cgi?id=87712
970
971         The '#if !defined(QT_OPENGL_ES_2)' has been removed before the initialization
972         of shader compiler to compile shader codes for ES-platforms as well.
973
974         Reviewed by Noam Rosenthal.
975
976         * platform/graphics/qt/GraphicsContext3DQt.cpp:
977         (WebCore::GraphicsContext3D::GraphicsContext3D):
978
979 2012-05-29  Taiju Tsuiki  <tzik@chromium.org>
980
981         Add InspectorFileSystemAgent::FrontendProvider
982         https://bugs.webkit.org/show_bug.cgi?id=87635
983
984         InspectorFileSystemAgent needs weak reference to its frontend to perform
985         asynchronous operation.
986
987         Reviewed by Yury Semikhatsky.
988
989         * inspector/InspectorFileSystemAgent.cpp:
990         (InspectorFileSystemAgent::FrontendProvider):
991         (WebCore):
992         (WebCore::InspectorFileSystemAgent::~InspectorFileSystemAgent):
993         (WebCore::InspectorFileSystemAgent::enable):
994         (WebCore::InspectorFileSystemAgent::disable):
995         (WebCore::InspectorFileSystemAgent::setFrontend):
996         (WebCore::InspectorFileSystemAgent::clearFrontend):
997         (WebCore::InspectorFileSystemAgent::restore):
998         (WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent):
999         * inspector/InspectorFileSystemAgent.h:
1000         (InspectorFileSystemAgent):
1001
1002 2012-05-29  Yoshifumi Inoue  <yosin@chromium.org>
1003
1004         REGRESSION(r109729): The optgroup element's "disabled" attribute has no effect to rendering and selection
1005         https://bugs.webkit.org/show_bug.cgi?id=87614
1006
1007         Reviewed by Kent Tamura.
1008
1009         This patch adds HTMLOptGroupElement::disabled and isEnabledFormControl
1010         methods which was implemented in HTMLFormControlElement at r109729 and
1011         updates CSS pseudo class checker to check "optgroup" element.
1012
1013         Tests: fast/forms/select/optgroup-clicking.html
1014                fast/forms/select/optgroup-disabled.html
1015                fast/forms/select/optgroup-rendering.html
1016
1017         * css/SelectorChecker.cpp:
1018         (WebCore::SelectorChecker::checkOneSelector): On disabled and enabled pseudo class checker. 
1019         We checked tag name "optgroup" in addition isFormControlElement.
1020         * css/StyleResolver.cpp:
1021         (WebCore::StyleResolver::canShareStyleWithElement): Checks optgroup.disabled.
1022         * html/HTMLOptGroupElement.cpp:
1023         (WebCore::HTMLOptGroupElement::disabled): Added.
1024         * html/HTMLOptGroupElement.h:
1025         (HTMLOptGroupElement): Added isEnabledFormControl.
1026
1027 2012-05-29  Alexander Pavlov  <apavlov@chromium.org>
1028
1029         [Chromium] [Regression] SELECT popup misplaced when there is not enough vertical space
1030         https://bugs.webkit.org/show_bug.cgi?id=87735
1031
1032         Reviewed by Kent Tamura.
1033
1034         This change fixes the obsolete WebWidget Y-repositioning code for the insufficient vertical space case, not removed in r113418.
1035
1036         No new tests, as popups are not testable in Chromium.
1037
1038         * platform/chromium/PopupContainer.cpp:
1039         (WebCore::PopupContainer::layoutAndCalculateWidgetRect):
1040
1041 2012-05-29  Andrei Bucur  <abucur@adobe.com>
1042
1043         [CSS Regions]Rename NamedFlow::overflow to NamedFlow::overset
1044         https://bugs.webkit.org/show_bug.cgi?id=87491
1045
1046         This patch updates the CSSOM property name overflow to overset. There are no changes in functionality.
1047         Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/
1048
1049         Reviewed by Andreas Kling.
1050
1051         Test: fast/regions/webkit-named-flow-overset.html
1052
1053         * dom/WebKitNamedFlow.cpp:
1054         (WebCore::WebKitNamedFlow::overset):
1055         * dom/WebKitNamedFlow.h:
1056         (WebKitNamedFlow):
1057         * dom/WebKitNamedFlow.idl:
1058         * rendering/RenderFlowThread.cpp:
1059         (WebCore::RenderFlowThread::RenderFlowThread):
1060         (WebCore::RenderFlowThread::computeOverflowStateForRegions):
1061         * rendering/RenderFlowThread.h:
1062
1063 2012-05-29  Andreas Kling  <kling@webkit.org>
1064
1065         Give StylePropertySet a proper mutability flag.
1066         <http://webkit.org/b/87675>
1067
1068         Reviewed by Antti Koivisto.
1069
1070         Add a flag to StylePropertySet that determines whether it's mutable or not. Only objects
1071         constructed from the CSS parser (by way of StylePropertySet::adopt()) are made immutable.
1072         This is clean-up and prep work for implementing a more efficient storage scheme for immutable
1073         StylePropertySets (fixed-size array instead of vector) as the vast majority of them are
1074         unlikely to ever mutate during their lifetime.
1075
1076         Sprinkled ASSERT(isMutable()) all over StylePropertySet to catch any attempts to modify
1077         an immutable object.
1078
1079         Also made properties() const on StyleRule and friends, which brought some additional code
1080         churn along with it.
1081
1082         * css/CSSComputedStyleDeclaration.cpp:
1083         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
1084         * css/CSSFontFaceRule.cpp:
1085         (WebCore::CSSFontFaceRule::style):
1086         (WebCore::CSSFontFaceRule::reattach):
1087         * css/CSSFontFaceSrcValue.cpp:
1088         (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs):
1089         * css/CSSFontFaceSrcValue.h:
1090         (CSSFontFaceSrcValue):
1091         * css/CSSPageRule.cpp:
1092         (WebCore::CSSPageRule::style):
1093         (WebCore::CSSPageRule::reattach):
1094         * css/CSSPrimitiveValue.cpp:
1095         (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs):
1096         * css/CSSPrimitiveValue.h:
1097         (CSSPrimitiveValue):
1098         * css/CSSReflectValue.cpp:
1099         (WebCore::CSSReflectValue::addSubresourceStyleURLs):
1100         * css/CSSReflectValue.h:
1101         (CSSReflectValue):
1102         * css/CSSStyleRule.cpp:
1103         (WebCore::CSSStyleRule::style):
1104         (WebCore::CSSStyleRule::reattach):
1105         * css/CSSValue.cpp:
1106         (WebCore::CSSValue::addSubresourceStyleURLs):
1107         * css/CSSValue.h:
1108         (CSSValue):
1109         * css/CSSValueList.cpp:
1110         (WebCore::CSSValueList::addSubresourceStyleURLs):
1111         * css/CSSValueList.h:
1112         (CSSValueList):
1113         * css/StylePropertySet.cpp:
1114         (WebCore::StylePropertySet::StylePropertySet):
1115         (WebCore::StylePropertySet::setCSSParserMode):
1116         (WebCore):
1117         (WebCore::StylePropertySet::copyPropertiesFrom):
1118         (WebCore::StylePropertySet::removeShorthandProperty):
1119         (WebCore::StylePropertySet::removeProperty):
1120         (WebCore::StylePropertySet::setProperty):
1121         (WebCore::StylePropertySet::parseDeclaration):
1122         (WebCore::StylePropertySet::addParsedProperties):
1123         (WebCore::StylePropertySet::addParsedProperty):
1124         (WebCore::StylePropertySet::merge):
1125         (WebCore::StylePropertySet::addSubresourceStyleURLs):
1126         (WebCore::StylePropertySet::removePropertiesInSet):
1127         (WebCore::StylePropertySet::findPropertyWithId):
1128         (WebCore::StylePropertySet::removeEquivalentProperties):
1129         (WebCore::StylePropertySet::copyPropertiesInSet):
1130         * css/StylePropertySet.h:
1131         (WebCore::StylePropertySet::adopt):
1132         (WebCore::StylePropertySet::adoptMutable):
1133         (StylePropertySet):
1134         (WebCore::StylePropertySet::isMutable):
1135         * css/StyleResolver.cpp:
1136         (WebCore::StyleResolver::addMatchedProperties):
1137         (WebCore::StyleResolver::collectMatchingRulesForList):
1138         * css/StyleResolver.h:
1139         (StyleResolver):
1140         * css/StyleRule.cpp:
1141         (WebCore::StyleRule::mutableProperties):
1142         (WebCore):
1143         (WebCore::StyleRulePage::mutableProperties):
1144         (WebCore::StyleRuleFontFace::mutableProperties):
1145         * css/StyleRule.h:
1146         (WebCore::StyleRule::properties):
1147         (StyleRule):
1148         (WebCore::StyleRuleFontFace::properties):
1149         (StyleRuleFontFace):
1150         (WebCore::StyleRulePage::properties):
1151         (StyleRulePage):
1152         * dom/ElementAttributeData.cpp:
1153         (WebCore::ElementAttributeData::ensureInlineStyle):
1154         (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
1155         * editing/EditingStyle.cpp:
1156         (WebCore::styleFromMatchedRulesForElement):
1157         * svg/SVGFontFaceElement.cpp:
1158         (WebCore::SVGFontFaceElement::parseAttribute):
1159         (WebCore::SVGFontFaceElement::rebuildFontFace):
1160         (WebCore::SVGFontFaceElement::removedFrom):
1161
1162 2012-05-29  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1163
1164         [EFL] Refactoring. Get rid of unnecessary singleCharacterString() function
1165         https://bugs.webkit.org/show_bug.cgi?id=87654
1166
1167         Reviewed by Csaba Osztrogonác.
1168
1169         Evas key events already provide key string, so no practical need for singleCharacterString() 
1170         evaluating the event string from keyname.
1171         Modified code related functionality is already covered with fast/events and fast/forms tests.
1172
1173         * platform/efl/EflKeyboardUtilities.cpp:
1174         * platform/efl/PlatformKeyboardEventEfl.cpp:
1175         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1176
1177 2012-05-29  Ilya Tikhonovsky  <loislo@chromium.org>
1178
1179         Unreviewed: Web Inspector: single line fix after r118742.
1180
1181         * inspector/front-end/HeapSnapshotView.js:
1182         (WebInspector.HeapProfileHeader.prototype.saveToFile):
1183
1184 2012-05-29  Kentaro Hara  <haraken@chromium.org>
1185
1186         Remove m_rootNode and m_selectorChecker from SelectorQuery.h
1187         https://bugs.webkit.org/show_bug.cgi?id=87650
1188
1189         Reviewed by Antti Koivisto.
1190
1191         To avoid parsing CSS selectors every time, I am planning to cache
1192         SelectorQuery objects into a HashMap, which will be defined in
1193         Node::querySelector(). To make the size of SelectorQuery small,
1194         this patch removes m_rootNode and m_selectorChecker from SelectorQuery.h.
1195
1196         Tests: fast/dom/SelectorAPI/*. No change in test results.
1197
1198         * dom/Node.cpp:
1199         (WebCore::Node::querySelector):
1200         (WebCore::Node::querySelectorAll):
1201         * dom/SelectorQuery.cpp:
1202         (WebCore::SelectorQuery::SelectorQuery):
1203         (WebCore):
1204         (WebCore::SelectorQuery::queryAll):
1205         (WebCore::SelectorQuery::queryFirst):
1206         * dom/SelectorQuery.h:
1207         (SelectorQuery):
1208
1209 2012-05-29  Eugene Klyuchnikov  <eustas.bug@gmail.com>
1210
1211         Web Inspector: Tabbed Settings Screen
1212         https://bugs.webkit.org/show_bug.cgi?id=87497
1213
1214         Reviewed by Yury Semikhatsky.
1215
1216         Combine settings screen and shortcuts screen
1217         to a single tabbed settings screen.
1218         This will make shortcuts screen more discoverable.
1219
1220         * inspector/front-end/HelpScreen.js:
1221         (WebInspector.HelpScreen): Make titled tamplate optional.
1222         (WebInspector.HelpScreen.prototype._createCloseButton): Extract method.
1223         * inspector/front-end/SettingsScreen.js:
1224         (WebInspector.SettingsScreen): Split initialization and UI construction.
1225         (WebInspector.SettingsScreen.prototype._createSettingsTabView.appendSection):
1226         (WebInspector.SettingsScreen.prototype._createSettingsTabView):
1227         Extract GUI construction method.
1228         (WebInspector.SettingsScreen.prototype._getOrCreateTabbedPane):
1229         Make GUI construction lazy.
1230         (WebInspector.SettingsScreen.prototype.selectTab):
1231         Add method for external tab swithching.
1232         (WebInspector.SettingsScreen.prototype.wasShown):
1233         Make GUI construction lazy.
1234         (WebInspector.SettingsScreenTabbedPane):
1235         Extend class to access protected member.
1236         (WebInspector.SettingsController.prototype._buttonClicked):
1237         Change "showSettingsScreen" visibility and parameters.
1238         (WebInspector.SettingsController.prototype._onHideSettingsScreen):
1239         Preserve settings screen state.
1240         (WebInspector.SettingsController.prototype.showSettingsScreen):
1241         Change method visibility and parameters.
1242         * inspector/front-end/ShortcutsScreen.js:
1243         (WebInspector.ShortcutsScreen): Remove inheritance from HelpScreen.
1244         (WebInspector.ShortcutsScreen.prototype._createShortcutsTabView):
1245         Refactoring of GUI construction.
1246         (WebInspector.ShortcutsSection.prototype.renderSection):
1247         Ditto.
1248         * inspector/front-end/helpScreen.css:
1249         (.help-window-main ::-webkit-scrollbar): Rebind scrollbar settings.
1250         (.help-window-main ::-webkit-resizer): Ditto.
1251         (.help-window-main ::-webkit-scrollbar-thumb:vertical): Ditto.
1252         (.help-window-main ::-webkit-scrollbar-thumb:vertical:active): Ditto.
1253         (.help-window-main ::-webkit-scrollbar-track:vertical): Ditto.
1254         (body:not(.compact) #settings-screen .tabbed-pane): Fix container height.
1255         (#settings-screen .tabbed-pane-header): Ditto.
1256         (#settings-screen .tabbed-pane-header-tabs): Adjust spacing.
1257         (#settings-screen .tabbed-pane-header-tab): Adjust style.
1258         (#settings-screen .help-close-button): Adjust spacing.
1259         (#settings-screen .tabbed-pane-header-tab.selected):
1260         Erase line below active tab.
1261         (#settings-screen .tabbed-pane-content): Adjust spacing.
1262         (#settings-screen .help-content): Ditto.
1263         * inspector/front-end/inspector.js:
1264         (WebInspector.documentKeyDown): Use Settings screen to show shortcuts.
1265
1266 2012-05-29  Ilya Tikhonovsky  <loislo@chromium.org>
1267
1268         Web Inspector: REGRESSION: load heap snapshot doesn't work.
1269         https://bugs.webkit.org/show_bug.cgi?id=87642
1270
1271         HeapSnapshotReceiver interface was introduced.
1272         It declares the API for HeapSnapshotLoader, HeapSnapshotLoaderProxy and HeapSnapshotSaveToFileReceiver.
1273         The HeapProfileHeader was refactored and tests were added.
1274
1275         Reviewed by Yury Semikhatsky.
1276
1277         * inspector/front-end/HeapSnapshotLoader.js:
1278         (WebInspector.HeapSnapshotLoader):
1279         (WebInspector.HeapSnapshotLoader.prototype.startLoading):
1280         (WebInspector.HeapSnapshotLoader.prototype.dispose):
1281         (WebInspector.HeapSnapshotLoader.prototype._reset):
1282         (WebInspector.HeapSnapshotLoader.prototype.finishLoading):
1283         * inspector/front-end/HeapSnapshotProxy.js:
1284         (WebInspector.HeapSnapshotWorker.prototype.startCheckingForLongRunningCalls):
1285         (WebInspector.HeapSnapshotLoaderProxy.prototype.startLoading):
1286         (WebInspector.HeapSnapshotLoaderProxy.prototype.pushJSONChunk):
1287         (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading):
1288         * inspector/front-end/HeapSnapshotView.js:
1289         (WebInspector.HeapSnapshotReceiver):
1290         (WebInspector.HeapSnapshotReceiver.prototype.startLoading):
1291         (WebInspector.HeapSnapshotReceiver.prototype.pushJSONChunk):
1292         (WebInspector.HeapSnapshotReceiver.prototype.finishLoading):
1293         (WebInspector.HeapSnapshotReceiver.prototype.dispose):
1294         (WebInspector.HeapProfileHeader):
1295         (WebInspector.HeapProfileHeader.prototype.load):
1296         (WebInspector.HeapProfileHeader.prototype._setupWorker):
1297         (WebInspector.HeapProfileHeader.prototype.dispose):
1298         (WebInspector.HeapProfileHeader.prototype._saveStatusUpdate):
1299         (WebInspector.HeapProfileHeader.prototype.pushJSONChunk):
1300         (WebInspector.HeapProfileHeader.prototype._parsed):
1301         (WebInspector.HeapProfileHeader.prototype.finishHeapSnapshot):
1302         (WebInspector.HeapProfileHeader.prototype.saveToFile):
1303         (WebInspector.HeapProfileHeader.prototype.loadFromFile.onLoad):
1304         (WebInspector.HeapProfileHeader.prototype.loadFromFile):
1305         (WebInspector.HeapProfileHeader.prototype._loadNextChunk):
1306         (WebInspector.HeapProfileHeader.prototype._nextChunkLoaded):
1307         (WebInspector.HeapProfileHeader.prototype._createFileReader):
1308         (WebInspector.HeapSnapshotSaveToFileReceiver):
1309         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.startLoading):
1310         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.pushJSONChunk):
1311         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.finishLoading):
1312         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype.dispose):
1313         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype._startSavingSnapshot):
1314         (WebInspector.HeapSnapshotSaveToFileReceiver.prototype._saveStatusUpdate):
1315         * inspector/front-end/ProfilesPanel.js:
1316         (WebInspector.ProfilesPanel.prototype._createFileSelectorElement.onChange):
1317         (WebInspector.ProfilesPanel.prototype._createFileSelectorElement):
1318         (WebInspector.ProfilesPanel.prototype._loadFromFile):
1319
1320 2012-05-29  Eric Seidel  <eric@webkit.org>
1321
1322         Add HTMLIFrameElement.seamless property accessor now that seamless is enabled and works
1323         https://bugs.webkit.org/show_bug.cgi?id=87708
1324
1325         Reviewed by Adam Barth.
1326
1327         Lots of tests in fast/frames/seamless cover this property.
1328
1329         * html/HTMLIFrameElement.idl:
1330
1331 2012-05-29  Kentaro Hara  <haraken@chromium.org>
1332
1333         [Performance] Optimize querySelector() and querySelectorAll() by removing
1334         redundant dummy style sheet creations
1335         https://bugs.webkit.org/show_bug.cgi?id=87627
1336
1337         Reviewed by Antti Koivisto.
1338
1339         This patch improves performance of querySelector("#id") by 4.2% ~ 17.7%
1340         in Safari and Chromium.
1341
1342         Performance tests: https://bugs.webkit.org/attachment.cgi?id=144288
1343
1344         The performance test results in my desktop:
1345
1346         [Safari/Mac]
1347         document.querySelector("#headId") :               13.60 ms =>  12.40 ms  +9.68%
1348         document.querySelector("#duplicatedId") :         14.80 ms =>  14.20 ms  +4.23%
1349         document.querySelector("#tailId") :               13.80 ms =>  12.20 ms  +13.11%
1350         document.querySelectorAll("#headId") :            17.80 ms =>  14.60 ms  +21.92%
1351         document.querySelectorAll("#duplicatedId") :     513.80 ms => 471.60 ms  +8.95%
1352         document.querySelectorAll("#tailId") :            19.20 ms =>  16.40 ms  +17.07%
1353         document.querySelector("h1") :                    14.40 ms =>  13.60 ms  +5.88%
1354         document.querySelector("h2") :                    14.80 ms =>  13.80 ms  +7.25%
1355         document.querySelector("h3") :                   312.00 ms => 306.60 ms  +1.76%
1356         document.querySelectorAll("h1") :                322.00 ms => 314.60 ms  +2.35%
1357         document.querySelectorAll("h2") :                481.00 ms => 420.60 ms  +14.36%
1358         document.querySelectorAll("h3") :                326.80 ms => 315.80 ms  +3.48%
1359         document.querySelector(".headClass") :            16.20 ms =>  15.40 ms  +5.19%
1360         document.querySelector(".duplicatedClass") :      17.00 ms =>  15.40 ms  +10.39%
1361         document.querySelector(".tailClass") :           369.60 ms => 362.60 ms  +1.93%
1362         document.querySelectorAll(".headClass") :        388.20 ms => 377.60 ms  +2.81%
1363         document.querySelectorAll(".duplicatedClass") :  605.00 ms => 581.20 ms  +4.09%
1364         document.querySelectorAll(".tailClass") :        401.60 ms => 391.40 ms  +2.61%
1365
1366         [Chromium/Linux]
1367         ocument.querySelector("#headId") :                16.00 ms =>  13.60 ms  +17.65%
1368         document.querySelector("#duplicatedId") :         16.80 ms =>  15.40 ms  +9.09%
1369         document.querySelector("#tailId") :               16.00 ms =>  13.60 ms  +17.65%
1370         document.querySelectorAll("#headId") :            29.00 ms =>  25.00 ms  +16.00%
1371         document.querySelectorAll("#duplicatedId") :     561.40 ms => 505.20 ms  +11.12%
1372         document.querySelectorAll("#tailId") :            34.00 ms =>  26.80 ms  +26.87%
1373         document.querySelector("h1") :                    18.20 ms =>  15.80 ms  +15.19%
1374         document.querySelector("h2") :                    19.00 ms =>  16.60 ms  +14.46%
1375         document.querySelector("h3") :                   280.40 ms => 274.00 ms  +2.34%
1376         document.querySelectorAll("h1") :                300.20 ms => 365.20 ms  -17.80%
1377         document.querySelectorAll("h2") :                487.60 ms => 504.20 ms  -3.29%
1378         document.querySelectorAll("h3") :                349.40 ms => 324.00 ms  +7.84%
1379         document.querySelector(".headClass") :            18.40 ms =>  16.00 ms  +15.00%
1380         document.querySelector(".duplicatedClass") :      19.40 ms =>  16.20 ms  +19.75%
1381         document.querySelector(".tailClass") :           349.60 ms => 345.40 ms  +1.22%
1382         document.querySelectorAll(".headClass") :        382.80 ms => 378.20 ms  +1.22%
1383         document.querySelectorAll(".duplicatedClass") :  550.80 ms => 574.20 ms  -4.08%
1384         document.querySelectorAll(".tailClass") :        381.00 ms => 387.00 ms  -1.55%
1385
1386         I've found that StyleSheetInternal::create() in CSSParser::parseSelector()
1387         is a bottleneck of querySelector() and querySelectorAll().
1388
1389         void CSSParser::parseSelector(const String& string, CSSSelectorList& selectorList)
1390         {
1391             RefPtr<StyleSheetInternal> dummyStyleSheet = StyleSheetInternal::create();
1392             setStyleSheet(dummyStyleSheet.get());
1393             ...;
1394         }
1395
1396         This patch removes a dummy style sheet. Previously the dummy style sheet
1397         was needed to avoid null checks of m_styleSheet in CSSGrammer.y.
1398         This patch fixes CSSGrammer.y so that it works fine with a null m_styleSheet.
1399
1400         Tests: fast/dom/SelectorAPI/*. No change in the test results.
1401
1402         * css/CSSGrammar.y:
1403         * css/CSSParser.cpp:
1404         (WebCore::CSSParser::parseSelector):
1405
1406 2012-05-29  Nikolas Zimmermann  <nzimmermann@rim.com>
1407
1408         SVGViewSpec DOM bindings aka SVGSVGElement.currentView is unimplemented
1409         https://bugs.webkit.org/show_bug.cgi?id=15495
1410
1411         Reviewed by Rob Buis.
1412
1413         Finish SVGViewSpec implementation and expose it to the Web. Numerous smaller bugs are fixed:
1414         - SVGViewSpec and all of its contents should be read-only. Enforce that and test it.
1415           Add a new enum to SVGPropertyInfo so that each SVGAnimatedProperty knows if its content is supposed to be read-write or read-only.
1416         - Make the 'transform' attribute of SVGViewSpec exposable by switching to a SVGTransformListProperty - it can now be accessed from JS.
1417         - Assure that following XXXString methods are in sync with the corresponding SVG DOM interfaces
1418             readonly attribute DOMString viewBoxString;
1419             readonly attribute DOMString preserveAspectRatioString;
1420             readonly attribute DOMString transformString;
1421             readonly attribute DOMString viewTargetString;
1422         - Cleanup code in svg/properties that was intended to handle SVGViewSpec. Turns out lot of the complexity was unncessary, and can be removed.
1423         - Move SVGFitToViewBox to the same pattern SVGZoomAndPan uses since two days, that avoids any virtual function calls for attribute parsing.
1424         - Create/expose ObjectiveC/JS bindings for SVGViewSpec.
1425         - Enable SVGViewSpec constructor.
1426
1427         Tests: svg/custom/linking-a-03-b-all-expected.svg
1428                svg/dom/SVGViewSpec-defaults.html
1429                svg/dom/SVGViewSpec.html
1430                svg/dom/complex-svgView-specification.html
1431                svg/dom/viewspec-parser.html
1432
1433         * CMakeLists.txt:
1434         * DerivedSources.cpp:
1435         * DerivedSources.make:
1436         * DerivedSources.pri:
1437         * GNUmakefile.list.am:
1438         * Target.pri:
1439         * WebCore.gyp/WebCore.gyp:
1440         * WebCore.gypi:
1441         * WebCore.order:
1442         * WebCore.vcproj/WebCore.vcproj:
1443         * WebCore.xcodeproj/project.pbxproj:
1444         * bindings/js/JSSVGLengthCustom.cpp:
1445         (WebCore::JSSVGLength::setValue):
1446         (WebCore::JSSVGLength::convertToSpecifiedUnits):
1447         * bindings/objc/DOMSVG.h:
1448         * bindings/scripts/CodeGeneratorJS.pm:
1449         (GenerateImplementation):
1450         (NativeToJSValue):
1451         * bindings/scripts/CodeGeneratorObjC.pm:
1452         (GenerateImplementation):
1453         * bindings/scripts/CodeGeneratorV8.pm:
1454         (GenerateNormalAttrGetter):
1455         (GenerateNormalAttrSetter):
1456         (GenerateFunctionCallback):
1457         * bindings/v8/custom/V8SVGLengthCustom.cpp:
1458         (WebCore::V8SVGLength::valueAccessorSetter):
1459         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
1460         * page/DOMWindow.idl:
1461         * rendering/svg/RenderSVGResourcePattern.cpp:
1462         (WebCore::RenderSVGResourcePattern::buildTileImageTransform):
1463         * svg/SVGFitToViewBox.cpp:
1464         * svg/SVGFitToViewBox.h:
1465         (SVGFitToViewBox):
1466         (WebCore::SVGFitToViewBox::parseAttribute):
1467         * svg/SVGMarkerElement.cpp:
1468         (WebCore::SVGMarkerElement::orientTypePropertyInfo):
1469         (WebCore::SVGMarkerElement::parseAttribute):
1470         (WebCore::SVGMarkerElement::synchronizeOrientType):
1471         (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
1472         * svg/SVGPathElement.cpp:
1473         (WebCore::SVGPathElement::dPropertyInfo):
1474         (WebCore::SVGPathElement::svgAttributeChanged):
1475         (WebCore::SVGPathElement::pathByteStream):
1476         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
1477         (WebCore::SVGPathElement::synchronizeD):
1478         * svg/SVGPathSegWithContext.h:
1479         (WebCore::SVGPathSegWithContext::animatedProperty):
1480         * svg/SVGPatternElement.cpp:
1481         (WebCore::SVGPatternElement::parseAttribute):
1482         * svg/SVGPolyElement.cpp:
1483         (WebCore::SVGPolyElement::pointsPropertyInfo):
1484         (WebCore::SVGPolyElement::parseAttribute):
1485         (WebCore::SVGPolyElement::synchronizePoints):
1486         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
1487         * svg/SVGRect.h:
1488         * svg/SVGSVGElement.cpp:
1489         (WebCore::SVGSVGElement::~SVGSVGElement):
1490         (WebCore::SVGSVGElement::currentView):
1491         (WebCore::SVGSVGElement::parseAttribute):
1492         (WebCore::SVGSVGElement::currentViewBoxRect):
1493         (WebCore::SVGSVGElement::viewBoxToViewTransform):
1494         (WebCore::SVGSVGElement::setupInitialView):
1495         (WebCore::SVGSVGElement::inheritViewAttributes):
1496         * svg/SVGSVGElement.h:
1497         (SVGSVGElement):
1498         * svg/SVGSVGElement.idl:
1499         * svg/SVGSymbolElement.cpp:
1500         (WebCore::SVGSymbolElement::parseAttribute):
1501         * svg/SVGTests.cpp:
1502         (WebCore::SVGTests::requiredFeaturesPropertyInfo):
1503         (WebCore::SVGTests::requiredExtensionsPropertyInfo):
1504         (WebCore::SVGTests::systemLanguagePropertyInfo):
1505         (WebCore::SVGTests::synchronizeRequiredFeatures):
1506         (WebCore::SVGTests::synchronizeRequiredExtensions):
1507         (WebCore::SVGTests::synchronizeSystemLanguage):
1508         * svg/SVGTextContentElement.cpp:
1509         (WebCore::SVGTextContentElement::textLengthPropertyInfo):
1510         (WebCore::SVGTextContentElement::synchronizeTextLength):
1511         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
1512         * svg/SVGViewElement.cpp:
1513         (WebCore::SVGViewElement::parseAttribute):
1514         * svg/SVGViewElement.h:
1515         * svg/SVGViewSpec.cpp:
1516         (WebCore::SVGViewSpec::viewBoxPropertyInfo):
1517         (WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo):
1518         (WebCore::SVGViewSpec::transformPropertyInfo):
1519         (WebCore::SVGViewSpec::SVGViewSpec):
1520         (WebCore::SVGViewSpec::viewBoxIdentifier):
1521         (WebCore::SVGViewSpec::preserveAspectRatioIdentifier):
1522         (WebCore::SVGViewSpec::transformIdentifier):
1523         (WebCore::SVGViewSpec::setZoomAndPan):
1524         (WebCore::SVGViewSpec::setTransformString):
1525         (WebCore::SVGViewSpec::transformString):
1526         (WebCore::SVGViewSpec::viewBoxString):
1527         (WebCore::SVGViewSpec::preserveAspectRatioString):
1528         (WebCore::SVGViewSpec::viewTarget):
1529         (WebCore::SVGViewSpec::transform):
1530         (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
1531         (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
1532         (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
1533         (WebCore::SVGViewSpec::reset):
1534         (WebCore::SVGViewSpec::parseViewSpec):
1535         * svg/SVGViewSpec.h:
1536         (WebCore::SVGViewSpec::~SVGViewSpec):
1537         (SVGViewSpec):
1538         (WebCore::SVGViewSpec::create):
1539         (WebCore::SVGViewSpec::setViewTargetString):
1540         (WebCore::SVGViewSpec::setZoomAndPan):
1541         (WebCore::SVGViewSpec::contextElement):
1542         (WebCore::SVGViewSpec::resetContextElement):
1543         (WebCore::SVGViewSpec::transformBaseValue):
1544         (WebCore::SVGViewSpec::viewBoxAnimated):
1545         (WebCore::SVGViewSpec::viewBox):
1546         (WebCore::SVGViewSpec::viewBoxBaseValue):
1547         (WebCore::SVGViewSpec::setViewBoxBaseValue):
1548         (WebCore::SVGViewSpec::preserveAspectRatioAnimated):
1549         (WebCore::SVGViewSpec::preserveAspectRatio):
1550         (WebCore::SVGViewSpec::preserveAspectRatioBaseValue):
1551         (WebCore::SVGViewSpec::setPreserveAspectRatioBaseValue):
1552         * svg/SVGViewSpec.idl:
1553         * svg/properties/SVGAnimatedProperty.h:
1554         (WebCore::SVGAnimatedProperty::isReadOnly):
1555         (WebCore::SVGAnimatedProperty::setIsReadOnly):
1556         (SVGAnimatedProperty):
1557         (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper):
1558         (WebCore::SVGAnimatedProperty::lookupWrapper):
1559         (WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
1560         * svg/properties/SVGAnimatedPropertyMacros.h:
1561         (WebCore::SVGSynchronizableAnimatedProperty::synchronize):
1562         (SVGSynchronizableAnimatedProperty):
1563         * svg/properties/SVGAnimatedPropertySynchronizer.h: Removed.
1564         * svg/properties/SVGAttributeToPropertyMap.h:
1565         * svg/properties/SVGListProperty.h:
1566         * svg/properties/SVGListPropertyTearOff.h:
1567         (SVGListPropertyTearOff):
1568         (WebCore::SVGListPropertyTearOff::isReadOnly):
1569         * svg/properties/SVGPathSegListPropertyTearOff.h:
1570         (SVGPathSegListPropertyTearOff):
1571         (WebCore::SVGPathSegListPropertyTearOff::isReadOnly):
1572         * svg/properties/SVGProperty.h:
1573         (SVGProperty):
1574         * svg/properties/SVGPropertyInfo.h:
1575         (WebCore::SVGPropertyInfo::SVGPropertyInfo):
1576         (SVGPropertyInfo):
1577         * svg/properties/SVGPropertyTearOff.h:
1578         (WebCore::SVGPropertyTearOff::isReadOnly):
1579         * svg/properties/SVGStaticListPropertyTearOff.h:
1580         (SVGStaticListPropertyTearOff):
1581         (WebCore::SVGStaticListPropertyTearOff::isReadOnly):
1582
1583 2012-05-29  Kent Tamura  <tkent@chromium.org>
1584
1585         REGRESSION (r90971): the cursor is painted “behind” the placeholder text
1586         https://bugs.webkit.org/show_bug.cgi?id=87155
1587
1588         Reviewed by Hajime Morita.
1589
1590         This regression happened only on platforms on which
1591         RenderTheme::shouldShowPlaceholderWhenFocused() returns true.
1592
1593         Because the order of renderers for the editable node and the placeholder
1594         node was:
1595          - A renderer for the editable node
1596          - A renderer for the placeholder node,
1597         The text caret was painted, then the palceholder was painted.
1598
1599         We should not use z-index in the built-in shadow nodes. So the patch
1600         fixes this bug by re-ordering these renderers.
1601
1602         Tests: fast/forms/input-placeholder-paint-order-2.html
1603                fast/forms/input-placeholder-paint-order.html
1604                fast/forms/textarea/textarea-placeholder-paint-order-2.html
1605                fast/forms/textarea/textarea-placeholder-paint-order.html
1606
1607         * html/HTMLTextFormControlElement.cpp:
1608         (WebCore::HTMLTextFormControlElement::fixPlaceholderRenderer):
1609         Added. Reorder the order of renderers so that the placeholder renderer
1610         precedes the inner text renderer.
1611         * html/HTMLTextFormControlElement.h: Add fixPlaceholderRenderer() declaration.
1612
1613         * html/HTMLTextAreaElement.cpp:
1614         (WebCore::HTMLTextAreaElement::attach): Calls fixPlaceholderRenderer().
1615         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
1616         ditto. Also, use innerTextElement() to improvde code readability.
1617         * html/HTMLTextAreaElement.h:
1618         (HTMLTextAreaElement): Overrides attach().
1619
1620         * html/TextFieldInputType.cpp:
1621         (WebCore::TextFieldInputType::updatePlaceholderText):
1622         Calls fixPlaceholderRenderer().
1623         (WebCore::TextFieldInputType::attach): ditto.
1624         * html/TextFieldInputType.h:
1625         (TextFieldInputType): Overrides attach().
1626
1627 2012-05-28  Kentaro Hara  <haraken@chromium.org>
1628
1629         [V8] Implement V8Binding::v8Null(isolate) and use it in CodeGeneratorV8.pm
1630         https://bugs.webkit.org/show_bug.cgi?id=87692
1631
1632         Reviewed by Adam Barth.
1633
1634         Since v8::Null(isolate) crashes if we pass a NULL isolate, we are planning
1635         to pass Isolate to v8::Null() in the following steps:
1636
1637         [1] Implement V8Bindings::v8Null(isolate). v8Null(isolate) does the NULL check.
1638         If isolate is NULL, v8Null(isolate) calls v8::Null(). Otherwise,
1639         v8Null(isolate) calls v8::Null(isolate).
1640
1641         [2] In V8 bindings, we replace v8::Null() with v8::Null(isolate) for a non-optional
1642         'isolate' parameter. (e.g. void foo(..., Isolate* isolate) { v8::Null(); } )
1643
1644         [3] In V8 bindings, we replace v8::Null() with v8Null(isolate) for an optional
1645         'isolate' parameter. (e.g. void foo(..., Isolate* isolate = 0) { v8::Null(); } )
1646
1647         This bug fixes [1] by implementing V8Binding::v8Null(isolate). Also this patch uses
1648         V8Binding::v8Null(isolate) in bindings/v8/*.{h,cpp}.
1649
1650         No tests. No behavior change.
1651
1652         * bindings/scripts/CodeGeneratorV8.pm:
1653         (GenerateHeader):
1654         (NativeToJSValue):
1655         * bindings/scripts/test/V8/V8Float64Array.h:
1656         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1657         (WebCore::toV8):
1658         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1659         (WebCore::toV8):
1660         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1661         (WebCore::toV8):
1662         * bindings/scripts/test/V8/V8TestEventTarget.h:
1663         (WebCore::toV8):
1664         * bindings/scripts/test/V8/V8TestException.h:
1665         (WebCore::toV8):
1666         * bindings/scripts/test/V8/V8TestInterface.h:
1667         (WebCore::toV8):
1668         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1669         (WebCore::toV8):
1670         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1671         (WebCore::toV8):
1672         * bindings/scripts/test/V8/V8TestNode.h:
1673         (WebCore::toV8):
1674         * bindings/scripts/test/V8/V8TestObj.h:
1675         (WebCore::toV8):
1676         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1677         (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetter):
1678         (WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetter):
1679         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1680         (WebCore::toV8):
1681         * bindings/v8/V8Binding.h:
1682         (WebCore::v8Null):
1683         (WebCore):
1684         (WebCore::v8DateOrNull):
1685         * bindings/v8/V8DOMWrapper.cpp:
1686         * bindings/v8/V8DOMWrapper.h:
1687         (WebCore):
1688
1689 2012-05-28  Kent Tamura  <tkent@chromium.org>
1690
1691         Fix a crash in HTMLFormControlElement::disabled().
1692         https://bugs.webkit.org/show_bug.cgi?id=86534
1693
1694         Reviewed by Ryosuke Niwa.
1695
1696         Stop to hold pointers of fildset and legend elements. We can avoid it by
1697         holding ancestor's disabled state.
1698
1699         The ancesotr's disabled state should be invalidated when
1700          - fieldset's disabled value is changed.
1701          - fieldset's children is updated because a legend position might be changed.
1702          - A form control is attached to or detached from a tree.
1703
1704         No new tests. It's almost impossible to make a reliable test.
1705
1706         * html/HTMLFieldSetElement.cpp:
1707         (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
1708         Added. Invalidate disabled state of form controls under the specified node.
1709         (WebCore::HTMLFieldSetElement::disabledAttributeChanged):
1710         Uses invalidateDisabledStateUnder().
1711         (WebCore::HTMLFieldSetElement::childrenChanged):
1712         Added new override function. We need invalidate disabled state of form
1713         controls under legend elements.
1714
1715         * html/HTMLFieldSetElement.h:
1716         (HTMLFieldSetElement): Add invalidateDisabledStateUnder() and childrenChanged().
1717
1718         * html/HTMLFormControlElement.cpp:
1719         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
1720         Remove initialization of the removed data members.
1721         Initialize m_ancestorDisabledState.
1722         (WebCore::HTMLFormControlElement::updateAncestorDisabledState):
1723         Update m_ancestorDisabledState. It should be
1724         AncestorDisabledStateDisabled if the control is under a disabled
1725         fieldset and not under the first legend child of the disabled filedset.
1726         (WebCore::HTMLFormControlElement::ancestorDisabledStateWasChanged):
1727         Invalidate m_ancestorDisabledState.
1728         (WebCore::HTMLFormControlElement::insertedInto): ditto.
1729         (WebCore::HTMLFormControlElement::removedFrom): ditto.
1730         (WebCore::HTMLFormControlElement::disabled):
1731         Calls updateAncestorDisabledState() if needed.
1732         (WebCore::HTMLFormControlElement::recalcWillValidate):
1733         Remove unnecessary check for m_legendAncestor.
1734
1735         * html/HTMLFormControlElement.h:
1736         (HTMLFormControlElement):
1737         - Rename updateFieldSetAndLegendAncestor() to updateAncestorDisabledState(), and make it private.
1738         - Remove m_fieldSetAncestor, m_legendAncestor, and m_fieldSetAncestorValid.
1739         - Add m_ancestorDisabledState.
1740
1741 2012-05-28  Takashi Toyoshima  <toyoshim@chromium.org>
1742
1743         [WebSocket] Receiving reserved close codes, 1005, 1006, and 1015 must appear as code=1006 and wasClean=false
1744         https://bugs.webkit.org/show_bug.cgi?id=87084
1745
1746         Reviewed by Kent Tamura.
1747
1748         Status codes 1005, 1006, and 1015 are forbidden to be sent in actual close frames.
1749         If a client received these frames, the client should handle them as broken.
1750         Close frames containing invalid body size are the same as these forbidden cases.
1751         Update close-code-and-reason tests to verify this patch.
1752
1753         * Modules/websockets/WebSocket.cpp: Handle AbnormalClosure as wasClean == false
1754         (WebCore::WebSocket::didClose):
1755         * Modules/websockets/WebSocketChannel.cpp: Handle close frames' status code carefully
1756         (WebCore::WebSocketChannel::processFrame):
1757         * Modules/websockets/WebSocketChannel.h: Update on newly defined close event codes
1758
1759 2012-05-28  Kentaro Hara  <haraken@chromium.org>
1760
1761         [V8] Avoid passing NULL to an 'isolate' parameter
1762         https://bugs.webkit.org/show_bug.cgi?id=87689
1763
1764         Reviewed by Adam Barth.
1765
1766         v8::Null(isolate) crashes if we pass a NULL isolate.
1767         Thus we are planning to replace v8::Null()s in a following way:
1768
1769         - Implement V8Bindings::v8Null(isolate). v8Null(isolate) does the NULL check.
1770         If isolate is NULL, v8Null(isolate) calls v8::Null(). Otherwise,
1771         v8Null(isolate) calls v8::Null(isolate).
1772
1773         - In V8 bindings, we replace v8::Null() with v8::Null(isolate) for a
1774         non-optional 'isolate' parameter.
1775         (e.g. void foo(..., Isolate* isolate) { v8::Null(); } )
1776
1777         - In V8 bindings, we replace v8::Null() with v8Null(isolate) for an
1778         optional 'isolate' parameter.
1779         (e.g. void foo(..., Isolate* isolate = 0) { v8::Null(); } )
1780
1781         However, currently we cannot do the replacement mechanically, since some code
1782         pass NULL to a non-optional 'isolate' parameter. In other words, currently
1783         "non-optional" does not guarantee that 'isolate' is not NULL.
1784
1785         This patch removes all the code that passes NULL to a non-optional 'isolate'
1786         parameter. This will enable us to achieve the replacement mechanically.
1787
1788         No tests. No behavior change.
1789
1790         * bindings/scripts/CodeGeneratorV8.pm:
1791         (GenerateCallbackImplementation):
1792         (NativeToJSValue):
1793         * bindings/scripts/test/V8/V8TestCallback.cpp:
1794         (WebCore::V8TestCallback::callbackWithClass1Param):
1795         (WebCore::V8TestCallback::callbackWithClass2Param):
1796         (WebCore::V8TestCallback::callbackWithStringList):
1797         (WebCore::V8TestCallback::callbackRequiresThisToPass):
1798         * bindings/scripts/test/V8/V8TestObj.cpp:
1799         (WebCore::V8TestObj::installPerContextProperties):
1800         * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
1801         (WebCore::V8SQLStatementErrorCallback::handleEvent):
1802         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
1803         (WebCore::V8MutationCallback::handleEvent):
1804
1805 2012-05-28  Kent Tamura  <tkent@chromium.org>
1806
1807         Form controls in <fieldset disabled> should not be validated.
1808         https://bugs.webkit.org/show_bug.cgi?id=87381
1809
1810         Reviewed by Hajime Morita.
1811
1812         We need to use disabeld() instead of m_disabled to calculate
1813         willValidate property. Also, we need to update willValidate if
1814         necessary.
1815
1816         Test: fast/forms/fieldset/validation-in-fieldset.html
1817
1818         * html/HTMLFieldSetElement.cpp:
1819         (WebCore::HTMLFieldSetElement::disabledAttributeChanged):
1820          - Do not traverse this.
1821          - Calls ancestorDisabledStateWasChanged() instead of
1822           setNeedsStyleRecalc() because we'd like to do additional tasks.
1823         * html/HTMLFormControlElement.cpp:
1824         (WebCore::HTMLFormControlElement::ancestorDisabledStateWasChanged):
1825         Added. Just calls disabledAttributeChanged().
1826         (WebCore::HTMLFormControlElement::parseAttribute):
1827         Do not call setNeedsWillValidateCheck() whenever an attribute is updated.
1828         It should be called only if disabled or readonly attribute is updated.
1829         (WebCore::HTMLFormControlElement::disabledAttributeChanged):
1830         Add setNeedsWillValidateCheck(). It was moved from parseAttribute().
1831         (WebCore::HTMLFormControlElement::insertedInto):
1832         Invalidate ancestor information.
1833         (WebCore::HTMLFormControlElement::recalcWillValidate):
1834         Use disabled() instead of m_disabled. disabled() takes care of
1835         ancestor's disabled state.
1836         * html/HTMLFormControlElement.h:
1837         (HTMLFormControlElement):
1838
1839 2012-05-28  Rakesh KN  <rakesh.kn@motorola.com>
1840
1841         [Forms] HTMLFieldSetElement.idl doesn't have elements attribute.
1842         https://bugs.webkit.org/show_bug.cgi?id=80110
1843
1844         Reviewed by Kent Tamura.
1845
1846         Implemented elements attribute for HTMLFieldSetElement. This is spec'ed at
1847         http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-fieldset-elements
1848
1849         Tests: fast/forms/fieldset/fieldset-elements.html
1850                fast/forms/fieldset/fieldset-form-collection-radionode-list.html
1851
1852         * dom/Node.cpp:
1853         (WebCore::Node::radioNodeList):
1854         Extended ASSERT to assert if not HTMLFieldSetElement or HTMLFormElement.
1855         * html/HTMLFieldSetElement.cpp:
1856         (WebCore::HTMLFieldSetElement::elements):
1857         Elements attribute implementation.
1858         (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
1859         Update the formcontrol elements collections if dom tree got modified.
1860         (WebCore::HTMLFieldSetElement::associatedElements):
1861         FormControl elements collection accessor.
1862         (WebCore::HTMLFieldSetElement::length):
1863         Number of elements in the fieldset group.
1864         * html/HTMLFieldSetElement.h:
1865         Added elements collection member and form control collection members.
1866         * html/HTMLFieldSetElement.idl:
1867         Added elements attribute.
1868         * html/HTMLFormCollection.cpp:
1869         (WebCore::HTMLFormCollection::formControlElements):
1870         Added support for HTMLFieldSetElement, based on base element type gets its associated elements.
1871         (WebCore::HTMLFormCollection::numberOfFormControlElements): Ditto
1872         (WebCore::HTMLFormCollection::getNamedFormItem): Process image elements only for form element.
1873         (WebCore::HTMLFormCollection::updateNameCache): Ditto
1874         * html/RadioNodeList.cpp:
1875         (WebCore::RadioNodeList::RadioNodeList):
1876         DynamicSubTree root element is decided based on the type whether base element is form or fieldset element.
1877         Renamed m_formElement to m_baseElement.
1878         (WebCore::RadioNodeList::~RadioNodeList):
1879         Renamed m_formElement to m_baseElement.
1880         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
1881         Form element specific changes moved under form element check.
1882         * html/RadioNodeList.h:
1883         (WebCore::RadioNodeList::create):
1884         (RadioNodeList):
1885         Renamed m_formElement to m_baseElement.
1886
1887 2012-05-28  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1888
1889         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
1890         https://bugs.webkit.org/show_bug.cgi?id=80135
1891
1892         Reviewed by Rob Buis.
1893
1894         RIM PR: 145660
1895         Fixed a regression introduced by r111810, we should cancel the new
1896         request when user press cancel button in http authentication challenge
1897         dialog, and we should also allow sending empty username and password
1898         with the request.
1899         Also removed redundant codes which checked the existence of the
1900         FrameLoaderClient pointer, as we've already moved authenticationChallenge()
1901         out of class FrameLoaderClient, it is not needed.
1902
1903         Manual test added. Testing http authentication dialog relies on user interaction.
1904
1905         Resubmit the patch reverted by r115104 after the digest infinite loop
1906         issue for BlackBerry porting get identified and fixed.
1907
1908         Internally reviewed by Joe Mason <jmason@rim.com>
1909
1910         * platform/blackberry/PageClientBlackBerry.h:
1911         * platform/network/blackberry/NetworkJob.cpp:
1912         (WebCore::NetworkJob::sendRequestWithCredentials):
1913
1914 2012-05-28  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1915
1916         [BlackBerry] http authentication challenge issue when loading favicon
1917         https://bugs.webkit.org/show_bug.cgi?id=87665
1918
1919         Reviewed by Rob Buis.
1920
1921         Provide the TargetType when generating a favicon loading
1922         request. Loading favicons is triggered after the main resource
1923         has been loaded and parsed, so if we cancel the authentication
1924         challenge when loading main resource, we should also cancel
1925         loading the favicon when it starts to load. If not we will
1926         receive another challenge after we canceled the main resource
1927         loading, which may confuse the user.
1928
1929         Internally reviewed by Joe Mason <jmason@rim.com>
1930
1931         No new tests because of no behavior changes.
1932
1933         * loader/icon/IconLoader.cpp:
1934         (WebCore::IconLoader::startLoading):
1935         * platform/network/blackberry/NetworkJob.cpp:
1936         (WebCore::NetworkJob::sendRequestWithCredentials):
1937
1938 2012-05-28  MORITA Hajime  <morrita@google.com>
1939
1940         Rename FrameLoaderClient::shadowDOMAllowed() to allowShadowDOM()
1941         https://bugs.webkit.org/show_bug.cgi?id=87101
1942
1943         Reviewed by Kentaro Hara.
1944
1945         No new tests. No behavior change.
1946
1947         * bindings/generic/ContextEnabledFeatures.cpp:
1948         (WebCore::ContextEnabledFeatures::shadowDOMEnabled):
1949         * loader/FrameLoaderClient.h:
1950         (WebCore::FrameLoaderClient::allowShadowDOM):
1951
1952 2012-05-28  David Barton  <dbarton@mathscribe.com>
1953
1954         mathml/presentation/mo-stretch.html and mroot-pref-width.html tests fail on Mac
1955         https://bugs.webkit.org/show_bug.cgi?id=86786
1956
1957         Reviewed by Darin Adler.
1958
1959         The fix to https://bugs.webkit.org/show_bug.cgi?id=84167 changed inline-table baselines,
1960         including for <mtable>. We therefore have to correct <mtable>'s vertical-align CSS
1961         property.
1962
1963         Tested by existing tests mo-stretch.html, row-alignment.xhtml, and tables.xhtml.
1964
1965         * css/mathml.css:
1966         (mtable):
1967
1968 2012-05-28  Luke Macpherson  <macpherson@chromium.org>
1969
1970         Make CSSParser::filteredProperties() O(n) instead of O(n^2) and improve readability.
1971         https://bugs.webkit.org/show_bug.cgi?id=87078
1972
1973         Reviewed by Darin Adler.
1974
1975         This patch implements a number of improvements to filteredProperties:
1976         1) Make the code more linearly readable by separating out handling of important and non-important properties.
1977         2) Eliminate one BitArray instance (reduces hot memory so more cache friendly).
1978         3) Remove O(n^2) behavior caused by scanning for and removing previously encountered definitions of each property.
1979         The key algorithmic change is to add properties in decreasing precedence:
1980         a) Iterating once per (important, !important) so that important properties are visited first.
1981         b) Reverse iteration of m_parsedProperties visits the properties in decreasing precedence.
1982
1983         Covered by loads of existing tests - getting CSS property precedence wrong results in too many errors to list.
1984         In particular fast/css contains test cases for important corner cases like duplicated important properties.
1985
1986         * css/CSSParser.cpp:
1987         (WebCore::CSSParser::createStylePropertySet):
1988         * css/CSSProperty.h:
1989         Add vector traits so that CSSProperty can just be memset by vector without calling constructor.
1990
1991 2012-05-28  MORITA Hajime  <morrita@google.com>
1992
1993         Can't edit <input> elements with :first-letter
1994         https://bugs.webkit.org/show_bug.cgi?id=87615
1995
1996         Reviewed by Kent Tamura.
1997
1998         A check using canHaveGeneratedChildren() should cover not only
1999         button and menulist, but also RenderTextControl.
2000         This change pulles canHaveGeneratedChildren() up
2001         from RenderDeprecatedFlexibleBox to RenderObject,
2002         and lets RenderTextControl override it.
2003
2004         Test: fast/forms/input-first-letter-edit.html
2005
2006         * rendering/RenderBlock.cpp:
2007         (WebCore):
2008         (WebCore::RenderBlock::styleDidChange):
2009         (WebCore::RenderBlock::updateFirstLetter):
2010         * rendering/RenderBlock.h: Removed a static function canHaveGeneratedChildren()
2011         (RenderBlock):
2012         * rendering/RenderDeprecatedFlexibleBox.h:
2013         * rendering/RenderObject.cpp:
2014         (WebCore):
2015         (WebCore::RenderObject::canHaveGeneratedChildren): Added.
2016         * rendering/RenderObject.h:
2017         (RenderObject):
2018         * rendering/RenderTextControl.h:
2019
2020 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2021
2022         [BlackBerry] Add support for layers with scale invariant size
2023         https://bugs.webkit.org/show_bug.cgi?id=87601
2024
2025         Reviewed by Rob Buis.
2026
2027         To support layers that have a "floating" appearance, i.e. don't change size
2028         when the web page is drawn at a different scale, we add a new layer property
2029         named "sizeIsScaleInvariant".
2030
2031         The anchor position will still be given in document coordinates for these
2032         "floating" layers, so this is well suited for interface elements like selection
2033         handles whose size is always the same but move with the web page contents.
2034
2035         PR #156812
2036
2037         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2038         (WebCore::LayerCompositingThread::setDrawTransform):
2039         (WebCore::LayerCompositingThread::drawTextures):
2040         (WebCore::LayerCompositingThread::drawMissingTextures):
2041         * platform/graphics/blackberry/LayerCompositingThread.h:
2042         (LayerCompositingThread):
2043         * platform/graphics/blackberry/LayerCompositingThreadClient.h:
2044         (LayerCompositingThreadClient):
2045         (WebCore::LayerCompositingThreadClient::drawMissingTextures):
2046         * platform/graphics/blackberry/LayerData.h:
2047         (WebCore::LayerData::LayerData):
2048         (WebCore::LayerData::sizeIsScaleInvariant):
2049         (LayerData):
2050         * platform/graphics/blackberry/LayerRenderer.cpp:
2051         (WebCore::LayerRenderer::LayerRenderer):
2052         (WebCore::LayerRenderer::compositeLayers):
2053         (WebCore::LayerRenderer::updateLayersRecursive):
2054         (WebCore::LayerRenderer::compositeLayersRecursive):
2055         * platform/graphics/blackberry/LayerRenderer.h:
2056         (LayerRenderer):
2057         * platform/graphics/blackberry/LayerTiler.cpp:
2058         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
2059         (WebCore::LayerTiler::drawTextures):
2060         (WebCore::LayerTiler::drawMissingTextures):
2061         (WebCore::LayerTiler::drawTexturesInternal):
2062         * platform/graphics/blackberry/LayerTiler.h:
2063         (LayerTiler):
2064         * platform/graphics/blackberry/LayerWebKitThread.h:
2065         (WebCore::LayerWebKitThread::setSizeIsScaleInvariant):
2066         (LayerWebKitThread):
2067
2068 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2069
2070         [BlackBerry] Make it possible to manipulate layers on the compositing thread
2071         https://bugs.webkit.org/show_bug.cgi?id=87602
2072
2073         Reviewed by Rob Buis.
2074
2075         Normally, layers are manipulated on the WebKit thread, and the changes are
2076         synced to the compositing thread during the next accelerated compositing commit
2077         operation.
2078
2079         However, for overlay layers the ability to manipulate layers on the compositing
2080         thread is necessary for adequate user interface responsiveness.
2081
2082         Two mechanisms are added:
2083         1. For a layer with a WebKit-thread counterpart, you can temporarily override
2084         attributes or add animations whose output override attributes.
2085         2. For a layer with no WebKit-thread counterpart, you can now directly set the
2086         compositing thread values for attributes. If you attempt to do this for layers
2087         that do have a WebKit-thread counterpart, the compositing thread values will
2088         be overwritten at the time of the next commit, which makes the override
2089         mechanism more useful there.
2090
2091         PR #156812
2092
2093         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2094         (WebCore::LayerCompositingThread::addSublayer):
2095         (WebCore):
2096         (WebCore::LayerCompositingThread::updateAnimations):
2097         (WebCore::LayerCompositingThread::removeAnimation):
2098         (WebCore::LayerCompositingThread::override):
2099         (WebCore::LayerCompositingThread::clearOverride):
2100         * platform/graphics/blackberry/LayerCompositingThread.h:
2101         (LayerOverride):
2102         (WebCore::LayerOverride::create):
2103         (WebCore::LayerOverride::setPosition):
2104         (WebCore::LayerOverride::setAnchorPoint):
2105         (WebCore::LayerOverride::setBounds):
2106         (WebCore::LayerOverride::setTransform):
2107         (WebCore::LayerOverride::setOpacity):
2108         (WebCore::LayerOverride::addAnimation):
2109         (WebCore::LayerOverride::LayerOverride):
2110         (WebCore):
2111         (LayerCompositingThread):
2112         (WebCore::LayerCompositingThread::setPosition):
2113         (WebCore::LayerCompositingThread::setAnchorPoint):
2114         (WebCore::LayerCompositingThread::setBounds):
2115         (WebCore::LayerCompositingThread::setSizeIsScaleInvariant):
2116         (WebCore::LayerCompositingThread::setTransform):
2117         (WebCore::LayerCompositingThread::setOpacity):
2118         (WebCore::LayerCompositingThread::setNeedsTexture):
2119         * platform/graphics/blackberry/LayerWebKitThread.cpp:
2120         (WebCore::LayerWebKitThread::LayerWebKitThread):
2121         (WebCore::LayerWebKitThread::commitOnCompositingThread):
2122         * platform/graphics/blackberry/LayerWebKitThread.h:
2123         (LayerWebKitThread):
2124         (WebCore::LayerWebKitThread::clearOverride):
2125
2126 2012-05-28  Rob Flack  <flackr@chromium.org>
2127
2128         [chromium] Only increase size of Combo Box Options when displayed on touch screen
2129         https://bugs.webkit.org/show_bug.cgi?id=85921
2130
2131         Reviewed by Adam Barth.
2132
2133         Adds a flag to set whether the current device is a touch screen, independent of whether touch events are supported and use this for the combo box sizing.
2134
2135         No new tests as this is a flag change and covered by existing tests: WebKit/chromium/tests/PopupMenuTest.cpp
2136
2137         * page/Settings.cpp:
2138         (WebCore::Settings::Settings):
2139         * page/Settings.h:
2140         (WebCore::Settings::setDeviceSupportsTouch):
2141         (WebCore::Settings::deviceSupportsTouch):
2142         (Settings):
2143         * platform/chromium/PopupListBox.cpp:
2144         (WebCore::PopupListBox::getRowHeight):
2145         * platform/chromium/PopupListBox.h:
2146         (PopupContainerSettings):
2147         * platform/chromium/PopupMenuChromium.cpp:
2148         (WebCore::PopupMenuChromium::show):
2149
2150 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2151
2152         [BlackBerry] Make custom compositing thread layers more flexible
2153         https://bugs.webkit.org/show_bug.cgi?id=87600
2154
2155         Reviewed by Rob Buis.
2156
2157         Introduce a LayerCompositingThreadClient that's used to fine tune the
2158         behaviour of custom layers. Let the LayerTiler be a
2159         LayerCompositingThreadClient and thus decouple it from
2160         LayerCompositingThread. Adjust method signatures to allow a one-to-many
2161         relationship between Client and Layer.
2162
2163         Remove the old LayerCompositingThread::drawCustom() in favour of this new
2164         Client interface.
2165
2166         PR #156812
2167
2168         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2169         (WebCore::LayerCompositingThread::create):
2170         (WebCore::LayerCompositingThread::LayerCompositingThread):
2171         (WebCore::LayerCompositingThread::~LayerCompositingThread):
2172         (WebCore::LayerCompositingThread::deleteTextures):
2173         (WebCore::LayerCompositingThread::drawTextures):
2174         (WebCore::LayerCompositingThread::hasMissingTextures):
2175         (WebCore::LayerCompositingThread::drawMissingTextures):
2176         (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
2177         (WebCore::LayerCompositingThread::bindContentsTexture):
2178         (WebCore::LayerCompositingThread::setVisible):
2179         (WebCore::LayerCompositingThread::scheduleCommit):
2180         * platform/graphics/blackberry/LayerCompositingThread.h:
2181         (WebCore):
2182         (LayerCompositingThread):
2183         * platform/graphics/blackberry/LayerCompositingThreadClient.h: Added.
2184         (WebCore):
2185         (LayerCompositingThreadClient):
2186         (WebCore::LayerCompositingThreadClient::~LayerCompositingThreadClient):
2187         (WebCore::LayerCompositingThreadClient::bindContentsTexture):
2188         (WebCore::LayerCompositingThreadClient::hasMissingTextures):
2189         (WebCore::LayerCompositingThreadClient::drawMissingTextures):
2190         (WebCore::LayerCompositingThreadClient::scheduleCommit):
2191         * platform/graphics/blackberry/LayerRenderer.cpp:
2192         (WebCore::LayerRenderer::drawDebugBorder):
2193         * platform/graphics/blackberry/LayerTiler.cpp:
2194         (WebCore::LayerTiler::LayerTiler):
2195         (WebCore::LayerTiler::layerCompositingThreadDestroyed):
2196         (WebCore::LayerTiler::layerVisibilityChanged):
2197         (WebCore::LayerTiler::uploadTexturesIfNeeded):
2198         (WebCore::LayerTiler::deleteTextures):
2199         (WebCore::LayerTiler::scheduleCommit):
2200         (WebCore):
2201         (WebCore::LayerTiler::bindContentsTexture):
2202         * platform/graphics/blackberry/LayerTiler.h:
2203         (LayerTiler):
2204         (WebCore::LayerTiler::hasMissingTextures):
2205         * platform/graphics/blackberry/LayerWebKitThread.cpp:
2206         (WebCore::LayerWebKitThread::LayerWebKitThread):
2207         * platform/graphics/blackberry/LayerWebKitThread.h:
2208         (LayerWebKitThread):
2209
2210 2012-05-25  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2211
2212         WebKitTestRunner needs to support layoutTestController.setJavaScriptProfilingEnabled
2213         https://bugs.webkit.org/show_bug.cgi?id=42328
2214
2215         Reviewed by Eric Seidel.
2216
2217         Add setJavaScriptProfilingEnabled() to window.internals.settings. No new tests, but this
2218         change will allow more tests to run in WebKitTestRunner and DRT for ports that weren't
2219         implementing this function before.
2220         This patch also refactors InspectorController::enableProfiler() and
2221         InspectorController::disableProfiler() to InspectorController::setProfilerEnabled(bool).
2222
2223         * WebCore.exp.in:
2224         * inspector/InspectorController.cpp:
2225         (WebCore::InspectorController::profilerEnabled):
2226         (WebCore::InspectorController::setProfilerEnabled):
2227         * inspector/InspectorController.h:
2228         (InspectorController):
2229         * testing/InternalSettings.cpp:
2230         (WebCore::InternalSettings::InternalSettings):
2231         (WebCore::InternalSettings::restoreTo):
2232         (WebCore::InternalSettings::setJavaScriptProfilingEnabled):
2233         (WebCore):
2234         * testing/InternalSettings.h:
2235         (InternalSettings):
2236         * testing/InternalSettings.idl:
2237
2238 2012-05-28  Yong Li  <yoli@rim.com>
2239
2240         Crash on incomplete :not().
2241         https://bugs.webkit.org/show_bug.cgi?id=86673
2242
2243         Reviewed by Antti Koivisto.
2244
2245         Add back null-checks for incomplete :not() class
2246         which were dropped by r81845.
2247
2248         * css/CSSSelector.cpp:
2249         (WebCore::CSSSelector::specificityForOneSelector):
2250         (WebCore::CSSSelector::selectorText):
2251         * css/SelectorChecker.cpp:
2252         (WebCore::SelectorChecker::checkOneSelector):
2253         (WebCore::SelectorChecker::determineLinkMatchType):
2254
2255 2012-05-28  Leo Yang  <leo.yang@torchmobile.com.cn>
2256
2257         FileWriterSync binding should have no static table
2258         https://bugs.webkit.org/show_bug.cgi?id=87645
2259
2260         Reviewed by George Staikos.
2261
2262         FileWriterSync could be used in filesystem FileWriter in worker thread, so we should add ProgressEvent in idl file.
2263
2264         Covered by existing test: fast/filesystem/workers/sync-operations.html.
2265
2266         * Modules/filesystem/FileWriterSync.idl:
2267
2268 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2269
2270         [BlackBerry] Add an overlay layer
2271         https://bugs.webkit.org/show_bug.cgi?id=87567
2272
2273         Reviewed by Antonio Gomes.
2274
2275         The overlay layer allows us to have compositing layers even though the
2276         web page is not currently using accelerated compositing.
2277
2278         These layers can be used to implement tap highlight, inspector overlay
2279         and more.
2280
2281         The WebCore changes support the overlay layer functionality in WebKit
2282         by making it possible to add animations from the compositing thread
2283         without them being instantly overwritten during the next commit.
2284
2285         Also a new custom layer type is added, which allow an overlay layer to
2286         draw itself using raw OpenGL calls. An instance of a custom subclass of
2287         LayerCompositingThread must be provided when creating the
2288         LayerWebKitThread. Then, the custom layer can be used as the content
2289         layer of a GraphicsLayer, or by itself.
2290
2291         Reviewed internally by Filip Spacek.
2292
2293         PR #154335
2294
2295         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2296         (WebCore::LayerCompositingThread::~LayerCompositingThread):
2297         (WebCore::LayerCompositingThread::deleteTextures):
2298         (WebCore::LayerCompositingThread::drawTextures):
2299         (WebCore::LayerCompositingThread::drawMissingTextures):
2300         (WebCore::LayerCompositingThread::updateTextureContentsIfNeeded):
2301         (WebCore::LayerCompositingThread::setVisible):
2302         (WebCore::LayerCompositingThread::scheduleCommit):
2303         * platform/graphics/blackberry/LayerCompositingThread.h:
2304         (WebCore::LayerCompositingThread::addAnimation):
2305         (WebCore::LayerCompositingThread::setRunningAnimations):
2306         (WebCore::LayerCompositingThread::setSuspendedAnimations):
2307         (LayerCompositingThread):
2308         (WebCore::LayerCompositingThread::drawCustom):
2309         * platform/graphics/blackberry/LayerData.h:
2310         (LayerData):
2311         * platform/graphics/blackberry/LayerWebKitThread.cpp:
2312         (WebCore::LayerWebKitThread::LayerWebKitThread):
2313         (WebCore):
2314         (WebCore::LayerWebKitThread::~LayerWebKitThread):
2315         (WebCore::LayerWebKitThread::updateTextureContentsIfNeeded):
2316         (WebCore::LayerWebKitThread::startAnimations):
2317         (WebCore::LayerWebKitThread::commitOnCompositingThread):
2318         (WebCore::LayerWebKitThread::setNeedsDisplayInRect):
2319         (WebCore::LayerWebKitThread::setNeedsDisplay):
2320         (WebCore::LayerWebKitThread::setIsMask):
2321         (WebCore::LayerWebKitThread::setRunningAnimations):
2322         (WebCore::LayerWebKitThread::setSuspendedAnimations):
2323         * platform/graphics/blackberry/LayerWebKitThread.h:
2324         (LayerWebKitThread):
2325
2326 2012-05-28  Leo Yang  <leo.yang@torchmobile.com.cn>
2327
2328         ProgressEvent JSC binding should have no static table
2329         https://bugs.webkit.org/show_bug.cgi?id=87365
2330
2331         Reviewed by George Staikos.
2332
2333         ProgressEvent could be used in filesystem FileWriter in worker thread, so we should add ProgressEvent in idl file.
2334
2335         Covered by existing test: fast/filesystem/workers/file-writer-events.html.
2336
2337         * dom/ProgressEvent.idl:
2338
2339 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2340
2341         [BlackBerry] Update WebPageCompositor::render() API
2342         https://bugs.webkit.org/show_bug.cgi?id=87565
2343
2344         Reviewed by Rob Buis.
2345
2346         The new API allows the embedder to specify the root transform and many
2347         OpenGL related parameters.
2348
2349         Also refactor the code to allow several sets of layers to be rendered,
2350         and to allow interleaving the rendering of layers with rendering of
2351         buffers and checkerboard.
2352
2353         Reviewed internally by Filip Spacek.
2354
2355         PR #154334
2356
2357         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2358         (WebCore::LayerCompositingThread::drawTextures):
2359         (WebCore::LayerCompositingThread::drawSurface):
2360         * platform/graphics/blackberry/LayerRenderer.cpp:
2361         (WebCore::LayerRenderer::orthoMatrix):
2362         (WebCore::LayerRenderer::LayerRenderer):
2363         (WebCore::LayerRenderer::prepareFrame):
2364         (WebCore):
2365         (WebCore::LayerRenderer::setViewport):
2366         (WebCore::LayerRenderer::compositeLayers):
2367         (WebCore::LayerRenderer::compositeBuffer):
2368         (WebCore::LayerRenderer::drawCheckerboardPattern):
2369         (WebCore::LayerRenderer::drawLayersOnSurfaces):
2370         (WebCore::LayerRenderer::prepareFrameRecursive):
2371         (WebCore::LayerRenderer::updateLayersRecursive):
2372         (WebCore::LayerRenderer::compositeLayersRecursive):
2373         (WebCore::LayerRenderer::updateScissorIfNeeded):
2374         (WebCore::LayerRenderingResults::addHolePunchRect):
2375         * platform/graphics/blackberry/LayerRenderer.h:
2376         (LayerRenderer):
2377
2378 2012-05-28  Antti Koivisto  <antti@apple.com>
2379
2380         REGRESSION(r96517): Attribute selector fails to match dynamically modified style attribute
2381         https://bugs.webkit.org/show_bug.cgi?id=87349
2382
2383         Reviewed by Andreas Kling.
2384         
2385         Selector fast path does not trigger lazy style attribute generation. Since attribute selectors matching
2386         style attribute are rare, disallow them from the fast path rather than making it more branchy.
2387
2388         Test: fast/css/dynamic-style-attribute-query.html
2389
2390         * css/SelectorChecker.cpp:
2391         (WebCore::isFastCheckableMatch):
2392
2393 2012-05-28  Peter Rybin  <peter.rybin@gmail.com>
2394
2395         Web Inspector: Expose function (closure) scopes in remote protocol
2396         https://bugs.webkit.org/show_bug.cgi?id=86861
2397
2398         Reviewed by Yury Semikhatsky.
2399
2400         A data transfer from V8's FunctionMirror via DebuggerScript.js via InjectedScriptHost is built.
2401         Scope field is added to protocol declaration similar to scopes of stack call frame.
2402         Test for function details is extended.
2403         JSC code binging got fixme for implemting the corresponding feature.
2404
2405         * bindings/js/JSInjectedScriptHostCustom.cpp:
2406         (WebCore::JSInjectedScriptHost::functionDetails):
2407         * bindings/v8/DebuggerScript.js:
2408         * bindings/v8/ScriptDebugServer.cpp:
2409         (WebCore::ScriptDebugServer::functionScopes):
2410         (WebCore):
2411         * bindings/v8/ScriptDebugServer.h:
2412         (ScriptDebugServer):
2413         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2414         (WebCore::V8InjectedScriptHost::functionDetailsCallback):
2415         * inspector/InjectedScriptHost.cpp:
2416         (WebCore):
2417         (WebCore::InjectedScriptHost::scriptDebugServer):
2418         * inspector/InjectedScriptHost.h:
2419         (WebCore):
2420         (WebCore::InjectedScriptHost::init):
2421         (InjectedScriptHost):
2422         * inspector/InjectedScriptSource.js:
2423         (.):
2424         * inspector/Inspector.json:
2425         * inspector/InspectorController.cpp:
2426         (WebCore::InspectorController::InspectorController):
2427         * inspector/WorkerInspectorController.cpp:
2428         (WebCore::WorkerInspectorController::WorkerInspectorController):
2429
2430 2012-05-28  Arvid Nilsson  <anilsson@rim.com>
2431
2432         [BlackBerry] Add a constructor to create a Path from an SkPath
2433         https://bugs.webkit.org/show_bug.cgi?id=87566
2434
2435         Reviewed by Antonio Gomes.
2436
2437         Skia allows the creation of more complex paths than WebCore would
2438         allow. This will be used in the BlackBerry port to implement a default
2439         tap highlight appearance.
2440
2441         Reviewed internally by Mike Lattanzio.
2442
2443         PR #154329
2444
2445         * platform/graphics/Path.h:
2446         (Path):
2447         * platform/graphics/skia/PathSkia.cpp:
2448         (WebCore):
2449         (WebCore::Path::Path):
2450
2451 2012-05-28  Alexis Menard  <alexis.menard@openbossa.org>
2452
2453         Unreviewed build fix for Mac on Lion.
2454
2455         * inspector/CodeGeneratorInspector.py:
2456
2457 2012-05-28  Keishi Hattori  <keishi@webkit.org>
2458
2459         Expose value localization function of HTMLInputElement
2460         https://bugs.webkit.org/show_bug.cgi?id=84356
2461
2462         Reviewed by Kent Tamura.
2463
2464         No new tests.
2465
2466         We want to localize the values that are defined in the datalist element.
2467         This adds HTMLInputElement::localizeValue() which will localize a given
2468         value.
2469
2470         * html/BaseDateAndTimeInputType.cpp:
2471         (WebCore::BaseDateAndTimeInputType::localizeValue):
2472         (WebCore):
2473         (WebCore::BaseDateAndTimeInputType::visibleValue):
2474         * html/BaseDateAndTimeInputType.h:
2475         (BaseDateAndTimeInputType):
2476         * html/HTMLInputElement.cpp:
2477         (WebCore::HTMLInputElement::localizeValue):
2478         (WebCore):
2479         * html/HTMLInputElement.h:
2480         (HTMLInputElement):
2481         * html/InputType.cpp:
2482         (WebCore::InputType::localizeValue):
2483         (WebCore):
2484         * html/InputType.h:
2485         (InputType):
2486         * html/NumberInputType.cpp:
2487         (WebCore::NumberInputType::localizeValue):
2488         (WebCore):
2489         (WebCore::NumberInputType::visibleValue):
2490         * html/NumberInputType.h:
2491         (NumberInputType):
2492
2493 2012-05-28  Yury Semikhatsky  <yurys@chromium.org>
2494
2495         Unreviewed. Test fix after r118670: saved timeline data may
2496         not have DOM counters data and MemoryStatistics object should
2497         take this into account.
2498
2499         * inspector/front-end/MemoryStatistics.js:
2500         (WebInspector.MemoryStatistics.prototype._onRecordAdded):
2501
2502 2012-05-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2503
2504         Unreviewed, rolling out r118580.
2505         http://trac.webkit.org/changeset/118580
2506         https://bugs.webkit.org/show_bug.cgi?id=87647
2507
2508         Caused webkit_unit_tests to crash on chromium. (Requested by
2509         bulach on #webkit).
2510
2511         * platform/graphics/chromium/ContentLayerChromium.cpp:
2512         (WebCore::ContentLayerPainter::create):
2513         (WebCore::ContentLayerPainter::paint):
2514         (WebCore::ContentLayerPainter::ContentLayerPainter):
2515         (ContentLayerPainter):
2516         (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded):
2517         * platform/graphics/chromium/TiledLayerChromium.cpp:
2518         (UpdatableTile):
2519         (WebCore::UpdatableTile::UpdatableTile):
2520         (WebCore::TiledLayerChromium::updateTiles):
2521         * platform/graphics/chromium/TiledLayerChromium.h:
2522         (TiledLayerChromium):
2523         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2524         (WebCore::CCSettings::CCSettings):
2525         (CCSettings):
2526
2527 2012-05-28  Peter Beverloo  <peter@chromium.org>
2528
2529         &AElig doesn't get rendered as U+00C6
2530         https://bugs.webkit.org/show_bug.cgi?id=87465
2531
2532         Reviewed by Adam Barth.
2533
2534         The if-statement to check whether the first entry of a certain letter
2535         already exists in the index used .get(). The very first alphabetical
2536         entry is in position "0", which evaluates to false, causing the first
2537         entry to be ignored. Instead, use a "x not in y" check here.
2538
2539         Also update WebCore.gyp to list the create-html-entity-table script as
2540         an input for the action, to make sure the table will be recreated.
2541
2542         Test: html5lib/resources/entities02.dat
2543
2544         * WebCore.gyp/WebCore.gyp:
2545         * html/parser/create-html-entity-table:
2546
2547 2012-05-28  Yury Semikhatsky  <yurys@chromium.org>
2548
2549         Web Inspector: dom counters graphs vanish on switching between timeline views
2550         https://bugs.webkit.org/show_bug.cgi?id=87628
2551
2552         Reviewed by Vsevolod Vlasov.
2553
2554         MemoryStatistics object now listens to the TimelineModel events instead of being
2555         populated by timeline panel. This behavior mathes that of the overview pane.
2556
2557         * inspector/front-end/MemoryStatistics.js:
2558         (WebInspector.MemoryStatistics.prototype.addTimlineEvent):
2559         * inspector/front-end/TimelinePanel.js:
2560         (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded):
2561         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
2562
2563 2012-05-28  Marcus Bulach  <bulach@chromium.org>
2564
2565         [chromium] Buildfix: remove obsolete file from gypi.
2566         https://bugs.webkit.org/show_bug.cgi?id=87643
2567
2568         Reviewed by no-reviewer.
2569
2570         Following http://trac.webkit.org/changeset/118610.
2571         Removes reference to platform/graphics/gstreamer/ImageGStreamerCG.mm
2572
2573         * WebCore.gypi:
2574
2575 2012-05-28  MORITA Hajime  <morrita@google.com>
2576
2577         HTMLFormControlElement::m_validationMessage shouldn't be cleared on detach()
2578         https://bugs.webkit.org/show_bug.cgi?id=87608
2579
2580         Reviewed by Kent Tamura.
2581
2582         Moved m_validationMessage clearance from detach() to removedFrom() and
2583         remove detach().
2584
2585         No new tests. This change has no visible difference. Upcoming changes rely on this though.
2586
2587         * html/HTMLFormControlElement.cpp:
2588         (WebCore::HTMLFormControlElement::removedFrom):
2589
2590 2012-05-28  Yury Semikhatsky  <yurys@chromium.org>
2591
2592         Web Inspector: "Record CPU profile" button doesn't change its state after finishing profiling
2593         https://bugs.webkit.org/show_bug.cgi?id=87624
2594
2595         Reviewed by Vsevolod Vlasov.
2596
2597         Keep record button state in sync with the current profiling state.
2598
2599         * inspector/front-end/ProfilesPanel.js:
2600         (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
2601
2602 2012-05-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2603
2604         Unreviewed, rolling out r118650.
2605         http://trac.webkit.org/changeset/118650
2606         https://bugs.webkit.org/show_bug.cgi?id=87639
2607
2608         Patch caused massive failures throughout the builders
2609         (Requested by zdobersek on #webkit).
2610
2611         * css/MediaQuery.cpp:
2612         (WebCore):
2613         (WebCore::MediaQuery::serialize):
2614         (WebCore::MediaQuery::MediaQuery):
2615         (WebCore::MediaQuery::cssText):
2616         * css/MediaQuery.h:
2617         (WebCore::MediaQuery::expressions):
2618         (WebCore::MediaQuery::mediaType):
2619         (MediaQuery):
2620         (WebCore::MediaQuery::copy):
2621         * css/MediaQueryEvaluator.cpp:
2622         (WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
2623         (WebCore::MediaQueryEvaluator):
2624         (WebCore::MediaQueryEvaluator::eval):
2625         (WebCore::aspect_ratioMediaFeatureEval):
2626         (WebCore::device_aspect_ratioMediaFeatureEval):
2627         (WebCore::transform_3dMediaFeatureEval):
2628         (WebCore::view_modeMediaFeatureEval):
2629         (WebCore::createFunctionMap):
2630         * css/MediaQueryEvaluator.h:
2631         (WebCore):
2632         (MediaQueryEvaluator):
2633         * css/StyleResolver.cpp:
2634         (WebCore):
2635         (WebCore::StyleResolver::collectMatchingRulesForList):
2636         * css/StyleResolver.h:
2637         (MediaQueryResult):
2638         (WebCore::MediaQueryResult::MediaQueryResult):
2639         (WebCore):
2640         (StyleResolver):
2641
2642 2012-05-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2643
2644         Move allowRoundingHacks to Internals interface
2645         https://bugs.webkit.org/show_bug.cgi?id=87328
2646
2647         Reviewed by Hajime Morita.
2648
2649         Add allowRoundingHacks function, because it is able to work in the
2650         cross-port way by means of the Internals interface.
2651
2652         In addition, a function is added in order to restore default setting values.
2653
2654         No new tests, since we are improving here the infra-structure for testing
2655         a specific method.
2656
2657         * testing/Internals.cpp:
2658         (WebCore::Internals::reset):
2659         (WebCore):
2660         (WebCore::Internals::resetDefaultsToConsistentValues):
2661         (WebCore::Internals::allowRoundingHacks):
2662         * testing/Internals.h:
2663         (Internals):
2664         * testing/Internals.idl:
2665
2666 2012-05-28  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2667
2668         [BlackBerry] http authentication crash the browser when user commit or cancel the http authentication dialog
2669         https://bugs.webkit.org/show_bug.cgi?id=87579
2670
2671         Reviewed by George Staikos.
2672
2673         In function NetworkJob::startNewJobWithRequest, We should cancel the
2674         NetworkJob first before we start a new NetworkJob which reuses the
2675         resource handle of the old one. If we only set the m_handle = 0 of the
2676         old NetworkJob without cancelling itself, it will still receives data
2677         notification from network thread and handles the received data with
2678         the released resource handler, which will cause the crash.
2679
2680         No new tests because no behavior has changed.
2681
2682         * platform/network/blackberry/NetworkJob.cpp:
2683         (WebCore::NetworkJob::startNewJobWithRequest):
2684
2685 2012-05-27  MORITA Hajime  <morrita@google.com>
2686
2687         [Refactoring][ShadowDOM] Some ElementShadow methods can be inlined.
2688         https://bugs.webkit.org/show_bug.cgi?id=87617
2689
2690         Reviewed by Kentaro Hara.
2691
2692         Inlined ElementShadow::attachHost(), ElementShadow::detachHost() and
2693         ElementShadow::reattach()
2694
2695         No new tests. No behavior change.
2696
2697         * dom/Element.cpp:
2698         (WebCore::Element::attach):
2699         (WebCore::Element::detach):
2700         * dom/ElementShadow.cpp:
2701         (WebCore::ElememtnShadow::reattachHostChildrenAndShadow):
2702         * dom/ElementShadow.h:
2703         (ElementShadow):
2704
2705 2012-05-28  Peter Rybin  <peter.rybin@gmail.com>
2706
2707         Web Inspector: CodeGeneratorInspector.py: protect typed API from C++ implicit float to int cast
2708         https://bugs.webkit.org/show_bug.cgi?id=87183
2709
2710         Reviewed by Yury Semikhatsky.
2711
2712         An intermediate C++ class is introduced that uses C++ template technique to control actual type
2713         of its constructor argument.
2714         All input parameters of type "int" now have type ExactlyInt. 
2715         All usage sites are fixed accordingly.
2716
2717         * inspector/CodeGeneratorInspector.py:
2718         (TypeModel.RefPtrBased):
2719         (TypeModel.Enum):
2720         (TypeModel.ValueType):
2721         (TypeModel.ValueType.get_opt_output_type_):
2722         (TypeModel.ValueType.ValueOptional.get_command_return_pass_model):
2723         (TypeModel.ExactlyInt):
2724         (TypeModel.ExactlyInt.__init__):
2725         (TypeModel.ExactlyInt.get_input_param_type_text):
2726         (TypeModel.ExactlyInt.get_opt_output_type_):
2727         (TypeModel.init_class):
2728         (ExactlyInt):
2729         * inspector/InspectorAgent.cpp:
2730         (WebCore::InspectorAgent::enable):
2731         (WebCore::InspectorAgent::didCreateWorker):
2732         (WebCore::InspectorAgent::didDestroyWorker):
2733         (WebCore::InspectorAgent::evaluateForTestInFrontend):
2734         * inspector/InspectorApplicationCacheAgent.cpp:
2735         (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
2736         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
2737         * inspector/InspectorDOMAgent.cpp:
2738         (WebCore::InspectorDOMAgent::buildObjectForNode):
2739         * inspector/InspectorMemoryAgent.cpp:
2740         (WebCore::jsHeapInfo):
2741         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2742         * inspector/PageRuntimeAgent.cpp:
2743         (WebCore::PageRuntimeAgent::notifyContextCreated):
2744
2745 2012-05-28  Kentaro Hara  <haraken@chromium.org>
2746
2747         Unreviewed. Rebaselined run-binding-tests results.
2748
2749         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2750         (WebCore::JSTestActiveDOMObjectOwner::finalize):
2751         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2752         (WebCore::JSTestCustomNamedGetterOwner::finalize):
2753         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2754         (WebCore::JSTestEventConstructorOwner::finalize):
2755         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2756         (WebCore::JSTestEventTargetOwner::finalize):
2757         * bindings/scripts/test/JS/JSTestException.cpp:
2758         (WebCore::JSTestExceptionOwner::finalize):
2759         * bindings/scripts/test/JS/JSTestInterface.cpp:
2760         (WebCore::JSTestInterfaceOwner::finalize):
2761         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2762         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
2763         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2764         (WebCore::JSTestNamedConstructorOwner::finalize):
2765         * bindings/scripts/test/JS/JSTestObj.cpp:
2766         (WebCore::JSTestObjOwner::finalize):
2767         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2768         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
2769         * bindings/scripts/test/V8/V8TestObj.cpp:
2770         (WebCore::V8TestObj::installPerContextProperties):
2771
2772 2012-05-28  Darin Adler  <darin@apple.com>
2773
2774         StyleResolver need not allocate each MediaQueryResult on the heap
2775         https://bugs.webkit.org/show_bug.cgi?id=75223
2776
2777         Reviewed by Daniel Bates.
2778
2779         * css/MediaQuery.cpp: Removed some comments that pointed to CSS documents.
2780         There is no guarantee these links will be valid over time.
2781         (WebCore::MediaQuery::MediaQuery): Rewrote for clarity, conventional WebKit coding
2782         style, and simplicity.
2783         (WebCore::MediaQuery::copy): Moved out of line; not performance critical, and this
2784         allows us to cut down header dependencies.
2785         (WebCore::MediaQuery::cssText): Updated for change to data member name.
2786
2787         * css/MediaQuery.h: Removed unneeded includes. Removed non-helpful argument name
2788         "exprs". Changed expressions function to return a reference instead of
2789         a pointer. Changed mediaType and cssText functions to return a reference. Renamed
2790         m_serializationCache to m_serializedQuery. Moved copy function out of header.
2791
2792         * css/MediaQueryEvaluator.cpp: Renamed EvalFunc to MediaFeatureEvaluationFunction.
2793         Broke a FIXME into three and reworded for clarity.
2794         (WebCore::MediaQueryEvaluator): Updated for name changes.
2795         (WebCore::MediaQueryEvaluator::eval): Rewrote this for clarity and to regularize
2796         the logic a bit.
2797         (WebCore::aspect_ratioMediaFeatureEval): Got rid of a != 0 that is contrary to the
2798         normal WebKit style.
2799         (WebCore::device_aspect_ratioMediaFeatureEval): Ditto.
2800         (WebCore::transform_3dMediaFeatureEval): Fixed mangled #if that was here.
2801         (WebCore::view_modeMediaFeatureEval): Replaced UNUSED_PARAM usage with ASSERT_UNUSED.
2802         (WebCore::createFunctionMap): Changed this so it returns the map so we can use a
2803         cleaner style in the caller.
2804         (WebCore::MediaQueryEvaluator::eval): Updated to take a reference and improved the
2805         comments and coding style a bit.
2806
2807         * css/MediaQueryEvaluator.h: Updated comment style. Removed unused constructor.
2808         Removed unneeded destructor declaration. Renamed m_expResult to m_mediaFeatureResult.
2809
2810         * css/StyleResolver.cpp: Moved the MediaQueryResult class into this file
2811         and made it a structure rather than a class.
2812         (WebCore::StyleResolver::addViewportDependentMediaQueryResult): Updated to take
2813         a reference argument instead of a pointer and for the new vector type.
2814         (WebCore::StyleResolver::affectedByViewportChange): Updated for above changes.
2815
2816         * css/StyleResolver.h: Removed many unneeded includes and forward declarations of
2817         classes, including now-unneeded include of MediaQueryExp.h. Replaced MediaQueryResult
2818         definition with a forward declaration. Changed addViewportDependentMediaQueryResult
2819         to take a reference instead of a pointer. Changed m_viewportDependentMediaQueryResults
2820         to be a vector of values rather than of pointers.
2821
2822 2012-05-27  Shinya Kawanaka  <shinyak@chromium.org>
2823
2824         cut, copy or paste event won't be fired in Shadow DOM.
2825         https://bugs.webkit.org/show_bug.cgi?id=87352
2826
2827         Reviewed by Dimitri Glazkov.
2828
2829         cut, copy or paste event was not fired in Shadow DOM.
2830         Since event re-targeting has been implemented, it should be safe to fire them in Shadow DOM now.
2831
2832         Tests: fast/dom/shadow/cppevent-in-shadow.html
2833                fast/dom/shadow/cppevent-input-in-shadow.html
2834
2835         * editing/Editor.cpp:
2836         (WebCore::Editor::findEventTargetFrom):
2837
2838 2012-05-27  Hayato Ito  <hayato@chromium.org>
2839
2840         Support multiple shadow roots in event dispatching.
2841         https://bugs.webkit.org/show_bug.cgi?id=87470
2842
2843         Reviewed by Dimitri Glazkov.
2844
2845         The current implementation does not set event's target correctly
2846         if an event happens on DOM tree with multiple shadow roots.  So
2847         this patch updates an event re-targeting algorithm so that it
2848         works even if it is applied to multiple shadow roots.
2849
2850         Tests: fast/dom/shadow/shadow-dom-event-dispatching.html
2851
2852         * dom/ComposedShadowTreeWalker.cpp:
2853         (WebCore::ComposedShadowTreeWalker::traverseParentIncludingInsertionPointAndShadowRoot):
2854         * dom/EventDispatcher.cpp:
2855         (WebCore::EventDispatcher::ensureEventAncestors):
2856
2857 2012-05-27  Benjamin Poulain  <benjamin@webkit.org>
2858
2859         Minor code cleaning for the interface of MainResourceLoader
2860         https://bugs.webkit.org/show_bug.cgi?id=87607
2861
2862         Reviewed by Darin Adler.
2863
2864         * loader/MainResourceLoader.cpp:
2865         (WebCore::MainResourceLoader::MainResourceLoader):
2866         (WebCore::MainResourceLoader::handleSubstituteDataLoadNow):
2867         (WebCore::MainResourceLoader::handleSubstituteDataLoadSoon):
2868         * loader/MainResourceLoader.h:
2869         (MainResourceLoader):
2870         -Add the OVERRIDE keyword for the methods inherited from ResourceLoader.
2871         -Remove the useless declaration of handleDataLoad(ResourceRequest&), this method does not exist.
2872         -Rename handleDataLoadNow() to handleSubstituteDataLoadNow() and make the method private. This should
2873          only be used by handleSubstituteDataLoadSoon() and indirectly through the timer.
2874
2875 2012-05-27  Yoshifumi Inoue  <yosin@chromium.org>
2876
2877         [WTF] Introduce UINT64_C to MathExtras.h
2878         https://bugs.webkit.org/show_bug.cgi?id=87485
2879
2880         Reviewed by Kent Tamura.
2881
2882         This patch introduces UINT64_C for all platforms to avoid using
2883         conditional compilation.
2884
2885         No new tests. This patch doesn't change behavior.
2886
2887         * Modules/websockets/WebSocketFrame.cpp:
2888         (WebCore::WebSocketFrame::parseFrame): Replace conditional compilation with UINT64_C.
2889
2890 2012-05-27  Luke Macpherson  <macpherson@chromium.org>
2891
2892         Use StringBuilder in WebKitCSSTransformValue::customCssText() to allow code reuse with CSS Variables.
2893         https://bugs.webkit.org/show_bug.cgi?id=87462
2894
2895         Reviewed by Dimitri Glazkov.
2896
2897         Factor out strings into a const char* array, and use a StringBuilder instead of String concatenation.
2898         This will allow future code to re-use the array of transform names, and StringBuilder is generally faster.
2899
2900         Covered by existing CSS transform tests.
2901
2902         * css/WebKitCSSTransformValue.cpp:
2903         (WebCore):
2904         (WebCore::WebKitCSSTransformValue::customCssText):
2905
2906 2012-05-27  Arvid Nilsson  <anilsson@rim.com>
2907
2908         [BlackBerry] Update color for tap highlight and selection
2909         https://bugs.webkit.org/show_bug.cgi?id=87606
2910
2911         Reviewed by Antonio Gomes.
2912
2913         PR #154813
2914
2915         * platform/blackberry/RenderThemeBlackBerry.cpp:
2916         (WebCore::RenderThemeBlackBerry::platformTapHighlightColor):
2917         (WebCore::RenderThemeBlackBerry::platformActiveSelectionBackgroundColor):
2918
2919 2012-05-27  Benjamin Poulain  <bpoulain@apple.com>
2920
2921         When pages are loaded from AppCache with DeferredLoading, willSendRequest() is never called
2922         https://bugs.webkit.org/show_bug.cgi?id=87582
2923
2924         Reviewed by Darin Adler.
2925
2926         Previously, there was a shortcut when a deferred MainResourceLoader is resumed: If the data
2927         was coming from AppCache we could jump directly to startDataLoadTimer().
2928
2929         The problem with the shortcut is willSendRequest() is never called in that particular case
2930         (substituteData + deferred-resume). The imbalance between willSendRequest() and didReceiveResponse()
2931         causes problems.
2932
2933         This patch removes the shortcut so that MainResourceLoader::loadNow() is used regardless of
2934         the deferred loading. The method MainResourceLoader::loadNow() handle the substituteData as if the loading
2935         was not deferred.
2936
2937         Test: http/tests/appcache/load-from-appcache-defer-resume-crash.html
2938
2939         * loader/MainResourceLoader.cpp:
2940         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
2941         (WebCore::MainResourceLoader::handleSubstituteDataLoadSoon):
2942         Rename the method to be consistent with the attribute it uses, making the naming more explicit.
2943         (WebCore::MainResourceLoader::loadNow):
2944         (WebCore::MainResourceLoader::setDefersLoading):
2945         * loader/MainResourceLoader.h:
2946         (MainResourceLoader):
2947
2948 2012-05-27  David Kilzer  <ddkilzer@apple.com>
2949
2950         Use xcrun to find gperf path on platforms that use Xcode
2951         <http://webkit.org/b/87587>
2952
2953         Reviewed by Dan Bernstein.
2954
2955         * WebCore.xcodeproj/project.pbxproj:
2956         (Generate Derived Sources): Set GPERF environment variable using
2957         xcrun.
2958         * css/makeprop.pl: Use GPERF environment variable if set, else
2959         "gperf".
2960         * css/makevalues.pl: Ditto.
2961         * make-hash-tools.pl: Ditto.
2962
2963 2012-05-27  Li Yin  <li.yin@intel.com>
2964
2965         [FileAPI] FileReader should fire progress event when blob has been completely read into memory
2966         https://bugs.webkit.org/show_bug.cgi?id=87585
2967
2968         Reviewed by Kentaro Hara.
2969
2970         From Spec: http://www.w3.org/TR/FileAPI/#dfn-progress-event
2971         One progress event will fire when blob has been completely read into memory.
2972         Firefox, Opera and IE follows the spec.
2973         Webkit based browser doesn't do that, it only fires progress event at interval of 50ms.
2974         WebKit should add the behavior to make the conformance with the spec.
2975
2976         Tests: fast/files/file-reader-event-listener.html
2977
2978         * fileapi/FileReader.cpp:
2979         (WebCore::FileReader::didFinishLoading):
2980
2981 2012-05-26  Li Yin  <li.yin@intel.com>
2982
2983         [FileAPI] The result attribute of FileReader shuold use null to replace empty string
2984         https://bugs.webkit.org/show_bug.cgi?id=87578
2985
2986         Reviewed by Kentaro Hara.
2987
2988         From Spec: http://www.w3.org/TR/FileAPI/#filedata-attr
2989         Before read method has been called or an error in reading has occurred,
2990         the result attribute should be null, not empty string.
2991
2992         Currently, Firefox, Opera and IE 10 follows the spec, but Webkit based 
2993         browser don't.
2994         WebKit should change the returned value empty string into null to keep 
2995         conformance with the spec.
2996
2997         Tests: fast/files/read-file-async.html
2998                fast/files/blob-slice-test.html
2999                fast/files/read-blob-async.html
3000                fast/files/workers/worker-read-blob-async.html
3001                fast/files/workers/worker-read-file-async.html
3002
3003         * fileapi/FileReader.cpp:
3004         (WebCore::FileReader::stringResult):
3005
3006 2012-05-26  Andy Estes  <aestes@apple.com>
3007
3008         Fix the build when NETSCAPE_PLUGIN_API is disabled by marking a
3009         parameter as unused.
3010
3011         * plugins/PluginData.cpp:
3012         (WebCore::PluginData::initPlugins):
3013
3014 2012-05-26  Nate Chapin  <japhet@chromium.org>
3015
3016         Cancel CachedResource loads when the last client is removed.
3017         https://bugs.webkit.org/show_bug.cgi?id=35377
3018
3019         Reviewed by Darin Adler.
3020
3021         Test: http/tests/cache/cancel-in-progress-load.html
3022
3023         * loader/SubresourceLoader.cpp:
3024         (WebCore::SubresourceLoader::errorLoadingResource):
3025         * loader/cache/CachedCSSStyleSheet.cpp:
3026         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
3027         * loader/cache/CachedFont.cpp:
3028         (WebCore::CachedFont::allClientsRemoved):
3029         * loader/cache/CachedImage.cpp:
3030         (WebCore::CachedImage::allClientsRemoved):
3031         * loader/cache/CachedRawResource.cpp:
3032         (WebCore):
3033         * loader/cache/CachedRawResource.h:
3034         (WebCore::CachedRawResource::shouldIgnoreHTTPStatusCodeErrors):
3035         * loader/cache/CachedResource.cpp:
3036         (WebCore::CachedResource::allClientsRemoved):
3037         (WebCore):
3038         * loader/cache/CachedResource.h:
3039         (CachedResource):
3040         * loader/cache/CachedScript.cpp:
3041         (WebCore::CachedScript::allClientsRemoved):
3042
3043 2012-05-26  Simon Fraser  <simon.fraser@apple.com>
3044
3045         fast/block/inline-children-root-linebox-crash.html asserts after r118567
3046         https://bugs.webkit.org/show_bug.cgi?id=87544
3047
3048         Reviewed by Darin Adler.
3049         
3050         RenderInline::offsetFromContainer() set offsetDependsOnPoint to true based
3051         on the container's flipped writing mode. However, offsetFromContainer() would
3052         then overwrite that, since it only checked for columns.
3053         
3054         Fix by having RenderInline::offsetFromContainer() check for flipping on
3055         the container. This fixes the assertion.
3056         
3057         The new testcase exercises fixes another issue; unlike mapLocalToAbsolute(),
3058         RenderGeometryMap::absoluteRect() didn't pass the rect center point through
3059         the mapping, which resulted in a different result in some flipping cases.
3060
3061         Test: compositing/geometry/flipped-blocks-inline-mapping.html
3062
3063         * rendering/RenderGeometryMap.cpp:
3064         (WebCore::RenderGeometryMap::absoluteRect):
3065         * rendering/RenderInline.cpp:
3066         (WebCore::RenderInline::offsetFromContainer):
3067         (WebCore::RenderInline::pushMappingToContainer):
3068
3069 2012-05-26  Geoffrey Garen  <ggaren@apple.com>
3070
3071         WebKit should be lazy-finalization-safe (esp. the DOM) v2
3072         https://bugs.webkit.org/show_bug.cgi?id=87581
3073
3074         Reviewed by Oliver Hunt.
3075
3076         * bindings/js/JSDOMGlobalObject.cpp:
3077         (WebCore::JSDOMGlobalObject::destroy):
3078         * bindings/js/JSDOMWindowBase.cpp:
3079         (WebCore::JSDOMWindowBase::destroy):
3080         * bindings/js/JSDOMWindowShell.cpp:
3081         (WebCore::JSDOMWindowShell::destroy):
3082         * bindings/js/JSNodeCustom.cpp:
3083         (WebCore::JSNodeOwner::finalize):
3084         * bindings/js/JSWorkerContextBase.cpp:
3085         (WebCore::JSWorkerContextBase::destroy):
3086         * bindings/scripts/CodeGeneratorJS.pm:
3087         (GenerateImplementation):
3088         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3089         (WebCore::JSTestActiveDOMObject::destroy):
3090         (WebCore::JSTestActiveDOMObjectOwner::finalize):
3091         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3092         (WebCore::JSTestCustomNamedGetter::destroy):
3093         (WebCore::JSTestCustomNamedGetterOwner::finalize):
3094         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3095         (WebCore::JSTestEventConstructor::destroy):
3096         (WebCore::JSTestEventConstructorOwner::finalize):
3097         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3098         (WebCore::JSTestEventTarget::destroy):
3099         (WebCore::JSTestEventTargetOwner::finalize):
3100         * bindings/scripts/test/JS/JSTestException.cpp:
3101         (WebCore::JSTestException::destroy):
3102         (WebCore::JSTestExceptionOwner::finalize):
3103         * bindings/scripts/test/JS/JSTestInterface.cpp:
3104         (WebCore::JSTestInterface::destroy):
3105         (WebCore::JSTestInterfaceOwner::finalize):
3106         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3107         (WebCore::JSTestMediaQueryListListener::destroy):
3108         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
3109         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3110         (WebCore::JSTestNamedConstructor::destroy):
3111         (WebCore::JSTestNamedConstructorOwner::finalize):
3112         * bindings/scripts/test/JS/JSTestObj.cpp:
3113         (WebCore::JSTestObj::destroy):
3114         (WebCore::JSTestObjOwner::finalize):
3115         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3116         (WebCore::JSTestSerializedScriptValueInterface::destroy):
3117         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
3118         * bridge/objc/objc_runtime.mm:
3119         (JSC::Bindings::ObjcFallbackObjectImp::destroy):
3120         * bridge/qt/qt_runtime.cpp:
3121         (JSC::Bindings::QtRuntimeMethod::destroy):
3122         * bridge/qt/qt_runtime_qt4.cpp:
3123         (JSC::Bindings::QtRuntimeMethod::destroy):
3124         * bridge/runtime_array.cpp:
3125         (JSC::RuntimeArray::destroy):
3126         * bridge/runtime_method.cpp:
3127         (JSC::RuntimeMethod::destroy):
3128         * bridge/runtime_object.cpp:
3129         (JSC::Bindings::RuntimeObject::destroy):
3130         * bridge/runtime_root.cpp:
3131         (JSC::Bindings::RootObject::finalize): Use static_cast instead of jsCast because
3132         jsCast does Structure-based validation, and our Structure is not guaranteed
3133         to be alive when we get finalized.
3134
3135 2012-05-26  Simon Fraser  <simon.fraser@apple.com>
3136
3137         Clip rects assertion when hovering div with transform
3138         https://bugs.webkit.org/show_bug.cgi?id=87580
3139
3140         Reviewed by Eric Seidel.
3141         
3142         Hit testing used to use temporary clip rects in composited documents,
3143         until r118562. Now that we cache clip rects for hit testing, we need
3144         to clear the cache on descendant layers when a layer gains or loses
3145         a transform.
3146
3147         Test: fast/layers/clip-rects-assertion.html
3148
3149         * rendering/RenderLayer.cpp:
3150         (WebCore::RenderLayer::updateTransform):
3151
3152 2012-05-25  Dan Bernstein  <mitz@apple.com>
3153
3154         <rdar://problem/11439771> WebProcess sends many synchronous messages to the UI process while scrolling beneath ScrollView::contentsToScreen()
3155         https://bugs.webkit.org/show_bug.cgi?id=87571
3156
3157         Reviewed by Anders Carlsson.
3158
3159         fakeMouseEventTimerFired() uses the last known mouse position for the fake mouse event, but
3160         calls contentsToScreen() to compute a corresponding position in screen coordinates. Avoid
3161         this by also recording the last known mouse position in screen coordinates, and using that
3162         value.
3163
3164         * page/EventHandler.cpp:
3165         (WebCore::EventHandler::clear): Added resetting m_currentMouseGlobalPosition.
3166         (WebCore::EventHandler::handleMousePressEvent): Added updating m_currentMouseGlobalPosition
3167         when updating m_currentMousePosition.
3168         (WebCore::EventHandler::handleMouseDoubleClickEvent): Ditto.
3169         (WebCore::EventHandler::handleMouseMoveEvent): Ditto.
3170         (WebCore::EventHandler::handleMouseReleaseEvent): Ditto.
3171         (WebCore::EventHandler::fakeMouseMoveEventTimerFired): Changed to use m_currentMouseGlobalPosition
3172         in the fake event instead of calling contentsToScreen().
3173         * page/EventHandler.h: Added m_currentMouseGlobalPosition data member.
3174
3175 2012-05-25  Philippe Normand  <pnormand@igalia.com>
3176
3177         [GStreamer] Remove ImageGStreamerCG implementation
3178         https://bugs.webkit.org/show_bug.cgi?id=87559
3179
3180         The ImageGStreamerCG abstraction is being removed until I manage to
3181         port my gst-mac WebKit branch over to the WebKit2 mac port. No
3182         need to update the XCode project because this file is not
3183         referenced there anyway.
3184
3185         Reviewed by Martin Robinson.
3186
3187         * platform/graphics/gstreamer/ImageGStreamer.h:
3188         (ImageGStreamer):
3189         * platform/graphics/gstreamer/ImageGStreamerCG.mm: Removed.
3190
3191 2012-05-26  Rob Buis  <rwlbuis@webkit.org>
3192
3193         Bug 15799: textPath element does not re-render when referenced path changes
3194         https://bugs.webkit.org/show_bug.cgi?id=15799
3195
3196         Reviewed by Nikolas Zimmermann.
3197
3198         Support textPath updating to changes on the referenced path. To make this possible
3199         use the target reference functionality also used by SVGFEImageElement.
3200
3201         Tests: svg/custom/textPath-change-id-expected.svg
3202                svg/custom/textPath-change-id-pattern-expected.svg
3203                svg/custom/textPath-change-id-pattern.svg
3204                svg/custom/textPath-change-id.svg
3205                svg/custom/textPath-change-id2-expected.svg
3206                svg/custom/textPath-change-id2-pattern-expected.svg
3207                svg/custom/textPath-change-id2-pattern.svg
3208                svg/custom/textPath-change-id2.svg
3209                svg/custom/textPath-change-reference-expected.svg
3210                svg/custom/textPath-change-reference-pattern-expected.svg
3211                svg/custom/textPath-change-reference-pattern.svg
3212                svg/custom/textPath-change-reference-using-baseval-expected.svg
3213                svg/custom/textPath-change-reference-using-baseval-pattern-expected.svg
3214                svg/custom/textPath-change-reference-using-baseval-pattern.svg
3215                svg/custom/textPath-change-reference-using-baseval.svg
3216                svg/custom/textPath-change-reference.svg
3217                svg/custom/textPath-change-reference2-expected.svg
3218                svg/custom/textPath-change-reference2-pattern-expected.svg
3219                svg/custom/textPath-change-reference2-pattern.svg
3220                svg/custom/textPath-change-reference2-using-baseval-expected.svg
3221                svg/custom/textPath-change-reference2-using-baseval-pattern-expected.svg
3222                svg/custom/textPath-change-reference2-using-baseval-pattern.svg
3223                svg/custom/textPath-change-reference2-using-baseval.svg
3224                svg/custom/textPath-change-reference2.svg
3225                svg/custom/textPath-insert-path-expected.svg
3226                svg/custom/textPath-insert-path-pattern-expected.svg
3227                svg/custom/textPath-insert-path-pattern.svg
3228                svg/custom/textPath-insert-path.svg
3229                svg/custom/textPath-modify-child-expected.svg
3230                svg/custom/textPath-modify-child-pattern-expected.svg
3231                svg/custom/textPath-modify-child-pattern.svg
3232                svg/custom/textPath-modify-child.svg
3233                svg/custom/textPath-path-change-expected.svg
3234                svg/custom/textPath-path-change-pattern-expected.svg
3235                svg/custom/textPath-path-change-pattern.svg
3236                svg/custom/textPath-path-change-using-svg-dom-expected.svg
3237                svg/custom/textPath-path-change-using-svg-dom-pattern-expected.svg
3238                svg/custom/textPath-path-change-using-svg-dom-pattern.svg
3239                svg/custom/textPath-path-change-using-svg-dom.svg
3240                svg/custom/textPath-path-change.svg
3241                svg/custom/textPath-path-change2-expected.svg
3242                svg/custom/textPath-path-change2-pattern-expected.svg
3243                svg/custom/textPath-path-change2-pattern.svg
3244                svg/custom/textPath-path-change2.svg
3245                svg/custom/textPath-remove-path-expected.svg
3246                svg/custom/textPath-remove-path-pattern-expected.svg
3247                svg/custom/textPath-remove-path-pattern.svg
3248                svg/custom/textPath-remove-path.svg
3249                svg/custom/textPath-set-id-expected.svg
3250                svg/custom/textPath-set-id.svg
3251                svg/custom/textPath-startoffset-expected.svg
3252                svg/custom/textPath-startoffset-pattern-expected.svg
3253                svg/custom/textPath-startoffset-pattern.svg
3254                svg/custom/textPath-startoffset.svg
3255
3256         * svg/SVGTextPathElement.cpp:
3257         (WebCore::SVGTextPathElement::~SVGTextPathElement):
3258         (WebCore):
3259         (WebCore::SVGTextPathElement::clearResourceReferences):
3260         (WebCore::SVGTextPathElement::svgAttributeChanged):
3261         (WebCore::SVGTextPathElement::buildPendingResource):
3262         (WebCore::SVGTextPathElement::insertedInto):
3263         (WebCore::SVGTextPathElement::removedFrom):
3264         * svg/SVGTextPathElement.h:
3265
3266 2012-05-26  Nikolas Zimmermann  <nzimmermann@rim.com>
3267
3268         Avoid updateFromElement() usage in SVG
3269         https://bugs.webkit.org/show_bug.cgi?id=87573
3270
3271         Stop relying on updateFromElement() - instead rely on addChild/removeChild, which
3272         allows us to optimize the resources re-fetching. When a child is added to the tree
3273         we don't need to remove existing resources from the SVGResourcesCache - the renderer
3274         can't be in the cache yet. Similary, remove the entry from the cache earlier: as soon
3275         as the renderer is removed from the tree, instead of waiting for willBeDestroyed().
3276
3277         No new tests, refactoring only.
3278
3279         * rendering/svg/RenderSVGBlock.cpp:
3280         * rendering/svg/RenderSVGBlock.h:
3281         (RenderSVGBlock):
3282         * rendering/svg/RenderSVGContainer.cpp:
3283         (WebCore::RenderSVGContainer::addChild):
3284         (WebCore):
3285         (WebCore::RenderSVGContainer::removeChild):
3286         * rendering/svg/RenderSVGContainer.h:
3287         (RenderSVGContainer):
3288         * rendering/svg/RenderSVGInline.cpp:
3289         (WebCore::RenderSVGInline::addChild):
3290         (WebCore::RenderSVGInline::removeChild):
3291         * rendering/svg/RenderSVGInline.h:
3292         (RenderSVGInline):
3293         * rendering/svg/RenderSVGModelObject.cpp:
3294         * rendering/svg/RenderSVGModelObject.h:
3295         (RenderSVGModelObject):
3296         * rendering/svg/RenderSVGResourceContainer.cpp:
3297         (WebCore::RenderSVGResourceContainer::registerResource):
3298         * rendering/svg/RenderSVGRoot.cpp:
3299         (WebCore::RenderSVGRoot::addChild):
3300         (WebCore):
3301         (WebCore::RenderSVGRoot::removeChild):
3302         * rendering/svg/RenderSVGRoot.h:
3303         (RenderSVGRoot):
3304         * rendering/svg/RenderSVGText.cpp:
3305         (WebCore::RenderSVGText::addChild):
3306         (WebCore::RenderSVGText::removeChild):
3307         * rendering/svg/SVGResourcesCache.cpp:
3308         (WebCore::SVGResourcesCache::clientStyleChanged):
3309         (WebCore::rendererCanHaveResources):
3310         (WebCore):
3311         (WebCore::SVGResourcesCache::clientWasAddedToTree):
3312         (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
3313         * rendering/svg/SVGResourcesCache.h:
3314         (SVGResourcesCache):
3315         * svg/SVGStyledElement.cpp:
3316         * svg/SVGStyledElement.h:
3317         (SVGStyledElement):
3318
3319 2012-05-25  Nat Duca  <nduca@chromium.org>
3320
3321         [chromium] Instrument V8 GC with TraceEvent
3322         https://bugs.webkit.org/show_bug.cgi?id=87530
3323
3324         Reviewed by Kentaro Hara.
3325
3326         We sometimes get performance issues where performance stalls can
3327         be attributed to badly timed GC operations, especially ones that
3328         happen just before a frame running. This adds tracing calls around
3329         GC so that we can better understand these kinds of hangs.
3330
3331         * bindings/v8/V8GCController.cpp:
3332         (WebCore::V8GCController::gcPrologue):
3333         (WebCore::V8GCController::gcEpilogue):
3334
3335 2012-05-25  Garrett Casto  <gcasto@chromium.org>
3336
3337         Allow WebTextFieldDecoratorClient to see applied decorations.
3338         https://bugs.webkit.org/show_bug.cgi?id=86557
3339
3340         Reviewed by Kent Tamura.
3341
3342         * html/shadow/TextFieldDecorationElement.cpp:
3343         (WebCore::TextFieldDecorationElement::fromShadowRoot): A function
3344         that will extract a TextFielDecorationElement from a ShadowRoot, if
3345         there is one.
3346         * html/shadow/TextFieldDecorationElement.h:
3347         (WebCore):
3348         (TextFieldDecorator):
3349
3350 2012-05-25  Tony Chang  <tony@chromium.org>
3351
3352         implement new negative flexing algorithm
3353         https://bugs.webkit.org/show_bug.cgi?id=86528
3354
3355         Reviewed by Ojan Vafai.
3356
3357         Rather than just scale by the negative flexibility, we also take the
3358         flex-basis (preferred size) into consideration.  That means items with
3359         a larger preferred size will shrink faster.
3360
3361         Test: css3/flexbox/flex-algorithm.html (new test cases added)
3362
3363         * rendering/RenderFlexibleBox.cpp:
3364         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): Handle overflow.
3365         (WebCore::RenderFlexibleBox::layoutFlexItems):
3366         (WebCore::RenderFlexibleBox::computeNextFlexLine): Sum weighted negative flex.
3367         (WebCore::RenderFlexibleBox::freezeViolations):
3368         (WebCore::RenderFlexibleBox::resolveFlexibleLengths): Shrink by weighted amount.
3369         Also handle large values by making sure the flex values are finite.
3370         * rendering/RenderFlexibleBox.h:
3371
3372 2012-05-25  Mihai Parparita  <mihaip@chromium.org>
3373
3374         Allow synchronous XHRs to be disabled in documents
3375         https://bugs.webkit.org/show_bug.cgi?id=87540
3376
3377         Reviewed by Eric Seidel.
3378
3379         Test: fast/xmlhttprequest/xmlhttprequest-sync-disabled.html
3380
3381         Synchronous XMLHttpRequests are a problematic API, since they result
3382         in blocked UI threads. Some clients may wish to always disable them;
3383         give them a setting to do so (see also r103629 for other cases where
3384         synchronous XHRs are disabled).
3385
3386         * page/Settings.cpp:
3387         (WebCore):
3388         (WebCore::Settings::Settings):
3389         * page/Settings.h:
3390         (Settings):
3391         (WebCore::Settings::setSyncXHRInDocumentsEnabled):
3392         (WebCore::Settings::syncXHRInDocumentsEnabled):
3393         * testing/InternalSettings.cpp:
3394         (WebCore::InternalSettings::InternalSettings):
3395         (WebCore::InternalSettings::restoreTo):
3396         (WebCore::InternalSettings::setSyncXHRInDocumentsEnabled):
3397         (WebCore):
3398         * testing/InternalSettings.h:
3399         (InternalSettings):
3400         * testing/InternalSettings.idl:
3401         * xml/XMLHttpRequest.cpp:
3402         (WebCore::XMLHttpRequest::open):
3403
3404 2012-05-25  Kinuko Yasuda  <kinuko@chromium.org>
3405
3406         [chromium] Deprecate FileUtilities::getFileSize and getFileModifiedTime in favor of getFileMetadata
3407         https://bugs.webkit.org/show_bug.cgi?id=87492
3408
3409         Reviewed by Adam Barth.
3410
3411         No new tests: existing tests (http/tests/local/fileapi/* and fast/files/*) should pass.
3412
3413         * platform/chromium/FileSystemChromium.cpp:
3414         (WebCore::getFileSize):
3415         (WebCore::getFileModificationTime):
3416         (WebCore::getFileMetadata):
3417         * platform/chromium/PlatformSupport.h:
3418         (PlatformSupport):
3419
3420 2012-05-25  Abhishek Arya  <inferno@chromium.org>
3421
3422         Crash in RenderTableSection::paintCell.
3423         https://bugs.webkit.org/show_bug.cgi?id=87445
3424
3425         Reviewed by Eric Seidel and Julien Chaffraix.
3426
3427         Fix the crash by preventing table parts from being set
3428         as layout root. This prevents us from accessing removed
3429         table cells which can happen if RenderTableSection::layout
3430         is called directly without calling RenderTable::layout first
3431         (in case of cell recalc).
3432
3433         Add ASSERTs to RenderTableSection::layout to prevent
3434         layout to happen when we are already pending cell recalc
3435         or our table is pending section recalc. In those cases,
3436         RenderTable::layout should be called first to relayout
3437         the entire table.
3438
3439         Test: tables/table-section-overflow-clip-crash.html