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