Reviewed by Mitz.
authorrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Jul 2007 15:37:19 +0000 (15:37 +0000)
committerrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Jul 2007 15:37:19 +0000 (15:37 +0000)
        http://bugs.webkit.org/show_bug.cgi?id=10752
        The inspector should not respond to Make Text Smaller/Bigger commands

        Use the -webkit-text-size-adjust property to ignore text sizing
        and do not take the zoom factor into account for line height when
        -webkit-text-size-adjust is set to none.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24097 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/ignore-text-zoom-expected.checksum [new file with mode: 0644]
LayoutTests/fast/css/ignore-text-zoom-expected.png [new file with mode: 0644]
LayoutTests/fast/css/ignore-text-zoom-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/ignore-text-zoom.html [new file with mode: 0644]
LayoutTests/qt/ChangeLog
LayoutTests/qt/Skipped
LayoutTests/win/Skipped
WebCore/ChangeLog
WebCore/css/cssstyleselector.cpp
WebCore/page/inspector/inspector.css
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.m
WebKitTools/DumpRenderTree/EventSendingController.m

index 5d3596b391643f406863960d3c51bfb3bd32dfc0..a0484eef1f9fc87041024d0f9af375e59065cc4a 100644 (file)
@@ -1,3 +1,19 @@
+2007-07-08  Rob Buis  <buis@kde.org>
+
+        Reviewed by Mitz.
+
+        Testcase for:
+        http://bugs.webkit.org/show_bug.cgi?id=14209
+        DRT should be able to deal with text zoom
+        http://bugs.webkit.org/show_bug.cgi?id=10752
+        The inspector should not respond to Make Text Smaller/Bigger commands
+
+        * fast/css/ignore-text-zoom-expected.checksum: Added.
+        * fast/css/ignore-text-zoom-expected.png: Added.
+        * fast/css/ignore-text-zoom-expected.txt: Added.
+        * fast/css/ignore-text-zoom.html: Added.
+        * win/Skipped:
+
 2007-07-08  Mitz Pettel  <mitz@webkit.org>
 
         Reviewed by Darin.
diff --git a/LayoutTests/fast/css/ignore-text-zoom-expected.checksum b/LayoutTests/fast/css/ignore-text-zoom-expected.checksum
new file mode 100644 (file)
index 0000000..6066667
--- /dev/null
@@ -0,0 +1 @@
+150e5b2a8b3320e08c4c615661b12c6a
\ No newline at end of file
diff --git a/LayoutTests/fast/css/ignore-text-zoom-expected.png b/LayoutTests/fast/css/ignore-text-zoom-expected.png
new file mode 100644 (file)
index 0000000..81c0330
Binary files /dev/null and b/LayoutTests/fast/css/ignore-text-zoom-expected.png differ
diff --git a/LayoutTests/fast/css/ignore-text-zoom-expected.txt b/LayoutTests/fast/css/ignore-text-zoom-expected.txt
new file mode 100644 (file)
index 0000000..7d31858
--- /dev/null
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {DIV} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 239x18
+          text run at (0,0) width 239: "This text should have default font size"
+      RenderBlock {DIV} at (0,18) size 784x26
+        RenderText {#text} at (0,0) size 461x26
+          text run at (0,0) width 461: "This text should have larger than default font size"
diff --git a/LayoutTests/fast/css/ignore-text-zoom.html b/LayoutTests/fast/css/ignore-text-zoom.html
new file mode 100644 (file)
index 0000000..6016f1a
--- /dev/null
@@ -0,0 +1,15 @@
+<head>
+<style>
+.ignore {
+-webkit-text-size-adjust: none;
+}
+</style>
+</head>
+<div class="ignore">This text should have default font size</div>
+<div>This text should have larger than default font size</div>
+<script>
+if (window.eventSender) {
+    eventSender.textZoomIn();
+    eventSender.textZoomIn();
+}
+</script>
index bf076cce7198492f398aa19e3cc3f5a42c509bfc..bee05867e541edb500ecf39839c3d195bd978642 100644 (file)
@@ -1,3 +1,12 @@
+2007-07-08  Rob Buis  <buis@kde.org>
+
+        Reviewed by Mitz.
+
+        To pass fast/css/ignore-text-zoom textZoomIn/textZoomOut
+        must be implemented in the qt DumpRenderTree version.
+
+        * Skipped:
+
 2007-06-21  Lars Knoll <lars@trolltech.com>
 
         Update test results after my font refactoring.
index ebf41e1ec6d82a407476954f5f03059f2f2bfbf0..ad6100287efc8d8723e662e93e2c29aa600de69b 100644 (file)
@@ -52,6 +52,7 @@ fast/block/float/float-in-float-hit-testing.html
 
 fast/css/acid2-pixel.html
 fast/css/acid2.html
+fast/css/ignore-text-zoom
 fast/css/resize-corner-tracking.html
 
 fast/dom/css-cached-import-rule.html
index 7534d45f2626c12524150c075ec28a6677324ae3..d03cdba8facc659b3f97a0b96c052194a8555009 100644 (file)
@@ -63,6 +63,7 @@ editing/style/5091898.html
 fast/block/positioning/047.html
 fast/css/beforeSelectorOnCodeElement.html
 fast/css/font_property_normal.html
+fast/css/ignore-text-zoom
 fast/css/rtl-ordering.html
 fast/css/text-security.html
 fast/encoding/denormalised-voiced-japanese-chars.html
index 6c4662e2464e0e9f6f5c2b777f43b30652927b38..777bb0c036ddbb2bfbfd7b7cc889a257a95fc629 100644 (file)
@@ -1,3 +1,18 @@
+2007-07-08  Rob Buis  <buis@kde.org>
+
+        Reviewed by Mitz.
+
+        http://bugs.webkit.org/show_bug.cgi?id=10752
+        The inspector should not respond to Make Text Smaller/Bigger commands
+
+        Use the -webkit-text-size-adjust property to ignore text sizing        
+        and do not take the zoom factor into account for line height when
+        -webkit-text-size-adjust is set to none.
+
+        * css/cssstyleselector.cpp:
+        (WebCore::CSSStyleSelector::applyProperty):
+        * page/inspector/inspector.css:
+
 2007-07-08  Darin Adler  <darin@apple.com>
 
         Reviewed by Maciej.
index ecdc71be9876d56eeaef4e51564076bd67aebc25..240d0ba3d977d6f61c194422ebaa0b9416118867 100644 (file)
@@ -3147,7 +3147,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
             double multiplier = 1.0;
             // Scale for the font zoom factor only for types other than "em" and "ex", since those are
             // already based on the font size.
-            if (type != CSSPrimitiveValue::CSS_EMS && type != CSSPrimitiveValue::CSS_EXS && m_document->frame()) {
+            if (type != CSSPrimitiveValue::CSS_EMS && type != CSSPrimitiveValue::CSS_EXS && style->textSizeAdjust() && m_document->frame()) {
                 multiplier = m_document->frame()->zoomFactor() / 100.0;
             }
             lineHeight = Length(primitiveValue->computeLengthIntForLength(style, multiplier), Fixed);
index f826ba09328e7351d2a29e8ab97404534c9f36be..9c19c381572cc52261716f6949991ec3ec2a4a8a 100644 (file)
@@ -33,6 +33,7 @@ body {
     overflow: hidden;
     font-family: Lucida Grande, sans-serif;
     margin: 0;
+    -webkit-text-size-adjust: none;
 }
 
 iframe, a img {
index 30dae5ff2337992f59899cba0e9a7f177df5dc4f..7f15a8ef4da9fc73ec84b4cabbc9dc988146c714 100644 (file)
@@ -1,3 +1,20 @@
+2007-07-08  Rob Buis  <buis@kde.org>
+
+        Reviewed by Mitz.
+
+        http://bugs.webkit.org/show_bug.cgi?id=14209
+        DRT should be able to deal with text zoom
+
+        Allow increasing/decreasing text zoom using eventSender.
+
+        * DumpRenderTree/DumpRenderTree.m:
+        (runTest):
+        * DumpRenderTree/EventSendingController.m:
+        (+[EventSendingController initialize]):
+        (+[EventSendingController isSelectorExcludedFromWebScript:]):
+        (-[EventSendingController textZoomIn]):
+        (-[EventSendingController textZoomOut]):
+
 2007-07-07  Mark Rowe  <mrowe@apple.com>
 
         Reviewed by Oliver.
index 431849cdacaa207b4117af2d7978a23d8753a897..25731cc6c7b3c9ef6d4cf7cd606d11b24028bcc2 100644 (file)
@@ -1468,6 +1468,7 @@ static void runTest(const char *pathOrURL)
     }
 
     [(EditingDelegate *)[[mainFrame webView] editingDelegate] setAcceptsEditing:YES];
+    [[mainFrame webView] makeTextStandardSize:nil];
     [[mainFrame webView] setTabKeyCyclesThroughElements: YES];
     done = NO;
     topLoadingFrame = nil;
index e3ffbe6662334ca4de265ea71015a83b37b5e0d4..1299634253bac4f40a8aef4e4f9038f21ec8cdbf 100644 (file)
@@ -92,6 +92,8 @@ BOOL replayingSavedEvents;
         @"selectstart",
         @"submit", 
         @"textInput", 
+        @"textzoomin",
+        @"textzoomout",
         @"unload",
         @"zoom",
         nil];
@@ -107,7 +109,9 @@ BOOL replayingSavedEvents;
             || aSelector == @selector(keyDown:withModifiers:)
             || aSelector == @selector(enableDOMUIEventLogging:)
             || aSelector == @selector(fireKeyboardEventsToElement:)
-            || aSelector == @selector(clearKillRing))
+            || aSelector == @selector(clearKillRing)
+            || aSelector == @selector(textZoomIn)
+            || aSelector == @selector(textZoomOut))
         return NO;
     return YES;
 }
@@ -199,6 +203,16 @@ BOOL replayingSavedEvents;
     }
 }
 
+- (void)textZoomIn
+{
+    [[mainFrame webView] makeTextLarger:self];
+}
+
+- (void)textZoomOut
+{
+    [[mainFrame webView] makeTextSmaller:self];
+}
+
 - (void)mouseUp
 {
     if (dragMode && !replayingSavedEvents) {